From t.grent-tjong at donders.ru.nl Tue May 1 09:28:54 2012 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Tue, 1 May 2012 09:28:54 +0200 Subject: [FieldTrip] problem ft_timelockanalysis after using ft_appenddata Message-ID: Hi all, I have encountered a weird problem with ft_timelockanalysis. The problem occurs only when running ft_timelockanalysis on some data from some subjects. I get the following error: averaging trial 239 of 252??? Error using ==> plus Matrix dimensions must agree. Error in ==> ft_timelockanalysis at 298 s = s + dat; % compute the sum This error was produced running ft_timelockanalysis on data that originated from two conditions (INCGR & INCGL), which were concatenated using ft_appenddata (resulting in INCGRL). So, I thought it made sense to test whether something was wrong with one of the two input datasets (likely the second one, since the error occurs while processing one of the last trials originating from the second dataset). So, I ran ft_timelockanalysis on INCGR and INCGL separately, and, believe it or not, no errors this time. But as soon as I concatenate the files again, ft_timelockanalysis reproduces the error. Anyone any idea what the problem could be? Thanks, Tineke Grent - 't Jong Radboud University Medical Centre Nijmegen Donders Institute for Brain, Cognition and Behaviour The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Tue May 1 10:09:49 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Tue, 1 May 2012 10:09:49 +0200 Subject: [FieldTrip] subplot clusterplot Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96@gmail.com> Hi, I am performing a monte-carlo cluster statistic, comparing a 200 ms activation period and a baseline of a spectrogram. I get positive and negative clusters which are significant, and would like to plot them using ft_clusterplot. However, the function gives me 7 subplot (for 7 timepoints) , all so small that one is barely able to identify the highlighted channels. Therefore, I would either like to only plot 1 big topoplot or arrange the subplots differently. Is there a way to plot only one timepoint? I would appreciate any help, Best, Fanny From r.vandermeij at donders.ru.nl Tue May 1 10:52:13 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 1 May 2012 10:52:13 +0200 Subject: [FieldTrip] error in ft_databrowser In-Reply-To: <4F9D3FD4.2050301@gmail.com> References: <4F9D3FD4.2050301@gmail.com> Message-ID: Hey Vitoria, Are you sure you are using an up to date version of FieldTrip? The error mentions a line in ft_plot_text that hasn't been there since at least October last year. Best, Roemer On Sun, Apr 29, 2012 at 3:19 PM, Vitória Magalhães Piai < vitoria.piai at gmail.com> wrote: > Hi there, > > I'm getting the following error when trying ft_databrowser on the output > of ft_componentanalysis (ft_topoplotIC on the same dataset works fine): > > ??? Error using ==> keyvalcheck at 77 > the input argument 'tag' is forbidden > > Error in ==> ft_plot_text at 44 > keyvalcheck(varargin, 'optional', {'hpos', 'vpos', 'width', 'height', > 'hlim', 'vlim', 'Color', .... > > Error in ==> ft_databrowser>redraw_cb at 1346 > ft_plot_text(labelx(laysel), labely(laysel), > opt.hdr.label(chanindx(i)), 'tag', 'timecourse', 'HorizontalAlignment', > 'right'); > > Error in ==> ft_databrowser at 548 > redraw_cb(h); > > I'm using the ft_databrowser version updated on the 25th of April. Is this > a bug? > Thank you, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 1 11:23:06 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 1 May 2012 12:23:06 +0300 Subject: [FieldTrip] Subsampling Message-ID: Hello, Is there anything to do subsampling (ex: decreasing the samples from 2048 to128) during the preprocessing Thanks -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue May 1 11:28:59 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 1 May 2012 11:28:59 +0200 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Hi Hamza, Have a look at ft_resampledata (http://fieldtrip.fcdonders.nl/reference/ft_resampledata). Best, Eelke On 1 May 2012 11:23, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Tue May 1 15:15:27 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 1 May 2012 08:15:27 -0500 Subject: [FieldTrip] subplot clusterplot Message-ID: Fanny, With ft_topoplotER, you can plot the average activation over a time interval rather than activation at a single point, using cfg.xlim; this apparently is not possible with ft_clusterplot (although I haven't used clusterplot recently). And the functionality of ft_clusterplot can be replicated by using cfg.highlightchannel. There is an example at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results(I can also send you my script, which is based on that), although it's for time-locked ERPs; I'm not sure if things will work differently for time-frequency data. Best, Steve Politzer-Ahles Message: 2 > Date: Tue, 1 May 2012 10:09:49 +0200 > From: Fanny Quandt > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] subplot clusterplot > Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I am performing a monte-carlo cluster statistic, comparing a 200 ms > activation period and a baseline of a spectrogram. > I get positive and negative clusters which are significant, and would like > to plot them using ft_clusterplot. > > However, the function gives me 7 subplot (for 7 timepoints) , all so small > that one is barely able to identify the highlighted channels. > > Therefore, I would either like to only plot 1 big topoplot or arrange the > subplots differently. Is there a way to plot only one timepoint? > > I would appreciate any help, > Best, > Fanny > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 1 15:23:42 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 1 May 2012 16:23:42 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Thank you Eelke Hamza On Tue, May 1, 2012 at 12:28 PM, Eelke Spaak wrote: > Hi Hamza, > > Have a look at ft_resampledata > (http://fieldtrip.fcdonders.nl/reference/ft_resampledata). > > Best, > Eelke > > On 1 May 2012 11:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > > to128) during the preprocessing > > > > Thanks > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.N.Maijers at student.ru.nl Tue May 1 20:03:20 2012 From: S.N.Maijers at student.ru.nl (Sander Maijers) Date: Tue, 1 May 2012 20:03:20 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <003d01cd278c$bc6fca40$354f5ec0$@simanova@mpi.nl> References: <20120428160125.521cf366@sander-H57M-USB3> <003d01cd278c$bc6fca40$354f5ec0$@simanova@mpi.nl> Message-ID: <20120501200320.4cc1c1f3@sander-H57M-USB3> Hi Irina, Nice to hear from you again! I will get back in touch with you once I've made enough preparations to redo my experiment. :) I was using the latest version from the source code repository at http://code.google.com/p/fieldtrip/ . I just updated it (to revision 5718), but the error remains. The source code and output for my current experiment script is at http://pastebin.com/zjXKFE0N . (This link will remain active for a day or so.) I intend to convert the experiment script to the new Donders Machine Learning Toolkit, if that is the best way to go forward. Hopefully someone knows what the problem is! Best, Sander On Tue, 1 May 2012 13:22:46 +0200 "Irina Simanova" wrote: > Hi Sander, > > Which version of Fieldtrip are you using? > > I have not been able to replicate your error, however, when I am > trying to run that old piece of code, I am getting a different error > in ft_statistics_crossvalidate ??? Undefined variable "dml" or class > "dml.standardizer" (see below). > > I cc this to Marcel van Gerven. There have been changes introduced to > the multivariate analysis toolbox, and it indeed might explain the > errors. Marcel, is it possible that there are compatibility errors in > the ft_statistics_crossvalidate? Regarding the error that I got: how > should I set the "dml" object when I call the function via Fieldtip? > > Best, > Irina > > cfg = []; > cfg.method = 'crossvalidate'; > cfg.nfolds = 6; > cfg.channel = avg_tls_txt_lp.label(1:60); > cfg.latency = [0 0.7]; > s1 = size(avg_anm_txt_lp.trial,1); > s2 = size(avg_tls_txt_lp.trial,1); > design = [ones(s1,1); ones(s2,1)*2]; > cfg.design = design; > class = ft_timelockstatistics(cfg, avg_anm_txt_lp, avg_tls_txt_lp); > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing > ??? Undefined variable "dml" or class "dml.standardizer". > > Error in ==> ft_statistics_crossvalidate at 44 > cfg.mva = dml.analysis({ ... > > Error in ==> statistics_wrapper at 298 > [stat] = statmethod(cfg, dat, design); > > Error in ==> ft_timelockstatistics at 110 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers > Sent: Saturday, April 28, 2012 4:01 PM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Problem in ft_timelockstatistics() phase > > Hi, > > I am trying to rework a small FieldTrip experiment I did last year > (reproduction of larger experiment done by Irina Simanova). > > Calling ft_timelockstatistics() on two ERP data partitions results in > an error: "Undefined function 'fieldnames' for input arguments of > type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on > Linux. > > I see a possible cause of the problem, in that these data we > pre-analysed with ft_timelockanalysis() a year ago, or longer. I read > them from parts of the data set I was supplied with. Maybe there have > been breaking changes to this function in the meantime? The cfg > struct that I pass as parameter seems in line with the current > documentation, though. > > > LOG: > > >> main() > > data_set_location = > > /media/SAMSUNG/0,data_set/EEG/0 MATLAB > > > output_dir = > > /tmp/EEG > > Data set part file: timelock10_lp > Data set part file: timelock11_lp > > CONTRAST > [class 1, size = 220]: participant timelock10_lp on condition > avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on > condition avg_tls_aud_lp cfg > method: 'crossvalidate' > latency: [0 0.7000] > channel: {1x60 cell} > nfolds: 5 > mva: {2x1 cell} > design: [444x1 double] > > class_1_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [220x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > class_2_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [224x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing fixing > random number generator for reproducibility creating sample indices > using 5-fold cross-validation validating fold 1 of 5 for 1 datasets > validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 > datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 > for 1 datasets Undefined function 'fieldnames' for input arguments of > type 'cell'. > > Error in ft_statistics_crossvalidate (line 84) fn = > fieldnames(stat.model{1}); > > Error in statistics_wrapper (line 298) > [stat] = statmethod(cfg, dat, design); > > Error in ft_timelockstatistics (line 110) [stat, cfg] = > statistics_wrapper(cfg, varargin{:}); > > Error in main/modeling (line 203) > stat = ft_timelockstatistics(cfg, class_1_datastruct, > class_2_datastruct); > > Error in main/statistics (line 225) > stat = modeling(data_set, method, obj_class_1_and_2); > > Error in main/ERP_experiment (line 374) > stats = statistics(data_set, contrasts, method); > > Error in main (line 401) > stats_x = ERP_experiment(data_set_location, 'RR', output_dir) > > > Any suggestions would be welcom! > > Kind regards, > Sander Maijers > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From bibi.raquel at gmail.com Wed May 2 06:09:01 2012 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Wed, 2 May 2012 00:09:01 -0400 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Hamza, Please view the Fieldtrip reference wiki on FT_resampledata. I believe it is what you are looking for. Best, Raquel On Tue, May 1, 2012 at 5:23 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Wed May 2 06:31:25 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 2 May 2012 07:31:25 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Yes, thank you Raquel I also get an answer from Eelke Best On Wed, May 2, 2012 at 7:09 AM, Raquel Bibi wrote: > Hamza, > Please view the Fieldtrip reference wiki on FT_resampledata. I believe it > is what you are looking for. > > Best, > > Raquel > > On Tue, May 1, 2012 at 5:23 AM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Hello, >> >> Is there anything to do subsampling (ex: decreasing the samples from 2048 >> to128) during the preprocessing >> >> Thanks >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Wed May 2 13:19:23 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Wed, 2 May 2012 13:19:23 +0200 Subject: [FieldTrip] subplot clusterplot In-Reply-To: References: Message-ID: Thanks Steve, it worked out well and I now got plots that are actually readable. Best, Fanny Am 01.05.2012 um 15:15 schrieb Stephen Politzer-Ahles: > Fanny, > > With ft_topoplotER, you can plot the average activation over a time interval rather than activation at a single point, using cfg.xlim; this apparently is not possible with ft_clusterplot (although I haven't used clusterplot recently). And the functionality of ft_clusterplot can be replicated by using cfg.highlightchannel. There is an example at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results (I can also send you my script, which is based on that), although it's for time-locked ERPs; I'm not sure if things will work differently for time-frequency data. > > Best, > Steve Politzer-Ahles > > Message: 2 > Date: Tue, 1 May 2012 10:09:49 +0200 > From: Fanny Quandt > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] subplot clusterplot > Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I am performing a monte-carlo cluster statistic, comparing a 200 ms activation period and a baseline of a spectrogram. > I get positive and negative clusters which are significant, and would like to plot them using ft_clusterplot. > > However, the function gives me 7 subplot (for 7 timepoints) , all so small that one is barely able to identify the highlighted channels. > > Therefore, I would either like to only plot 1 big topoplot or arrange the subplots differently. Is there a way to plot only one timepoint? > > I would appreciate any help, > Best, > Fanny > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.rotonda at gmail.com Wed May 2 14:05:14 2012 From: marco.rotonda at gmail.com (Marco Rotonda) Date: Wed, 2 May 2012 14:05:14 +0200 Subject: [FieldTrip] Methodological question on connectivity Message-ID: Hi fieldtrippers, I have some methodological questions on connectivity and I would like to share you my doubts in the hope to solve them. I would like to ask you if I could apply Granger Causality or other connectivity analysis to a non transient event. I mean I would like to know if it is possible to analyse an hypnosis induction. In this case I have not many events to check but only one long session where I could take 2-3 minutes in between. I would like to analyze at the beginning, during the induction and after the induction what's going on. So now my questions are: - is it correct to think using GC in this case? - is it correct to take these 3 moments during the induction and treat them as 3 different conditions? - if yes, how long should be the ideal temporal window (in classical FFT analysis is 4 seconds) Thanks in advance Marco From marco.rotonda at gmail.com Wed May 2 14:06:17 2012 From: marco.rotonda at gmail.com (Marco Rotonda) Date: Wed, 2 May 2012 14:06:17 +0200 Subject: [FieldTrip] Methodological question on connectivity Message-ID: Hi fieldtrippers, I have some methodological questions on connectivity and I would like to share you my doubts in the hope to solve them. I would like to ask you if I could apply Granger Causality or other connectivity analysis to a non transient event. I mean I would like to know if it is possible to analyse an hypnosis induction. In this case I have not many events to check but only one long session where I could take 2-3 minutes in between. I would like to analyze at the beginning, during the induction and after the induction what's going on. So now my questions are: - is it correct to think using GC in this case? - is it correct to take these 3 moments during the induction and treat them as 3 different conditions? - if yes, how long should be the ideal temporal window (in classical FFT analysis is 4 seconds) Thanks in advance Marco From Elena.Orekhova at neuro.gu.se Wed May 2 16:24:53 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Wed, 2 May 2012 14:24:53 +0000 Subject: [FieldTrip] grid problem Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253923E6@exchccr1.neuro.gu.se> Dear fieldtrippers, I try to construct leadfield grid using ft_prepare_leadfield. I use a template MRI (/spm8/canonical/single_subj_T1.nii) and template electrode positions (subsample of /template/electrode/standard_1005.elc). The resulting grid covers only part of the brain. My attempts to extend it manually using cfg.grid.xgrid, cfg.grid.ygrid, cfg.grid.zgrid do not help. The grid is still too small (see the attached figure). My code is: cfg = []; cfg.vol = vol; cfg.channel = {'all', '-HEOG', '-VEOG'} cfg.grid.xgrid = [ -80:10:80]; cfg.grid.ygrid = [ -100:10:100]; cfg.grid.zgrid = [ -110:10:80]; [grid] = ft_prepare_leadfield(cfg, data); Why this happens and what may I do wrong? I am new to the Fieldtrip and I would appreciate any help very much. Thanks, Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grid.tif Type: image/tiff Size: 44684 bytes Desc: grid.tif URL: From alex.santos at mso.umt.edu Wed May 2 18:19:31 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 16:19:31 +0000 Subject: [FieldTrip] loading .txt files Message-ID: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Hello all, I am new using the fieldtrip suite and for now my problem is being the loading of recorded .txt files. These files are simple 36000lines x 9 columns matrices with no headers containing signals I collected previously. I have tried to use the 'ft_preprocessing' file but obviously it did not work. Any help on this matter will be really appreciated. Alex Santos -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed May 2 18:32:13 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 2 May 2012 18:32:13 +0200 Subject: [FieldTrip] loading .txt files In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Message-ID: Dear Alex, Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format I hope this helps, Stephen On 2 May 2012 18:19, Santos, Alex wrote: > Hello all, > I am new using the fieldtrip suite and for now my problem is being the > loading of recorded .txt files. > These files are simple 36000lines x 9 columns matrices with no headers > containing signals I collected previously. I have tried to use the > ‘ft_preprocessing’ file but obviously it did not work. > Any help on this matter will be really appreciated. > > Alex Santos > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 18:42:35 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 16:42:35 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Hi Stephen, The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. I will try the option you suggested and let you know. Thank you very much. Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 10:32 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Dear Alex, Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format I hope this helps, Stephen On 2 May 2012 18:19, Santos, Alex wrote: > Hello all, > I am new using the fieldtrip suite and for now my problem is being the > loading of recorded .txt files. > These files are simple 36000lines x 9 columns matrices with no headers > containing signals I collected previously. I have tried to use the > 'ft_preprocessing' file but obviously it did not work. > Any help on this matter will be really appreciated. > > Alex Santos > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Wed May 2 19:14:53 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 2 May 2012 19:14:53 +0200 Subject: [FieldTrip] loading .txt files In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science > The University of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) > Missoula - Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being the >> loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no headers >> containing signals I collected previously. I have tried to use the >> 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 19:18:50 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 17:18:50 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C58735@UMMAIL03.gs.umt.edu> Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 11:15 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science The University > of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - > Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen > Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_ > defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being >> the loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no >> headers containing signals I collected previously. I have tried to >> use the 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 19:19:21 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 17:19:21 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C58740@UMMAIL03.gs.umt.edu> Thanks Stephen. I will try it and let you know. Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 11:15 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science The University > of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - > Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen > Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_ > defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being >> the loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no >> headers containing signals I collected previously. I have tried to >> use the 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Thu May 3 01:53:03 2012 From: wljj09 at gmail.com (Jing Wang) Date: Thu, 3 May 2012 01:53:03 +0200 Subject: [FieldTrip] About the ft_spikedetection Message-ID: Dear all, I have recently use the function ft_spikedetection to extract spike information from continous data. When I set the cfg.interactive= 'yes' , the function can run well only with the warning that data was not write in to disk in interactive mode. When I change the cfg.interactive ='no' to let the function write the spike into disk, there is a error like this ??? Undefined function or method 'ft_write_spike' for input arguments of type 'struct'. Error in ==> ft_spikedetection at 377 ft_write_spike(datafile, spike, 'dataformat', cfg.dataformat, 'fsample', hdr.Fs, 'TimeStampPerSample', hdr.TimeStampPerSample*hdr.Fs); So, it seems because it did not find the ft_write_spike. I check the latest and old Fieldtrip versions but did not find ft_write_spike neither. I have no idea how to solve this problem. Thank you for your kind help in advance. Any help on this matter will be really appreciated All the best Jing -------------- next part -------------- An HTML attachment was scrubbed... URL: From hame at meg.re.kr Thu May 3 06:29:24 2012 From: hame at meg.re.kr (Hame Park) Date: Thu, 3 May 2012 13:29:24 +0900 Subject: [FieldTrip] comparing time-series Message-ID: Hello I am trying to compare three time series, that is, to find the time windows where the three time series have statistical differences. Can anybody give me some useful advice? I would really appreciate it. THANK YOU! Hame -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu May 3 09:45:03 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 03 May 2012 09:45:03 +0200 Subject: [FieldTrip] comparing time-series In-Reply-To: References: Message-ID: <4FA2377F.9080005@donders.ru.nl> Dear Hame. I would start by looking into the tutorial: http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics If you've done that, you need to think about what precisely you would like to find out. The most intuitive way would be to check for differences between two of the three time series, and that for each combination (1vs2, 2vs3, 1vs3), and then report those differences. Best regards, Jörn On 5/3/2012 6:29 AM, Hame Park wrote: > Hello > > I am trying to compare three time series, that is, > to find the time windows where the three time series > have statistical differences. > > Can anybody give me some useful advice? > > I would really appreciate it. > > THANK YOU! > > Hame > > > _______________________________________________ > 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 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 hamzaf at sabanciuniv.edu Thu May 3 10:23:35 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 11:23:35 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) Message-ID: Hello, I want to average each 10 trials of 100 trials. I don't know what to put in (cfg.trials) I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; It does not work? Note: at the end I want to have a cell of 10 matices, not just one matrix. Any thoughts? Best, -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 3 10:36:13 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 3 May 2012 10:36:13 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Dear Hamza, Fieldtrip functions in generally do not work on several different 'sets' of data at the same time. Call the function you are using (e.g. ft_timelockanalysis) separately for every set of trials and if you want put the output in a matrix{1:10} of datastructures (e.g. timelock). You can easily put it in a loop. Something like this: for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; yourtimelockdata{i} = ft_function(cfg,yourdata) end Hope this helps, Stephen On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I want to average each 10 trials of 100 trials. > I don't know what to put in (cfg.trials) > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > It does not work? > > Note: at the end I want to have a cell of 10 matices, not just one matrix. > > Any thoughts? > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 3 10:44:30 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 11:44:30 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Yes, it helps a lot Thanks Stephen Hamza On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Fieldtrip functions in generally do not work on several different > 'sets' of data at the same time. > Call the function you are using (e.g. ft_timelockanalysis) separately > for every set of trials and if you want put the output in a > matrix{1:10} of datastructures (e.g. timelock). > You can easily put it in a loop. Something like this: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > yourtimelockdata{i} = ft_function(cfg,yourdata) > end > > Hope this helps, > Stephen > > > On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > I want to average each 10 trials of 100 trials. > > I don't know what to put in (cfg.trials) > > > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > > > It does not work? > > > > Note: at the end I want to have a cell of 10 matices, not just one > matrix. > > > > Any thoughts? > > > > Best, > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Thu May 3 11:09:52 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 12:09:52 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hello again, But I need to process my data later by ft_timelockstatistics. I don't think this funtion accepts cell containing many structs. I think its better to do average manually then call ft_lockanalysis, then ft_timelockstatistics. Right? Hamza On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Fieldtrip functions in generally do not work on several different > 'sets' of data at the same time. > Call the function you are using (e.g. ft_timelockanalysis) separately > for every set of trials and if you want put the output in a > matrix{1:10} of datastructures (e.g. timelock). > You can easily put it in a loop. Something like this: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > yourtimelockdata{i} = ft_function(cfg,yourdata) > end > > Hope this helps, > Stephen > > > On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > I want to average each 10 trials of 100 trials. > > I don't know what to put in (cfg.trials) > > > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > > > It does not work? > > > > Note: at the end I want to have a cell of 10 matices, not just one > matrix. > > > > Any thoughts? > > > > Best, > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 3 11:20:23 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 3 May 2012 11:20:23 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Dear Hamza, Actually, the statistic functions DO accept cellstructures of datastructures, and what I suggested is therefor very convenient, especially in that regard. Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I would recommend walking through it from the beginning, but you could take a particular look at the statistics section. In there I try to explain the data structure handling in detail which deals with your question. Cheers, Stephen On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) wrote: > Hello again, > > But I need to process my data later by ft_timelockstatistics. > I don't think this funtion accepts cell containing many structs. > > I think its better to do average manually then call ft_lockanalysis, then > ft_timelockstatistics. Right? > > Hamza > > > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh > wrote: >> >> Dear Hamza, >> >> Fieldtrip functions in generally do not work on several different >> 'sets' of data at the same time. >> Call the function you are using (e.g. ft_timelockanalysis) separately >> for every set of trials and if you want put the output in a >> matrix{1:10} of datastructures (e.g. timelock). >> You can easily put it in a loop. Something like this: >> >> for i = 1:10 >>     cfg = []; >>     cfg.trials = [(i-1)*10+1 : i*10]; >>     yourtimelockdata{i} = ft_function(cfg,yourdata) >> end >> >> Hope this helps, >> Stephen >> >> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello, >> > >> > I want to average each 10 trials of 100 trials. >> > I don't know what to put in (cfg.trials) >> > >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >> > >> > It does not work? >> > >> > Note: at the end I want to have a cell of 10 matices, not just one >> > matrix. >> > >> > Any thoughts? >> > >> > Best, >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 3 11:28:23 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 12:28:23 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Thanks a lot Stephen for your help, Hamza On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Actually, the statistic functions DO accept cellstructures of > datastructures, and what I suggested is therefor very convenient, > especially in that regard. > Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I > would recommend walking through it from the beginning, but you could > take a particular look at the statistics section. In there I try to > explain the data structure handling in detail which deals with your > question. > > Cheers, > Stephen > > On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) > wrote: > > Hello again, > > > > But I need to process my data later by ft_timelockstatistics. > > I don't think this funtion accepts cell containing many structs. > > > > I think its better to do average manually then call ft_lockanalysis, then > > ft_timelockstatistics. Right? > > > > Hamza > > > > > > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh > > wrote: > >> > >> Dear Hamza, > >> > >> Fieldtrip functions in generally do not work on several different > >> 'sets' of data at the same time. > >> Call the function you are using (e.g. ft_timelockanalysis) separately > >> for every set of trials and if you want put the output in a > >> matrix{1:10} of datastructures (e.g. timelock). > >> You can easily put it in a loop. Something like this: > >> > >> for i = 1:10 > >> cfg = []; > >> cfg.trials = [(i-1)*10+1 : i*10]; > >> yourtimelockdata{i} = ft_function(cfg,yourdata) > >> end > >> > >> Hope this helps, > >> Stephen > >> > >> > >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > >> wrote: > >> > Hello, > >> > > >> > I want to average each 10 trials of 100 trials. > >> > I don't know what to put in (cfg.trials) > >> > > >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > >> > > >> > It does not work? > >> > > >> > Note: at the end I want to have a cell of 10 matices, not just one > >> > matrix. > >> > > >> > Any thoughts? > >> > > >> > Best, > >> > > >> > -- > >> > Hamza Fawzi Altakroury > >> > Graduate student - MA > >> > Faculty of Engineering and Natural Sciences > >> > Sabancı University > >> > > >> > _______________________________________________ > >> > fieldtrip mailing list > >> > fieldtrip at donders.ru.nl > >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkuepper at uni-muenster.de Thu May 3 14:58:18 2012 From: pkuepper at uni-muenster.de (=?ISO-8859-15?Q?P_K=FCpper?=) Date: Thu, 03 May 2012 14:58:18 +0200 Subject: [FieldTrip] ft_spikedetection Message-ID: <4FA280EA.7080503@uni-muenster.de> Hello, using "ft_spikedetection.m" I get the error message referring to a function called "ft_write_spike.m". I cannot find this function included in the current package (fieldtrip-20120423). The included function "write_fcdc_spike.m" is marked as deprecated. Can anyone help with this issue? Thanks P Kuepper Institute for Biomagnetism and Biosignalanalysis University of Muenster From irina.simanova at mpi.nl Thu May 3 16:43:08 2012 From: irina.simanova at mpi.nl (Irina Simanova) Date: Thu, 3 May 2012 16:43:08 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <20120428160125.521cf366@sander-H57M-USB3> References: <20120428160125.521cf366@sander-H57M-USB3> Message-ID: <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> Hi Sander, The multivariate analysis module is now being re-structured, so that it will eventually become a stand-alone toolbox - Donders Machine Learning Toolbox, DMLT. Your error is caused by a conflict between the old and the new versions of the functions. You should just change the way you specify the mva method: cfg.mva = {dml.standardizer dml.svm} (check the reference to ft_statistics_crossvalidate) It should work then. Best, Irina -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers Sent: Saturday, April 28, 2012 4:01 PM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Problem in ft_timelockstatistics() phase Hi, I am trying to rework a small FieldTrip experiment I did last year (reproduction of larger experiment done by Irina Simanova). Calling ft_timelockstatistics() on two ERP data partitions results in an error: "Undefined function 'fieldnames' for input arguments of type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on Linux. I see a possible cause of the problem, in that these data we pre-analysed with ft_timelockanalysis() a year ago, or longer. I read them from parts of the data set I was supplied with. Maybe there have been breaking changes to this function in the meantime? The cfg struct that I pass as parameter seems in line with the current documentation, though. LOG: >> main() data_set_location = /media/SAMSUNG/0,data_set/EEG/0 MATLAB output_dir = /tmp/EEG Data set part file: timelock10_lp Data set part file: timelock11_lp CONTRAST [class 1, size = 220]: participant timelock10_lp on condition avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on condition avg_tls_aud_lp cfg method: 'crossvalidate' latency: [0 0.7000] channel: {1x60 cell} nfolds: 5 mva: {2x1 cell} design: [444x1 double] class_1_data__struct avg: [62x501 double] var: [62x501 double] fsample: 500 time: [1x501 double] dof: [62x501 double] label: {62x1 cell} trial: [220x62x501 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] class_2_data__struct avg: [62x501 double] var: [62x501 double] fsample: 500 time: [1x501 double] dof: [62x501 double] label: {62x1 cell} trial: [224x62x501 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] selected 60 channels selected 351 time bins selected 1 frequency bins using "ft_statistics_crossvalidate" for the statistical testing fixing random number generator for reproducibility creating sample indices using 5-fold cross-validation validating fold 1 of 5 for 1 datasets validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 for 1 datasets Undefined function 'fieldnames' for input arguments of type 'cell'. Error in ft_statistics_crossvalidate (line 84) fn = fieldnames(stat.model{1}); Error in statistics_wrapper (line 298) [stat] = statmethod(cfg, dat, design); Error in ft_timelockstatistics (line 110) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in main/modeling (line 203) stat = ft_timelockstatistics(cfg, class_1_datastruct, class_2_datastruct); Error in main/statistics (line 225) stat = modeling(data_set, method, obj_class_1_and_2); Error in main/ERP_experiment (line 374) stats = statistics(data_set, contrasts, method); Error in main (line 401) stats_x = ERP_experiment(data_set_location, 'RR', output_dir) Any suggestions would be welcom! Kind regards, Sander Maijers _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From joscha.schmiedt at esi-frankfurt.de Thu May 3 16:48:32 2012 From: joscha.schmiedt at esi-frankfurt.de (Schmiedt, Joscha) Date: Thu, 3 May 2012 14:48:32 +0000 Subject: [FieldTrip] isrealmat & isrealvec Message-ID: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> Dear Fieldtrip community, I'd like to use the Fieldtrip framework for my spike data analysis, but encountered something strange: a couple of spike analysis-related functions (e.g. ft_spikedensity, ft_spike_plot_raster) make use of the functions isrealmat and isrealvec, which seem to be non-standard matlab functions and also not present in the standard Fieldtrip installation. I'm using Matlab R2011a and a pretty recent version of Fieldtrip (ft_spikedensity.m 5157 2012-01-22 14:49:34Z, ft_spike_plot_raster.m 5157 2012-01-22 14:49:34Z). Did I miss something there? Though it is easy to implement these functions, I'd very happy about any hints on this issue. Thanks! Best, Joscha From Christos.Papadelis at childrens.harvard.edu Thu May 3 21:08:52 2012 From: Christos.Papadelis at childrens.harvard.edu (Papadelis, Christos) Date: Thu, 3 May 2012 19:08:52 +0000 Subject: [FieldTrip] Research Technologist, Boston, MA Message-ID: <876E0E5B34DB6A4DBD0E65B9091B435010D4AB63@CHEXMBX2A.CHBOSTON.ORG> Research Technologist, Boston, MA The MEG program at Children’s Hospital Boston (CHB)/HMS is now recruiting a Research Technologist. The successful candidate will work as a member of the team to help carry out studies of human brain development using a combination of MEG, EEG and MRI (tractography). This position is best for a person interested in working with babies and children, studying brain development either as a career or as an educational/training opportunity for further studies. Below is a description of the responsibilities and minimum and preferred qualifications. Responsibilities: o Acquisition/collection of MEG and related data (i.e. EEG, EOG, Polaris, Polhemus etc). o Ordering of supplies and equipment for the lab. o Scheduling healthy subjects and patients for the different studies running in the lab. o Analysis and evaluation of MEG and related data for investigators by using sophisticated software analysis tools such as BrainStorm, FieldTrip, BESA, etc. o Training of members of the Center and external users in the acceptable use and maintenance of the BabyMEG System hardware and software. o Performance of periodic liquid helium refills of the BabyMEG system, three times per week. o Maintains all safety documentation of the laboratory as well as the IRB approved signed consent forms of the different studies running in the lab. o Preparation of documents concerning the smooth operation of the lab (family education sheets, brochures, technical specifications documents, liquid helium refill records, etc). o Performance of routine tests for specific research projects, using sophisticated and intricate research equipment and techniques. Performance of research procedures, troubleshooting problems with own and other researchers' results. Minimum qualifications: o MSc or MA in the area of Biomedical Engineering or Neuroscience is preferred. The minimum requirement is BA or BSc degree in Biomedical, Electrical or Computer Engineering, or in a Biological Science. Previous experience in Biomagnetism research is not required. o Basic understanding of the electromagnetic theory needed for signal analysis. o Native speaker of English is preferred. Required is complete fluency in English since there will be frequent interactions with the family members as well as children. Abilities to relate to children and their parents are essential. Conditions of Employment: o Position available beginning June 2012. o Salary: commensurate with education and experience (minimum = $ 40,000). o CHB has excellent benefits, including health benefits and retirement plans with employer contributions. o CHB values diversity and is committed to equal opportunity in employment. How to Apply: o Please visit the website of Children's Hospital Boston (www.childrenshospital.jobs) AutoReqID 27106. o If you have any questions please contact: Christos Papadelis Lab Manager of the BabyMEG/EEG Facility Children’s Hospital Boston/Harvard Medical School 9 Hope Ave, Waltham MA 02453, USA E-mail: christos.papadelis at childrens.harvard.edu Phone: +1-781-216-1128 ______________________________________________ Christos Papadelis, PhD Instructor in Neurology, Harvard Medical School MEG Lab Manager, Children's Hospital Boston 9 Hope Avenue Waltham, MA 02453 USA Phone: +1-781-216-1128 Fax: +1-781-216-1172 From r.oostenveld at donders.ru.nl Thu May 3 21:40:32 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 3 May 2012 21:40:32 +0200 Subject: [FieldTrip] isrealmat & isrealvec In-Reply-To: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> References: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <2818E365-AAE5-45AC-8303-7651E8E5D16E@donders.ru.nl> Dear Josha, Hmm, those functions seem to be part of the "Identification_Toolbox". No idea what that toolbox does, but our University has a few licenses for it, that is why the use of that external toolbox went undetected. Of course there is no reason to use an external toolbox for such simple functions. I'll add a replacement implementation to FieldTrip. See already attached for the two functions, please put them in your fieldtrip/private folder. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: isrealmat.m Type: application/octet-stream Size: 1573 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: isrealvec.m Type: application/octet-stream Size: 1606 bytes Desc: not available URL: -------------- next part -------------- On 3 May 2012, at 16:48, Schmiedt, Joscha wrote: > Dear Fieldtrip community, > > I'd like to use the Fieldtrip framework for my spike data analysis, but > encountered something strange: a couple of spike analysis-related > functions (e.g. ft_spikedensity, ft_spike_plot_raster) make use of the > functions isrealmat and isrealvec, which seem to be non-standard matlab > functions and also not present in the standard Fieldtrip installation. > I'm using Matlab R2011a and a pretty recent version of Fieldtrip > (ft_spikedensity.m 5157 2012-01-22 14:49:34Z, ft_spike_plot_raster.m > 5157 2012-01-22 14:49:34Z). > > Did I miss something there? Though it is easy to implement these > functions, I'd very happy about any hints on this issue. Thanks! > > Best, > Joscha > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Elena.Orekhova at neuro.gu.se Fri May 4 08:50:08 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Fri, 4 May 2012 06:50:08 +0000 Subject: [FieldTrip] SAM option in ft_sourceanalysis Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> Dear fieldtrippers! I tried to use SAM beamformer for the EEG analysis, But I have got en error (see below). I guess that there is a bug in ‘beamformer_sam’at line 112. I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in ‘ft_sourceanalysis’? Thanks, Elena *********************** Error using * Inner matrix dimensions must agree. Error in beamformer_sam (line 112) inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Fri May 4 14:51:47 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Fri, 4 May 2012 14:51:47 +0200 Subject: [FieldTrip] WARNING: The input units are cm for points and S/cm for conductivity Message-ID: Dear all, I am getting the following error message when using ft_sourceanalysis: WARNING: The input units are cm for points and S/cm for conductivity Is this something that could affect my results or can I simply ignore it? Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Fri May 4 16:21:43 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Fri, 4 May 2012 16:21:43 +0200 Subject: [FieldTrip] computing the covariance matrix from trials with different lengths Message-ID: Dear all, I want to do a beamforming analysis using the LCMV beamformer on MEG resting state activity. After the artifcat rejection, my data is chopped into trials of different lengths. My question is related as to how to compute the covariance matrix. If I use cfg = []; cfg.vartrllength = 2; cov = ft_timelockanalysis(cfg,data); a covariance matrix will be computed for each trial while padding all the segments that are smaller than the longest segment with zeros. I believe that in the end the average covariance matrix across the trials is used. Am I correct? Another alternative would be to chop all the trials into epochs of the same length, ie 2 seconds. cfg = []; cfg.trllength = 2; data = ft_redefinetrial(cfg,data); cfg = []; cfg.vartrllength = 0; cov = ft_timelockanalysis(cfg,data); Finally, one could also concatenate all the trials into one long epoch and run the same code. I would be curious to know what the differences would be regarding the computation of the covariance matrix and which would be the most appropriate way to do this. Any suggestions, help or comments would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.santos at mso.umt.edu Fri May 4 16:23:53 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Fri, 4 May 2012 14:23:53 +0000 Subject: [FieldTrip] time-resolved coherence Message-ID: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> Hello everybody, I am looking forward to do coherence analysis between EMG signals on a time continuum so I could verify any modulation of this estimate along my trials. Has anyone done that ? Alex Alex Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Fri May 4 18:10:01 2012 From: michael.wibral at web.de (Michael Wibral) Date: Fri, 4 May 2012 18:10:01 +0200 (CEST) Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Fri May 4 20:56:19 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Fri, 4 May 2012 21:56:19 +0300 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> Message-ID: Dear Elena I used it recently with MEG data and local spheres model I don't think it could work with eeg but I don't know. Yuval On 4 May 2012 09:50, Elena Orekhova wrote: > Dear fieldtrippers! > > > > I tried to use SAM beamformer for the EEG analysis, > > But I have got en error (see below). > > I guess that there is a bug in ‘beamformer_sam’at line 112. > > > > I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in > ‘ft_sourceanalysis’? > > > > Thanks, > > Elena > > > > *********************** > > Error using * > > Inner matrix dimensions must agree. > > > > Error in beamformer_sam (line 112) > > inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); > > > > Error in ft_sourceanalysis (line 849) > > dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), > > squeeze(Cy(i,:,:)), optarg{:}); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 06:43:47 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 07:43:47 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Thanks Michael Hamza On Fri, May 4, 2012 at 7:10 PM, Michael Wibral wrote: > Hi Hamza, > > if you serach for downsampling instead of subsampling you should find an > FT function. > > Best Michael > > *Gesendet:* Dienstag, 01. Mai 2012 um 11:23 Uhr > *Von:* "Hamza Fawzi Altakroury (Student)" > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* [FieldTrip] Subsampling > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 11:15:40 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 12:15:40 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hello again Stephen and for all, I could not find out how to enter the following sturct into the ft_timelockstatistics function The input is generated using the following loop: for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); end and for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; avgP300{i} = ft_timelockanalysis(cfg,p300); end Then I use cfg = []; cfg.layout = 'CTF275.lay'; cfg.method = 'crossvalidate'; cfg.design = [ones(10,1); 2*ones(10,1)]'; stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); I get the following error ??? Error using ==> ft_checkdata at 307 This function requires timelock data as input. Error in ==> ft_timelockstatistics at 75 varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', 'feedback', 'no'); Error in ==> test05 at 11 stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); Any thoughts Hamza On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Thanks a lot Stephen for your help, > > Hamza > > > > On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Dear Hamza, >> >> Actually, the statistic functions DO accept cellstructures of >> datastructures, and what I suggested is therefor very convenient, >> especially in that regard. >> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >> would recommend walking through it from the beginning, but you could >> take a particular look at the statistics section. In there I try to >> explain the data structure handling in detail which deals with your >> question. >> >> Cheers, >> Stephen >> >> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello again, >> > >> > But I need to process my data later by ft_timelockstatistics. >> > I don't think this funtion accepts cell containing many structs. >> > >> > I think its better to do average manually then call ft_lockanalysis, >> then >> > ft_timelockstatistics. Right? >> > >> > Hamza >> > >> > >> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >> > wrote: >> >> >> >> Dear Hamza, >> >> >> >> Fieldtrip functions in generally do not work on several different >> >> 'sets' of data at the same time. >> >> Call the function you are using (e.g. ft_timelockanalysis) separately >> >> for every set of trials and if you want put the output in a >> >> matrix{1:10} of datastructures (e.g. timelock). >> >> You can easily put it in a loop. Something like this: >> >> >> >> for i = 1:10 >> >> cfg = []; >> >> cfg.trials = [(i-1)*10+1 : i*10]; >> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >> >> end >> >> >> >> Hope this helps, >> >> Stephen >> >> >> >> >> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >> >> wrote: >> >> > Hello, >> >> > >> >> > I want to average each 10 trials of 100 trials. >> >> > I don't know what to put in (cfg.trials) >> >> > >> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >> >> > >> >> > It does not work? >> >> > >> >> > Note: at the end I want to have a cell of 10 matices, not just one >> >> > matrix. >> >> > >> >> > Any thoughts? >> >> > >> >> > Best, >> >> > >> >> > -- >> >> > Hamza Fawzi Altakroury >> >> > Graduate student - MA >> >> > Faculty of Engineering and Natural Sciences >> >> > Sabancı University >> >> > >> >> > _______________________________________________ >> >> > fieldtrip mailing list >> >> > fieldtrip at donders.ru.nl >> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> > >> > >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 11:46:26 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 12:46:26 +0300 Subject: [FieldTrip] Reading multiple files Message-ID: Hello, I am planning to process the data of multiple files (training and test over multiple sessions). Is there a way to read more than one file then combine their data? Or combine the bdf files before reading them? Hamza -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.N.Maijers at student.ru.nl Sat May 5 11:54:25 2012 From: S.N.Maijers at student.ru.nl (Sander Maijers) Date: Sat, 5 May 2012 11:54:25 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> References: <20120428160125.521cf366@sander-H57M-USB3> <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> Message-ID: <20120505115425.4441dd23@sander-H57M-USB3> Hi Irina, Thank you for your solution! I changed the code as per your suggestion, and other shortcomings too. It works correctly now. I will start working further on the experiment (correcting the remaining issues, and expand its scope a bit I hope). I will ask you if I have questions. I was aware of the DMLT effort, and I had installed it already. Perhaps I am mistaken, but I could not find clear guidance about the transition between the old FieldTrip function names and the the new DMLT names. Thanks for your help and dedication. Best, Sander On Thu, 3 May 2012 16:43:08 +0200 "Irina Simanova" wrote: > Hi Sander, > > The multivariate analysis module is now being re-structured, so that > it will eventually become a stand-alone toolbox - Donders Machine > Learning Toolbox, DMLT. Your error is caused by a conflict between > the old and the new versions of the functions. You should just change > the way you specify the mva method: cfg.mva = {dml.standardizer > dml.svm} (check the reference to ft_statistics_crossvalidate) > It should work then. > > Best, > Irina > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers > Sent: Saturday, April 28, 2012 4:01 PM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Problem in ft_timelockstatistics() phase > > Hi, > > I am trying to rework a small FieldTrip experiment I did last year > (reproduction of larger experiment done by Irina Simanova). > > Calling ft_timelockstatistics() on two ERP data partitions results in > an error: "Undefined function 'fieldnames' for input arguments of > type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on > Linux. > > I see a possible cause of the problem, in that these data we > pre-analysed with ft_timelockanalysis() a year ago, or longer. I read > them from parts of the data set I was supplied with. Maybe there have > been breaking changes to this function in the meantime? The cfg > struct that I pass as parameter seems in line with the current > documentation, though. > > > LOG: > > >> main() > > data_set_location = > > /media/SAMSUNG/0,data_set/EEG/0 MATLAB > > > output_dir = > > /tmp/EEG > > Data set part file: timelock10_lp > Data set part file: timelock11_lp > > CONTRAST > [class 1, size = 220]: participant timelock10_lp on condition > avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on > condition avg_tls_aud_lp cfg > method: 'crossvalidate' > latency: [0 0.7000] > channel: {1x60 cell} > nfolds: 5 > mva: {2x1 cell} > design: [444x1 double] > > class_1_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [220x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > class_2_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [224x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing fixing > random number generator for reproducibility creating sample indices > using 5-fold cross-validation validating fold 1 of 5 for 1 datasets > validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 > datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 > for 1 datasets Undefined function 'fieldnames' for input arguments of > type 'cell'. > > Error in ft_statistics_crossvalidate (line 84) fn = > fieldnames(stat.model{1}); > > Error in statistics_wrapper (line 298) > [stat] = statmethod(cfg, dat, design); > > Error in ft_timelockstatistics (line 110) [stat, cfg] = > statistics_wrapper(cfg, varargin{:}); > > Error in main/modeling (line 203) > stat = ft_timelockstatistics(cfg, class_1_datastruct, > class_2_datastruct); > > Error in main/statistics (line 225) > stat = modeling(data_set, method, obj_class_1_and_2); > > Error in main/ERP_experiment (line 374) > stats = statistics(data_set, contrasts, method); > > Error in main (line 401) > stats_x = ERP_experiment(data_set_location, 'RR', output_dir) > > > Any suggestions would be welcom! > > Kind regards, > Sander Maijers > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Sat May 5 16:24:28 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 5 May 2012 09:24:28 -0500 Subject: [FieldTrip] Reading multiple files Message-ID: Hello Hamza, Does http://fieldtrip.fcdonders.nl/reference/ft_appenddata do what you need? Best, Steve > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 5 May 2012 12:46:26 +0300 > From: "Hamza Fawzi Altakroury (Student)" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Reading multiple files > Message-ID: > > > Content-Type: text/plain; charset="utf-8" > > Hello, > > I am planning to process the data of multiple files (training and test over > multiple sessions). > Is there a way to read more than one file then combine their data? Or > combine the bdf files before reading them? > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabanc? University > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120505/a5c5ae35/attachment-0001.html > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 5 20:38:12 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 5 May 2012 20:38:12 +0200 Subject: [FieldTrip] time-resolved coherence In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> Message-ID: Hi Alex, Yes, this has been done, see for example: http://www.sciencemag.org/content/308/5718/111.abstract Best wishes, Jan-Mathijs On May 4, 2012, at 4:23 PM, Santos, Alex wrote: > Hello everybody, > I am looking forward to do coherence analysis between EMG signals on a time continuum so I could verify any modulation of this estimate along my trials. > Has anyone done that ? > Alex > > Alex Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science > The University of Montana > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 5 21:15:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 5 May 2012 21:15:27 +0200 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis References: <4F97AD41.8090304@biomag.uni-jena.de> Message-ID: <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> Dear Theresa, I am forwarding your questions to the discussion list, as this is the forum on which we discuss this type of issues. Other people may benefit from it too, or may feel inclined to answer. Cheers, Jan-Mathijs Begin forwarded message: > From: Theresa Götz > Date: April 25, 2012 9:52:33 AM GMT+02:00 > To: j.schoffelen at donders.ru.nl > Subject: Question about unit of the wavelet analysis > > Dear Jan-Mathijs Schoeffelen, > > we have a question about the unit of the time-frequency power spectrum: > maybe you can help me with that. > > 1. In fieldtrip, we performed ft_frequanalysis with method 'wavelet' and > output 'power'. What is the exact unit of the resulting power spectrum > (e.g. V/sqrt(hz) or V^2/Hz or V^2 or V)? > > 2. Why does the amplitude of power spectrum decrease toward higher > frequencies even though we keep the amplitude of the input sine wave (in > time domain) constant? > > Thank you very much. > > Best, > Theresa > > > > > -- > Bitte denken Sie an die Umwelt, bevor Sie diese e-Mail ausdrucken. > > > Dr. Theresa Götz Phone: +49-3641-9325780 > University Hospital Jena Fax: +49-3641-9325772 > Dept. for Neurology > Biomagnetic Center > > Erlanger Allee 101 > D-07747 Jena > Germany > > > > > Universitätsklinikum Jena > Körperschaft des öffentlichen Rechts und > Teilkörperschaft der Friedrich-Schiller-Universität Jena > Bachstraße 18, 07743 Jena > > Verwaltungsratsvorsitzender: Prof. Dr. Thomas Deufel > Medizinischer Vorstand: Prof. Dr. Klaus Höffken > Wissenschaftlicher Vorstand: Prof. Dr. Klaus Benndorf > Kaufmännischer Vorstand und > Sprecher des Klinikumsvorstandes: Dr. Brunhilde Seidel-Kwem > > Bankverbindung: Sparkasse Jena > BLZ: 830 530 30, Kto.: 221 > > Gerichtsstand Jena > Steuernummer: 161/144/02978 USt.-IdNr. : DE 150545777 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Sun May 6 13:51:20 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sun, 6 May 2012 13:51:20 +0200 Subject: [FieldTrip] WARNING: The input units are cm for points and S/cm for conductivity In-Reply-To: References: Message-ID: Hi Fred As long as you are fine with arbitrary units of your results, you don't have to worry. We are working towards better support of units throughout the whole code, to allow computations return well-defined values and not "arbitrary units". This has the consequence that for a lot of data objects the physical units have to be added. In some cases we need backward compatibility and have to "guess" the units on the fly. At places where different physical units meet (i.e. in source reconstruction where conductivity, space/distance, and field strength come together), the units of the inputs have to be matched (i.e. all have to be converted to SI units). The purpose of the specific warning is indeed not clear. For now I have disabled it in the code. best Robert On 4 May 2012, at 14:51, Frederic Roux wrote: > Dear all, > > I am getting the following error message when using ft_sourceanalysis: > > WARNING: The input units are cm for points and S/cm for conductivity > > Is this something that could affect my results or can I simply ignore it? > > Best, > Fred > > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Sun May 6 20:22:01 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 6 May 2012 21:22:01 +0300 Subject: [FieldTrip] Reading multiple files In-Reply-To: References: Message-ID: Hello, I found a way to merges files. Hamza On Sat, May 5, 2012 at 12:46 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > I am planning to process the data of multiple files (training and test > over multiple sessions). > Is there a way to read more than one file then combine their data? Or > combine the bdf files before reading them? > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Sun May 6 22:50:02 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 6 May 2012 20:50:02 +0000 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> >Dear Elena >I used it recently with MEG data and local spheres model >I don't think it could work with eeg but I don't know. >Yuval Hi again, Theoretically SAM should work for EEG as well. Is there any particular reason it does not? I have found a previous message by Don Rojas and introduced the lambda correction he suggested. Now there is another error (see below). Dear developers, what is wrong? I would be very grateful for help! Elena *********************** sourcepst = ft_sourceanalysis(cfg, tlckavgpst); the input is timelock data with 30 channels and 1250 timebins using headmodel specified in the configuration using electrodes specified in the configuration creating dipole grid based on user specified dipole positions 15156 dipoles inside, 11814 dipoles outside brain the call to "ft_prepare_sourcemodel" took 0 seconds and an estimated 1 MB scanning repetition 1 using precomputed leadfields scanning grid Undefined function 'SAM_costfun' for input arguments of type 'double'. Error in fminsearch (line 191) fv(:,1) = funfcn(x,varargin{:}); Error in beamformer_sam (line 157) [opt_angle, fval, exitflag, output] = fminsearch('SAM_costfun', all_angles(min_ind), optim_options, vox_pos, tanu, tanv, lf, all_cov, inv_cov, noise_cov); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); ************************ ________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of Yuval Harpaz [yuvharpaz at gmail.com] Sent: Friday, May 04, 2012 8:56 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] SAM option in ft_sourceanalysis Dear Elena I used it recently with MEG data and local spheres model I don't think it could work with eeg but I don't know. Yuval On 4 May 2012 09:50, Elena Orekhova > wrote: Dear fieldtrippers! I tried to use SAM beamformer for the EEG analysis, But I have got en error (see below). I guess that there is a bug in ‘beamformer_sam’at line 112. I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in ‘ft_sourceanalysis’? Thanks, Elena *********************** Error using * Inner matrix dimensions must agree. Error in beamformer_sam (line 112) inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Mon May 7 02:49:14 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Sun, 6 May 2012 20:49:14 -0400 Subject: [FieldTrip] Artifact rejection using 'summary' mode Message-ID: Dear all FTers I want to use the artifact rejection module in the 'summary' mode. My data have just one channel (single electrode LFP recording), so, I want to summarize just the trial information (for trial rejection). Is it possible? Cheers Y -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Mon May 7 07:52:29 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Mon, 7 May 2012 08:52:29 +0300 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> Message-ID: Hi well, talking to Dr. Robinson he said he tried to make it work for EEG but since the impedance is unknown and may change during the experiment the forward solution wasn't stable enough. I noticed the fieldtrip team followed up on Dr. Robinson's SAM on few issues. since at the time it only worked with local spheres (or a single sphere but not with Nolte) sam in fieldtrip does not allow single shell for example. on the other hand, dipole orientation is not set according to Dr. Robinson's method (there is "stephen's" method there but it doesn't work now) so maybe fieldtrip went beyond Dr. Robinson and adjusted sam for EEG. Yuval On 6 May 2012 23:50, Elena Orekhova wrote: > >Dear Elena > >I used it recently with MEG data and local spheres model > >I don't think it could work with eeg but I don't know. > >Yuval > > Hi again, > Theoretically SAM should work for EEG as well. Is there any particular > reason it does not? > > I have found a previous message by Don Rojas and introduced the lambda > correction he suggested. > Now there is another error (see below). > > Dear developers, what is wrong? I would be very grateful for help! > > Elena > > > *********************** > sourcepst = ft_sourceanalysis(cfg, tlckavgpst); > the input is timelock data with 30 channels and 1250 timebins > using headmodel specified in the configuration > using electrodes specified in the configuration > creating dipole grid based on user specified dipole positions > 15156 dipoles inside, 11814 dipoles outside brain > the call to "ft_prepare_sourcemodel" took 0 seconds and an estimated 1 MB > scanning repetition 1 > using precomputed leadfields > scanning grid > Undefined function 'SAM_costfun' for input arguments of type 'double'. > > Error in fminsearch (line 191) > fv(:,1) = funfcn(x,varargin{:}); > > Error in beamformer_sam (line 157) > [opt_angle, fval, exitflag, output] = fminsearch('SAM_costfun', > all_angles(min_ind), optim_options, vox_pos, tanu, tanv, lf, all_cov, > inv_cov, noise_cov); > > > Error in ft_sourceanalysis (line 849) > dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), optarg{:}); > ************************ > > ------------------------------ > *From:* fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > on behalf of Yuval Harpaz [yuvharpaz at gmail.com] > *Sent:* Friday, May 04, 2012 8:56 PM > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] SAM option in ft_sourceanalysis > Dear Elena > I used it recently with MEG data and local spheres model > I don't think it could work with eeg but I don't know. > Yuval > > On 4 May 2012 09:50, Elena Orekhova wrote: > >> Dear fieldtrippers! >> >> >> >> I tried to use SAM beamformer for the EEG analysis, >> >> But I have got en error (see below). >> >> I guess that there is a bug in ‘beamformer_sam’at line 112. >> >> >> >> I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in >> ‘ft_sourceanalysis’? >> >> >> >> Thanks, >> >> Elena >> >> >> >> *********************** >> >> Error using * >> >> Inner matrix dimensions must agree. >> >> >> >> Error in beamformer_sam (line 112) >> >> inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); >> >> >> >> Error in ft_sourceanalysis (line 849) >> >> dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), >> >> squeeze(Cy(i,:,:)), optarg{:}); >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Mon May 7 10:00:51 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Mon, 7 May 2012 10:00:51 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hi Fawzi, If you do: stat = ft_timelockstatistics(cfg,avgP300{:},avgnonP300{:}) It should work. (this way the contents of each cell is used, instead the cell itself) Best, Roemer On May 5, 2012 11:51 AM, "Hamza Fawzi Altakroury (Student)" < hamzaf at sabanciuniv.edu> wrote: > Hello again Stephen and for all, > > I could not find out how to enter the following sturct into the > ft_timelockstatistics function > > The input is generated using the following loop: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); > end > > and > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > avgP300{i} = ft_timelockanalysis(cfg,p300); > end > > > Then I use > > cfg = []; > cfg.layout = 'CTF275.lay'; > cfg.method = 'crossvalidate'; > cfg.design = [ones(10,1); 2*ones(10,1)]'; > stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); > > I get the following error > > ??? Error using ==> ft_checkdata at 307 > This function requires timelock data as input. > > Error in ==> ft_timelockstatistics at 75 > varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', > 'feedback', > 'no'); > > Error in ==> test05 at 11 > stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); > > > Any thoughts > > Hamza > > > On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Thanks a lot Stephen for your help, >> >> Hamza >> >> >> >> On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < >> stephen.whitmarsh at gmail.com> wrote: >> >>> Dear Hamza, >>> >>> Actually, the statistic functions DO accept cellstructures of >>> datastructures, and what I suggested is therefor very convenient, >>> especially in that regard. >>> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >>> would recommend walking through it from the beginning, but you could >>> take a particular look at the statistics section. In there I try to >>> explain the data structure handling in detail which deals with your >>> question. >>> >>> Cheers, >>> Stephen >>> >>> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >>> wrote: >>> > Hello again, >>> > >>> > But I need to process my data later by ft_timelockstatistics. >>> > I don't think this funtion accepts cell containing many structs. >>> > >>> > I think its better to do average manually then call ft_lockanalysis, >>> then >>> > ft_timelockstatistics. Right? >>> > >>> > Hamza >>> > >>> > >>> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >>> > wrote: >>> >> >>> >> Dear Hamza, >>> >> >>> >> Fieldtrip functions in generally do not work on several different >>> >> 'sets' of data at the same time. >>> >> Call the function you are using (e.g. ft_timelockanalysis) separately >>> >> for every set of trials and if you want put the output in a >>> >> matrix{1:10} of datastructures (e.g. timelock). >>> >> You can easily put it in a loop. Something like this: >>> >> >>> >> for i = 1:10 >>> >> cfg = []; >>> >> cfg.trials = [(i-1)*10+1 : i*10]; >>> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >>> >> end >>> >> >>> >> Hope this helps, >>> >> Stephen >>> >> >>> >> >>> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >>> >> wrote: >>> >> > Hello, >>> >> > >>> >> > I want to average each 10 trials of 100 trials. >>> >> > I don't know what to put in (cfg.trials) >>> >> > >>> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >>> >> > >>> >> > It does not work? >>> >> > >>> >> > Note: at the end I want to have a cell of 10 matices, not just one >>> >> > matrix. >>> >> > >>> >> > Any thoughts? >>> >> > >>> >> > Best, >>> >> > >>> >> > -- >>> >> > Hamza Fawzi Altakroury >>> >> > Graduate student - MA >>> >> > Faculty of Engineering and Natural Sciences >>> >> > Sabancı University >>> >> > >>> >> > _______________________________________________ >>> >> > fieldtrip mailing list >>> >> > fieldtrip at donders.ru.nl >>> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >>> >> _______________________________________________ >>> >> fieldtrip mailing list >>> >> fieldtrip at donders.ru.nl >>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> > >>> > >>> > >>> > >>> > -- >>> > Hamza Fawzi Altakroury >>> > Graduate student - MA >>> > Faculty of Engineering and Natural Sciences >>> > Sabancı University >>> > >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Mon May 7 10:44:07 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Mon, 7 May 2012 11:44:07 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Yes, it works. Thanks a lot Roemer Best, Hamza On Mon, May 7, 2012 at 11:00 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Fawzi, > > If you do: > stat = ft_timelockstatistics(cfg,avgP300{:},avgnonP300{:}) > It should work. > (this way the contents of each cell is used, instead the cell itself) > > Best, > Roemer > On May 5, 2012 11:51 AM, "Hamza Fawzi Altakroury (Student)" < > hamzaf at sabanciuniv.edu> wrote: > >> Hello again Stephen and for all, >> >> I could not find out how to enter the following sturct into the >> ft_timelockstatistics function >> >> The input is generated using the following loop: >> >> for i = 1:10 >> cfg = []; >> cfg.trials = [(i-1)*10+1 : i*10]; >> avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); >> end >> >> and >> >> for i = 1:10 >> cfg = []; >> cfg.trials = [(i-1)*10+1 : i*10]; >> avgP300{i} = ft_timelockanalysis(cfg,p300); >> end >> >> >> Then I use >> >> cfg = []; >> cfg.layout = 'CTF275.lay'; >> cfg.method = 'crossvalidate'; >> cfg.design = [ones(10,1); 2*ones(10,1)]'; >> stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); >> >> I get the following error >> >> ??? Error using ==> ft_checkdata at 307 >> This function requires timelock data as input. >> >> Error in ==> ft_timelockstatistics at 75 >> varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', >> 'feedback', >> 'no'); >> >> Error in ==> test05 at 11 >> stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); >> >> >> Any thoughts >> >> Hamza >> >> >> On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < >> hamzaf at sabanciuniv.edu> wrote: >> >>> Thanks a lot Stephen for your help, >>> >>> Hamza >>> >>> >>> >>> On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < >>> stephen.whitmarsh at gmail.com> wrote: >>> >>>> Dear Hamza, >>>> >>>> Actually, the statistic functions DO accept cellstructures of >>>> datastructures, and what I suggested is therefor very convenient, >>>> especially in that regard. >>>> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >>>> would recommend walking through it from the beginning, but you could >>>> take a particular look at the statistics section. In there I try to >>>> explain the data structure handling in detail which deals with your >>>> question. >>>> >>>> Cheers, >>>> Stephen >>>> >>>> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >>>> wrote: >>>> > Hello again, >>>> > >>>> > But I need to process my data later by ft_timelockstatistics. >>>> > I don't think this funtion accepts cell containing many structs. >>>> > >>>> > I think its better to do average manually then call ft_lockanalysis, >>>> then >>>> > ft_timelockstatistics. Right? >>>> > >>>> > Hamza >>>> > >>>> > >>>> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >>>> > wrote: >>>> >> >>>> >> Dear Hamza, >>>> >> >>>> >> Fieldtrip functions in generally do not work on several different >>>> >> 'sets' of data at the same time. >>>> >> Call the function you are using (e.g. ft_timelockanalysis) separately >>>> >> for every set of trials and if you want put the output in a >>>> >> matrix{1:10} of datastructures (e.g. timelock). >>>> >> You can easily put it in a loop. Something like this: >>>> >> >>>> >> for i = 1:10 >>>> >> cfg = []; >>>> >> cfg.trials = [(i-1)*10+1 : i*10]; >>>> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >>>> >> end >>>> >> >>>> >> Hope this helps, >>>> >> Stephen >>>> >> >>>> >> >>>> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >>>> >> wrote: >>>> >> > Hello, >>>> >> > >>>> >> > I want to average each 10 trials of 100 trials. >>>> >> > I don't know what to put in (cfg.trials) >>>> >> > >>>> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >>>> >> > >>>> >> > It does not work? >>>> >> > >>>> >> > Note: at the end I want to have a cell of 10 matices, not just one >>>> >> > matrix. >>>> >> > >>>> >> > Any thoughts? >>>> >> > >>>> >> > Best, >>>> >> > >>>> >> > -- >>>> >> > Hamza Fawzi Altakroury >>>> >> > Graduate student - MA >>>> >> > Faculty of Engineering and Natural Sciences >>>> >> > Sabancı University >>>> >> > >>>> >> > _______________________________________________ >>>> >> > fieldtrip mailing list >>>> >> > fieldtrip at donders.ru.nl >>>> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >> >>>> >> _______________________________________________ >>>> >> fieldtrip mailing list >>>> >> fieldtrip at donders.ru.nl >>>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > Hamza Fawzi Altakroury >>>> > Graduate student - MA >>>> > Faculty of Engineering and Natural Sciences >>>> > Sabancı University >>>> > >>>> > _______________________________________________ >>>> > fieldtrip mailing list >>>> > fieldtrip at donders.ru.nl >>>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Mon May 7 17:36:16 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Mon, 7 May 2012 17:36:16 +0200 Subject: [FieldTrip] ICA before beamforming -> change in gradiometer -> workaround? Message-ID: Dear all, I am using ICA prior to beamforming for artefact cleaning (EOG & ECG). After running ft_componentanalysis I noticed that the gradiometer structure is removed from the data, which is required by ft_sourceanalysis. In a prior post I read that one could just add the grad structure from a previous version of the data before the ICA cleaning. http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004877.html Can anyone tell me if this is the best solution, or if there is any other strategies out there? Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Mon May 7 19:52:08 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 13:52:08 -0400 Subject: [FieldTrip] ft_sourceplot Message-ID: Hi, I am having trouble following the tutorial of 'source reconstruction of event-related fields using minimum-norm estimate'. So far, I have been successfully done with the freesurfer and am checking the mri result by freesurfer. The command is like this, % go to the Subject01/mri directory mri = ft_read_mri('filled.mgz'); cfg = []; cfg.interactive = 'yes'; figure;ft_sourceplot(cfg, mri); ft_sourceplot shows no figures at all. I do check the 'filled.mgz by converting it to nii and view it in afni. The white matter can be clearly seen. Can anybody help? Thanks a lot! Qi From yuvharpaz at gmail.com Mon May 7 20:03:49 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Mon, 7 May 2012 21:03:49 +0300 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: for work around try reading the nii with fieldtrip regards yuval On 7 May 2012 20:52, qi li wrote: > Hi, > > I am having trouble following the tutorial of 'source reconstruction > of event-related fields using minimum-norm estimate'. > > So far, I have been successfully done with the freesurfer and am > checking the mri result by freesurfer. > > The command is like this, > > % go to the Subject01/mri directory > mri = ft_read_mri('filled.mgz'); > cfg = []; > cfg.interactive = 'yes'; > figure;ft_sourceplot(cfg, mri); > > ft_sourceplot shows no figures at all. I do check the 'filled.mgz by > converting it to nii and view it in afni. The white matter can be > clearly seen. > > Can anybody help? Thanks a lot! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Mon May 7 21:19:20 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:19:20 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Hi Yuval, Thanks for your help but ft_sourceplot still can not show nii either. Now it is showing the message' Warning: no colorbar possible without functional data > In ft_sourceplot at 774 the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >> mri mri = dim: [256 256 256] anatomy: [256x256x256 double] hdr: [1x1 struct] transform: [4x4 double]' On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: > for work around try reading the nii with fieldtrip > regards > yuval > > On 7 May 2012 20:52, qi li wrote: >> >> Hi, >> >> I am having trouble following the tutorial of  'source reconstruction >> of event-related fields using minimum-norm estimate'. >> >> So far, I have been successfully done with the freesurfer and am >> checking the mri result by freesurfer. >> >> The command is like this, >> >> % go to the Subject01/mri directory >> mri = ft_read_mri('filled.mgz'); >> cfg = []; >> cfg.interactive = 'yes'; >> figure;ft_sourceplot(cfg, mri); >> >> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >> converting it to nii and view it in afni. The white matter can be >> clearly seen. >> >> Can anybody help? Thanks a lot! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Mon May 7 21:23:39 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:23:39 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Hi Yuval, I tried to show the slice by the command imagesc(squeeze(mri.anatomy(100,:,:))) and please take a look of the figure attached. On Mon, May 7, 2012 at 3:19 PM, qi li wrote: > Hi Yuval, > > Thanks for your help but ft_sourceplot still can not show nii either. > > Now it is showing the message' > Warning: no colorbar possible without functional data >> In ft_sourceplot at 774 > the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>> mri > > mri = > >          dim: [256 256 256] >      anatomy: [256x256x256 double] >          hdr: [1x1 struct] >    transform: [4x4 double]' > > On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >> for work around try reading the nii with fieldtrip >> regards >> yuval >> >> On 7 May 2012 20:52, qi li wrote: >>> >>> Hi, >>> >>> I am having trouble following the tutorial of  'source reconstruction >>> of event-related fields using minimum-norm estimate'. >>> >>> So far, I have been successfully done with the freesurfer and am >>> checking the mri result by freesurfer. >>> >>> The command is like this, >>> >>> % go to the Subject01/mri directory >>> mri = ft_read_mri('filled.mgz'); >>> cfg = []; >>> cfg.interactive = 'yes'; >>> figure;ft_sourceplot(cfg, mri); >>> >>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>> converting it to nii and view it in afni. The white matter can be >>> clearly seen. >>> >>> Can anybody help? Thanks a lot! >>> >>> Qi >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> >> Y.Harpaz >> >> a link to the BIU MEG lab: >> http://faculty.biu.ac.il/~goldsa/index.html >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: 100.jpg Type: image/jpeg Size: 11381 bytes Desc: not available URL: From nathanweisz at mac.com Mon May 7 21:43:27 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Mon, 07 May 2012 21:43:27 +0200 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: hi, do you encounter the same issue with ft_sourceplot_old? (the image in the tutorial looks like the old function, but i may be mistaken) good luck, n On 07.05.2012, at 21:19, qi li wrote: > Hi Yuval, > > Thanks for your help but ft_sourceplot still can not show nii either. > > Now it is showing the message' > Warning: no colorbar possible without functional data >> In ft_sourceplot at 774 > the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>> mri > > mri = > > dim: [256 256 256] > anatomy: [256x256x256 double] > hdr: [1x1 struct] > transform: [4x4 double]' > > On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >> for work around try reading the nii with fieldtrip >> regards >> yuval >> >> On 7 May 2012 20:52, qi li wrote: >>> >>> Hi, >>> >>> I am having trouble following the tutorial of 'source reconstruction >>> of event-related fields using minimum-norm estimate'. >>> >>> So far, I have been successfully done with the freesurfer and am >>> checking the mri result by freesurfer. >>> >>> The command is like this, >>> >>> % go to the Subject01/mri directory >>> mri = ft_read_mri('filled.mgz'); >>> cfg = []; >>> cfg.interactive = 'yes'; >>> figure;ft_sourceplot(cfg, mri); >>> >>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>> converting it to nii and view it in afni. The white matter can be >>> clearly seen. >>> >>> Can anybody help? Thanks a lot! >>> >>> Qi >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> >> Y.Harpaz >> >> a link to the BIU MEG lab: >> http://faculty.biu.ac.il/~goldsa/index.html >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Mon May 7 21:59:52 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:59:52 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Yes, I have the same problem with ft_sourceplot_old. No figures out. On Mon, May 7, 2012 at 3:43 PM, Nathan Weisz wrote: > hi, > > do you encounter the same issue with ft_sourceplot_old? (the image in the tutorial looks like the old function, but i may be mistaken) > > good luck, > n > > On 07.05.2012, at 21:19, qi li wrote: > >> Hi Yuval, >> >> Thanks for your help but ft_sourceplot still can not show nii either. >> >> Now it is showing the message' >> Warning: no colorbar possible without functional data >>> In ft_sourceplot at 774 >> the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>>> mri >> >> mri = >> >>          dim: [256 256 256] >>      anatomy: [256x256x256 double] >>          hdr: [1x1 struct] >>    transform: [4x4 double]' >> >> On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >>> for work around try reading the nii with fieldtrip >>> regards >>> yuval >>> >>> On 7 May 2012 20:52, qi li wrote: >>>> >>>> Hi, >>>> >>>> I am having trouble following the tutorial of  'source reconstruction >>>> of event-related fields using minimum-norm estimate'. >>>> >>>> So far, I have been successfully done with the freesurfer and am >>>> checking the mri result by freesurfer. >>>> >>>> The command is like this, >>>> >>>> % go to the Subject01/mri directory >>>> mri = ft_read_mri('filled.mgz'); >>>> cfg = []; >>>> cfg.interactive = 'yes'; >>>> figure;ft_sourceplot(cfg, mri); >>>> >>>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>>> converting it to nii and view it in afni. The white matter can be >>>> clearly seen. >>>> >>>> Can anybody help? Thanks a lot! >>>> >>>> Qi >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> -- >>> >>> Y.Harpaz >>> >>> a link to the BIU MEG lab: >>> http://faculty.biu.ac.il/~goldsa/index.html >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yuvharpaz at gmail.com Tue May 8 04:23:21 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 8 May 2012 05:23:21 +0300 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: well, there's something there. the no colorbar message only means that this is structural, not functional data so it will show in grayscale, no colors. do you want to send me the image if it is not too big? I am not a ft developer but I can take a look, maybe you need to play with the contrst On 7 May 2012 22:59, qi li wrote: > Yes, I have the same problem with ft_sourceplot_old. No figures out. > > On Mon, May 7, 2012 at 3:43 PM, Nathan Weisz wrote: > > hi, > > > > do you encounter the same issue with ft_sourceplot_old? (the image in > the tutorial looks like the old function, but i may be mistaken) > > > > good luck, > > n > > > > On 07.05.2012, at 21:19, qi li wrote: > > > >> Hi Yuval, > >> > >> Thanks for your help but ft_sourceplot still can not show nii either. > >> > >> Now it is showing the message' > >> Warning: no colorbar possible without functional data > >>> In ft_sourceplot at 774 > >> the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB > >>>> mri > >> > >> mri = > >> > >> dim: [256 256 256] > >> anatomy: [256x256x256 double] > >> hdr: [1x1 struct] > >> transform: [4x4 double]' > >> > >> On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz > wrote: > >>> for work around try reading the nii with fieldtrip > >>> regards > >>> yuval > >>> > >>> On 7 May 2012 20:52, qi li wrote: > >>>> > >>>> Hi, > >>>> > >>>> I am having trouble following the tutorial of 'source reconstruction > >>>> of event-related fields using minimum-norm estimate'. > >>>> > >>>> So far, I have been successfully done with the freesurfer and am > >>>> checking the mri result by freesurfer. > >>>> > >>>> The command is like this, > >>>> > >>>> % go to the Subject01/mri directory > >>>> mri = ft_read_mri('filled.mgz'); > >>>> cfg = []; > >>>> cfg.interactive = 'yes'; > >>>> figure;ft_sourceplot(cfg, mri); > >>>> > >>>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by > >>>> converting it to nii and view it in afni. The white matter can be > >>>> clearly seen. > >>>> > >>>> Can anybody help? Thanks a lot! > >>>> > >>>> Qi > >>>> _______________________________________________ > >>>> fieldtrip mailing list > >>>> fieldtrip at donders.ru.nl > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >>> > >>> > >>> > >>> -- > >>> > >>> Y.Harpaz > >>> > >>> a link to the BIU MEG lab: > >>> http://faculty.biu.ac.il/~goldsa/index.html > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Tue May 8 17:29:39 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Tue, 8 May 2012 17:29:39 +0200 Subject: [FieldTrip] center of sphere artefact Message-ID: Dear all, I was looking at my lcmv-beamformer maps of ~200 Sec of eyes closed resting state MEG activity and wondering if what I was seeing is the center of sphere artefact. The code I used is: %filtering of the data cfg = []; cfg.bpfilter = 'yes'; cfg.bpfilttype = 'but'; cfg.bpfreq = [5 45]; cfg.bpfiltord = 4; cfg.bpfiltdir = 'twopass'; [meg_data] = ft_preprocessing(cfg,meg_data); %PCA to extract components with max explained variance [cf,pcs,vexp] = princomp(meg_data.trial{1},'econ'); pexp = 100*vexp/sum(vexp); indx = find(cumsum(vexp) <=90); meg_data.trial{1} = (pcs(:,indx)*cv(:,indx)')'; % computing the covariance matrix cfg = []; cfg.channel = {'MEG'}; cfg.covariance = 'yes'; cfg.pad = 'maxperlen'; cfg.sgncmb = {'MEG' 'MEG'}; cfg.removemean = 'yes'; [cov_data] = ft_timelockanalysis(cfg,meg_data); %LCMV beamformer cfg = []; cfg.channel = {'MEG'}; cfg.grid = grid_data; cfg.vol = hdm; cfg.method = 'lcmv'; cfg.grid.dim = [Nx Ny Nz]; cfg.lcmv.fixedori = 'no'; cfg.lcmv.lambda = '5%'; cfg.lcmv.projectnoise = 'yes'; cfg.lcmv.keepfilters = 'yes'; cfg.lcmv.projectmom = 'no'; cfg.lcmv.keepmom = 'no'; cfg.lcmv.reducerank = 2; cfg.lcmv.normalize = 'yes'; [bf] = ft_sourceanalysis(cfg,cov_data); %make power unit invariant bf.avg.pow = bf.avg.pow./max(bf.avg.pow); Since I don't have enough experience to judge about that I wanted to ask if anybody out there with experience could tell me their opinion. The grid was computed using an inwardshift of -0.5 and a grid resolution of 2.5 mm. The head model using the ft_prepare_singleshell. Any help,advice, comments or suggestions would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cosa.jpg Type: image/jpeg Size: 76416 bytes Desc: not available URL: From k.muesch at uke.uni-hamburg.de Tue May 8 17:32:47 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Tue, 8 May 2012 17:32:47 +0200 Subject: [FieldTrip] specification of lambda in ft_sourceanalysis Message-ID: <1F981CD8-2F58-449D-B819-A4B383780519@uke.uni-hamburg.de> Dear all, I would like to regularize my data when calculating a DICS beamformer. In the discussion list, I found that most users set cfg.lambda = '5%' but I also found cfg.lambda = 0.05. Considering a previous post (http://mailman.science.ru.nl/pipermail/fieldtrip/2010-July/002947.html), I assume that these two options are not the same, right? Is there a rule of thumb for the specification of lambda? In addition, what aspects of my data and of my analysis should I also take into consideration? Any information is appreciated, Kathrin _____________________________________ Kathrin Müsch, PhD student Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany Phone: +49-40-7410-54680 Fax: +49-40-7410-57752 E-Mail: k.muesch at uke.uni-hamburg.de _____________________________________ -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From hamzaf at sabanciuniv.edu Wed May 9 10:33:05 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 9 May 2012 11:33:05 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions Message-ID: Hello, I am doing realtime processing, and I wanted to check ft_realtime_average function and ft_realtime_selectiveaverage functions. I faced a problem in defining cfg.trialfun Could you help me Best -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Wed May 9 10:59:36 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Wed, 9 May 2012 10:59:36 +0200 Subject: [FieldTrip] Post-doctoral and PhD position in Cognitive Neuroscience In-Reply-To: References: Message-ID: <4FAA31F8.7070606@charite.de> 1 Post-doctoral and 1 PhD position in Cognitive Neuroscience, Charité Berlin The Department of Psychiatry and Psychotherapy, Charité – Universitätsmedizin Berlin (http://psy-ccm.charite.de/en/) invites applications for a Post-doctoral and a PhD student position. A Starting Grant of the European Research Council (ERC) will fund both positions for initially 2 years with the possibility of extension. The main objective of this ERC research program is to examine neural and neurochemical markers of multisensory integration and to test a new hypothesis that considers dynamic interplay of synchronized neural populations as a key to multisensory processes (Senkowski et al. 2008, Trends in Neurosciences). The studies within this program include healthy subjects and patients with schizophrenia, as a prototype of a mental disorder with deficits in multisensory integration. Multisensory processes will be examined in a series of experiments requiring both bottom-up and top-down processing (Talsma et al. 2010, Trends in Cognitive Sciences). This comprises a combination of human EEG data as a macroscopic measure of cortical processing and source modeling of synchronized oscillatory activity. Applicants should have a background in psychology, medicine, biology, physics or neuroscience. Experience in human EEG/MEG studies or biosignal analysis (e.g., Matlab) is desirable (i.e. required for the Post-doctoral position). An interest in neurophysiologic studies in clinical populations is expected, as well as German language skills for interacting with patients. Applicants are asked to submit their CV, a short motivation letter, 2 names of referees, and documentation of relevant qualification (e.g., copies of diplomas and/or transcripts of grades) until May 20, 2012, electronically to PD Dr. Daniel Senkowski (daniel.senkowski at charite.de; www.danielsenkowski.com), Department of Psychiatry and Psychotherapy, Charité, University Medicine Berlin, 10115 Berlin, Germany, Phone: +49-30-2311-2738, Fax: +49-30-2311-2209. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreahelo at gmail.com Wed May 9 22:02:07 2012 From: andreahelo at gmail.com (Andrea Helo) Date: Wed, 9 May 2012 22:02:07 +0200 Subject: [FieldTrip] ICA Message-ID: Dear list, I'm trying to run ICA but I have a problem to plot ICA components using ft_topoplotIC(cfg,comp). It send me this error Could you help me please? ??? Error using ==> ft_prepare_layout>readlay at 668 could not open layout file: andreacoco1.lay Error in ==> ft_prepare_layout at 222 lay = readlay(cfg.layout); Error in ==> ft_topoplotER at 380 lay = ft_prepare_layout(cfg, data); Error in ==> ft_topoplotIC at 115 ft_topoplotER(cfg, varargin{:}); Andrea Thank you :) -- Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed May 9 22:09:48 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 9 May 2012 22:09:48 +0200 Subject: [FieldTrip] ICA In-Reply-To: References: Message-ID: Dear Andrea, It seems you specify cfg.layout='andreacoco1.lay'. The error message suggests Matlab is unable to open that file. Are you sure the file you refer to is present on your path, is readable, and is a valid layout file? Best, Eelke On 9 May 2012 22:02, Andrea Helo wrote: > Dear list, > > I'm trying to run ICA but I have a problem to plot ICA components using > ft_topoplotIC(cfg,comp). It send me this error > > Could you help me please? > > ??? Error using ==> ft_prepare_layout>readlay at 668 > > > could not open layout file: andreacoco1.lay > > Error in ==> ft_prepare_layout at 222 > lay = readlay(cfg.layout); > > Error in ==> ft_topoplotER at 380 > lay = ft_prepare_layout(cfg, data); > > Error in ==> ft_topoplotIC at 115 > > > ft_topoplotER(cfg, varargin{:}); > > Andrea > > > > Thank you :) > > > > -- > Andrea > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From explena at gmail.com Thu May 10 06:31:42 2012 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 10 May 2012 12:31:42 +0800 Subject: [FieldTrip] cluster-based permutation test on time-frequency data Message-ID: Dear Users, I wonder if anyone could provide any suggestion regarding an issue I encountered. According to the article (Maris, 2007), it seems that cluster-based permutation test is calculated under the permutation distribution of the maximum cluster-level statistics. In my tome-frequency data, there are two big clusters. Only one cluster reaches statistical significance; however, if I exclude this significant cluster and then rerun the test, the other cluster also reaches statistical significance. It seems to suggest that the sensitivity is lost for the second cluster. I wondered if there is any approach to resolve this issue. Many thanks! Best regards, Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreahelo at gmail.com Thu May 10 10:15:10 2012 From: andreahelo at gmail.com (Andrea Helo) Date: Thu, 10 May 2012 10:15:10 +0200 Subject: [FieldTrip] ICA In-Reply-To: References: Message-ID: Hi, Yes I'm sure I've cheked all those thing but I still have the same problen. Do you have some idea? Thank you for your help!!! On Wed, May 9, 2012 at 10:09 PM, Eelke Spaak wrote: > Dear Andrea, > > It seems you specify cfg.layout='andreacoco1.lay'. The error message > suggests Matlab is unable to open that file. Are you sure the file you > refer to is present on your path, is readable, and is a valid layout > file? > > Best, > Eelke > > On 9 May 2012 22:02, Andrea Helo wrote: > > Dear list, > > > > I'm trying to run ICA but I have a problem to plot ICA components using > > ft_topoplotIC(cfg,comp). It send me this error > > > > Could you help me please? > > > > ??? Error using ==> ft_prepare_layout>readlay at 668 > > > > > > could not open layout file: andreacoco1.lay > > > > Error in ==> ft_prepare_layout at 222 > > lay = readlay(cfg.layout); > > > > Error in ==> ft_topoplotER at 380 > > lay = ft_prepare_layout(cfg, data); > > > > Error in ==> ft_topoplotIC at 115 > > > > > > ft_topoplotER(cfg, varargin{:}); > > > > Andrea > > > > > > > > Thank you :) > > > > > > > > -- > > Andrea > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Thu May 10 12:09:51 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Thu, 10 May 2012 13:09:51 +0300 Subject: [FieldTrip] Excluding a subject Message-ID: Hi all, Is there an elegant way to exclude a subject from the statistical analysis when using ft_timelockstatistics, without computing the averages again while excluding the subject? Thanks! Roni -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 10 13:07:17 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 13:07:17 +0200 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Hi Tony, Thanks for your question. First of all, I do not fully understand what you mean with 'without computing the averages again', but I'll have a shot at it. In ft_freq/timelock-statistics you enter all your 'units of observations', i.e. data structures per subject or condition that you want to compare, together with the design matrix. The designmatrix is a one or two row matrix with as many columns as your have data-entries. One of the rows codes the group/condition membership of those entries (the independent variable). They can be subjects (group analysis) or trials (within-subjects analysis). Another row might be used to code the observation number in case you are doing a paired test. To exclude one data entry (i.e. subject) for your ft_timelockstatistics you could either: 1) not enter that datastructure as data in ft_freqstatistics, and also remove it from your design matrix. 2) keep your input to ft_timelockstatistics the same but use a zero for that entry in you design matrix. In this case that data input will not be used to calculate your statistics. I would say the second option is more elegant, but it is more prone to mistakes perhaps. You would do me a favour if you would doublecheck that it gives you the same results as option 1. I hope this answers your question, Stephen On 10 May 2012 12:09, Roni Tibon wrote: > Hi all, > Is there an elegant way to exclude a subject from the statistical analysis > when using ft_timelockstatistics, without computing the averages again while > excluding the subject? > > Thanks! > Roni > > -- >    /\.../\ >   ( -- ---)__{} >    (_.._...._) > > http://shkafkafim.blogspot.com/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 10 13:55:56 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 10 May 2012 14:55:56 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello, I don't know why should I define a function inside the ft_realtime_selectiveaverage. I just want to make an average of some segments. Could you provide me with an example of cfg.trialfun Hamza On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > I am doing realtime processing, and I wanted to check ft_realtime_average > function and ft_realtime_selectiveaverage functions. > > I faced a problem in defining cfg.trialfun > > Could you help me > > Best > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 10 14:51:56 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 14:51:56 +0200 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Dear Hamza, The trialfunction is an integral part of processing data in FieldTrip. It is how you define your timepoints of interest, i.e. trials based on recorded markers in your data, or based on user-defined events (e.g. sleep stages). If you are not yet familiar with the basic FieldTrip operations the documentation of the realtime analysis might indeed seem somewhat inadequate as it assumes this familiarity. FieldTrip's online analysis tools are using many of the same functions of the offline ones, and has a similar overall philosophy and approach. This makes it relatively easy to understand and to use online analysis approach once one is familiar with the offline one. Alas this translation is assymmetric and doesn't hold for the other way around. The good news is, however, that everything is there to get you on your way once your take a little detour. You could take a look at the tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and get a bit of hands-on working through some steps with the supplied tutorial-data. Specifically for your question these pages would be relevant: http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data http://fieldtrip.fcdonders.nl/tutorial/preprocessing http://fieldtrip.fcdonders.nl/tutorial/continuous For more overview and general operations I would advice reading through: http://fieldtrip.fcdonders.nl/walkthrough Most of all it might not be a bad idea to start with a pre-recorded dataset and work on it offline, using the more standard and more extensively documented offline functions for e.g. trial based averaging. Once that works out for you can adapt it to the realtime situation. Hope this helps, Stephen On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I don't know why should I define a function inside the > ft_realtime_selectiveaverage. > I just want to make an average of some segments. > > Could you provide me with an example of cfg.trialfun > > Hamza > > > On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) > wrote: >> >> Hello, >> >> I am doing realtime processing, and I wanted to check ft_realtime_average >> function and ft_realtime_selectiveaverage functions. >> >> I faced a problem in defining cfg.trialfun >> >> Could you help me >> >> Best >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Thu May 10 15:07:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 15:07:34 +0200 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hi Hamza, I just saw you've been posting on the FT list for quite a while and have been working on offline analysis already. To answer your question more specifically: The trialfunction could be very simple in the first instance, but is needed to know what samples to read when preprocessing the data. You can find some examples here that you can adapt to your own purpose here: http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition Cheers, Stephen On 10 May 2012 14:51, Stephen Whitmarsh wrote: > Dear Hamza, > > The trialfunction is an integral part of processing data in FieldTrip. > It is how you define your timepoints of interest, i.e. trials based on > recorded markers in your data, or based on user-defined events (e.g. > sleep stages). > > If you are not yet familiar with the basic FieldTrip operations the > documentation of the realtime analysis  might indeed seem somewhat > inadequate as it assumes this familiarity. FieldTrip's online analysis > tools are using many of the same functions of the offline ones, and > has a similar overall philosophy and approach. This makes it > relatively easy to understand and to use online analysis approach once > one is familiar with the offline one. Alas this translation is > assymmetric and doesn't hold for the other way around. > > The good news is, however, that everything is there to get you on your > way once your take a little detour. You could take a look at the > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and > get a bit of hands-on working through some steps with the supplied > tutorial-data. > > Specifically for your question these pages would be relevant: > http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data > http://fieldtrip.fcdonders.nl/tutorial/preprocessing > http://fieldtrip.fcdonders.nl/tutorial/continuous > > For more overview and general operations I would advice reading through: > http://fieldtrip.fcdonders.nl/walkthrough > > Most of all it might not be a bad idea to start with a pre-recorded > dataset and work on it offline, using the more standard and more > extensively documented offline functions for e.g. trial based > averaging. Once that works out for you can adapt it to the realtime > situation. > > Hope this helps, > Stephen > > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) > wrote: >> Hello, >> >> I don't know why should I define a function inside the >> ft_realtime_selectiveaverage. >> I just want to make an average of some segments. >> >> Could you provide me with an example of cfg.trialfun >> >> Hamza >> >> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >> wrote: >>> >>> Hello, >>> >>> I am doing realtime processing, and I wanted to check ft_realtime_average >>> function and ft_realtime_selectiveaverage functions. >>> >>> I faced a problem in defining cfg.trialfun >>> >>> Could you help me >>> >>> Best >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From david.m.groppe at gmail.com Thu May 10 16:42:45 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 10 May 2012 10:42:45 -0400 Subject: [FieldTrip] cluster-based permutation test on time-frequency data In-Reply-To: References: Message-ID: Hi Shen-Mou, Cluster-based permutation tests have great power for detecting broadly distributed effects, but this comes at the cost at being less sensitive to less broadly distributed effects. A good alternative to cluster-based permutation tests is Benjamini & Hochberg's false discovery rate (FDR) control algorithm. Like cluster-based permutation tests FDR control provides weak control of family-wise error, and we've found that it has relatively good power for broadly and narrowly distributed effects: Groppe, D.M., Urbach, T.P., & Kutas, M., Mass univariate analysis of event-related brain potentials/fields I: A critical tutorial review, Psychophysiology, 2011, DOI: 10.1111/j.1469-8986.2011.01273.x http://kutaslab.ucsd.edu/people/kutas/pdfs/2011.P.01273.pdf I'd recommend using that FDR control procedure over the cluster-based permutation procedure unless you are only interested in the broadly distributed effects. -David On Thu, May 10, 2012 at 12:31 AM, Shen-Mou Hsu wrote: > Dear Users, > > I wonder if anyone could provide any suggestion regarding an issue I > encountered. According to the article (Maris, 2007), it seems that > cluster-based permutation test is calculated under the permutation > distribution of the maximum cluster-level statistics. In my tome-frequency > data, there are two big clusters. Only one cluster reaches statistical > significance; however, if I exclude this significant cluster and then rerun > the test, the other cluster also reaches statistical significance. It seems > to suggest that the sensitivity is lost for the second cluster. I wondered > if there is any approach to resolve this issue. Many thanks! > > Best regards, > > Shen-Mou Hsu > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From aler1 at web.de Thu May 10 18:21:27 2012 From: aler1 at web.de (alla brodski) Date: Thu, 10 May 2012 18:21:27 +0200 (CEST) Subject: [FieldTrip] ft_sourceplot problems Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Negativeclusters_badplot_example.jpg Type: image/jpeg Size: 72058 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Positiveclusters_goodplot_example.jpg Type: image/jpeg Size: 76851 bytes Desc: not available URL: From politzerahless at gmail.com Thu May 10 18:30:31 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 10 May 2012 11:30:31 -0500 Subject: [FieldTrip] Excluding a subject Message-ID: Hi Roni, If your units of observation for the statistical test are subjects and your input to ft_timelockstatistics is a grand average structure (generated by ft_timelockgrandaverage with cfg.keepindividual='no'), then I think the easiest solution would be to just re-run ft_timelockgrandaverage again without those subjects, and use that output as the input to ft_timelockstatistics. It certainly seems easier and less error-prone than trying to change the design matrix (at least, for someone like me who has a hard time wrapping his head around statistics already!). Best, Steve > Message: 1 > Date: Thu, 10 May 2012 13:09:51 +0300 > From: Roni Tibon > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Excluding a subject > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > Is there an elegant way to exclude a subject from the statistical analysis > when using ft_timelockstatistics, without computing the averages again > while excluding the subject? > > Thanks! > Roni > > -- > /\.../\ > ( -- ---)__{} > (_.._...._) > > http://shkafkafim.blogspot.com/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120510/8ddffc61/attachment-0001.html > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Thu May 10 20:55:53 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Thu, 10 May 2012 21:55:53 +0300 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Dear Stephen and Steve, Thank you for your answers. Stephen, if I understand you correctly, option 1 means I have to compute the grand average again (using ft_timelockgrandaverage), which is what I tried to avoid. I tried option 2 though, and it didn't work. When I used a zero entry at the uvar line, the data stayed exactly the same (as if the subject was not excluded). When I used a zero entry at the ivar line (or at both lines), i get an error message saying "invalid specification for the design array". I also tried skipping the entry all together, but got an error message saying "the size of the design matrix does not match the number of observations in the data" An I doing something wrong? Steve, I guess I can do that.. the reason I'm asking is cause I want to "play" with the data a bit - remove a different subjects each time and see if I still get the same pattern. So I thought it would be easier if I did not have to compute the grand average again and again. Thanks! Roni On 10 May 2012 14:07, Stephen Whitmarsh wrote: > Hi Tony, > > Thanks for your question. > > First of all, I do not fully understand what you mean with 'without > computing the averages again', but I'll have a shot at it. > > In ft_freq/timelock-statistics you enter all your 'units of > observations', i.e. data structures per subject or condition that you > want to compare, together with the design matrix. The designmatrix is > a one or two row matrix with as many columns as your have > data-entries. One of the rows codes the group/condition membership of > those entries (the independent variable). They can be subjects (group > analysis) or trials (within-subjects analysis). Another row might be > used to code the observation number in case you are doing a paired > test. > > To exclude one data entry (i.e. subject) for your > ft_timelockstatistics you could either: > 1) not enter that datastructure as data in ft_freqstatistics, and also > remove it from your design matrix. > 2) keep your input to ft_timelockstatistics the same but use a zero > for that entry in you design matrix. In this case that data input will > not be used to calculate your statistics. > > I would say the second option is more elegant, but it is more prone to > mistakes perhaps. You would do me a favour if you would doublecheck > that it gives you the same results as option 1. > > I hope this answers your question, > > Stephen > > > > On 10 May 2012 12:09, Roni Tibon wrote: > > Hi all, > > Is there an elegant way to exclude a subject from the statistical > analysis > > when using ft_timelockstatistics, without computing the averages again > while > > excluding the subject? > > > > Thanks! > > Roni > > > > -- > > /\.../\ > > ( -- ---)__{} > > (_.._...._) > > > > http://shkafkafim.blogspot.com/ > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.sowman at mq.edu.au Fri May 11 06:01:16 2012 From: paul.sowman at mq.edu.au (Paul Sowman) Date: Fri, 11 May 2012 14:01:16 +1000 Subject: [FieldTrip] ft_sensorrealign error Message-ID: Hi, I am trying to use ft_sensorrealign to align my Yokogawa data. i am getting this error: sens2 = ft_sensorrealign(cfg, sens) using the fiducials instead of the sensor positions Warning: could be Yokogawa system > In forward/private/warning_once at 75 In ft_senstype at 280 In utilities/private/channelposition at 46 In ft_datatype_sens at 107 In ft_sensorrealign at 235 converting units from 'mm' to 'cm' ??? Subscripted assignment between dissimilar structures. Error in ==> ft_sensorrealign at 236 tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the units are consistent with the electrodes I have attached variable template and elec. Secondly, I presume also that I can only use 3 of the 5 fiducial markers? as line 395 has length(cfg.fiducial)~=3. I don't think this is causing the above issue though. Thanks, Paul -- Paul F Sowman NHMRC Postdoctoral Training Fellow Macquarie Centre for Cognitive Science (MACCS) MACQUARIE UNIVERSITY NSW 2109 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec_original.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: template.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: From stephen.whitmarsh at gmail.com Fri May 11 09:43:57 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 11 May 2012 09:43:57 +0200 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Dear Roni & Steve, Thank you for reminding me one can compare datastructures containing means computed by ft_timelockgrandaverage. I forgot about that. Then indeed the mean/var has to be re-computed every time if you are trying out different subject to reject (and the designmatrix has to stay the same). Ofcourse you are rejecting subjects based on a-priori criteria, not on the effect it has on the results, so you shouldn't have to do it too often ;-) However, to explain what I meant previously: you do not have to compute a grandaverage first, and then do statistics. You can put those subjects (of both groups) straight into ft_timelockstatistics, and use the designmatrix to specify group membership with 1's and 2's. Using a 0 instead for one of your subjects would exclude that subject from the analysis. (see http://fieldtrip.fcdonders.nl/walkthrough#non-paired_comparison). Have a nice day! Stephen On 10 May 2012 20:55, Roni Tibon wrote: > Dear Stephen and Steve, > > Thank you for your answers. > > Stephen, if I understand you correctly, option 1 means I have to compute the > grand average again (using ft_timelockgrandaverage), which is what I tried > to avoid. > > I tried option 2 though, and it didn't work. > When I used a zero entry at the uvar line, the data stayed exactly the same > (as if the subject was not excluded). When I used a zero entry at the ivar > line (or at both lines), i get an error message saying "invalid > specification for the design array". > > I also tried skipping the entry all together, but got an error message > saying "the size of the design matrix does not match the number of > observations in the data" > > An I doing something wrong? > > Steve, I guess I can do that.. the reason I'm asking is cause I want to > "play" with the data a bit - remove a different subjects each time and see > if I still get the same pattern. So I thought it would be easier if I did > not have to compute the grand average again and again. > > Thanks! > Roni > > On 10 May 2012 14:07, Stephen Whitmarsh wrote: >> >> Hi Tony, >> >> Thanks for your question. >> >> First of all, I do not fully understand what you mean with 'without >> computing the averages again', but I'll have a shot at it. >> >> In ft_freq/timelock-statistics you enter all your 'units of >> observations', i.e. data structures per subject or condition that you >> want to compare, together with the design matrix. The designmatrix is >> a one or two row matrix with as many columns as your have >> data-entries. One of the rows codes the group/condition membership of >> those entries (the independent variable). They can be subjects (group >> analysis) or trials (within-subjects analysis). Another row might be >> used to code the observation number in case you are doing a paired >> test. >> >> To exclude one data entry (i.e. subject) for your >> ft_timelockstatistics you could either: >> 1) not enter that datastructure as data in ft_freqstatistics, and also >> remove it from your design matrix. >> 2) keep your input to ft_timelockstatistics the same but use a zero >> for that entry in you design matrix. In this case that data input will >> not be used to calculate your statistics. >> >> I would say the second option is more elegant, but it is more prone to >> mistakes perhaps. You would do me a favour if you would doublecheck >> that it gives you the same results as option 1. >> >> I hope this answers your question, >> >> Stephen >> >> >> >> On 10 May 2012 12:09, Roni Tibon wrote: >> > Hi all, >> > Is there an elegant way to exclude a subject from the statistical >> > analysis >> > when using ft_timelockstatistics, without computing the averages again >> > while >> > excluding the subject? >> > >> > Thanks! >> > Roni >> > >> > -- >> >    /\.../\ >> >   ( -- ---)__{} >> >    (_.._...._) >> > >> > http://shkafkafim.blogspot.com/ >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- >    /\.../\ >   ( -- ---)__{} >    (_.._...._) > > http://shkafkafim.blogspot.com/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Fri May 11 12:05:07 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 11 May 2012 12:05:07 +0200 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis In-Reply-To: <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> References: <4F97AD41.8090304@biomag.uni-jena.de> <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> Message-ID: Hi Theresa, The answer to question #1 is a bit difficult because of scaling, I thought for a long time about it but I couldn't define a definite convincing answer, so I'll leave that to someone else. Without all the scaling that is going on, power for EEG is simply V^2. However, the fft/ifft in ft_specest_wavelet and the scaling by the square root of 2 over the sampling rate in line 176 of the same function complicate matters for me. I hope someone else can shine some light on it. For your second question, even though the total wavelet energy is the same at every frequency, the energy of the frequencies present in your data are not, and their energy decays with a 1/f pattern. This 1/f decrease found in EEG data is a pattern that is found in many natural phenomena. It is often referred to as 1/f noise, but I personally don't like that term, as it indicates something that is not interesting in any way. While doing some hand-waving, my intuition for neuronal recordings has always been that the time constants of lower frequencies are much further away from the 'noise' of EPSPs, dendritic and somatic currents, etc of neurons (and therefore have a higher amplitude) and that lower frequencies are thought to be generated by larger groups of neurons, which of course increases the total energy at those frequencies. This is just a vague notion of me however, surely there are more clever people on the mailinglist to give their insights, and give a more physically founded explanation of what the 1/f pattern means for neuronal recordings. But since nobody gave an answer, I'd thought I'd give it a shot anyway. Hope it helps, Cheers, Roemer On Sat, May 5, 2012 at 9:15 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Theresa, > > I am forwarding your questions to the discussion list, as this is the > forum on which we discuss this type of issues. Other people may benefit > from it too, or may feel inclined to answer. > > Cheers, > > Jan-Mathijs > > Begin forwarded message: > > *From: *Theresa Götz > *Date: *April 25, 2012 9:52:33 AM GMT+02:00 > *To: *j.schoffelen at donders.ru.nl > *Subject: **Question about unit of the wavelet analysis* > > Dear Jan-Mathijs Schoeffelen, > > we have a question about the unit of the time-frequency power spectrum: > maybe you can help me with that. > > 1. In fieldtrip, we performed ft_frequanalysis with method 'wavelet' and > output 'power'. What is the exact unit of the resulting power spectrum > (e.g. V/sqrt(hz) or V^2/Hz or V^2 or V)? > > 2. Why does the amplitude of power spectrum decrease toward higher > frequencies even though we keep the amplitude of the input sine wave (in > time domain) constant? > > Thank you very much. > > Best, > Theresa > > > > > -- > Bitte denken Sie an die Umwelt, bevor Sie diese e-Mail ausdrucken. > > > Dr. Theresa Götz Phone: +49-3641-9325780 > University Hospital Jena Fax: +49-3641-9325772 > Dept. for Neurology > Biomagnetic Center > > Erlanger Allee 101 > D-07747 Jena > Germany > > > > > Universitätsklinikum Jena > Körperschaft des öffentlichen Rechts und > Teilkörperschaft der Friedrich-Schiller-Universität Jena > Bachstraße 18, 07743 Jena > > Verwaltungsratsvorsitzender: Prof. Dr. Thomas Deufel > Medizinischer Vorstand: Prof. Dr. Klaus Höffken > Wissenschaftlicher Vorstand: Prof. Dr. Klaus Benndorf > Kaufmännischer Vorstand und > Sprecher des Klinikumsvorstandes: Dr. Brunhilde Seidel-Kwem > > Bankverbindung: Sparkasse Jena > BLZ: 830 530 30, Kto.: 221 > > Gerichtsstand Jena > Steuernummer: 161/144/02978 USt.-IdNr. : DE 150545777 > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From VenziM at cardiff.ac.uk Fri May 11 12:48:41 2012 From: VenziM at cardiff.ac.uk (Marcello Venzi) Date: Fri, 11 May 2012 11:48:41 +0100 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis Message-ID: Hello, I'm a first year PhD student in Neuroscience, so this is really my two cents... 1) If you sum two sine waves of the same amplitude but different frequency then you would expect the wavelet spectrum to show the higher-frequency peak smaller than the lower-frequency peak (while this would not happen with the Fourier power spectrum) . Have a look at 'Bias of the Global Wavelet Spectrum' on http://paos.colorado.edu/research/wavelets/faq.html for an explanation. 2) My limited understanding of the 1/f scaling in EEG/MEG is that there is no complete agreement on what its origin is. There are at two main hypothesis that I'm aware of : -  The 1/f scaling is due to low-pass filtering of the extracellular medium. See this paper and references therein  Bédard, C., & Destexhe, A. (2009). Macroscopic models of local field potentials and the apparent 1/f noise in brain activity. Biophysical journal, 96(7), 2589-603. doi:10.1016/j.bpj.2008.12.3951 - If instead the extracellular medium is purely resistive (as suggested in this Logothethis paper: Logothetis, N. K., Kayser, C., & Oeltermann, A. (2007). In vivo measurement of cortical impedance spectrum in monkeys: implications for signal propagation. Neuron, 55(5), 809-23. doi:10.1016/j.neuron.2007.07.027 ) the scaling could represent an organized phenomenon produced by neurons, ie. an aspect of neuronal computation. I hope people in the mailing list will be so kind to correct me if this is just gibberish talk: I'm learning about this topics as I'm writing! All the best, Marcello Venzi Marcello Venzi PhD Student in Integrative Neuroscience School of Biosciences Cardiff University +44(0)29 208 7515 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Fri May 11 14:27:00 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Fri, 11 May 2012 15:27:00 +0300 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Got it. Awesome :) Thanks! On 11 May 2012 10:43, Stephen Whitmarsh wrote: > Dear Roni & Steve, > > Thank you for reminding me one can compare datastructures containing > means computed by ft_timelockgrandaverage. I forgot about that. Then > indeed the mean/var has to be re-computed every time if you are trying > out different subject to reject (and the designmatrix has to stay the > same). Ofcourse you are rejecting subjects based on a-priori criteria, > not on the effect it has on the results, so you shouldn't have to do > it too often ;-) > > However, to explain what I meant previously: you do not have to > compute a grandaverage first, and then do statistics. You can put > those subjects (of both groups) straight into ft_timelockstatistics, > and use the designmatrix to specify group membership with 1's and 2's. > Using a 0 instead for one of your subjects would exclude that subject > from the analysis. > (see http://fieldtrip.fcdonders.nl/walkthrough#non-paired_comparison). > > Have a nice day! > > Stephen > > > > > On 10 May 2012 20:55, Roni Tibon wrote: > > Dear Stephen and Steve, > > > > Thank you for your answers. > > > > Stephen, if I understand you correctly, option 1 means I have to compute > the > > grand average again (using ft_timelockgrandaverage), which is what I > tried > > to avoid. > > > > I tried option 2 though, and it didn't work. > > When I used a zero entry at the uvar line, the data stayed exactly the > same > > (as if the subject was not excluded). When I used a zero entry at the > ivar > > line (or at both lines), i get an error message saying "invalid > > specification for the design array". > > > > I also tried skipping the entry all together, but got an error message > > saying "the size of the design matrix does not match the number of > > observations in the data" > > > > An I doing something wrong? > > > > Steve, I guess I can do that.. the reason I'm asking is cause I want to > > "play" with the data a bit - remove a different subjects each time and > see > > if I still get the same pattern. So I thought it would be easier if I did > > not have to compute the grand average again and again. > > > > Thanks! > > Roni > > > > On 10 May 2012 14:07, Stephen Whitmarsh > wrote: > >> > >> Hi Tony, > >> > >> Thanks for your question. > >> > >> First of all, I do not fully understand what you mean with 'without > >> computing the averages again', but I'll have a shot at it. > >> > >> In ft_freq/timelock-statistics you enter all your 'units of > >> observations', i.e. data structures per subject or condition that you > >> want to compare, together with the design matrix. The designmatrix is > >> a one or two row matrix with as many columns as your have > >> data-entries. One of the rows codes the group/condition membership of > >> those entries (the independent variable). They can be subjects (group > >> analysis) or trials (within-subjects analysis). Another row might be > >> used to code the observation number in case you are doing a paired > >> test. > >> > >> To exclude one data entry (i.e. subject) for your > >> ft_timelockstatistics you could either: > >> 1) not enter that datastructure as data in ft_freqstatistics, and also > >> remove it from your design matrix. > >> 2) keep your input to ft_timelockstatistics the same but use a zero > >> for that entry in you design matrix. In this case that data input will > >> not be used to calculate your statistics. > >> > >> I would say the second option is more elegant, but it is more prone to > >> mistakes perhaps. You would do me a favour if you would doublecheck > >> that it gives you the same results as option 1. > >> > >> I hope this answers your question, > >> > >> Stephen > >> > >> > >> > >> On 10 May 2012 12:09, Roni Tibon wrote: > >> > Hi all, > >> > Is there an elegant way to exclude a subject from the statistical > >> > analysis > >> > when using ft_timelockstatistics, without computing the averages again > >> > while > >> > excluding the subject? > >> > > >> > Thanks! > >> > Roni > >> > > >> > -- > >> > /\.../\ > >> > ( -- ---)__{} > >> > (_.._...._) > >> > > >> > http://shkafkafim.blogspot.com/ > >> > > >> > > >> > _______________________________________________ > >> > fieldtrip mailing list > >> > fieldtrip at donders.ru.nl > >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > /\.../\ > > ( -- ---)__{} > > (_.._...._) > > > > http://shkafkafim.blogspot.com/ > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri May 11 18:45:16 2012 From: lihqih at gmail.com (qi li) Date: Fri, 11 May 2012 12:45:16 -0400 Subject: [FieldTrip] ft_plot_mesh Message-ID: Hi there, I am having trouble for the use of ft_plot_mesh. Can someone load the attached files and type ft_plot_mesh(bnd, 'vertexcolor', m); to see what happens. I have a blank figure. Thanks! Qi -------------- next part -------------- A non-text attachment was scrubbed... Name: bnd.mat Type: application/octet-stream Size: 259261 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: m.mat Type: application/octet-stream Size: 62865 bytes Desc: not available URL: From hamzaf at sabanciuniv.edu Sun May 13 16:46:38 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 13 May 2012 17:46:38 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Thank you for your help Stephen Hamza On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Hamza, > > I just saw you've been posting on the FT list for quite a while and > have been working on offline analysis already. To answer your question > more specifically: The trialfunction could be very simple in the first > instance, but is needed to know what samples to read when > preprocessing the data. You can find some examples here that you can > adapt to your own purpose here: > > http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition > > Cheers, > Stephen > > On 10 May 2012 14:51, Stephen Whitmarsh > wrote: > > Dear Hamza, > > > > The trialfunction is an integral part of processing data in FieldTrip. > > It is how you define your timepoints of interest, i.e. trials based on > > recorded markers in your data, or based on user-defined events (e.g. > > sleep stages). > > > > If you are not yet familiar with the basic FieldTrip operations the > > documentation of the realtime analysis might indeed seem somewhat > > inadequate as it assumes this familiarity. FieldTrip's online analysis > > tools are using many of the same functions of the offline ones, and > > has a similar overall philosophy and approach. This makes it > > relatively easy to understand and to use online analysis approach once > > one is familiar with the offline one. Alas this translation is > > assymmetric and doesn't hold for the other way around. > > > > The good news is, however, that everything is there to get you on your > > way once your take a little detour. You could take a look at the > > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and > > get a bit of hands-on working through some steps with the supplied > > tutorial-data. > > > > Specifically for your question these pages would be relevant: > > > http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data > > http://fieldtrip.fcdonders.nl/tutorial/preprocessing > > http://fieldtrip.fcdonders.nl/tutorial/continuous > > > > For more overview and general operations I would advice reading through: > > http://fieldtrip.fcdonders.nl/walkthrough > > > > Most of all it might not be a bad idea to start with a pre-recorded > > dataset and work on it offline, using the more standard and more > > extensively documented offline functions for e.g. trial based > > averaging. Once that works out for you can adapt it to the realtime > > situation. > > > > Hope this helps, > > Stephen > > > > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) > > wrote: > >> Hello, > >> > >> I don't know why should I define a function inside the > >> ft_realtime_selectiveaverage. > >> I just want to make an average of some segments. > >> > >> Could you provide me with an example of cfg.trialfun > >> > >> Hamza > >> > >> > >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) > >> wrote: > >>> > >>> Hello, > >>> > >>> I am doing realtime processing, and I wanted to check > ft_realtime_average > >>> function and ft_realtime_selectiveaverage functions. > >>> > >>> I faced a problem in defining cfg.trialfun > >>> > >>> Could you help me > >>> > >>> Best > >>> > >>> -- > >>> Hamza Fawzi Altakroury > >>> Graduate student - MA > >>> Faculty of Engineering and Natural Sciences > >>> Sabancı University > >> > >> > >> > >> > >> -- > >> Hamza Fawzi Altakroury > >> Graduate student - MA > >> Faculty of Engineering and Natural Sciences > >> Sabancı University > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Mon May 14 15:57:05 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Mon, 14 May 2012 16:57:05 +0300 Subject: [FieldTrip] ft_realtime_average and ft_realtime_selective_average Message-ID: Hello, I am doing realtime processing. I wrote the following two simple codes: cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; ft_realtime_average(cfg) And cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; ft_realtime_selectiveaverage(cfg) In the first no error appeared but also I did not get a result (the generated figure was empty). In the second I got the following message: ??? Error using ==> ft_read_data at 243 cannot read data before the begin of the file Error in ==> ft_realtime_selectiveaverage at 94 dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx, 'checkboundary', false); Error in ==> online2 at 10 ft_realtime_selectiveaverage(cfg) Why I get so? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From dashiel.munding at gmail.com Mon May 14 18:29:31 2012 From: dashiel.munding at gmail.com (Dashiel Munding) Date: Mon, 14 May 2012 18:29:31 +0200 Subject: [FieldTrip] Create trialfun with stim lock baseline and resp locked t.o.i. Message-ID: Hi Everyone, I'm trying to analyse some picture naming data, and need to have a trial definition that has a baseline locked to the stimulus onset, but an analysis period locked to the response onset, which has a very varied latency. That is, I have two codes on my trigger channel, X and Y. I want to lock my baseline to X, but my analysis period to Y. The example for a custom, conditional 'trialfun' [http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition] goes partway to explaining how this might be possible, but can anyone help me work out how to ask Fieldtrip to build trials like this? Many thanks, Dashiel From Elena.Orekhova at neuro.gu.se Mon May 14 21:51:11 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Mon, 14 May 2012 19:51:11 +0000 Subject: [FieldTrip] MNE to dSPM? Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> Hi I calculated the MNE estimates for an evoked potential using the full brain grid with ‘loose’ dipole orientation. I would like to calculate the dSPM values (Dale et al, Neuron, Vol. 26, 55–67). Is there a simple way to do it in the Fieldtrip? Thank you! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Mon May 14 23:37:00 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Mon, 14 May 2012 21:37:00 +0000 Subject: [FieldTrip] where is the inverse operator? Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> Dear Fieldtrip Developers, I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? Thank you! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mollison at gmail.com Tue May 15 01:05:10 2012 From: matt.mollison at gmail.com (Matt Mollison) Date: Mon, 14 May 2012 17:05:10 -0600 Subject: [FieldTrip] Oscillatory power normalization In-Reply-To: <454AC917-60FD-4CF6-BF21-242DF4B5B4D0@mac.com> References: <454AC917-60FD-4CF6-BF21-242DF4B5B4D0@mac.com> Message-ID: Eelke, I know this is a slow reply, but I was waiting to see if someone would comment on Joe's questions. Anyway, thank you for your explanation. It makes sense that the subtraction would control for 1/f within each frequency. However, I am curious about the points that Joe brought up and I hope someone can still comment on them. Joe, Your first point seems quite important, especially when averaging across a range of frequencies is a common thing to do in the literature. Does anyone know if it's correct that higher frequencies will get washed out by lower ones when averaging within a frequency band? To add to Joe's questions, could normalizing power ever be a bad thing to do? It seems like it would be reasonable for FieldTrip to at least have the option so that one could use cfg.keeptrials='no' with ft_freqanalysis and would not need to have cfg.keeptrials='yes' for followed by the ft_freqbaseline steps that Stephan mentioned. Not sure about your second point regarding spectral density, but I would also like to know more. Thanks, everyone, for your knowledge in these matters. Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Tue, Apr 24, 2012 at 12:41 AM, Joseph Dien wrote: > I'm new to spectral analysis so take anything I say with a grain of salt: > > 1) If one intends on taking the average of a band (like 8-12Hz for alpha), > seems like maybe helpful to correct for 1/f so the lower bands don't > dominate? > > 2) Another issue is spectral density (correcting for frequency bin width > for discrete Fourier). As far as I can tell, FieldTrip isn't doing this. > Seems like it should be standard. Or at least it should say in the > documentation whether it is being done. Am I wrong? > > Cheers! > > Joe > > > > On Apr 23, 2012, at 5:54 AM, Eelke Spaak wrote: > > > Hi Matt, > > > > When you are comparing power across conditions, it is not really > > necessary to apply an explicit correction for the dominant 1/f > > component of the raw spectrum. Since this 1/f component is present in > > both conditions, when you subtract power in one condition from power > > in another condition (or compute the ratio, or log-ratio, or relative > > change, or whatever), the 1/f will cancel out and you will only be > > left with whatever is due to your experimental manipulation. This is > > true because the contrast is done per frequency. (Note that comparing > > activity versus baseline is just a special case of looking at a > > contrast between conditions, so the same argument holds there.) > > > > The only time when an explicit correction for 1/f is useful, is when > > you want to look at raw power. The most dominant oscillatory features > > (visual alpha, visual contrast induced gamma...) will usually be > > evident in raw spectra without such a correction, by the way. > > Correcting for 1/f can be done in many ways, the most simple one is > > simply taking the logarithm of power, something like: > > > > freqCorrected = freqUncorrected; > > freqCorrected.powspctrm = log10(freqCorrected.powspctrm); > > > > Or you could take the first derivative in the time domain (equivalent > > to multiplying the spectrum with f, search for post by Robert on this > > on the FT list). Or you could take the log of both the frequency- and > > power axes, then fit a line, and subtract it, then transform back > > (10^corrected data). > > > > But, the main point is: in the vast majority of typical cognitive > > experiments, correcting for 1/f is not needed. > > > > Best, > > Eelke > > > > On 23 April 2012 05:54, Matt Mollison wrote: > >> Hi FieldTrippers, > >> > >> In almost all the papers I've read involving oscillatory power, some > kind of > >> transformation is done to the data due to the 1/f power spectrum effect > >> (power decreases as frequency increases). I'm mostly looking at > >> within-subjects experiments (every subject behaved in all conditions) > >> comparing conditions across subjects, but it seems like normalizing the > >> power spectrum should apply in any case (especially if any kind of > >> parametric stats are done—right?). > >> > >> Anyway, it's not apparent to me how to use FT functions like > ft_freqanalysis > >> to make these transformations (e.g., log10 normalization, dB > normalization > >> [EEGLab does this], vector length normalization, etc.; the only thing I > see > >> is in ft_sourcedescriptives, but I'm not doing source analyses), and it > >> confuses me why this is the case. I can't find much discussion > regarding the > >> 1/f issue on the FT wiki or the mailing list. This seems like an > important > >> step that is missing from any frequency analysis workflow. Am I missing > >> something (meaning I just don't see the option), am I misunderstanding > >> something (meaning I'm incorrect in this assumption), or is this an > issue > >> that needs to be fixed? > >> > >> Thanks, > >> Matt > >> > >> -- > >> Univ. of Colorado at Boulder > >> Dept. of Psychology and Neuroscience > >> matthew.mollison at colorado.edu > >> http://psych.colorado.edu/~mollison/ > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 09:23:15 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 09:23:15 +0200 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> Message-ID: Hi Elena, You can specify cfg.mne.keepfilter = 'yes'. Best, Jan-Mathijs On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: > > Dear Fieldtrip Developers, > > I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? > > Thank you! > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 09:23:56 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 09:23:56 +0200 Subject: [FieldTrip] MNE to dSPM? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> Message-ID: Hi Elena, You can specify cfg.mne.projectnoise = 'yes'. This will give you an estimate of the projected noise. This can be used as normalization term to compute the dSPM. Best, Jan-Mathijs On May 14, 2012, at 9:51 PM, Elena Orekhova wrote: > > Hi > > I calculated the MNE estimates for an evoked potential using the full brain grid with ‘loose’ dipole orientation. I would like to calculate the dSPM values (Dale et al, Neuron, Vol. 26, 55–67). Is there a simple way to do it in the Fieldtrip? > > Thank you! > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 15 10:29:19 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 15 May 2012 11:29:19 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello again Realtime functions should work if I define the function as: cfg.trialfun = 'trialfun_general'; Right? Hamza On Sun, May 13, 2012 at 5:46 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Thank you for your help Stephen > > Hamza > > > On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Hi Hamza, >> >> I just saw you've been posting on the FT list for quite a while and >> have been working on offline analysis already. To answer your question >> more specifically: The trialfunction could be very simple in the first >> instance, but is needed to know what samples to read when >> preprocessing the data. You can find some examples here that you can >> adapt to your own purpose here: >> >> http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition >> >> Cheers, >> Stephen >> >> On 10 May 2012 14:51, Stephen Whitmarsh >> wrote: >> > Dear Hamza, >> > >> > The trialfunction is an integral part of processing data in FieldTrip. >> > It is how you define your timepoints of interest, i.e. trials based on >> > recorded markers in your data, or based on user-defined events (e.g. >> > sleep stages). >> > >> > If you are not yet familiar with the basic FieldTrip operations the >> > documentation of the realtime analysis might indeed seem somewhat >> > inadequate as it assumes this familiarity. FieldTrip's online analysis >> > tools are using many of the same functions of the offline ones, and >> > has a similar overall philosophy and approach. This makes it >> > relatively easy to understand and to use online analysis approach once >> > one is familiar with the offline one. Alas this translation is >> > assymmetric and doesn't hold for the other way around. >> > >> > The good news is, however, that everything is there to get you on your >> > way once your take a little detour. You could take a look at the >> > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and >> > get a bit of hands-on working through some steps with the supplied >> > tutorial-data. >> > >> > Specifically for your question these pages would be relevant: >> > >> http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data >> > http://fieldtrip.fcdonders.nl/tutorial/preprocessing >> > http://fieldtrip.fcdonders.nl/tutorial/continuous >> > >> > For more overview and general operations I would advice reading through: >> > http://fieldtrip.fcdonders.nl/walkthrough >> > >> > Most of all it might not be a bad idea to start with a pre-recorded >> > dataset and work on it offline, using the more standard and more >> > extensively documented offline functions for e.g. trial based >> > averaging. Once that works out for you can adapt it to the realtime >> > situation. >> > >> > Hope this helps, >> > Stephen >> > >> > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) >> > wrote: >> >> Hello, >> >> >> >> I don't know why should I define a function inside the >> >> ft_realtime_selectiveaverage. >> >> I just want to make an average of some segments. >> >> >> >> Could you provide me with an example of cfg.trialfun >> >> >> >> Hamza >> >> >> >> >> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >> >> wrote: >> >>> >> >>> Hello, >> >>> >> >>> I am doing realtime processing, and I wanted to check >> ft_realtime_average >> >>> function and ft_realtime_selectiveaverage functions. >> >>> >> >>> I faced a problem in defining cfg.trialfun >> >>> >> >>> Could you help me >> >>> >> >>> Best >> >>> >> >>> -- >> >>> Hamza Fawzi Altakroury >> >>> Graduate student - MA >> >>> Faculty of Engineering and Natural Sciences >> >>> Sabancı University >> >> >> >> >> >> >> >> >> >> -- >> >> Hamza Fawzi Altakroury >> >> Graduate student - MA >> >> Faculty of Engineering and Natural Sciences >> >> Sabancı University >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Tue May 15 11:18:07 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Tue, 15 May 2012 09:18:07 +0000 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> Thank you! I have dot source.avg.filter variable as an output. I guess that the inverse operator should have size of N-sources x M-channels and that it should be the same for all the time points. Am I correct? The structural variable source.avg.filter, however, contains 3xNchannels data for each of N-sources. What is it? Are there different inverse operators for different time points? Elena ________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Tuesday, May 15, 2012 9:23 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] where is the inverse operator? Hi Elena, You can specify cfg.mne.keepfilter = 'yes'. Best, Jan-Mathijs On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: Dear Fieldtrip Developers, I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? Thank you! Elena _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 11:29:51 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 11:29:51 +0200 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se>, <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> Message-ID: <9BE88D19-44DA-4CAC-A72D-5145E45F4DB0@donders.ru.nl> Each dipole location has a spatial filter, and each dipole is defined in 3D, hence the 3xchannels per dipole location. Jan-Mathijs On May 15, 2012, at 11:18 AM, Elena Orekhova wrote: > Thank you! > > I have dot source.avg.filter variable as an output. > > I guess that the inverse operator should have size of > N-sources x M-channels and that it should be the same for all the time points. Am I correct? > > The structural variable source.avg.filter, however, contains 3xNchannels data for each of N-sources. What is it? Are there different inverse operators for different time points? > > Elena > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, May 15, 2012 9:23 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] where is the inverse operator? > > Hi Elena, > > You can specify cfg.mne.keepfilter = 'yes'. > > Best, > > Jan-Mathijs > > On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: > >> >> Dear Fieldtrip Developers, >> >> I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? >> >> Thank you! >> Elena >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Wed May 16 09:06:30 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 16 May 2012 10:06:30 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello, The function can be run when I put cfg.trialfun = 'trialfun_general'; But I don't get the result that I supposed The file: cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'stimulus'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; %cfg = ft_definetrial(cfg); ft_realtime_average(cfg) Is there any wrong in my function? Hamza On Tue, May 15, 2012 at 11:29 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello again > > Realtime functions should work if I define the function as: > > cfg.trialfun = 'trialfun_general'; > > Right? > > Hamza > > > On Sun, May 13, 2012 at 5:46 PM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Thank you for your help Stephen >> >> Hamza >> >> >> On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < >> stephen.whitmarsh at gmail.com> wrote: >> >>> Hi Hamza, >>> >>> I just saw you've been posting on the FT list for quite a while and >>> have been working on offline analysis already. To answer your question >>> more specifically: The trialfunction could be very simple in the first >>> instance, but is needed to know what samples to read when >>> preprocessing the data. You can find some examples here that you can >>> adapt to your own purpose here: >>> >>> http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition >>> >>> Cheers, >>> Stephen >>> >>> On 10 May 2012 14:51, Stephen Whitmarsh >>> wrote: >>> > Dear Hamza, >>> > >>> > The trialfunction is an integral part of processing data in FieldTrip. >>> > It is how you define your timepoints of interest, i.e. trials based on >>> > recorded markers in your data, or based on user-defined events (e.g. >>> > sleep stages). >>> > >>> > If you are not yet familiar with the basic FieldTrip operations the >>> > documentation of the realtime analysis might indeed seem somewhat >>> > inadequate as it assumes this familiarity. FieldTrip's online analysis >>> > tools are using many of the same functions of the offline ones, and >>> > has a similar overall philosophy and approach. This makes it >>> > relatively easy to understand and to use online analysis approach once >>> > one is familiar with the offline one. Alas this translation is >>> > assymmetric and doesn't hold for the other way around. >>> > >>> > The good news is, however, that everything is there to get you on your >>> > way once your take a little detour. You could take a look at the >>> > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and >>> > get a bit of hands-on working through some steps with the supplied >>> > tutorial-data. >>> > >>> > Specifically for your question these pages would be relevant: >>> > >>> http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data >>> > http://fieldtrip.fcdonders.nl/tutorial/preprocessing >>> > http://fieldtrip.fcdonders.nl/tutorial/continuous >>> > >>> > For more overview and general operations I would advice reading >>> through: >>> > http://fieldtrip.fcdonders.nl/walkthrough >>> > >>> > Most of all it might not be a bad idea to start with a pre-recorded >>> > dataset and work on it offline, using the more standard and more >>> > extensively documented offline functions for e.g. trial based >>> > averaging. Once that works out for you can adapt it to the realtime >>> > situation. >>> > >>> > Hope this helps, >>> > Stephen >>> > >>> > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) >>> > wrote: >>> >> Hello, >>> >> >>> >> I don't know why should I define a function inside the >>> >> ft_realtime_selectiveaverage. >>> >> I just want to make an average of some segments. >>> >> >>> >> Could you provide me with an example of cfg.trialfun >>> >> >>> >> Hamza >>> >> >>> >> >>> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >>> >> wrote: >>> >>> >>> >>> Hello, >>> >>> >>> >>> I am doing realtime processing, and I wanted to check >>> ft_realtime_average >>> >>> function and ft_realtime_selectiveaverage functions. >>> >>> >>> >>> I faced a problem in defining cfg.trialfun >>> >>> >>> >>> Could you help me >>> >>> >>> >>> Best >>> >>> >>> >>> -- >>> >>> Hamza Fawzi Altakroury >>> >>> Graduate student - MA >>> >>> Faculty of Engineering and Natural Sciences >>> >>> Sabancı University >>> >> >>> >> >>> >> >>> >> >>> >> -- >>> >> Hamza Fawzi Altakroury >>> >> Graduate student - MA >>> >> Faculty of Engineering and Natural Sciences >>> >> Sabancı University >>> >> >>> >> _______________________________________________ >>> >> fieldtrip mailing list >>> >> fieldtrip at donders.ru.nl >>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Wed May 16 09:54:56 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Wed, 16 May 2012 10:54:56 +0300 Subject: [FieldTrip] ICA for merged EEG recordings Message-ID: Hi all, I have a question which is not directly related to fieldtrip, but I bet you can help me with that :) I'm running a very long EEG experiment (takes about 3 hours), so we decided to run it in two sessions, in two following days. I used the Biosemi Merger to merge the files from day 1 and day 2, and want to run ICA to remove blinks and eye-movements. Would you say it's better to run ICA on the merged file, or do you think it would be best to run ICA separately for each file, and then merge the data? Thanks! Roni -------------- next part -------------- An HTML attachment was scrubbed... URL: From maarten.de.vos at uni-oldenburg.de Wed May 16 11:08:00 2012 From: maarten.de.vos at uni-oldenburg.de (Maarten De Vos) Date: Wed, 16 May 2012 09:08:00 +0000 Subject: [FieldTrip] ICA for merged EEG recordings In-Reply-To: References: Message-ID: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> dear Roni, I would definitely suggest to run ICA on separate blocks. Because you removed the cap, also the relative position of eyes to the electrodes can have (has) been changed. Seems you have enough data in both sessions to run a reliable ICA. so I would run ICA on separate blocks, remove artifacts, and then merge the data. best maarten ________________________________ Van: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] namens Roni Tibon [ronitibon at gmail.com] Verzonden: woensdag 16 mei 2012 9:54 Aan: Email discussion list for the FieldTrip project Onderwerp: [FieldTrip] ICA for merged EEG recordings Hi all, I have a question which is not directly related to fieldtrip, but I bet you can help me with that :) I'm running a very long EEG experiment (takes about 3 hours), so we decided to run it in two sessions, in two following days. I used the Biosemi Merger to merge the files from day 1 and day 2, and want to run ICA to remove blinks and eye-movements. Would you say it's better to run ICA on the merged file, or do you think it would be best to run ICA separately for each file, and then merge the data? Thanks! Roni -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Wed May 16 11:58:53 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Wed, 16 May 2012 12:58:53 +0300 Subject: [FieldTrip] ICA for merged EEG recordings In-Reply-To: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> References: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> Message-ID: Thanks! On 16 May 2012 12:08, Maarten De Vos wrote: > dear Roni, > > I would definitely suggest to run ICA on separate blocks. Because you > removed the cap, also the relative position of eyes to the electrodes can > have (has) been changed. Seems you have enough data in both sessions to > run a reliable ICA. > so I would run ICA on separate blocks, remove artifacts, and then merge > the data. > best > maarten > ------------------------------ > *Van:* fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > namens Roni Tibon [ronitibon at gmail.com] > *Verzonden:* woensdag 16 mei 2012 9:54 > *Aan:* Email discussion list for the FieldTrip project > *Onderwerp:* [FieldTrip] ICA for merged EEG recordings > > Hi all, > > I have a question which is not directly related to fieldtrip, but I bet > you can help me with that :) > > I'm running a very long EEG experiment (takes about 3 hours), so we > decided to run it in two sessions, in two following days. > I used the Biosemi Merger to merge the files from day 1 and day 2, and > want to run ICA to remove blinks and eye-movements. > > Would you say it's better to run ICA on the merged file, or do you think > it would be best to run ICA separately for each file, and then merge the > data? > > Thanks! > Roni > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Wed May 16 13:25:54 2012 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Wed, 16 May 2012 13:25:54 +0200 Subject: [FieldTrip] TFR map couldn't display negative value Message-ID: Hi Fieldtripers, I try to plot the TRP map using ft_singleplotTFR, but the colour map cannot display negative value. My code likes this: cfg = []; cfg.baseline = [-0.3 -0.1]; cfg.baselinetype = 'absolute'; cfg.channelname = {'MLP','MRP','MLO','MRO'}; figure; ft_singleplotTFR(cfg, TFR); I attach one example I plotted. Does anyone know how to solve it ? I think maybe this is a bug. Thanks in advance ! Best, Haiteng -- Haiteng Jiang PhD candidate Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Visiting address Room 2.32 Donders Centre for Cognitive Neuroimaging Kapittelweg 29 6525 EN Nijmegen the Netherlands Tel.: +31 (0)243668291 Web: https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: examples.jpg Type: image/jpeg Size: 60048 bytes Desc: not available URL: From nuria.donamayor at neuro.uni-luebeck.de Wed May 16 13:49:15 2012 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Wed, 16 May 2012 13:49:15 +0200 Subject: [FieldTrip] between-groups cluster stats Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> Dear fieldtrip users, I am currently analyzing data from a between-groups study and I am having some trouble programming the stats... Data are from a neuromag 306 system and I am using grand averages (keepindividual = yes) of the combined planar gradiometer data. I have followed the fieldtrip tutorial on cluster-based permutation tests on ERFs, so my script currently looks like this: cfg = []; cfg.latency = [0 .5]; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 3; cfg.neighbours = neighbours; cfg.tail = 0; cfg.clustertail = 0; cfg.numrandomization = 500; design = zeros(1,(size(g1.individual,1)+size(g2.individual,1))); design(1,1:size(g1.individual,1)) = 1; design(1,(size(g1.individual,1)+1):(size(g1.individual,1)+size(g2.individual,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_timelockstatistics(cfg, g1, g2); Still, though the script works, creates one or two clusters and produces no error, the output makes no sense. For example, there is a pretty huge difference in the ERFs between around 50-150 ms, but the output only shows a couple of sensors forming a cluster at 32 ms. Up to now, I had just performed within-subjects stats, so I guess there is probably something wrong in my design... I would be very thankful to any help! Thanks, Nuria From johanna.zumer at donders.ru.nl Wed May 16 14:08:45 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 16 May 2012 14:08:45 +0200 Subject: [FieldTrip] TFR map couldn't display negative value In-Reply-To: References: Message-ID: Hi Haiteng, Does this solve it for you? http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity Cheers, Johanna 2012/5/16 Haiteng Jiang > Hi Fieldtripers, > > I try to plot the TRP map using ft_singleplotTFR, but the colour map > cannot display negative value. My code likes this: > > cfg = []; > cfg.baseline = [-0.3 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.channelname = {'MLP','MRP','MLO','MRO'}; > figure; ft_singleplotTFR(cfg, TFR); > > I attach one example I plotted. Does anyone know how to solve it ? I think > maybe this is a bug. Thanks in advance ! > > > Best, > Haiteng > > > -- > Haiteng Jiang > PhD candidate > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Visiting address > Room 2.32 > Donders Centre for Cognitive Neuroimaging > Kapittelweg 29 > 6525 EN Nijmegen > the Netherlands > > Tel.: +31 (0)243668291 > Web: https://sites.google.com/site/haitengjiang/ > > > _______________________________________________ > 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.vandermeij at donders.ru.nl Wed May 16 14:48:55 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 16 May 2012 14:48:55 +0200 Subject: [FieldTrip] TFR map couldn't display negative value In-Reply-To: References: Message-ID: Hey Haiting, This is a very annoying Matlab OpenGL bug, please see the following FAQ on how to bypass it: http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity In your case, you could try the second option mentioned, it should look fine: cfg.maskstyle = 'saturation' Best, Roemer On Wed, May 16, 2012 at 2:47 PM, Roemer van der Meij < roemer.van.der.meij at gmail.com> wrote: > Hey Haiting, > > This is a very annoying Matlab OpenGL bug, please see the following FAQ on > how to bypass it: > > http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity > > In your case, you could try the second option mentioned, it should look > fine: > cfg.maskstyle = 'saturation' > > Best, > Roemer > > > On Wed, May 16, 2012 at 1:25 PM, Haiteng Jiang wrote: > >> Hi Fieldtripers, >> >> I try to plot the TRP map using ft_singleplotTFR, but the colour map >> cannot display negative value. My code likes this: >> >> cfg = []; >> cfg.baseline = [-0.3 -0.1]; >> cfg.baselinetype = 'absolute'; >> cfg.channelname = {'MLP','MRP','MLO','MRO'}; >> figure; ft_singleplotTFR(cfg, TFR); >> >> I attach one example I plotted. Does anyone know how to solve it ? I >> think maybe this is a bug. Thanks in advance ! >> >> >> Best, >> Haiteng >> >> >> -- >> Haiteng Jiang >> PhD candidate >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Visiting address >> Room 2.32 >> Donders Centre for Cognitive Neuroimaging >> Kapittelweg 29 >> 6525 EN Nijmegen >> the Netherlands >> >> Tel.: +31 (0)243668291 >> Web: https://sites.google.com/site/haitengjiang/ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed May 16 15:36:57 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 May 2012 15:36:57 +0200 Subject: [FieldTrip] between-groups cluster stats In-Reply-To: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> References: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> Message-ID: Dear Nuria, I don't see anything wrong with your design, its just the 1's and 2's I would expect. (although: design = [ones(1,size(g1.individual,1)) ones(1,size(g1.individual,1))*2]; would be a bit shorter ;-) Two points though: 1) Statistics don't neccecarily make sense looking only at means (or mean differences), since it depends on the variance of the data as well. Take a look at the .stat field to get a sense of how the time-by-time and sensor-by-sensor statistics are corresponding to the clusters, as well as to your mean-differences. You can also plot these values topographically to see if they make sense. 2) I would not start with clustercorrection as a first step in appreciating your effects, especially when it comes to possibly noisy intermediate data such as your within subject data. Clustercorrection is meant as a means to deal with multiple comparison corrections, nothing more nothing less. For a first look at significant differences per sensor I would not specify a .correctm at all. Going from there, and to group level, the clusters might start to make more sense though. Good luck! Stephen On 16 May 2012 13:49, Nuria Doñamayor Alonso wrote: > Dear fieldtrip users, > I am currently analyzing data from a between-groups study and I am having some trouble programming the stats... Data are from a neuromag 306 system and I am using grand averages (keepindividual = yes) of the combined planar gradiometer data. I have followed the fieldtrip tutorial on cluster-based permutation tests on ERFs, so my script currently looks like this: > > cfg = []; > cfg.latency = [0 .5]; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 3; > cfg.neighbours = neighbours; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.numrandomization = 500; > > design = zeros(1,(size(g1.individual,1)+size(g2.individual,1))); > design(1,1:size(g1.individual,1)) = 1; > design(1,(size(g1.individual,1)+1):(size(g1.individual,1)+size(g2.individual,1))) = 2; > > cfg.design = design; > cfg.ivar  = 1; > > [stat] = ft_timelockstatistics(cfg, g1, g2); > > Still, though the script works, creates one or two clusters and produces no error, the output makes no sense. For example, there is a pretty huge difference in the ERFs between around 50-150 ms, but the output only shows a couple of sensors forming a cluster at 32 ms. Up to now, I had just performed within-subjects stats, so I guess there is probably something wrong in my design... I would be very thankful to any help! > Thanks, > Nuria > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Thu May 17 15:37:06 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 17 May 2012 15:37:06 +0200 Subject: [FieldTrip] center of sphere artefact In-Reply-To: References: Message-ID: Dear Frederic, I see that you have computed the 'noise' (from cfg.lcmv.projectnoise='yes'). You can often use this output to remove the center of sphere artifact to which you refer. Have you tried this (i.e. described here http://fieldtrip.fcdonders.nl/tutorial/beamformer#neural_activity_index ) and does this help? Also, how much is the rank of the covariance matrix (i.e. cov_data.cov) reduced relative to number of sensors you have? In other words, if length(indx) is much less than the number of sensors, then you may need a cfg.lcmv.lambda greater than 5%. Best, Johanna 2012/5/8 Frederic Roux > Dear all, > > I was looking at my lcmv-beamformer maps of ~200 Sec of > eyes closed resting state MEG activity and wondering if > what I was seeing is the center of sphere artefact. > > The code I used is: > > %filtering of the data > cfg = []; > cfg.bpfilter = 'yes'; > cfg.bpfilttype = 'but'; > cfg.bpfreq = [5 45]; > cfg.bpfiltord = 4; > cfg.bpfiltdir = 'twopass'; > > [meg_data] = ft_preprocessing(cfg,meg_data); > > %PCA to extract components with max explained variance > [cf,pcs,vexp] = princomp(meg_data.trial{1},'econ'); > pexp = 100*vexp/sum(vexp); > indx = find(cumsum(vexp) <=90); > meg_data.trial{1} = (pcs(:,indx)*cv(:,indx)')'; > > % computing the covariance matrix > cfg = []; > cfg.channel = {'MEG'}; > cfg.covariance = 'yes'; > cfg.pad = 'maxperlen'; > cfg.sgncmb = {'MEG' 'MEG'}; > cfg.removemean = 'yes'; > > [cov_data] = ft_timelockanalysis(cfg,meg_data); > > %LCMV beamformer > cfg = []; > cfg.channel = {'MEG'}; > cfg.grid = grid_data; > cfg.vol = hdm; > cfg.method = 'lcmv'; > cfg.grid.dim = [Nx Ny Nz]; > > cfg.lcmv.fixedori = 'no'; > cfg.lcmv.lambda = '5%'; > cfg.lcmv.projectnoise = 'yes'; > cfg.lcmv.keepfilters = 'yes'; > cfg.lcmv.projectmom = 'no'; > cfg.lcmv.keepmom = 'no'; > cfg.lcmv.reducerank = 2; > cfg.lcmv.normalize = 'yes'; > > [bf] = ft_sourceanalysis(cfg,cov_data); > > %make power unit invariant > bf.avg.pow = bf.avg.pow./max(bf.avg.pow); > > Since I don't have enough experience to judge about that > I wanted to ask if anybody out there with experience > could tell me their opinion. > > The grid was computed using an inwardshift of -0.5 and a grid > resolution of 2.5 mm. The head model using the ft_prepare_singleshell. > > Any help,advice, comments or suggestions would be highly appreciated. > > Best, > Fred > > > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > _______________________________________________ > 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 johanna.zumer at donders.ru.nl Thu May 17 15:59:10 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 17 May 2012 15:59:10 +0200 Subject: [FieldTrip] ICA before beamforming -> change in gradiometer -> workaround? In-Reply-To: References: Message-ID: Dear Frederic, It is possible to keep the .grad structure, with updated .grad.tra, by including, in the third argument to ft_rejectcomponent, the original data structure, like this: comp=ft_componentanalysis(cfg1,rawdata) cleanedraw=ft_rejectcomponent(cfg2,comp,rawdata); Best, Johanna 2012/5/7 Frederic Roux > Dear all, > > I am using ICA prior to beamforming for artefact cleaning (EOG & ECG). > > After running ft_componentanalysis I noticed that the gradiometer structure > is removed from the data, which is required by ft_sourceanalysis. > > In a prior post I read that one could just add the grad structure from a > previous version > of the data before the ICA cleaning. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004877.html > > Can anyone tell me if this is the best solution, or if there is any other > strategies out there? > > Best, > Fred > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > _______________________________________________ > 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 jonas at obleser.de Fri May 18 17:51:40 2012 From: jonas at obleser.de (Jonas Obleser) Date: Fri, 18 May 2012 17:51:40 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions Message-ID: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> Dear FT colleagues, after a great FT workshop and a fresh FT release in my matlab path, I am all the more confused on how to “beam“ my single trials (DICS, cfg.realfilter='yes'). Now, here I have this filter (allsource.avg.filter) constructed from the CSD of, say 300 trials (a struct called allfreq, baseline and post-stim together; obtained with ft_freqanalysis, 'mtmfft', cfg.keeptrials ='yes'). In order to “filter them all and let God sort ’em out” later, I somehow must now funnel my allfreq.trials through the filter (cfg.grid.filter = allsource.avg.filter). But: Somehow, cfg.rawtrials seems to be deprecated, can this be true? I understand that in principle it would simply be the single-trial CSD “sandwiched” between the filter and the filter transposed, so I probably can do it by hand easily, but I thought there still must be a handy way of having FT do this for me? Thanks for a quick hint by anybody! Best wishes, Jonas Dr. Jonas Obleser Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Leipzig, Germany (p) +49 (0)341 9940 114 (e) obleser at cbs.mpg.de From johanna.zumer at donders.ru.nl Fri May 18 18:15:45 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 18 May 2012 18:15:45 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions In-Reply-To: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> References: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> Message-ID: Dear Jonas, Sorry that this part is indeed confusing. cfg.rawtrial is not deprecated, but rather you should specify cfg.grid.filter = allsource.avg.filter and cfg.rawtrial = 'yes' and cfg.keeptrials = 'yes', but cfg.singletrial='no' (i.e. default). On what line exactly are you finding an error? or is the mistake that you are calling it 'rawtrials' not 'rawtrial'? Best regards, Johanna 2012/5/18 Jonas Obleser > > Dear FT colleagues, > > after a great FT workshop and a fresh FT release in my matlab path, > I am all the more confused on how to “beam“ my single trials (DICS, > cfg.realfilter='yes'). > > Now, here I have this filter (allsource.avg.filter) constructed from the > CSD of, say 300 trials (a struct called allfreq, baseline and post-stim > together; obtained with ft_freqanalysis, 'mtmfft', cfg.keeptrials ='yes'). > > In order to “filter them all and let God sort ’em out” later, I somehow > must now funnel my allfreq.trials through the filter (cfg.grid.filter = > allsource.avg.filter). > > But: Somehow, cfg.rawtrials seems to be deprecated, can this be true? > > I understand that in principle it would simply be the single-trial CSD > “sandwiched” between the filter and the filter transposed, so I probably > can do it by hand easily, but I thought there still must be a handy way of > having FT do this for me? > > Thanks for a quick hint by anybody! > Best wishes, Jonas > > > > > Dr. Jonas Obleser > Auditory Cognition Group > Max Planck Institute for Human Cognitive and Brain Sciences > Leipzig, Germany > (p) +49 (0)341 9940 114 > (e) obleser at cbs.mpg.de > > > > > _______________________________________________ > 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 jonas at obleser.de Sat May 19 12:14:43 2012 From: jonas at obleser.de (Jonas Obleser) Date: Sat, 19 May 2012 12:14:43 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions Message-ID: Dear Johanna, thanks, it really *was* one of these notorious plural/singular cfg errors (“cfg.rawtrials” rather than the correct “cfg.rawtrial”). Am getting “scanning repetition 1 … 2 … 3 ” now with the precomputed filter and leadfield, so it seems to work. [I must say that three options named cfg.singletrial, cfg.rawtrial, and cfg.keeptrials is a pretty daring combo!] Best wishes, Jonas Dr. Jonas Obleser Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Leipzig, Germany (p) +49 (0)341 9940 114 (e) obleser at cbs.mpg.de From daria.laptinskaya at googlemail.com Sat May 19 17:21:37 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sat, 19 May 2012 17:21:37 +0200 Subject: [FieldTrip] Changing samplingrate for EGI-data Message-ID: Dear All, I wish to subsample my EGI-data from 1000 to 250 Hz before preprocessing to speed up the whole analysis. For the step descriped at http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the structure as obtained from the FT_PREPROCESSING function is needed. Does anyone have an idea for read the data with a changing samplingrate before preprocessing? It would really help me a lot! Thanks, Daria From inieuwenhuis at berkeley.edu Sat May 19 20:58:02 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Sat, 19 May 2012 11:58:02 -0700 Subject: [FieldTrip] Changing samplingrate for EGI-data In-Reply-To: References: Message-ID: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> Hi Daria, Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. Hope this helps, Ingrid On May 19, 2012, at 8:21, Daria Laptinskaya wrote: > Dear All, > > I wish to subsample my EGI-data from 1000 to 250 Hz before > preprocessing to speed up the whole analysis. > For the step descriped at > http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the > structure as obtained from the FT_PREPROCESSING function is needed. > Does anyone have an idea for read the data with a changing > samplingrate before preprocessing? > It would really help me a lot! > > Thanks, > Daria > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Sun May 20 11:53:58 2012 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 20 May 2012 11:53:58 +0200 Subject: [FieldTrip] equal number of trials across conditions Message-ID: <4FB8BF36.8050909@gmail.com> Hi everyone, I'm working on a dataset (ERPs, but this is not that relevant for the question, I believe) for which one condition elicited more errors than the other. I'd like to have both conditions with the same number of trials in the analyses. Ideally, I'd throw away the noisiest trials from one condition, instead of just start throwing away trials at random. I was thinking of using z-scores for that but I was wondering if any of you has already done this before and how. What would be the best way to go? Take the mean amplitude across all trials (collapsed over condition or not?) and calculate the z-score for each trial individually? Then take out the one with the largest scores? How does this approach sound? Does FT keep information about the variance for each trial somewhere in the output of an artefact rejection function? Or would I have to compute that myself? I'd appreciate any suggestions or feedback. Cheers, Vitória From inbalots at gmail.com Sun May 20 13:02:58 2012 From: inbalots at gmail.com (Inbal Shapira Lots) Date: Sun, 20 May 2012 14:02:58 +0300 Subject: [FieldTrip] error using ft_databrowser Message-ID: Hello I call the function in the following way: cfg = []; cfg.dataset=fileName; cfg.trialdef.beginning=0.1; cfg.trialdef.end=0.2; cfg.trialfun='trialfun_raw'; cfg=ft_definetrial(cfg); % to create all needed fields additionally to trl cfg.demean='yes'; cfg.baselinewindow=[-0.2,0]; cfg.trl = trl; cfg.channel = {'MEG'}; BLC =ft_preprocessing(cfg); cfg.layout='4D248.lay'; cfg.channel = {BLC.label{1:10:end}}; cfgbo=ft_databrowser(cfg,BLC); and I get the following error: ??? Attempt to reference field of non-structure array. Error in ==> ft_databrowser at 411 eventtypes = unique({event.type}); What do I do wrong? a similar error occure when I call in this way as well: cfgc = []; cfgc.method='pca'; cfgc.numcomponent=20; comp = ft_componentanalysis(cfgc, BLC); cfgb=[]; cfgb.layout='4D248.lay'; cfgb.channel = {comp.label{1:5}}; %cfgb.ploteventlabels ='colorvalue' ;%(default = 'type=value'); cfgbo=ft_databrowser(cfgb,comp); Thanks Inbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Sun May 20 13:25:52 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Sun, 20 May 2012 13:25:52 +0200 Subject: [FieldTrip] Changing samplingrate for EGI-data In-Reply-To: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> References: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> Message-ID: Hi Daria, 1. you may want to check out the EGI software. there should be some resampling tool. the you can read the downsampled data into FT. 2. you can read chunks of trials using ft_preprocessing. resample. at the end concatenate them with ft_appenddata ciao, n On 19.05.2012, at 20:58, Ingrid Nieuwenhuis wrote: > Hi Daria, > > Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. > > Hope this helps, > Ingrid > > On May 19, 2012, at 8:21, Daria Laptinskaya wrote: > >> Dear All, >> >> I wish to subsample my EGI-data from 1000 to 250 Hz before >> preprocessing to speed up the whole analysis. >> For the step descriped at >> http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the >> structure as obtained from the FT_PREPROCESSING function is needed. >> Does anyone have an idea for read the data with a changing >> samplingrate before preprocessing? >> It would really help me a lot! >> >> Thanks, >> Daria >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.stolk at fcdonders.ru.nl Mon May 21 09:18:59 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 21 May 2012 09:18:59 +0200 (CEST) Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: <4FB8BF36.8050909@gmail.com> Message-ID: <96701170.281413.1337584739634.JavaMail.root@sculptor.zimbra.ru.nl> Hi Vitoria, With 'randperm' you can randomly select a number of trials from one set. If you think order is important, for example indicated by the the trialnumber, have a look at ft_stratify and method 'histogram'. I would perform these randomization steps after regular cleaning. Perhaps someone else has more fine-grained idea for your desired approach. Yours, Arjen ----- Oorspronkelijk bericht ----- > Van: "Vitória Magalhães Piai" > Aan: fieldtrip at donders.ru.nl > Verzonden: Zondag 20 mei 2012 11:53:58 > Onderwerp: [FieldTrip] equal number of trials across conditions > Hi everyone, > > I'm working on a dataset (ERPs, but this is not that relevant for the > question, I believe) for which one condition elicited more errors than > the other. > > I'd like to have both conditions with the same number of trials in the > analyses. > Ideally, I'd throw away the noisiest trials from one condition, > instead > of just start throwing away trials at random. > > I was thinking of using z-scores for that but I was wondering if any > of > you has already done this before and how. What would be the best way > to go? > Take the mean amplitude across all trials (collapsed over condition or > not?) and calculate the z-score for each trial individually? Then take > out the one with the largest scores? How does this approach sound? > Does FT keep information about the variance for each trial somewhere > in > the output of an artefact rejection function? Or would I have to > compute > that myself? > > I'd appreciate any suggestions or feedback. > > Cheers, Vitória > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From g.piantoni at nin.knaw.nl Mon May 21 11:19:12 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Mon, 21 May 2012 11:19:12 +0200 Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: <4FB8BF36.8050909@gmail.com> References: <4FB8BF36.8050909@gmail.com> Message-ID: Hi Vitória, I like the intuitive appeal of your approach, in order to keep only the "most representative" trials. However, I'd have serious concerns that your approach might not be valid. If you reject only the noisiest trials from condition A, you're applying a sort of extra preprocessing step to your data and this makes the comparison between conditions A and B not very meaningful. You cannot unequivocally attribute the difference between A and B to a real difference between experimental conditions or to the extra preprocessing step. More critically, if you only reject noisy trials in condition A, you'll systematically introduce heteroscedasticity in your data; this is against one of the assumptions of parametric testing. I agree with Arjen to use random sampling of the trials of condition A. Depending on what you want to do next, you can even get standard errors from this randomization, similarly to the bootstrap approach. I find this a very elegant way to deal with very unequal numbers of trials. Hope this helps, Best, Gio -- Giovanni Piantoni, MSc Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 20 5665492 gio at gpiantoni.com www.gpiantoni.com On Sun, May 20, 2012 at 11:53 AM, Vitória Magalhães Piai wrote: > Hi everyone, > > I'm working on a dataset (ERPs, but this is not that relevant for the > question, I believe) for which one condition elicited more errors than the > other. > > I'd like to have both conditions with the same number of trials in the > analyses. > Ideally, I'd throw away the noisiest trials from one condition, instead of > just start throwing away trials at random. > > I was thinking of using z-scores for that but I was wondering if any of you > has already done this before and how. What would be the best way to go? > Take the mean amplitude across all trials (collapsed over condition or not?) > and calculate the z-score for each trial individually? Then take out the one > with the largest scores? How does this approach sound? > Does FT keep information about the variance for each trial somewhere in the > output of an artefact rejection function? Or would I have to compute that > myself? > > I'd appreciate any suggestions or feedback. > > Cheers, Vitória > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Mon May 21 12:07:02 2012 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Mon, 21 May 2012 12:07:02 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 18, Issue 33 In-Reply-To: References: Message-ID: <4FBA13C6.205@gmail.com> Thank you Arjen and Giovanni, and good point Gio, didn't think of that before but now that you mention, it's really obvious that that would create a difference between the conditions in itself. I'll go for random then. Cheers, Vitória On 21-5-2012 12:00, fieldtrip-request at donders.ru.nl wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. error using ft_databrowser (Inbal Shapira Lots) > 2. Re: Changing samplingrate for EGI-data (Nathan Weisz) > 3. Re: equal number of trials across conditions (Stolk, A.) > 4. Re: equal number of trials across conditions (Gio Piantoni) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 20 May 2012 14:02:58 +0300 > From: Inbal Shapira Lots > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] error using ft_databrowser > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hello > I call the function in the following way: > cfg = []; > cfg.dataset=fileName; > cfg.trialdef.beginning=0.1; > cfg.trialdef.end=0.2; > cfg.trialfun='trialfun_raw'; > cfg=ft_definetrial(cfg); % to create all needed fields additionally to trl > cfg.demean='yes'; > cfg.baselinewindow=[-0.2,0]; > cfg.trl = trl; > cfg.channel = {'MEG'}; > BLC =ft_preprocessing(cfg); > > cfg.layout='4D248.lay'; > cfg.channel = {BLC.label{1:10:end}}; > cfgbo=ft_databrowser(cfg,BLC); > > and I get the following error: > > ??? Attempt to reference field of non-structure array. > Error in ==> ft_databrowser at 411 > eventtypes = unique({event.type}); > > What do I do wrong? > > a similar error occure when I call in this way as well: > cfgc = []; > cfgc.method='pca'; > cfgc.numcomponent=20; > comp = ft_componentanalysis(cfgc, BLC); > > cfgb=[]; > cfgb.layout='4D248.lay'; > cfgb.channel = {comp.label{1:5}}; > %cfgb.ploteventlabels ='colorvalue' ;%(default = 'type=value'); > cfgbo=ft_databrowser(cfgb,comp); > > > Thanks > Inbal > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Sun, 20 May 2012 13:25:52 +0200 > From: Nathan Weisz > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Changing samplingrate for EGI-data > Message-ID: > Content-Type: text/plain; CHARSET=US-ASCII > > Hi Daria, > > 1. you may want to check out the EGI software. there should be some resampling tool. the you can read the downsampled data into FT. > 2. you can read chunks of trials using ft_preprocessing. resample. at the end concatenate them with ft_appenddata > > ciao, > n > > On 19.05.2012, at 20:58, Ingrid Nieuwenhuis wrote: > >> Hi Daria, >> >> Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. >> >> Hope this helps, >> Ingrid >> >> On May 19, 2012, at 8:21, Daria Laptinskaya wrote: >> >>> Dear All, >>> >>> I wish to subsample my EGI-data from 1000 to 250 Hz before >>> preprocessing to speed up the whole analysis. >>> For the step descriped at >>> http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the >>> structure as obtained from the FT_PREPROCESSING function is needed. >>> Does anyone have an idea for read the data with a changing >>> samplingrate before preprocessing? >>> It would really help me a lot! >>> >>> Thanks, >>> Daria >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ------------------------------ > > Message: 3 > Date: Mon, 21 May 2012 09:18:59 +0200 (CEST) > From: "Stolk, A." > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] equal number of trials across conditions > Message-ID: > <96701170.281413.1337584739634.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Vitoria, > > With 'randperm' you can randomly select a number of trials from one set. If you think order is important, for example indicated by the the trialnumber, have a look at ft_stratify and method 'histogram'. > > I would perform these randomization steps after regular cleaning. Perhaps someone else has more fine-grained idea for your desired approach. > > Yours, > Arjen > > > > ----- Oorspronkelijk bericht ----- >> Van: "Vit?ria Magalh?es Piai" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Zondag 20 mei 2012 11:53:58 >> Onderwerp: [FieldTrip] equal number of trials across conditions >> Hi everyone, >> >> I'm working on a dataset (ERPs, but this is not that relevant for the >> question, I believe) for which one condition elicited more errors than >> the other. >> >> I'd like to have both conditions with the same number of trials in the >> analyses. >> Ideally, I'd throw away the noisiest trials from one condition, >> instead >> of just start throwing away trials at random. >> >> I was thinking of using z-scores for that but I was wondering if any >> of >> you has already done this before and how. What would be the best way >> to go? >> Take the mean amplitude across all trials (collapsed over condition or >> not?) and calculate the z-score for each trial individually? Then take >> out the one with the largest scores? How does this approach sound? >> Does FT keep information about the variance for each trial somewhere >> in >> the output of an artefact rejection function? Or would I have to >> compute >> that myself? >> >> I'd appreciate any suggestions or feedback. >> >> Cheers, Vit?ria >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ------------------------------ > > Message: 4 > Date: Mon, 21 May 2012 11:19:12 +0200 > From: Gio Piantoni > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] equal number of trials across conditions > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Hi Vit?ria, > > I like the intuitive appeal of your approach, in order to keep only > the "most representative" trials. However, I'd have serious concerns > that your approach might not be valid. > > If you reject only the noisiest trials from condition A, you're > applying a sort of extra preprocessing step to your data and this > makes the comparison between conditions A and B not very meaningful. > You cannot unequivocally attribute the difference between A and B to a > real difference between experimental conditions or to the extra > preprocessing step. > More critically, if you only reject noisy trials in condition A, > you'll systematically introduce heteroscedasticity in your data; this > is against one of the assumptions of parametric testing. > > I agree with Arjen to use random sampling of the trials of condition > A. Depending on what you want to do next, you can even get standard > errors from this randomization, similarly to the bootstrap approach. I > find this a very elegant way to deal with very unequal numbers of > trials. > > Hope this helps, > > Best, > > Gio > > > -- > ** Please consider the environment - do you really need to print? ** From y.j.w.rozendaal at student.tue.nl Mon May 21 13:28:08 2012 From: y.j.w.rozendaal at student.tue.nl (Rozendaal, Y.J.W.) Date: Mon, 21 May 2012 13:28:08 +0200 Subject: [FieldTrip] out of memory when executing ft_volumesegmentation Message-ID: <0C957C2F55FC6447A1F237B48EA8604801025D97777F@EXCHANGE12.campus.tue.nl> Hi, I'm trying to create a head model using an MRI to use it for dipole fitting of MEG data. However, currently my Matlab (R2007b on Windows Vista) gives an 'out of memory' error when executing the ft_volumesegment statement. I already tried several things to improve memory handling by Matlab (not keeping trials, not keeping intermediate and the 'pack' statement). The first part of the output seems fine: the input is volume data with dimensions [240 240 170] Converting the coordinate system from ctf to spm performing the segmentation on the specified volume creating scalpmask smoothing anatomy with a 5-voxel FWHM kernel thresholding anatomy at a relative threshold of 0.100 ??? Error using ==> spm_bwlabel Out of memory. Type HELP MEMORY for your options. Error in ==> ft_volumesegment>threshold at 535 [tmp, N] = spm_bwlabel(output, 6); Error in ==> ft_volumesegment at 490 if dothresh, anatomy = threshold(anatomy, cfg.threshold(k), 'anatomy'); end This problem also occured when using the mri of the provided tutorial data. How could I fix this and what causes this large memory consumption? Could using another version of Matlab help or is there an error in my code? Thanks in advance, Yvonne ----- %% load MRI file mri = ft_read_mri(filename_mri); %% realign MRI to head coordinates cfg = []; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg,mri); %% segment MRI cfg = []; cfg.units = 'mm'; cfg.output = {'scalp,'skull','brain'}; cfg.keeptrials = 'no'; cfg.keepintermediate = 'no'; pack mri_segmented = ft_volumesegment(cfg,mri_realigned); From wljj09 at gmail.com Mon May 21 13:44:17 2012 From: wljj09 at gmail.com (Jing Wang) Date: Mon, 21 May 2012 13:44:17 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? Message-ID: Dear Fieldtrip developers and users, I have found same error when I using ft_spiketriggeredaverage and ft_spiketriggeredspectrum.m. After I run the following script, an error appeared at line 51 cfg=ft_checkconfig. This error also is same when I run ft_spiketriggeredspectrum.m. But after I use comment to silent a part of these functions. it could work well. It is same for both the latese and 20120420 version of Fieldtrip. I donnot know whether it is a bug or something wrong with my data? Would anybody who knows can help me? That will be really appreciated! Thanks in advance! Jing I have append spike and LFP into data. The folloing is the script and error information. *cfg=[]; cfg.timwin = [-0.01 0.01]; cfg.spikechannel =data.label{1}; cfg.channel = data.label{2}; cfg.keeptrials ='yes'; cfg.feedback='yes'; [timelock] = ft_spiketriggeredaverage(cfg, data);* ** *Error using ft_getopt the first input should contain key-value pairs* *Error in ft_checkconfig (line 83) renamed = ft_getopt(varargin, 'renamed');* *Error in ft_spiketriggeredaverage (line 51) cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ...* For ft_spikertriggerespectrum, I silent the line like this, the script can work well. *% cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... % 'outputfile'); % see ** http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056* For ft_spiketriggeredaverage, the script can work when I silent these part. it can work well. * % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); % cfg.channel = ft_getopt(cfg,'channel', 'all'); % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); * -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon May 21 13:57:10 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 21 May 2012 13:57:10 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: Dear Jing Wang, This is a bug in the functions you mention. ft_checkconfig should be called like this: cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); so with the forbidden options grouped in a cell array, rather than as it was done in the code snippet you posted. There also seem to be a few other minor bugs in the ft_getopt/checkopt calls. Could you file a bug on this on our Bugzilla tracking system? http://bugzilla.fcdonders.nl/ Thank you for reporting this! Best, Eelke On 21 May 2012 13:44, Jing Wang wrote: > Dear Fieldtrip developers and users, > > I have found same error when I using ft_spiketriggeredaverage and > ft_spiketriggeredspectrum.m. > After I run the following script, an error appeared at line 51 > cfg=ft_checkconfig. This error also is same when I run > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > these functions. it could work well. It is same for both the latese and > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > something wrong with my data? Would anybody who knows can help me? > That will be really appreciated! Thanks in advance! > Jing > > I have append spike and LFP into data. The folloing is the script and error > information. > cfg=[]; > cfg.timwin = [-0.01 0.01]; > cfg.spikechannel =data.label{1}; > cfg.channel = data.label{2}; > cfg.keeptrials ='yes'; > cfg.feedback='yes'; > [timelock] = ft_spiketriggeredaverage(cfg, data); > > Error using ft_getopt > the first input should contain key-value pairs > Error in ft_checkconfig (line 83) > renamed         = ft_getopt(varargin, 'renamed'); > Error in ft_spiketriggeredaverage (line 51) > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > For ft_spikertriggerespectrum, I silent the line like this, the script can > work well. > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > %                                        'outputfile');  % see > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > For ft_spiketriggeredaverage, the script can work when I silent these part. > it can work well. >  % cfg.timwin       = ft_getopt(cfg, 'timwin',[-0.1 0.1]); >  % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); >  % cfg.channel      = ft_getopt(cfg,'channel', 'all'); >  % cfg.keeptrials   = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); >  % cfg.feedback     = ft_checkopt(cfg,'feedback', 'yes'); > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Mon May 21 15:08:23 2012 From: wljj09 at gmail.com (Jing Wang) Date: Mon, 21 May 2012 15:08:23 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: Hello Eelke, Thank you very much for your answers. I will file this bug in Bugzilla tracking system. I also found that there are some functions which are used in the ft_spike* function are not in the Fieldtrip. One is *specest_nanfft.m* which is used in ft_spiketriggeredspectrum.m and another is *ft_write_spike* which is used in ft_spikedetection. We could not find the two functions in Fieldtrip to run these main functions about spike analysis. Whether it has been changed names or put somewhere else? Would you please give me some idea about that? Thanks again! Best Regards Jing 2012/5/21 Eelke Spaak > Dear Jing Wang, > > This is a bug in the functions you mention. ft_checkconfig should be > called like this: > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > so with the forbidden options grouped in a cell array, rather than as > it was done in the code snippet you posted. There also seem to be a > few other minor bugs in the ft_getopt/checkopt calls. > > Could you file a bug on this on our Bugzilla tracking system? > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > Best, > Eelke > > On 21 May 2012 13:44, Jing Wang wrote: > > Dear Fieldtrip developers and users, > > > > I have found same error when I using ft_spiketriggeredaverage and > > ft_spiketriggeredspectrum.m. > > After I run the following script, an error appeared at line 51 > > cfg=ft_checkconfig. This error also is same when I run > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > > these functions. it could work well. It is same for both the latese and > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > something wrong with my data? Would anybody who knows can help me? > > That will be really appreciated! Thanks in advance! > > Jing > > > > I have append spike and LFP into data. The folloing is the script and > error > > information. > > cfg=[]; > > cfg.timwin = [-0.01 0.01]; > > cfg.spikechannel =data.label{1}; > > cfg.channel = data.label{2}; > > cfg.keeptrials ='yes'; > > cfg.feedback='yes'; > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > Error using ft_getopt > > the first input should contain key-value pairs > > Error in ft_checkconfig (line 83) > > renamed = ft_getopt(varargin, 'renamed'); > > Error in ft_spiketriggeredaverage (line 51) > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > For ft_spikertriggerespectrum, I silent the line like this, the script > can > > work well. > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > % 'outputfile'); % see > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > For ft_spiketriggeredaverage, the script can work when I silent these > part. > > it can work well. > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', > 'no'}); > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrecravo at gmail.com Mon May 21 17:08:31 2012 From: andrecravo at gmail.com (Andre Cravo) Date: Mon, 21 May 2012 12:08:31 -0300 Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: References: <4FB8BF36.8050909@gmail.com> Message-ID: Hi Vitória, Although using random sampling is a good approach, it is not a big problem to have a different number of trials between conditions, specially in ERP studies. If you're just going to do classical analyses (mean, grand-mean and statistics in mean), it might be better just to stay with different number of trials. There has been a similar discussion in the eeglab list, which might be worth reading for those interested ( http://sccn.ucsd.edu/pipermail/eeglablist/2010/003240.html) There is also a nice essay written by Steve Luck about this, which can be found in this website : http://erpinfo.org/Members/sjluck Best, -- Andre M. Cravo Postdoctoral Researcher University of Sao Paulo-Brazil On 21 May 2012 06:19, Gio Piantoni wrote: > Hi Vitória, > > I like the intuitive appeal of your approach, in order to keep only > the "most representative" trials. However, I'd have serious concerns > that your approach might not be valid. > > If you reject only the noisiest trials from condition A, you're > applying a sort of extra preprocessing step to your data and this > makes the comparison between conditions A and B not very meaningful. > You cannot unequivocally attribute the difference between A and B to a > real difference between experimental conditions or to the extra > preprocessing step. > More critically, if you only reject noisy trials in condition A, > you'll systematically introduce heteroscedasticity in your data; this > is against one of the assumptions of parametric testing. > > I agree with Arjen to use random sampling of the trials of condition > A. Depending on what you want to do next, you can even get standard > errors from this randomization, similarly to the bootstrap approach. I > find this a very elegant way to deal with very unequal numbers of > trials. > > Hope this helps, > > Best, > > Gio > > -- > Giovanni Piantoni, MSc > Dept. Sleep & Cognition > Netherlands Institute for Neuroscience > Meibergdreef 47 > 1105 BA Amsterdam (NL) > > +31 20 5665492 > gio at gpiantoni.com > www.gpiantoni.com > > > On Sun, May 20, 2012 at 11:53 AM, Vitória Magalhães Piai > wrote: > > Hi everyone, > > > > I'm working on a dataset (ERPs, but this is not that relevant for the > > question, I believe) for which one condition elicited more errors than > the > > other. > > > > I'd like to have both conditions with the same number of trials in the > > analyses. > > Ideally, I'd throw away the noisiest trials from one condition, instead > of > > just start throwing away trials at random. > > > > I was thinking of using z-scores for that but I was wondering if any of > you > > has already done this before and how. What would be the best way to go? > > Take the mean amplitude across all trials (collapsed over condition or > not?) > > and calculate the z-score for each trial individually? Then take out the > one > > with the largest scores? How does this approach sound? > > Does FT keep information about the variance for each trial somewhere in > the > > output of an artefact rejection function? Or would I have to compute that > > myself? > > > > I'd appreciate any suggestions or feedback. > > > > Cheers, Vitória > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.taubert at uk-koeln.de Wed May 23 15:46:49 2012 From: max.taubert at uk-koeln.de (Taubert, Max) Date: Wed, 23 May 2012 15:46:49 +0200 (CEST) Subject: [FieldTrip] Dipole time course Message-ID: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> Hi, I'd like to use the leadfield from the ft_compute_leadfield function to compute the time course of two dipoles, given their location and orientation. So I searched on the mailing list and found a thread from Apr-1 2011 (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-April/003690.html) with a nice explanation. By using this approach it is not very difficult to obtain the waveform of a single dipole, but in my case there are TWO dipoles. This works when assuming a single dipole: dip.pos = [0 0.5 0]; dip.ori = [1 0 0]; lf = ft_compute_leadfield(dip.pos,elec,vol); li = pinv(lf); ori = dip.mom; ori = repmat(ori,length(li),1)'; w = dot(li,ori); waveform = dot(D.Data,repmat(w,size(D.Data,2),1)'); Is there any way to make this work with a two-dipole-model, so I get the waveforms of both of them? Thanks in advance Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From rapela at ucsd.edu Thu May 24 05:03:52 2012 From: rapela at ucsd.edu (Joaquin Rapela) Date: Wed, 23 May 2012 20:03:52 -0700 Subject: [FieldTrip] Postdoc, motor control, Buenos Aires (Argentina) Message-ID: <20120524030352.GA25028@sccn.ucsd.edu> Prof. Della-Maggiore, in the lively city of Buenos Aires, Argentina, is looking for a postdoctoral scholar. Please contact her directly (vdellamaggiore at fmed.uba.ar) if interested. Cordially, Joaquin The Physiology of Action Lab (www.physiologyofactionlab.info) is looking for a candidate to fill a postdoctoral position in the Department of Physiology of the University of Buenos Aires. The Laboratory focuses on Human Behavioral Neuroscience, particularly in the area of motor control. We use Transcranial Magnetic Stimulation, Magnetic Resonance Imaging, EEG and psychophysics to study the neural mechanisms at the basis of different aspects of control motor. These include motor resonance and action understanding during action observation, online motor control and motor learning. Plastic changes induced by learning and stroke are also main interests of the lab. We are looking for a Ph.D with a background in motor control and, preferably, with experience in Magnetic Resonance imaging. Candidates with knowledge of Matlab would have priority. The postdoc is funded by a fellowship from the National Agency for the Promotion of Science and Technology (Argentina). Interested candidates could contact Dr. Valeria Della Maggiore at vdellamaggiore at fmed.uba.ar with a CV, a letter of interest and one or two references (email). Many thanks -- Valeria Della-Maggiore, Ph. D Department of Physiology, School of Medicine University of Buenos Aires Paraguay 2155, Capital Federal Buenos Aires, C1121ABG Argentina phone 54 11 5 950 9500 (2132) http://www.physiologyofactionlab.info ------------------------------------------------------------ being wild and disciplined at the same time.... From t.marshall at fcdonders.ru.nl Thu May 24 16:18:38 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Thu, 24 May 2012 16:18:38 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... Message-ID: <4FBE433E.8050804@fcdonders.ru.nl> Hi 'trippers... So I'm having some trouble with the following pipeline: Import and filter continuous data using ft_preprocessing Create trial definition using ft_definetrial Apply trial definition to imported, filtered data using ft_redefinetrial (in case it helps, full code is below) When I call ft_redefinetrial, it fails with:- *??? Error using ==> ft_checkdata at 307 This function requires raw data as input. Error in ==> ft_redefinetrial at 103 data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* However, when I check my data myself using ft_checkdata... *ft_checkdata(data,'datatype','raw','feedback','yes')* ...the feedback it gives me is... *the input is raw data with 2 channels and 1 trials* ...which is exactly what I'd expect. (There are only two channels because I am just looking at my heog and veog data). It seems that my zenlike data are both raw and not raw, depending on whether ft_checkdata is called within ft_redefinetrial or by me. Any ideas why it could be failing in the former case? Best, Tom PS - full code here:- * % import eog data veog_chan='UADC001'; heog_chan='UADC002'; cfg = []; cfg.dataset = full_file; cfg.channel = {heog_chan, veog_chan}; cfg.continuous = 'yes'; data = ft_preprocessing(cfg); % define trials cfg = []; cfg.dataset = meg_file; cfg.trialdef.prestim = -0.1; % ie 100ms after stim cfg.trialdef.poststim = 5; % in seconds cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); cfg.trialfun = 'trialfun_find_eog'; cfg = ft_definetrial(cfg); % apply trial def to continuous data data=ft_redefinetrial(data,cfg);* -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Thu May 24 17:07:13 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Thu, 24 May 2012 17:07:13 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... In-Reply-To: <4FBE433E.8050804@fcdonders.ru.nl> References: <4FBE433E.8050804@fcdonders.ru.nl> Message-ID: <4FBE4EA1.3000506@fcdonders.ru.nl> Rats, I've seen it :( Sorry to bother you guys... should have checked more thoroughly before posting to the mailing list! *redface* Best, Tom On 5/24/2012 4:18 PM, Tom Marshall wrote: > Hi 'trippers... > > So I'm having some trouble with the following pipeline: > > Import and filter continuous data using ft_preprocessing > Create trial definition using ft_definetrial > Apply trial definition to imported, filtered data using ft_redefinetrial > (in case it helps, full code is below) > > When I call ft_redefinetrial, it fails with:- > *??? Error using ==> ft_checkdata at 307 > This function requires raw data as input. > > Error in ==> ft_redefinetrial at 103 > data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* > > However, when I check my data myself using ft_checkdata... > *ft_checkdata(data,'datatype','raw','feedback','yes')* > ...the feedback it gives me is... > *the input is raw data with 2 channels and 1 trials* > ...which is exactly what I'd expect. (There are only two channels > because I am just looking at my heog and veog data). > > It seems that my zenlike data are both raw and not raw, depending on > whether ft_checkdata is called within ft_redefinetrial or by me. Any > ideas why it could be failing in the former case? > > Best, > Tom > > PS - full code here:- > * > % import eog data > > veog_chan='UADC001'; > heog_chan='UADC002'; > > cfg = []; > cfg.dataset = full_file; > cfg.channel = {heog_chan, veog_chan}; > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > % define trials > > cfg = []; > cfg.dataset = meg_file; > cfg.trialdef.prestim = -0.1; % ie 100ms after stim > cfg.trialdef.poststim = 5; % in seconds > cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); > > cfg.trialfun = 'trialfun_find_eog'; > > cfg = ft_definetrial(cfg); > > % apply trial def to continuous data > > data=ft_redefinetrial(data,cfg);* > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email:t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Thu May 24 17:14:26 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Thu, 24 May 2012 17:14:26 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... In-Reply-To: <4FBE433E.8050804@fcdonders.ru.nl> References: <4FBE433E.8050804@fcdonders.ru.nl> Message-ID: Hey Tom, It seems like you accidentally switched input arguments in your call to redefine_trial: * data=ft_redefinetrial(data,cfg);* This should read: *data=ft_redefinetrial(cfg,data);* Cheers, Roemer On Thu, May 24, 2012 at 4:18 PM, Tom Marshall wrote: > Hi 'trippers... > > So I'm having some trouble with the following pipeline: > > Import and filter continuous data using ft_preprocessing > Create trial definition using ft_definetrial > Apply trial definition to imported, filtered data using ft_redefinetrial > (in case it helps, full code is below) > > When I call ft_redefinetrial, it fails with:- > *??? Error using ==> ft_checkdata at 307 > This function requires raw data as input. > > Error in ==> ft_redefinetrial at 103 > data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* > > However, when I check my data myself using ft_checkdata... > *ft_checkdata(data,'datatype','raw','feedback','yes')* > ...the feedback it gives me is... > *the input is raw data with 2 channels and 1 trials* > ...which is exactly what I'd expect. (There are only two channels because > I am just looking at my heog and veog data). > > It seems that my zenlike data are both raw and not raw, depending on > whether ft_checkdata is called within ft_redefinetrial or by me. Any ideas > why it could be failing in the former case? > > Best, > Tom > > PS - full code here:- > * > % import eog data > > veog_chan='UADC001'; > heog_chan='UADC002'; > > cfg = []; > cfg.dataset = full_file; > cfg.channel = {heog_chan, veog_chan}; > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > % define trials > > cfg = []; > cfg.dataset = meg_file; > cfg.trialdef.prestim = -0.1; % ie 100ms after stim > cfg.trialdef.poststim = 5; % in seconds > cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); > > cfg.trialfun = 'trialfun_find_eog'; > > cfg = ft_definetrial(cfg); > > % apply trial def to continuous data > > data=ft_redefinetrial(data,cfg);* > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Fri May 25 10:12:58 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Fri, 25 May 2012 10:12:58 +0200 Subject: [FieldTrip] topoplot of vector Message-ID: Dear Fieldtrip-User, I am trying to plot some results ( one value per channel) using a topoplot function. Since I am working with ECoG data, I specified my own layout with ft_prepare_layout. Plotting my results obtain from ft_freqanalysis using ft_topoplotER works just fine. Now 2 Questions: 1) Is there a way to plot data, using ft_topoplotER , which is not obtain from freqanalysis or timelocked analysis, but which is only a vector. 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg contained the layout. However I get the following error message. It might be that some points of my mask fall outside the outline, which does not cause a problem using ft_topoplotER. Undefined function 'inside_contour' for input arguments of type 'double'. Error in topoplot (line 488) maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; I would very much appreciate any help. Best, Fanny From a.stolk at fcdonders.ru.nl Fri May 25 11:00:59 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 May 2012 11:00:59 +0200 (CEST) Subject: [FieldTrip] topoplot of vector In-Reply-To: Message-ID: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Hi Fanny, If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. For example; data.powspctrm = your_vector_here; % [N x 1] data.freq = 1; data.label = your_label_here; % {1 x N} data.dimord = 'chan_freq'; ft_topoplotER(cfg,data) The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. Hope this helps, Arjen ----- Oorspronkelijk bericht ----- > Van: "Fanny Quandt" > Aan: fieldtrip at donders.ru.nl > Verzonden: Vrijdag 25 mei 2012 10:12:58 > Onderwerp: [FieldTrip] topoplot of vector > Dear Fieldtrip-User, > > I am trying to plot some results ( one value per channel) using a > topoplot function. > Since I am working with ECoG data, I specified my own layout with > ft_prepare_layout. Plotting my results obtain from ft_freqanalysis > using ft_topoplotER works just fine. > > Now 2 Questions: > > 1) Is there a way to plot data, using ft_topoplotER , which is not > obtain from freqanalysis or timelocked analysis, but which is only a > vector. > > 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg > contained the layout. However I get the following error message. It > might be that some points of my mask fall outside the outline, which > does not cause a problem using ft_topoplotER. > > Undefined function 'inside_contour' for input arguments of type > 'double'. > > Error in topoplot (line 488) > maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; > > > I would very much appreciate any help. > Best, > Fanny > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From fannyquandt at gmail.com Fri May 25 11:08:57 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Fri, 25 May 2012 11:08:57 +0200 Subject: [FieldTrip] topoplot of vector In-Reply-To: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> References: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Arjen, thank you very much! It works perfectly and seems way easier than to go into ft_plot_topo ( which I also tried earlier :)). I appreciate your help, Fanny Am 25.05.2012 um 11:00 schrieb Stolk, A.: > Hi Fanny, > > If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. > > For example; > data.powspctrm = your_vector_here; % [N x 1] > data.freq = 1; > data.label = your_label_here; % {1 x N} > data.dimord = 'chan_freq'; > ft_topoplotER(cfg,data) > > The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. > > Hope this helps, > Arjen > > > ----- Oorspronkelijk bericht ----- >> Van: "Fanny Quandt" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Vrijdag 25 mei 2012 10:12:58 >> Onderwerp: [FieldTrip] topoplot of vector >> Dear Fieldtrip-User, >> >> I am trying to plot some results ( one value per channel) using a >> topoplot function. >> Since I am working with ECoG data, I specified my own layout with >> ft_prepare_layout. Plotting my results obtain from ft_freqanalysis >> using ft_topoplotER works just fine. >> >> Now 2 Questions: >> >> 1) Is there a way to plot data, using ft_topoplotER , which is not >> obtain from freqanalysis or timelocked analysis, but which is only a >> vector. >> >> 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg >> contained the layout. However I get the following error message. It >> might be that some points of my mask fall outside the outline, which >> does not cause a problem using ft_topoplotER. >> >> Undefined function 'inside_contour' for input arguments of type >> 'double'. >> >> Error in topoplot (line 488) >> maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; >> >> >> I would very much appreciate any help. >> Best, >> Fanny >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Fri May 25 11:16:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 25 May 2012 11:16:34 +0200 Subject: [FieldTrip] topoplot of vector In-Reply-To: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> References: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Fanny, Arjen, I would like to add something to that. Like Arjen said, first make a ft-like structure, but don't 'fake it' by naming your datafield e.g. 'powspctrm', but name it appropriately and use the cfg.parameter field in the plotting functions to specify the field you want to plot. In similar cases what I always do is to add extra field to my main data structure. This could be, e.g. different statistical maps, different ways of normalizing etc: data.dimord = 'chan_freq' data.powspctrm = [N x 1]; data.powspctrmLOG = [N x 1]; data.stat_difference = [N x 1]; data.conditionA_minus_B = [N x 1]; etc. This is memory efficient, makes it easy to keep things together (the repetition/trial dimension with the trialinfo, for instance), don't mix up the field and to them without messing around with temporary data structures. Note that many functions that work on datastructures use the cfg.parameter field. For instance averaging, baselinecorrection, grandaverage etc. all should work in this way. cheers, Stephen On 25 May 2012 11:00, Stolk, A. wrote: > Hi Fanny, > > If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. > > For example; > data.powspctrm = your_vector_here; % [N x 1] > data.freq = 1; > data.label = your_label_here; % {1 x N} > data.dimord = 'chan_freq'; > ft_topoplotER(cfg,data) > > The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. > > Hope this helps, > Arjen > > > ----- Oorspronkelijk bericht ----- >> Van: "Fanny Quandt" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Vrijdag 25 mei 2012 10:12:58 >> Onderwerp: [FieldTrip] topoplot of vector >> Dear Fieldtrip-User, >> >> I am trying to plot some results ( one value per channel) using a >> topoplot function. >> Since I am working with ECoG data, I specified my own layout with >> ft_prepare_layout. Plotting my results obtain from ft_freqanalysis >> using ft_topoplotER works just fine. >> >> Now 2 Questions: >> >> 1) Is there a way to plot data, using ft_topoplotER , which is not >> obtain from freqanalysis or timelocked analysis, but which is only a >> vector. >> >> 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg >> contained the layout. However I get the following error message. It >> might be that some points of my mask fall outside the outline, which >> does not cause a problem using ft_topoplotER. >> >> Undefined function 'inside_contour' for input arguments of type >> 'double'. >> >> Error in topoplot (line 488) >> maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; >> >> >> I would very much appreciate any help. >> Best, >> Fanny >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From v.poghosyan at humanbraindynamics.com Fri May 25 11:37:08 2012 From: v.poghosyan at humanbraindynamics.com (Vahe Poghosyan) Date: Fri, 25 May 2012 12:37:08 +0300 Subject: [FieldTrip] MEG forward problem Message-ID: <03e001cd3a59$f61cb7f0$e25627d0$@poghosyan@humanbraindynamics.com> Dear fieldtrip developers, In MEG forward problem computations (in ft_compute_leadfield or in its subfunctions), do you numerically integrate the MEG signal over the coil area or a single point is used for each coil? I found some functions in the fieldtrip's SVN (trunc) version (on googlecode), which are not available in the daily releases on the ftp server (e.g. ft_surfacecheck). Is it safe to use those functions (I understand that the toolbox is released under GPL)? Thanks in advance Vahe Poghosyan, Ph.D. Senior Scientist Lab. for Human Brain Dynamics AAI Scientific Cultural Services Ltd. http://aaiscs.com/LHBD/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri May 25 15:40:18 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 25 May 2012 07:40:18 -0600 Subject: [FieldTrip] Dipole time course In-Reply-To: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> References: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> Message-ID: <8C72D77A-A56F-438C-8077-7EB47EFC2E8A@ucdenver.edu> Max, There is no reason why you can't simply use the same strategy for both dipoles. Each will produce its own leadfields, and then your inner product of the pinv'd leadfields and the waveforms will give you two separate waveforms. Note that by using this pseudoinverse of the leadfield approach, depending on how far apart the sources are, you may have substantial correlation between the two waveforms that is an artifact of their leadfield correlation. This shouldn't be a big problem for things like auditory sources for the left and right hemisphere, or anterior and posterior sources within a hemisphere, but once you start getting sources closer together, you might consider an alternative approach. You can try using a beamformer to suppress correlated source activity, but you could also just adopt a beamformer-like set of weights for your dipole model instead. For that, you would ideally compute a covariance matrix on the epoched data, prior to averaging. Then, you can extend the logic of the pseudoinverse method by multiplication with inverse of the covariance matrix. You can see this in the fieldtrip functions that do beamformers, such as beamformer_lcmv. Around line 255, you can see: filt = pinv(lf' * invCy * lf) * lf' * invCy; where lf = leadfield and invCy = inverse of covariance matrix and filt = the resulting weight vector for your sensors for that particular source location. You can then do: waveform = filt * data to get your timecourse. In the previous example, I used the dot function to remind myself it was an inner product, but it isn't strictly necessary in matlab. Don On May 23, 2012, at 7:46 AM, Taubert, Max wrote: Hi, I'd like to use the leadfield from the ft_compute_leadfield function to compute the time course of two dipoles, given their location and orientation. So I searched on the mailing list and found a thread from Apr-1 2011 (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-April/003690.html) with a nice explanation. By using this approach it is not very difficult to obtain the waveform of a single dipole, but in my case there are TWO dipoles. This works when assuming a single dipole: dip.pos = [0 0.5 0]; dip.ori = [1 0 0]; lf = ft_compute_leadfield(dip.pos,elec,vol); li = pinv(lf); ori = dip.mom; ori = repmat(ori,length(li),1)'; w = dot(li,ori); waveform = dot(D.Data,repmat(w,size(D.Data,2),1)'); Is there any way to make this work with a two-dipole-model, so I get the waveforms of both of them? Thanks in advance Max _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.buiatti at gmail.com Fri May 25 15:58:32 2012 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Fri, 25 May 2012 15:58:32 +0200 Subject: [FieldTrip] interactions between two factors Message-ID: Dear FieldTrippers, I am analysing an EEG study with 2x4 factors: one varies between 4 parametrically varying levels (1 to 4), the second between two levels. I have three questions concerning the use of Fieldtrip cluster-based non parametric statistical analysis in this case: 1) How to compute the interaction between the two factors. Let's start from the simplest case of a 2x2 design, factors varying between values A1 and A2 for the first factor, B1 and B2 for the second. Please tell me if it is correct to compute the interaction by: - computing the difference diffA=ERP(A1)-ERP(A2) separately in condition B1 and B2, for every subject - performing a within-subjects statistical analysis between diffA in condition B1 and diffA in condition B2 (function statfun_depsamplesT.m). 2) Now consider that factor A varies parametrically between values 1 to 4. For the main effect of this factor, I have used the Fieldtrip function statfun_depsamplesregrT.m and I'm satisfied with it. Is it correct to compute the interaction by - computing the regression regrA=regression(ERP(A1),ERP(A2),ERP(A3),ERP(A4)) (computed as inside function statfun_depsamplesregrT.m) separately in condition B1 and B2, for every subject - performing a within-subjects statistical analysis between regrA in condition B1 and regrA in condition B2 (function statfun_depsamplesT.m)? 3) Since BEFORE looking at the data (this is to prevent Eric's contestation...) I expect a dipolar topography for the regression (data are in average reference), I would like to combine into a joint cluster negative and positive clusters. I have tried by changing statfun_depsamplesregrT.m by just taking the absolute value of the regression, but I get weird results (a huge, non significant cluster). Is it possible that since values are now all positive, I should use a different statistical test at the single bin level? Any other suggestions? Thanks in advance for your help, Marco -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191  FRANCE Ph:  +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From arno at cerco.ups-tlse.fr Sat May 26 02:19:55 2012 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Fri, 25 May 2012 17:19:55 -0700 Subject: [FieldTrip] Potential function conflicts in Fieldtrip Message-ID: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Dear all, I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. Thanks, Arno Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m -------------- next part -------------- A non-text attachment was scrubbed... Name: find_function_conflict.m Type: application/octet-stream Size: 1219 bytes Desc: not available URL: -------------- next part -------------- -- Arnaud Delorme, PhD Centre de Recherche Cerveau et Cognition - UMR 5549 Pavillon Baudot, Hopital Purpan, BP 25202 31052 Toulouse Cedex, France From caspervanheck at gmail.com Tue May 29 09:44:24 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Tue, 29 May 2012 09:44:24 +0200 Subject: [FieldTrip] Coherency parameters Message-ID: Dear Fieldtrip users, I'm currently working on coherency between EEG and EMG, so far without any significant problems. However, I'd like to get statistical significancy (in the hope that's possible) tested on my coherency-data. In the Fieldtrip reference there's a mention of something resembling statistics in combination with coherency (in the help of the 'STATISTICS_MONTECARLO' function), but I've not found how to call this function. My question is: is there a standard method to perform statistical analysis on coherency data? Sincerely, Casper van Heck (Intern) Clinical Neurophysiology, UMC St. Radboud, Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 29 10:28:42 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 29 May 2012 10:28:42 +0200 Subject: [FieldTrip] Coherency parameters In-Reply-To: References: Message-ID: Hi Casper, The approach I would take depends on your question. If you want to test for coherence differences within a subject, your unit of observation is a trial, so the permutation test shuffles the trials between the experimental condition. In this instance you can use statfun_indepsamplesZcoh (with fourier-data in the input (i.e. cfg.output = 'fourier' when calling ft_freqanalysis). If you want to test across subjects, your unit of observation is a subject, so there you can compute the coherence per subject and condition and then do the statistical test by shuffling the conditions. This has for example been done in the following paper: J Neuroscience 2011, 31(18): 6750-6758; doi: 10.1523/​JNEUROSCI.4882-10.2011 Best Jan-Mathijs On May 29, 2012, at 9:44 AM, Casper van Heck wrote: > Dear Fieldtrip users, > > I'm currently working on coherency between EEG and EMG, so far without any significant problems. However, I'd like to get statistical significancy (in the hope that's possible) tested on my coherency-data. > In the Fieldtrip reference there's a mention of something resembling statistics in combination with coherency (in the help of the 'STATISTICS_MONTECARLO' function), but I've not found how to call this function. > > My question is: is there a standard method to perform statistical analysis on coherency data? > > Sincerely, > > Casper van Heck (Intern) > Clinical Neurophysiology, UMC St. Radboud, Nijmegen > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue May 29 16:36:49 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:36:49 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> Dear Jing, The missing ft_write_spike function has been re-added to the release version as of last week, it was also reported missing by someone else in a personal mail by me. The specest_nanfft function should be located in the fieldtrip/private directory, where ft_spiketriggeredspectrum should be able to find it. best regards, Robert On 21 May 2012, at 15:08, Jing Wang wrote: > Hello Eelke, > > Thank you very much for your answers. I will file this bug in Bugzilla tracking system. > > I also found that there are some functions which are used in the ft_spike* function are not in the Fieldtrip. One is specest_nanfft.m which is used in ft_spiketriggeredspectrum.m and another is ft_write_spike which is used in ft_spikedetection. We could not find the two functions in Fieldtrip to run these main functions about spike analysis. > > Whether it has been changed names or put somewhere else? Would you please give me some idea about that? > Thanks again! > > Best Regards > > Jing > > > > 2012/5/21 Eelke Spaak > Dear Jing Wang, > > This is a bug in the functions you mention. ft_checkconfig should be > called like this: > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > so with the forbidden options grouped in a cell array, rather than as > it was done in the code snippet you posted. There also seem to be a > few other minor bugs in the ft_getopt/checkopt calls. > > Could you file a bug on this on our Bugzilla tracking system? > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > Best, > Eelke > > On 21 May 2012 13:44, Jing Wang wrote: > > Dear Fieldtrip developers and users, > > > > I have found same error when I using ft_spiketriggeredaverage and > > ft_spiketriggeredspectrum.m. > > After I run the following script, an error appeared at line 51 > > cfg=ft_checkconfig. This error also is same when I run > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > > these functions. it could work well. It is same for both the latese and > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > something wrong with my data? Would anybody who knows can help me? > > That will be really appreciated! Thanks in advance! > > Jing > > > > I have append spike and LFP into data. The folloing is the script and error > > information. > > cfg=[]; > > cfg.timwin = [-0.01 0.01]; > > cfg.spikechannel =data.label{1}; > > cfg.channel = data.label{2}; > > cfg.keeptrials ='yes'; > > cfg.feedback='yes'; > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > Error using ft_getopt > > the first input should contain key-value pairs > > Error in ft_checkconfig (line 83) > > renamed = ft_getopt(varargin, 'renamed'); > > Error in ft_spiketriggeredaverage (line 51) > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > For ft_spikertriggerespectrum, I silent the line like this, the script can > > work well. > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > % 'outputfile'); % see > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > For ft_spiketriggeredaverage, the script can work when I silent these part. > > it can work well. > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:52:00 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:52:00 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <4805EB64-6057-43F1-93DE-2E81037CC6E6@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:55:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:55:36 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <872DD16A-9C02-4EA7-B8A3-EAB4B490E6A1@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:58:41 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:58:41 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <62459FD6-3D40-47F9-A06B-E0F5D290AD2E@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Tue May 29 20:09:29 2012 From: wljj09 at gmail.com (Jing Wang) Date: Tue, 29 May 2012 20:09:29 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> References: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> Message-ID: Dear Robert, Thank you so much for letting me know this. It is really very helpful. Thanks a lot. I will work on that! Best wishes Jing 2012/5/29 Robert Oostenveld > Dear Jing, > > The missing ft_write_spike function has been re-added to the release > version as of last week, it was also reported missing by someone else in a > personal mail by me. > > The specest_nanfft function should be located in the fieldtrip/private > directory, where ft_spiketriggeredspectrum should be able to find it. > > best regards, > Robert > > > > > On 21 May 2012, at 15:08, Jing Wang wrote: > > > Hello Eelke, > > > > Thank you very much for your answers. I will file this bug in Bugzilla > tracking system. > > > > I also found that there are some functions which are used in the > ft_spike* function are not in the Fieldtrip. One is specest_nanfft.m which > is used in ft_spiketriggeredspectrum.m and another is ft_write_spike which > is used in ft_spikedetection. We could not find the two functions in > Fieldtrip to run these main functions about spike analysis. > > > > Whether it has been changed names or put somewhere else? Would you > please give me some idea about that? > > Thanks again! > > > > Best Regards > > > > Jing > > > > > > > > 2012/5/21 Eelke Spaak > > Dear Jing Wang, > > > > This is a bug in the functions you mention. ft_checkconfig should be > > called like this: > > > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > > > so with the forbidden options grouped in a cell array, rather than as > > it was done in the code snippet you posted. There also seem to be a > > few other minor bugs in the ft_getopt/checkopt calls. > > > > Could you file a bug on this on our Bugzilla tracking system? > > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > > > Best, > > Eelke > > > > On 21 May 2012 13:44, Jing Wang wrote: > > > Dear Fieldtrip developers and users, > > > > > > I have found same error when I using ft_spiketriggeredaverage and > > > ft_spiketriggeredspectrum.m. > > > After I run the following script, an error appeared at line 51 > > > cfg=ft_checkconfig. This error also is same when I run > > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part > of > > > these functions. it could work well. It is same for both the latese and > > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > > something wrong with my data? Would anybody who knows can help me? > > > That will be really appreciated! Thanks in advance! > > > Jing > > > > > > I have append spike and LFP into data. The folloing is the script and > error > > > information. > > > cfg=[]; > > > cfg.timwin = [-0.01 0.01]; > > > cfg.spikechannel =data.label{1}; > > > cfg.channel = data.label{2}; > > > cfg.keeptrials ='yes'; > > > cfg.feedback='yes'; > > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > > > Error using ft_getopt > > > the first input should contain key-value pairs > > > Error in ft_checkconfig (line 83) > > > renamed = ft_getopt(varargin, 'renamed'); > > > Error in ft_spiketriggeredaverage (line 51) > > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > > > For ft_spikertriggerespectrum, I silent the line like this, the script > can > > > work well. > > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > % 'outputfile'); % see > > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > > > For ft_spiketriggeredaverage, the script can work when I silent these > part. > > > it can work well. > > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', > 'no'}); > > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From recasensmarc at gmail.com Wed May 30 11:47:51 2012 From: recasensmarc at gmail.com (Marc Recasens) Date: Wed, 30 May 2012 11:47:51 +0200 Subject: [FieldTrip] megrealign across runs/sessions Message-ID: Hi everyone, I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, However, in the literature this is mainly used to average data across subjects rather than across runs. I did a test using the following code: *cfg= [];* *cfg.template{1} = run1.grad;* *cfg.template{2} = run2.grad;* *cfg.template{3} = run3.grad;* * * *cfg.vol = vol; % single shell headmodel computed from individual MRI* *cfg.inwardshift = 3;* *cfg.verify = 'yes';* *cfg.feedback = 'yes';* *[interp1] = ft_megrealign(cfg, run1); % trial-based data* *[interp1] = ft_megrealign(cfg, run1);* [interp1] = ft_megrealign(cfg, run1); acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) *original -> template RV 2.22 %* *original -> original RV 2.11 %* *original -> template -> original RV 2.14 %* I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) Can affect the accuracy of the subsequent source reconstruction? -- Marc Recasens PhD Student Universitat de Barcelona Tel.: +34 639 24 15 98 -------------- next part -------------- An HTML attachment was scrubbed... URL: From maess at cbs.mpg.de Wed May 30 17:54:00 2012 From: maess at cbs.mpg.de (Burkhard Maess) Date: Wed, 30 May 2012 17:54:00 +0200 (CEST) Subject: [FieldTrip] megrealign across runs/sessions In-Reply-To: Message-ID: <305149289.6076.1338393240619.JavaMail.root@zimbra> Hi Marc, this comment is not related to your code example below, because I did not understand it. The Knösche (2002) paper suggests to use a minimum norm solution as a plausible, but temporary model to carry the information from the original sensor position to the new positions. If you use a plausible spatial arrangement of the MEG sensors and the source space together with a low regularization you might easily achieve even smaller RV values than 2% for the transformation original-to-original. For all other transformations, you need to keep in mind, that you always extrapolate the magnetic field distribution from the position & orientation of your measurement towards the position & orientation you finally wish to have. Nevertheless, it works as long as the differences in position & orientation are not too big (see the Knösche paper for some tests). The critical examples are those in which you try to get closer to the sensor via the head position correction. In these cases, you actually ask for an improvement of your signals which were unfortunately measured suboptimally. Due to the larger distance between sensors and brain, your data most likely suffers from a complete loss of impact of some of the more distant sources - it is therefore impossible to get this information back by whatsoever mathematical method. We have used this method on a regular basis from about 2000 on until 2006 to correct for different head positions between measurement blocks whenever the signal-to-noise ratio in single blocks was too low to get stable inverse solutions from the single block data already. In the latter case, there is no need to use this method as the computation of the inverse solution for each single block is an simpler, alternative option. best wishes, Burkhard -- Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- From: "Marc Recasens" To: fieldtrip at science.ru.nl Sent: Wednesday, 30 May, 2012 11:47:51 AM Subject: [FieldTrip] megrealign across runs/sessions Hi everyone, I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, However, in the literature this is mainly used to average data across subjects rather than across runs. I did a test using the following code: cfg= []; cfg.template{1} = run1.grad; cfg.template{2} = run2.grad; cfg.template{3} = run3.grad; cfg.vol = vol; % single shell headmodel computed from individual MRI cfg.inwardshift = 3; cfg.verify = 'yes'; cfg.feedback = 'yes'; [interp1] = ft_megrealign(cfg, run1); % trial-based data [interp1] = ft_megrealign(cfg, run1); [interp1] = ft_megrealign(cfg, run1); acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) original -> template RV 2.22 % original -> original RV 2.11 % original -> template -> original RV 2.14 % I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) Can affect the accuracy of the subsequent source reconstruction? -- Marc Recasens PhD Student Universitat de Barcelona Tel.: +34 639 24 15 98 _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Thu May 31 11:48:41 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 11:48:41 +0200 Subject: [FieldTrip] change radiological to neurological convention Message-ID: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Dear all, Unfortunately, the result of my source analysis seems to be flipped when calling ft_sourceplot. The transformation matrix of the anatomy seems to be in radiological convention (left is right). I have two questions on that: 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? Any help is very much appreciated. Best, Kathrin -------------- next part -------------- -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From jan.schoffelen at donders.ru.nl Thu May 31 12:21:11 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 31 May 2012 12:21:11 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: Hi Kathrin, > 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? Yes. FieldTrip does not have any of the 'conventions'. It just takes the data as it is represented in the mri-file (i.e. the block of voxels is oriented in a certain way, and FT just plots along the 3 cardinal voxel axes). For example, in DICOM images the voxel axes are often left-handed, leading to visualization according the 'radiological' convention. > 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? If the coordinate system in which the data are defined is right-handed, you can use ft_volumereslice to get the anatomical image to be visualized in neurological convention. This function only works on anatomical data, so you should first reslice the anatomical data and only then interpolate the functional data onto the resliced anatomy. Best, Jan-Mathijs > Any help is very much appreciated. > > Best, > Kathrin > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.mohr at psy.gla.ac.uk Thu May 31 12:43:45 2012 From: s.mohr at psy.gla.ac.uk (sibylle) Date: Thu, 31 May 2012 11:43:45 +0100 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> Hey Kathrin, which SPM version are you using? As far as I know spm2 uses neurological convention (right is right), while spm8 uses radiological convention (right is left). So using spm8, the slice and ortho plots will 'seem' flipped, but you can check the Talairach coordinates to be sure. Whereas in the surface plots, the right of the brain will appear on R side of image (maybe you could revert back to spm2 using T1.mnc template mri for sourceinterpolate..?). Hope that helps! Sibylle On 31 May 2012, at 10:48, Kathrin Müsch wrote: > Dear all, > > Unfortunately, the result of my source analysis seems to be flipped > when calling ft_sourceplot. The transformation matrix of the anatomy > seems to be in radiological convention (left is right). I have two > questions on that: > > 1) Is it correct that the functional data is flipped when the > anatomy is in radiological convention (left is right)? > > 2 ) How can I change the transformation matrix of my anatomy so that > my results are plotted in neurological convention (i.e. left is > left) - with ft_volumenormalise or ft_volumerealign? > > Any help is very much appreciated. > > Best, > Kathrin > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des > öffentlichen Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des > Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. > Uwe Koch-Gromus > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From k.muesch at uke.uni-hamburg.de Thu May 31 13:18:18 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 13:18:18 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <6518E3D3-B254-40FE-AB9A-F056C85F3A2B@uke.uni-hamburg.de> Thanks, Jan-Mathijs! Am 31.05.2012 um 12:21 schrieb jan-mathijs schoffelen: > Hi Kathrin, > >> 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? > > Yes. FieldTrip does not have any of the 'conventions'. It just takes the data as it is represented in the mri-file (i.e. the block of voxels is oriented in a certain way, and FT just plots along the 3 cardinal voxel axes). For example, in DICOM images the voxel axes are often left-handed, leading to visualization according the 'radiological' convention. > > >> 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? > > If the coordinate system in which the data are defined is right-handed, you can use ft_volumereslice to get the anatomical image to be visualized in neurological convention. > This function only works on anatomical data, so you should first reslice the anatomical data and only then interpolate the functional data onto the resliced anatomy. > > Best, > > Jan-Mathijs > > >> Any help is very much appreciated. >> >> Best, >> Kathrin >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu May 31 13:56:40 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 31 May 2012 13:56:40 +0200 Subject: [FieldTrip] megrealign across runs/sessions In-Reply-To: References: Message-ID: <121B4C60-2EC8-4ACF-A701-55D460407DCA@donders.ru.nl> Dear Marc, In principle it is not different to realign the MEG data from three sessions if those sessions were recorded on the same subject (as in your case) or in three different subjects (or a larger number of subjest, as the more common usage scenario). The way you use the function is also correct. However, you should not interpret the residual variance as a measure of the quality of teh realignment procedure. The realignment does not know the ground truth, so cannot tell how the attempted realignment matches with the ground truth. It only expresses the difference in the data when the data is compared between original and template position (and when the realignment is repeated but then inversely). An important aspect however is that you should be careful with applying source reconstruction on the realigned data. In general I would recommend against it, especially if you are planning to apply a beamformer afterwards. The realignment works by making a crude source estimation on on a sheet that is just in the outer grey matter. That crude source estimate (which is a minimum norm estimate with a slight bit of regularization) affects the spatial correlations (i.e. between channels) in the data. Consequently, subsequent source reconstruction might not be able to pick up the spatial correlation any more and might mislocalize. Better (although not always possible) is to source reconstruct the three conditions separate and then combine them. best Robert On 30 May 2012, at 11:47, Marc Recasens wrote: > Hi everyone, > > I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. > I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, > However, in the literature this is mainly used to average data across subjects rather than across runs. > > I did a test using the following code: > cfg= []; > cfg.template{1} = run1.grad; > cfg.template{2} = run2.grad; > cfg.template{3} = run3.grad; > > cfg.vol = vol; % single shell headmodel computed from individual MRI > cfg.inwardshift = 3; > cfg.verify = 'yes'; > cfg.feedback = 'yes'; > [interp1] = ft_megrealign(cfg, run1); % trial-based data > [interp1] = ft_megrealign(cfg, run1); > [interp1] = ft_megrealign(cfg, run1); > > acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) > original -> template RV 2.22 % > original -> original RV 2.11 % > original -> template -> original RV 2.14 % > > > I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). > According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) > > Can affect the accuracy of the subsequent source reconstruction? > > > -- > Marc Recasens > PhD Student > Universitat de Barcelona > Tel.: +34 639 24 15 98 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From k.muesch at uke.uni-hamburg.de Thu May 31 14:11:06 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 14:11:06 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> Message-ID: It's working, thank you! Am 31.05.2012 um 12:43 schrieb sibylle: > Hey Kathrin, > > which SPM version are you using? > > As far as I know spm2 uses neurological convention (right is right), while spm8 uses radiological convention (right is left). > So using spm8, the slice and ortho plots will 'seem' flipped, but you can check the Talairach coordinates to be sure. > Whereas in the surface plots, the right of the brain will appear on R side of image (maybe you could revert back to spm2 using T1.mnc template mri for sourceinterpolate..?). > > Hope that helps! > > Sibylle > > > On 31 May 2012, at 10:48, Kathrin Müsch wrote: > >> Dear all, >> >> Unfortunately, the result of my source analysis seems to be flipped when calling ft_sourceplot. The transformation matrix of the anatomy seems to be in radiological convention (left is right). I have two questions on that: >> >> 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? >> >> 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? >> >> Any help is very much appreciated. >> >> Best, >> Kathrin >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From r.oostenveld at donders.ru.nl Thu May 31 14:30:52 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 31 May 2012 14:30:52 +0200 Subject: [FieldTrip] megrealign across runs/sessions Message-ID: Dear Marc, In principle it is not different to realign the MEG data from three sessions if those sessions were recorded on the same subject (as in your case) or in three different subjects (or a larger number of subjest, as the more common usage scenario). The way you use the function is also correct. However, you should not interpret the residual variance as a measure of the quality of the realignment procedure. The realignment does not know the ground truth, so cannot tell how the attempted realignment matches with the ground truth. It only expresses the difference in the data when the data is compared between original and template position (and when the realignment is repeated but then inversely). An important aspect however is that you should be careful with applying source reconstruction on the realigned data. In general I would recommend against it, especially if you are planning to apply a beamformer afterwards. The realignment works by making a crude source estimation on on a sheet that is just in the outer grey matter. That crude source estimate (which is a minimum norm estimate with a slight bit of regularization) affects the spatial correlations (i.e. between channels) in the data. Consequently, subsequent source reconstruction might not be able to pick up the spatial correlation any more and might mislocalize. Better (although not always possible) is to source reconstruct the three conditions separate and then combine them. best Robert On 30 May 2012, at 11:47, Marc Recasens wrote: > Hi everyone, > > I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. > I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, > However, in the literature this is mainly used to average data across subjects rather than across runs. > > I did a test using the following code: > cfg= []; > cfg.template{1} = run1.grad; > cfg.template{2} = run2.grad; > cfg.template{3} = run3.grad; > > cfg.vol = vol; % single shell headmodel computed from individual MRI > cfg.inwardshift = 3; > cfg.verify = 'yes'; > cfg.feedback = 'yes'; > [interp1] = ft_megrealign(cfg, run1); % trial-based data > [interp1] = ft_megrealign(cfg, run1); > [interp1] = ft_megrealign(cfg, run1); > > acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) > original -> template RV 2.22 % > original -> original RV 2.11 % > original -> template -> original RV 2.14 % > > > I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). > According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) > > Can affect the accuracy of the subsequent source reconstruction? > > > -- > Marc Recasens > PhD Student > Universitat de Barcelona > Tel.: +34 639 24 15 98 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gauthierb.ens at gmail.com Thu May 31 15:56:15 2012 From: gauthierb.ens at gmail.com (Baptiste Gauthier) Date: Thu, 31 May 2012 15:56:15 +0200 Subject: [FieldTrip] mismatch between volume conduction model and sourcespace Message-ID: Dear Fieldtrippers, I recently tried to follow the fieldtrip tutorial for source reconstruction of event-related field with MNE method ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate?s[]=grey&s[]=matter). All the steps look ok but when it comes to check the matching between volume conduction model and sourcespace, there's an inconsistency along the x-axis. What I found strange is that all parameters (size, shape, y and z- coordinates) seems ok (cf attached picture), so basically the error looks like a simple translation. Have someone ever experimented this problem or have a idea of where it comes from? Regards, Baptiste -- Baptiste Gauthier PhD student INSERM-CEA Cognitive Neuroimaging unit CEA/SAC/DSV/DRM/Neurospin center Bât 145, Point Courier 156 F-91191 Gif-sur-Yvette Cedex FRANCE -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MISMATCH.png Type: image/png Size: 134747 bytes Desc: not available URL: From t.grent-tjong at donders.ru.nl Tue May 1 09:28:54 2012 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Tue, 1 May 2012 09:28:54 +0200 Subject: [FieldTrip] problem ft_timelockanalysis after using ft_appenddata Message-ID: Hi all, I have encountered a weird problem with ft_timelockanalysis. The problem occurs only when running ft_timelockanalysis on some data from some subjects. I get the following error: averaging trial 239 of 252??? Error using ==> plus Matrix dimensions must agree. Error in ==> ft_timelockanalysis at 298 s = s + dat; % compute the sum This error was produced running ft_timelockanalysis on data that originated from two conditions (INCGR & INCGL), which were concatenated using ft_appenddata (resulting in INCGRL). So, I thought it made sense to test whether something was wrong with one of the two input datasets (likely the second one, since the error occurs while processing one of the last trials originating from the second dataset). So, I ran ft_timelockanalysis on INCGR and INCGL separately, and, believe it or not, no errors this time. But as soon as I concatenate the files again, ft_timelockanalysis reproduces the error. Anyone any idea what the problem could be? Thanks, Tineke Grent - 't Jong Radboud University Medical Centre Nijmegen Donders Institute for Brain, Cognition and Behaviour The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Tue May 1 10:09:49 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Tue, 1 May 2012 10:09:49 +0200 Subject: [FieldTrip] subplot clusterplot Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96@gmail.com> Hi, I am performing a monte-carlo cluster statistic, comparing a 200 ms activation period and a baseline of a spectrogram. I get positive and negative clusters which are significant, and would like to plot them using ft_clusterplot. However, the function gives me 7 subplot (for 7 timepoints) , all so small that one is barely able to identify the highlighted channels. Therefore, I would either like to only plot 1 big topoplot or arrange the subplots differently. Is there a way to plot only one timepoint? I would appreciate any help, Best, Fanny From r.vandermeij at donders.ru.nl Tue May 1 10:52:13 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 1 May 2012 10:52:13 +0200 Subject: [FieldTrip] error in ft_databrowser In-Reply-To: <4F9D3FD4.2050301@gmail.com> References: <4F9D3FD4.2050301@gmail.com> Message-ID: Hey Vitoria, Are you sure you are using an up to date version of FieldTrip? The error mentions a line in ft_plot_text that hasn't been there since at least October last year. Best, Roemer On Sun, Apr 29, 2012 at 3:19 PM, Vitória Magalhães Piai < vitoria.piai at gmail.com> wrote: > Hi there, > > I'm getting the following error when trying ft_databrowser on the output > of ft_componentanalysis (ft_topoplotIC on the same dataset works fine): > > ??? Error using ==> keyvalcheck at 77 > the input argument 'tag' is forbidden > > Error in ==> ft_plot_text at 44 > keyvalcheck(varargin, 'optional', {'hpos', 'vpos', 'width', 'height', > 'hlim', 'vlim', 'Color', .... > > Error in ==> ft_databrowser>redraw_cb at 1346 > ft_plot_text(labelx(laysel), labely(laysel), > opt.hdr.label(chanindx(i)), 'tag', 'timecourse', 'HorizontalAlignment', > 'right'); > > Error in ==> ft_databrowser at 548 > redraw_cb(h); > > I'm using the ft_databrowser version updated on the 25th of April. Is this > a bug? > Thank you, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 1 11:23:06 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 1 May 2012 12:23:06 +0300 Subject: [FieldTrip] Subsampling Message-ID: Hello, Is there anything to do subsampling (ex: decreasing the samples from 2048 to128) during the preprocessing Thanks -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue May 1 11:28:59 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 1 May 2012 11:28:59 +0200 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Hi Hamza, Have a look at ft_resampledata (http://fieldtrip.fcdonders.nl/reference/ft_resampledata). Best, Eelke On 1 May 2012 11:23, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Tue May 1 15:15:27 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 1 May 2012 08:15:27 -0500 Subject: [FieldTrip] subplot clusterplot Message-ID: Fanny, With ft_topoplotER, you can plot the average activation over a time interval rather than activation at a single point, using cfg.xlim; this apparently is not possible with ft_clusterplot (although I haven't used clusterplot recently). And the functionality of ft_clusterplot can be replicated by using cfg.highlightchannel. There is an example at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results(I can also send you my script, which is based on that), although it's for time-locked ERPs; I'm not sure if things will work differently for time-frequency data. Best, Steve Politzer-Ahles Message: 2 > Date: Tue, 1 May 2012 10:09:49 +0200 > From: Fanny Quandt > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] subplot clusterplot > Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I am performing a monte-carlo cluster statistic, comparing a 200 ms > activation period and a baseline of a spectrogram. > I get positive and negative clusters which are significant, and would like > to plot them using ft_clusterplot. > > However, the function gives me 7 subplot (for 7 timepoints) , all so small > that one is barely able to identify the highlighted channels. > > Therefore, I would either like to only plot 1 big topoplot or arrange the > subplots differently. Is there a way to plot only one timepoint? > > I would appreciate any help, > Best, > Fanny > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 1 15:23:42 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 1 May 2012 16:23:42 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Thank you Eelke Hamza On Tue, May 1, 2012 at 12:28 PM, Eelke Spaak wrote: > Hi Hamza, > > Have a look at ft_resampledata > (http://fieldtrip.fcdonders.nl/reference/ft_resampledata). > > Best, > Eelke > > On 1 May 2012 11:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > > to128) during the preprocessing > > > > Thanks > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.N.Maijers at student.ru.nl Tue May 1 20:03:20 2012 From: S.N.Maijers at student.ru.nl (Sander Maijers) Date: Tue, 1 May 2012 20:03:20 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <003d01cd278c$bc6fca40$354f5ec0$@simanova@mpi.nl> References: <20120428160125.521cf366@sander-H57M-USB3> <003d01cd278c$bc6fca40$354f5ec0$@simanova@mpi.nl> Message-ID: <20120501200320.4cc1c1f3@sander-H57M-USB3> Hi Irina, Nice to hear from you again! I will get back in touch with you once I've made enough preparations to redo my experiment. :) I was using the latest version from the source code repository at http://code.google.com/p/fieldtrip/ . I just updated it (to revision 5718), but the error remains. The source code and output for my current experiment script is at http://pastebin.com/zjXKFE0N . (This link will remain active for a day or so.) I intend to convert the experiment script to the new Donders Machine Learning Toolkit, if that is the best way to go forward. Hopefully someone knows what the problem is! Best, Sander On Tue, 1 May 2012 13:22:46 +0200 "Irina Simanova" wrote: > Hi Sander, > > Which version of Fieldtrip are you using? > > I have not been able to replicate your error, however, when I am > trying to run that old piece of code, I am getting a different error > in ft_statistics_crossvalidate ??? Undefined variable "dml" or class > "dml.standardizer" (see below). > > I cc this to Marcel van Gerven. There have been changes introduced to > the multivariate analysis toolbox, and it indeed might explain the > errors. Marcel, is it possible that there are compatibility errors in > the ft_statistics_crossvalidate? Regarding the error that I got: how > should I set the "dml" object when I call the function via Fieldtip? > > Best, > Irina > > cfg = []; > cfg.method = 'crossvalidate'; > cfg.nfolds = 6; > cfg.channel = avg_tls_txt_lp.label(1:60); > cfg.latency = [0 0.7]; > s1 = size(avg_anm_txt_lp.trial,1); > s2 = size(avg_tls_txt_lp.trial,1); > design = [ones(s1,1); ones(s2,1)*2]; > cfg.design = design; > class = ft_timelockstatistics(cfg, avg_anm_txt_lp, avg_tls_txt_lp); > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing > ??? Undefined variable "dml" or class "dml.standardizer". > > Error in ==> ft_statistics_crossvalidate at 44 > cfg.mva = dml.analysis({ ... > > Error in ==> statistics_wrapper at 298 > [stat] = statmethod(cfg, dat, design); > > Error in ==> ft_timelockstatistics at 110 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers > Sent: Saturday, April 28, 2012 4:01 PM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Problem in ft_timelockstatistics() phase > > Hi, > > I am trying to rework a small FieldTrip experiment I did last year > (reproduction of larger experiment done by Irina Simanova). > > Calling ft_timelockstatistics() on two ERP data partitions results in > an error: "Undefined function 'fieldnames' for input arguments of > type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on > Linux. > > I see a possible cause of the problem, in that these data we > pre-analysed with ft_timelockanalysis() a year ago, or longer. I read > them from parts of the data set I was supplied with. Maybe there have > been breaking changes to this function in the meantime? The cfg > struct that I pass as parameter seems in line with the current > documentation, though. > > > LOG: > > >> main() > > data_set_location = > > /media/SAMSUNG/0,data_set/EEG/0 MATLAB > > > output_dir = > > /tmp/EEG > > Data set part file: timelock10_lp > Data set part file: timelock11_lp > > CONTRAST > [class 1, size = 220]: participant timelock10_lp on condition > avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on > condition avg_tls_aud_lp cfg > method: 'crossvalidate' > latency: [0 0.7000] > channel: {1x60 cell} > nfolds: 5 > mva: {2x1 cell} > design: [444x1 double] > > class_1_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [220x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > class_2_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [224x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing fixing > random number generator for reproducibility creating sample indices > using 5-fold cross-validation validating fold 1 of 5 for 1 datasets > validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 > datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 > for 1 datasets Undefined function 'fieldnames' for input arguments of > type 'cell'. > > Error in ft_statistics_crossvalidate (line 84) fn = > fieldnames(stat.model{1}); > > Error in statistics_wrapper (line 298) > [stat] = statmethod(cfg, dat, design); > > Error in ft_timelockstatistics (line 110) [stat, cfg] = > statistics_wrapper(cfg, varargin{:}); > > Error in main/modeling (line 203) > stat = ft_timelockstatistics(cfg, class_1_datastruct, > class_2_datastruct); > > Error in main/statistics (line 225) > stat = modeling(data_set, method, obj_class_1_and_2); > > Error in main/ERP_experiment (line 374) > stats = statistics(data_set, contrasts, method); > > Error in main (line 401) > stats_x = ERP_experiment(data_set_location, 'RR', output_dir) > > > Any suggestions would be welcom! > > Kind regards, > Sander Maijers > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From bibi.raquel at gmail.com Wed May 2 06:09:01 2012 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Wed, 2 May 2012 00:09:01 -0400 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Hamza, Please view the Fieldtrip reference wiki on FT_resampledata. I believe it is what you are looking for. Best, Raquel On Tue, May 1, 2012 at 5:23 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Wed May 2 06:31:25 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 2 May 2012 07:31:25 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Yes, thank you Raquel I also get an answer from Eelke Best On Wed, May 2, 2012 at 7:09 AM, Raquel Bibi wrote: > Hamza, > Please view the Fieldtrip reference wiki on FT_resampledata. I believe it > is what you are looking for. > > Best, > > Raquel > > On Tue, May 1, 2012 at 5:23 AM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Hello, >> >> Is there anything to do subsampling (ex: decreasing the samples from 2048 >> to128) during the preprocessing >> >> Thanks >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Wed May 2 13:19:23 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Wed, 2 May 2012 13:19:23 +0200 Subject: [FieldTrip] subplot clusterplot In-Reply-To: References: Message-ID: Thanks Steve, it worked out well and I now got plots that are actually readable. Best, Fanny Am 01.05.2012 um 15:15 schrieb Stephen Politzer-Ahles: > Fanny, > > With ft_topoplotER, you can plot the average activation over a time interval rather than activation at a single point, using cfg.xlim; this apparently is not possible with ft_clusterplot (although I haven't used clusterplot recently). And the functionality of ft_clusterplot can be replicated by using cfg.highlightchannel. There is an example at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results (I can also send you my script, which is based on that), although it's for time-locked ERPs; I'm not sure if things will work differently for time-frequency data. > > Best, > Steve Politzer-Ahles > > Message: 2 > Date: Tue, 1 May 2012 10:09:49 +0200 > From: Fanny Quandt > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] subplot clusterplot > Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I am performing a monte-carlo cluster statistic, comparing a 200 ms activation period and a baseline of a spectrogram. > I get positive and negative clusters which are significant, and would like to plot them using ft_clusterplot. > > However, the function gives me 7 subplot (for 7 timepoints) , all so small that one is barely able to identify the highlighted channels. > > Therefore, I would either like to only plot 1 big topoplot or arrange the subplots differently. Is there a way to plot only one timepoint? > > I would appreciate any help, > Best, > Fanny > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.rotonda at gmail.com Wed May 2 14:05:14 2012 From: marco.rotonda at gmail.com (Marco Rotonda) Date: Wed, 2 May 2012 14:05:14 +0200 Subject: [FieldTrip] Methodological question on connectivity Message-ID: Hi fieldtrippers, I have some methodological questions on connectivity and I would like to share you my doubts in the hope to solve them. I would like to ask you if I could apply Granger Causality or other connectivity analysis to a non transient event. I mean I would like to know if it is possible to analyse an hypnosis induction. In this case I have not many events to check but only one long session where I could take 2-3 minutes in between. I would like to analyze at the beginning, during the induction and after the induction what's going on. So now my questions are: - is it correct to think using GC in this case? - is it correct to take these 3 moments during the induction and treat them as 3 different conditions? - if yes, how long should be the ideal temporal window (in classical FFT analysis is 4 seconds) Thanks in advance Marco From marco.rotonda at gmail.com Wed May 2 14:06:17 2012 From: marco.rotonda at gmail.com (Marco Rotonda) Date: Wed, 2 May 2012 14:06:17 +0200 Subject: [FieldTrip] Methodological question on connectivity Message-ID: Hi fieldtrippers, I have some methodological questions on connectivity and I would like to share you my doubts in the hope to solve them. I would like to ask you if I could apply Granger Causality or other connectivity analysis to a non transient event. I mean I would like to know if it is possible to analyse an hypnosis induction. In this case I have not many events to check but only one long session where I could take 2-3 minutes in between. I would like to analyze at the beginning, during the induction and after the induction what's going on. So now my questions are: - is it correct to think using GC in this case? - is it correct to take these 3 moments during the induction and treat them as 3 different conditions? - if yes, how long should be the ideal temporal window (in classical FFT analysis is 4 seconds) Thanks in advance Marco From Elena.Orekhova at neuro.gu.se Wed May 2 16:24:53 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Wed, 2 May 2012 14:24:53 +0000 Subject: [FieldTrip] grid problem Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253923E6@exchccr1.neuro.gu.se> Dear fieldtrippers, I try to construct leadfield grid using ft_prepare_leadfield. I use a template MRI (/spm8/canonical/single_subj_T1.nii) and template electrode positions (subsample of /template/electrode/standard_1005.elc). The resulting grid covers only part of the brain. My attempts to extend it manually using cfg.grid.xgrid, cfg.grid.ygrid, cfg.grid.zgrid do not help. The grid is still too small (see the attached figure). My code is: cfg = []; cfg.vol = vol; cfg.channel = {'all', '-HEOG', '-VEOG'} cfg.grid.xgrid = [ -80:10:80]; cfg.grid.ygrid = [ -100:10:100]; cfg.grid.zgrid = [ -110:10:80]; [grid] = ft_prepare_leadfield(cfg, data); Why this happens and what may I do wrong? I am new to the Fieldtrip and I would appreciate any help very much. Thanks, Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grid.tif Type: image/tiff Size: 44684 bytes Desc: grid.tif URL: From alex.santos at mso.umt.edu Wed May 2 18:19:31 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 16:19:31 +0000 Subject: [FieldTrip] loading .txt files Message-ID: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Hello all, I am new using the fieldtrip suite and for now my problem is being the loading of recorded .txt files. These files are simple 36000lines x 9 columns matrices with no headers containing signals I collected previously. I have tried to use the 'ft_preprocessing' file but obviously it did not work. Any help on this matter will be really appreciated. Alex Santos -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed May 2 18:32:13 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 2 May 2012 18:32:13 +0200 Subject: [FieldTrip] loading .txt files In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Message-ID: Dear Alex, Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format I hope this helps, Stephen On 2 May 2012 18:19, Santos, Alex wrote: > Hello all, > I am new using the fieldtrip suite and for now my problem is being the > loading of recorded .txt files. > These files are simple 36000lines x 9 columns matrices with no headers > containing signals I collected previously. I have tried to use the > ‘ft_preprocessing’ file but obviously it did not work. > Any help on this matter will be really appreciated. > > Alex Santos > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 18:42:35 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 16:42:35 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Hi Stephen, The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. I will try the option you suggested and let you know. Thank you very much. Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 10:32 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Dear Alex, Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format I hope this helps, Stephen On 2 May 2012 18:19, Santos, Alex wrote: > Hello all, > I am new using the fieldtrip suite and for now my problem is being the > loading of recorded .txt files. > These files are simple 36000lines x 9 columns matrices with no headers > containing signals I collected previously. I have tried to use the > 'ft_preprocessing' file but obviously it did not work. > Any help on this matter will be really appreciated. > > Alex Santos > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Wed May 2 19:14:53 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 2 May 2012 19:14:53 +0200 Subject: [FieldTrip] loading .txt files In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science > The University of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) > Missoula - Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being the >> loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no headers >> containing signals I collected previously. I have tried to use the >> 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 19:18:50 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 17:18:50 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C58735@UMMAIL03.gs.umt.edu> Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 11:15 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science The University > of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - > Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen > Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_ > defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being >> the loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no >> headers containing signals I collected previously. I have tried to >> use the 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 19:19:21 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 17:19:21 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C58740@UMMAIL03.gs.umt.edu> Thanks Stephen. I will try it and let you know. Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 11:15 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science The University > of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - > Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen > Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_ > defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being >> the loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no >> headers containing signals I collected previously. I have tried to >> use the 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Thu May 3 01:53:03 2012 From: wljj09 at gmail.com (Jing Wang) Date: Thu, 3 May 2012 01:53:03 +0200 Subject: [FieldTrip] About the ft_spikedetection Message-ID: Dear all, I have recently use the function ft_spikedetection to extract spike information from continous data. When I set the cfg.interactive= 'yes' , the function can run well only with the warning that data was not write in to disk in interactive mode. When I change the cfg.interactive ='no' to let the function write the spike into disk, there is a error like this ??? Undefined function or method 'ft_write_spike' for input arguments of type 'struct'. Error in ==> ft_spikedetection at 377 ft_write_spike(datafile, spike, 'dataformat', cfg.dataformat, 'fsample', hdr.Fs, 'TimeStampPerSample', hdr.TimeStampPerSample*hdr.Fs); So, it seems because it did not find the ft_write_spike. I check the latest and old Fieldtrip versions but did not find ft_write_spike neither. I have no idea how to solve this problem. Thank you for your kind help in advance. Any help on this matter will be really appreciated All the best Jing -------------- next part -------------- An HTML attachment was scrubbed... URL: From hame at meg.re.kr Thu May 3 06:29:24 2012 From: hame at meg.re.kr (Hame Park) Date: Thu, 3 May 2012 13:29:24 +0900 Subject: [FieldTrip] comparing time-series Message-ID: Hello I am trying to compare three time series, that is, to find the time windows where the three time series have statistical differences. Can anybody give me some useful advice? I would really appreciate it. THANK YOU! Hame -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu May 3 09:45:03 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 03 May 2012 09:45:03 +0200 Subject: [FieldTrip] comparing time-series In-Reply-To: References: Message-ID: <4FA2377F.9080005@donders.ru.nl> Dear Hame. I would start by looking into the tutorial: http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics If you've done that, you need to think about what precisely you would like to find out. The most intuitive way would be to check for differences between two of the three time series, and that for each combination (1vs2, 2vs3, 1vs3), and then report those differences. Best regards, Jörn On 5/3/2012 6:29 AM, Hame Park wrote: > Hello > > I am trying to compare three time series, that is, > to find the time windows where the three time series > have statistical differences. > > Can anybody give me some useful advice? > > I would really appreciate it. > > THANK YOU! > > Hame > > > _______________________________________________ > 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 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 hamzaf at sabanciuniv.edu Thu May 3 10:23:35 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 11:23:35 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) Message-ID: Hello, I want to average each 10 trials of 100 trials. I don't know what to put in (cfg.trials) I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; It does not work? Note: at the end I want to have a cell of 10 matices, not just one matrix. Any thoughts? Best, -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 3 10:36:13 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 3 May 2012 10:36:13 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Dear Hamza, Fieldtrip functions in generally do not work on several different 'sets' of data at the same time. Call the function you are using (e.g. ft_timelockanalysis) separately for every set of trials and if you want put the output in a matrix{1:10} of datastructures (e.g. timelock). You can easily put it in a loop. Something like this: for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; yourtimelockdata{i} = ft_function(cfg,yourdata) end Hope this helps, Stephen On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I want to average each 10 trials of 100 trials. > I don't know what to put in (cfg.trials) > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > It does not work? > > Note: at the end I want to have a cell of 10 matices, not just one matrix. > > Any thoughts? > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 3 10:44:30 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 11:44:30 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Yes, it helps a lot Thanks Stephen Hamza On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Fieldtrip functions in generally do not work on several different > 'sets' of data at the same time. > Call the function you are using (e.g. ft_timelockanalysis) separately > for every set of trials and if you want put the output in a > matrix{1:10} of datastructures (e.g. timelock). > You can easily put it in a loop. Something like this: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > yourtimelockdata{i} = ft_function(cfg,yourdata) > end > > Hope this helps, > Stephen > > > On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > I want to average each 10 trials of 100 trials. > > I don't know what to put in (cfg.trials) > > > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > > > It does not work? > > > > Note: at the end I want to have a cell of 10 matices, not just one > matrix. > > > > Any thoughts? > > > > Best, > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Thu May 3 11:09:52 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 12:09:52 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hello again, But I need to process my data later by ft_timelockstatistics. I don't think this funtion accepts cell containing many structs. I think its better to do average manually then call ft_lockanalysis, then ft_timelockstatistics. Right? Hamza On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Fieldtrip functions in generally do not work on several different > 'sets' of data at the same time. > Call the function you are using (e.g. ft_timelockanalysis) separately > for every set of trials and if you want put the output in a > matrix{1:10} of datastructures (e.g. timelock). > You can easily put it in a loop. Something like this: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > yourtimelockdata{i} = ft_function(cfg,yourdata) > end > > Hope this helps, > Stephen > > > On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > I want to average each 10 trials of 100 trials. > > I don't know what to put in (cfg.trials) > > > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > > > It does not work? > > > > Note: at the end I want to have a cell of 10 matices, not just one > matrix. > > > > Any thoughts? > > > > Best, > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 3 11:20:23 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 3 May 2012 11:20:23 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Dear Hamza, Actually, the statistic functions DO accept cellstructures of datastructures, and what I suggested is therefor very convenient, especially in that regard. Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I would recommend walking through it from the beginning, but you could take a particular look at the statistics section. In there I try to explain the data structure handling in detail which deals with your question. Cheers, Stephen On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) wrote: > Hello again, > > But I need to process my data later by ft_timelockstatistics. > I don't think this funtion accepts cell containing many structs. > > I think its better to do average manually then call ft_lockanalysis, then > ft_timelockstatistics. Right? > > Hamza > > > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh > wrote: >> >> Dear Hamza, >> >> Fieldtrip functions in generally do not work on several different >> 'sets' of data at the same time. >> Call the function you are using (e.g. ft_timelockanalysis) separately >> for every set of trials and if you want put the output in a >> matrix{1:10} of datastructures (e.g. timelock). >> You can easily put it in a loop. Something like this: >> >> for i = 1:10 >>     cfg = []; >>     cfg.trials = [(i-1)*10+1 : i*10]; >>     yourtimelockdata{i} = ft_function(cfg,yourdata) >> end >> >> Hope this helps, >> Stephen >> >> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello, >> > >> > I want to average each 10 trials of 100 trials. >> > I don't know what to put in (cfg.trials) >> > >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >> > >> > It does not work? >> > >> > Note: at the end I want to have a cell of 10 matices, not just one >> > matrix. >> > >> > Any thoughts? >> > >> > Best, >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 3 11:28:23 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 12:28:23 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Thanks a lot Stephen for your help, Hamza On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Actually, the statistic functions DO accept cellstructures of > datastructures, and what I suggested is therefor very convenient, > especially in that regard. > Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I > would recommend walking through it from the beginning, but you could > take a particular look at the statistics section. In there I try to > explain the data structure handling in detail which deals with your > question. > > Cheers, > Stephen > > On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) > wrote: > > Hello again, > > > > But I need to process my data later by ft_timelockstatistics. > > I don't think this funtion accepts cell containing many structs. > > > > I think its better to do average manually then call ft_lockanalysis, then > > ft_timelockstatistics. Right? > > > > Hamza > > > > > > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh > > wrote: > >> > >> Dear Hamza, > >> > >> Fieldtrip functions in generally do not work on several different > >> 'sets' of data at the same time. > >> Call the function you are using (e.g. ft_timelockanalysis) separately > >> for every set of trials and if you want put the output in a > >> matrix{1:10} of datastructures (e.g. timelock). > >> You can easily put it in a loop. Something like this: > >> > >> for i = 1:10 > >> cfg = []; > >> cfg.trials = [(i-1)*10+1 : i*10]; > >> yourtimelockdata{i} = ft_function(cfg,yourdata) > >> end > >> > >> Hope this helps, > >> Stephen > >> > >> > >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > >> wrote: > >> > Hello, > >> > > >> > I want to average each 10 trials of 100 trials. > >> > I don't know what to put in (cfg.trials) > >> > > >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > >> > > >> > It does not work? > >> > > >> > Note: at the end I want to have a cell of 10 matices, not just one > >> > matrix. > >> > > >> > Any thoughts? > >> > > >> > Best, > >> > > >> > -- > >> > Hamza Fawzi Altakroury > >> > Graduate student - MA > >> > Faculty of Engineering and Natural Sciences > >> > Sabancı University > >> > > >> > _______________________________________________ > >> > fieldtrip mailing list > >> > fieldtrip at donders.ru.nl > >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkuepper at uni-muenster.de Thu May 3 14:58:18 2012 From: pkuepper at uni-muenster.de (=?ISO-8859-15?Q?P_K=FCpper?=) Date: Thu, 03 May 2012 14:58:18 +0200 Subject: [FieldTrip] ft_spikedetection Message-ID: <4FA280EA.7080503@uni-muenster.de> Hello, using "ft_spikedetection.m" I get the error message referring to a function called "ft_write_spike.m". I cannot find this function included in the current package (fieldtrip-20120423). The included function "write_fcdc_spike.m" is marked as deprecated. Can anyone help with this issue? Thanks P Kuepper Institute for Biomagnetism and Biosignalanalysis University of Muenster From irina.simanova at mpi.nl Thu May 3 16:43:08 2012 From: irina.simanova at mpi.nl (Irina Simanova) Date: Thu, 3 May 2012 16:43:08 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <20120428160125.521cf366@sander-H57M-USB3> References: <20120428160125.521cf366@sander-H57M-USB3> Message-ID: <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> Hi Sander, The multivariate analysis module is now being re-structured, so that it will eventually become a stand-alone toolbox - Donders Machine Learning Toolbox, DMLT. Your error is caused by a conflict between the old and the new versions of the functions. You should just change the way you specify the mva method: cfg.mva = {dml.standardizer dml.svm} (check the reference to ft_statistics_crossvalidate) It should work then. Best, Irina -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers Sent: Saturday, April 28, 2012 4:01 PM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Problem in ft_timelockstatistics() phase Hi, I am trying to rework a small FieldTrip experiment I did last year (reproduction of larger experiment done by Irina Simanova). Calling ft_timelockstatistics() on two ERP data partitions results in an error: "Undefined function 'fieldnames' for input arguments of type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on Linux. I see a possible cause of the problem, in that these data we pre-analysed with ft_timelockanalysis() a year ago, or longer. I read them from parts of the data set I was supplied with. Maybe there have been breaking changes to this function in the meantime? The cfg struct that I pass as parameter seems in line with the current documentation, though. LOG: >> main() data_set_location = /media/SAMSUNG/0,data_set/EEG/0 MATLAB output_dir = /tmp/EEG Data set part file: timelock10_lp Data set part file: timelock11_lp CONTRAST [class 1, size = 220]: participant timelock10_lp on condition avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on condition avg_tls_aud_lp cfg method: 'crossvalidate' latency: [0 0.7000] channel: {1x60 cell} nfolds: 5 mva: {2x1 cell} design: [444x1 double] class_1_data__struct avg: [62x501 double] var: [62x501 double] fsample: 500 time: [1x501 double] dof: [62x501 double] label: {62x1 cell} trial: [220x62x501 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] class_2_data__struct avg: [62x501 double] var: [62x501 double] fsample: 500 time: [1x501 double] dof: [62x501 double] label: {62x1 cell} trial: [224x62x501 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] selected 60 channels selected 351 time bins selected 1 frequency bins using "ft_statistics_crossvalidate" for the statistical testing fixing random number generator for reproducibility creating sample indices using 5-fold cross-validation validating fold 1 of 5 for 1 datasets validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 for 1 datasets Undefined function 'fieldnames' for input arguments of type 'cell'. Error in ft_statistics_crossvalidate (line 84) fn = fieldnames(stat.model{1}); Error in statistics_wrapper (line 298) [stat] = statmethod(cfg, dat, design); Error in ft_timelockstatistics (line 110) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in main/modeling (line 203) stat = ft_timelockstatistics(cfg, class_1_datastruct, class_2_datastruct); Error in main/statistics (line 225) stat = modeling(data_set, method, obj_class_1_and_2); Error in main/ERP_experiment (line 374) stats = statistics(data_set, contrasts, method); Error in main (line 401) stats_x = ERP_experiment(data_set_location, 'RR', output_dir) Any suggestions would be welcom! Kind regards, Sander Maijers _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From joscha.schmiedt at esi-frankfurt.de Thu May 3 16:48:32 2012 From: joscha.schmiedt at esi-frankfurt.de (Schmiedt, Joscha) Date: Thu, 3 May 2012 14:48:32 +0000 Subject: [FieldTrip] isrealmat & isrealvec Message-ID: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> Dear Fieldtrip community, I'd like to use the Fieldtrip framework for my spike data analysis, but encountered something strange: a couple of spike analysis-related functions (e.g. ft_spikedensity, ft_spike_plot_raster) make use of the functions isrealmat and isrealvec, which seem to be non-standard matlab functions and also not present in the standard Fieldtrip installation. I'm using Matlab R2011a and a pretty recent version of Fieldtrip (ft_spikedensity.m 5157 2012-01-22 14:49:34Z, ft_spike_plot_raster.m 5157 2012-01-22 14:49:34Z). Did I miss something there? Though it is easy to implement these functions, I'd very happy about any hints on this issue. Thanks! Best, Joscha From Christos.Papadelis at childrens.harvard.edu Thu May 3 21:08:52 2012 From: Christos.Papadelis at childrens.harvard.edu (Papadelis, Christos) Date: Thu, 3 May 2012 19:08:52 +0000 Subject: [FieldTrip] Research Technologist, Boston, MA Message-ID: <876E0E5B34DB6A4DBD0E65B9091B435010D4AB63@CHEXMBX2A.CHBOSTON.ORG> Research Technologist, Boston, MA The MEG program at Children’s Hospital Boston (CHB)/HMS is now recruiting a Research Technologist. The successful candidate will work as a member of the team to help carry out studies of human brain development using a combination of MEG, EEG and MRI (tractography). This position is best for a person interested in working with babies and children, studying brain development either as a career or as an educational/training opportunity for further studies. Below is a description of the responsibilities and minimum and preferred qualifications. Responsibilities: o Acquisition/collection of MEG and related data (i.e. EEG, EOG, Polaris, Polhemus etc). o Ordering of supplies and equipment for the lab. o Scheduling healthy subjects and patients for the different studies running in the lab. o Analysis and evaluation of MEG and related data for investigators by using sophisticated software analysis tools such as BrainStorm, FieldTrip, BESA, etc. o Training of members of the Center and external users in the acceptable use and maintenance of the BabyMEG System hardware and software. o Performance of periodic liquid helium refills of the BabyMEG system, three times per week. o Maintains all safety documentation of the laboratory as well as the IRB approved signed consent forms of the different studies running in the lab. o Preparation of documents concerning the smooth operation of the lab (family education sheets, brochures, technical specifications documents, liquid helium refill records, etc). o Performance of routine tests for specific research projects, using sophisticated and intricate research equipment and techniques. Performance of research procedures, troubleshooting problems with own and other researchers' results. Minimum qualifications: o MSc or MA in the area of Biomedical Engineering or Neuroscience is preferred. The minimum requirement is BA or BSc degree in Biomedical, Electrical or Computer Engineering, or in a Biological Science. Previous experience in Biomagnetism research is not required. o Basic understanding of the electromagnetic theory needed for signal analysis. o Native speaker of English is preferred. Required is complete fluency in English since there will be frequent interactions with the family members as well as children. Abilities to relate to children and their parents are essential. Conditions of Employment: o Position available beginning June 2012. o Salary: commensurate with education and experience (minimum = $ 40,000). o CHB has excellent benefits, including health benefits and retirement plans with employer contributions. o CHB values diversity and is committed to equal opportunity in employment. How to Apply: o Please visit the website of Children's Hospital Boston (www.childrenshospital.jobs) AutoReqID 27106. o If you have any questions please contact: Christos Papadelis Lab Manager of the BabyMEG/EEG Facility Children’s Hospital Boston/Harvard Medical School 9 Hope Ave, Waltham MA 02453, USA E-mail: christos.papadelis at childrens.harvard.edu Phone: +1-781-216-1128 ______________________________________________ Christos Papadelis, PhD Instructor in Neurology, Harvard Medical School MEG Lab Manager, Children's Hospital Boston 9 Hope Avenue Waltham, MA 02453 USA Phone: +1-781-216-1128 Fax: +1-781-216-1172 From r.oostenveld at donders.ru.nl Thu May 3 21:40:32 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 3 May 2012 21:40:32 +0200 Subject: [FieldTrip] isrealmat & isrealvec In-Reply-To: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> References: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <2818E365-AAE5-45AC-8303-7651E8E5D16E@donders.ru.nl> Dear Josha, Hmm, those functions seem to be part of the "Identification_Toolbox". No idea what that toolbox does, but our University has a few licenses for it, that is why the use of that external toolbox went undetected. Of course there is no reason to use an external toolbox for such simple functions. I'll add a replacement implementation to FieldTrip. See already attached for the two functions, please put them in your fieldtrip/private folder. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: isrealmat.m Type: application/octet-stream Size: 1573 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: isrealvec.m Type: application/octet-stream Size: 1606 bytes Desc: not available URL: -------------- next part -------------- On 3 May 2012, at 16:48, Schmiedt, Joscha wrote: > Dear Fieldtrip community, > > I'd like to use the Fieldtrip framework for my spike data analysis, but > encountered something strange: a couple of spike analysis-related > functions (e.g. ft_spikedensity, ft_spike_plot_raster) make use of the > functions isrealmat and isrealvec, which seem to be non-standard matlab > functions and also not present in the standard Fieldtrip installation. > I'm using Matlab R2011a and a pretty recent version of Fieldtrip > (ft_spikedensity.m 5157 2012-01-22 14:49:34Z, ft_spike_plot_raster.m > 5157 2012-01-22 14:49:34Z). > > Did I miss something there? Though it is easy to implement these > functions, I'd very happy about any hints on this issue. Thanks! > > Best, > Joscha > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Elena.Orekhova at neuro.gu.se Fri May 4 08:50:08 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Fri, 4 May 2012 06:50:08 +0000 Subject: [FieldTrip] SAM option in ft_sourceanalysis Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> Dear fieldtrippers! I tried to use SAM beamformer for the EEG analysis, But I have got en error (see below). I guess that there is a bug in ‘beamformer_sam’at line 112. I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in ‘ft_sourceanalysis’? Thanks, Elena *********************** Error using * Inner matrix dimensions must agree. Error in beamformer_sam (line 112) inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Fri May 4 14:51:47 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Fri, 4 May 2012 14:51:47 +0200 Subject: [FieldTrip] WARNING: The input units are cm for points and S/cm for conductivity Message-ID: Dear all, I am getting the following error message when using ft_sourceanalysis: WARNING: The input units are cm for points and S/cm for conductivity Is this something that could affect my results or can I simply ignore it? Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Fri May 4 16:21:43 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Fri, 4 May 2012 16:21:43 +0200 Subject: [FieldTrip] computing the covariance matrix from trials with different lengths Message-ID: Dear all, I want to do a beamforming analysis using the LCMV beamformer on MEG resting state activity. After the artifcat rejection, my data is chopped into trials of different lengths. My question is related as to how to compute the covariance matrix. If I use cfg = []; cfg.vartrllength = 2; cov = ft_timelockanalysis(cfg,data); a covariance matrix will be computed for each trial while padding all the segments that are smaller than the longest segment with zeros. I believe that in the end the average covariance matrix across the trials is used. Am I correct? Another alternative would be to chop all the trials into epochs of the same length, ie 2 seconds. cfg = []; cfg.trllength = 2; data = ft_redefinetrial(cfg,data); cfg = []; cfg.vartrllength = 0; cov = ft_timelockanalysis(cfg,data); Finally, one could also concatenate all the trials into one long epoch and run the same code. I would be curious to know what the differences would be regarding the computation of the covariance matrix and which would be the most appropriate way to do this. Any suggestions, help or comments would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.santos at mso.umt.edu Fri May 4 16:23:53 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Fri, 4 May 2012 14:23:53 +0000 Subject: [FieldTrip] time-resolved coherence Message-ID: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> Hello everybody, I am looking forward to do coherence analysis between EMG signals on a time continuum so I could verify any modulation of this estimate along my trials. Has anyone done that ? Alex Alex Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Fri May 4 18:10:01 2012 From: michael.wibral at web.de (Michael Wibral) Date: Fri, 4 May 2012 18:10:01 +0200 (CEST) Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Fri May 4 20:56:19 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Fri, 4 May 2012 21:56:19 +0300 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> Message-ID: Dear Elena I used it recently with MEG data and local spheres model I don't think it could work with eeg but I don't know. Yuval On 4 May 2012 09:50, Elena Orekhova wrote: > Dear fieldtrippers! > > > > I tried to use SAM beamformer for the EEG analysis, > > But I have got en error (see below). > > I guess that there is a bug in ‘beamformer_sam’at line 112. > > > > I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in > ‘ft_sourceanalysis’? > > > > Thanks, > > Elena > > > > *********************** > > Error using * > > Inner matrix dimensions must agree. > > > > Error in beamformer_sam (line 112) > > inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); > > > > Error in ft_sourceanalysis (line 849) > > dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), > > squeeze(Cy(i,:,:)), optarg{:}); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 06:43:47 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 07:43:47 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Thanks Michael Hamza On Fri, May 4, 2012 at 7:10 PM, Michael Wibral wrote: > Hi Hamza, > > if you serach for downsampling instead of subsampling you should find an > FT function. > > Best Michael > > *Gesendet:* Dienstag, 01. Mai 2012 um 11:23 Uhr > *Von:* "Hamza Fawzi Altakroury (Student)" > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* [FieldTrip] Subsampling > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 11:15:40 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 12:15:40 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hello again Stephen and for all, I could not find out how to enter the following sturct into the ft_timelockstatistics function The input is generated using the following loop: for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); end and for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; avgP300{i} = ft_timelockanalysis(cfg,p300); end Then I use cfg = []; cfg.layout = 'CTF275.lay'; cfg.method = 'crossvalidate'; cfg.design = [ones(10,1); 2*ones(10,1)]'; stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); I get the following error ??? Error using ==> ft_checkdata at 307 This function requires timelock data as input. Error in ==> ft_timelockstatistics at 75 varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', 'feedback', 'no'); Error in ==> test05 at 11 stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); Any thoughts Hamza On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Thanks a lot Stephen for your help, > > Hamza > > > > On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Dear Hamza, >> >> Actually, the statistic functions DO accept cellstructures of >> datastructures, and what I suggested is therefor very convenient, >> especially in that regard. >> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >> would recommend walking through it from the beginning, but you could >> take a particular look at the statistics section. In there I try to >> explain the data structure handling in detail which deals with your >> question. >> >> Cheers, >> Stephen >> >> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello again, >> > >> > But I need to process my data later by ft_timelockstatistics. >> > I don't think this funtion accepts cell containing many structs. >> > >> > I think its better to do average manually then call ft_lockanalysis, >> then >> > ft_timelockstatistics. Right? >> > >> > Hamza >> > >> > >> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >> > wrote: >> >> >> >> Dear Hamza, >> >> >> >> Fieldtrip functions in generally do not work on several different >> >> 'sets' of data at the same time. >> >> Call the function you are using (e.g. ft_timelockanalysis) separately >> >> for every set of trials and if you want put the output in a >> >> matrix{1:10} of datastructures (e.g. timelock). >> >> You can easily put it in a loop. Something like this: >> >> >> >> for i = 1:10 >> >> cfg = []; >> >> cfg.trials = [(i-1)*10+1 : i*10]; >> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >> >> end >> >> >> >> Hope this helps, >> >> Stephen >> >> >> >> >> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >> >> wrote: >> >> > Hello, >> >> > >> >> > I want to average each 10 trials of 100 trials. >> >> > I don't know what to put in (cfg.trials) >> >> > >> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >> >> > >> >> > It does not work? >> >> > >> >> > Note: at the end I want to have a cell of 10 matices, not just one >> >> > matrix. >> >> > >> >> > Any thoughts? >> >> > >> >> > Best, >> >> > >> >> > -- >> >> > Hamza Fawzi Altakroury >> >> > Graduate student - MA >> >> > Faculty of Engineering and Natural Sciences >> >> > Sabancı University >> >> > >> >> > _______________________________________________ >> >> > fieldtrip mailing list >> >> > fieldtrip at donders.ru.nl >> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> > >> > >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 11:46:26 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 12:46:26 +0300 Subject: [FieldTrip] Reading multiple files Message-ID: Hello, I am planning to process the data of multiple files (training and test over multiple sessions). Is there a way to read more than one file then combine their data? Or combine the bdf files before reading them? Hamza -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.N.Maijers at student.ru.nl Sat May 5 11:54:25 2012 From: S.N.Maijers at student.ru.nl (Sander Maijers) Date: Sat, 5 May 2012 11:54:25 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> References: <20120428160125.521cf366@sander-H57M-USB3> <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> Message-ID: <20120505115425.4441dd23@sander-H57M-USB3> Hi Irina, Thank you for your solution! I changed the code as per your suggestion, and other shortcomings too. It works correctly now. I will start working further on the experiment (correcting the remaining issues, and expand its scope a bit I hope). I will ask you if I have questions. I was aware of the DMLT effort, and I had installed it already. Perhaps I am mistaken, but I could not find clear guidance about the transition between the old FieldTrip function names and the the new DMLT names. Thanks for your help and dedication. Best, Sander On Thu, 3 May 2012 16:43:08 +0200 "Irina Simanova" wrote: > Hi Sander, > > The multivariate analysis module is now being re-structured, so that > it will eventually become a stand-alone toolbox - Donders Machine > Learning Toolbox, DMLT. Your error is caused by a conflict between > the old and the new versions of the functions. You should just change > the way you specify the mva method: cfg.mva = {dml.standardizer > dml.svm} (check the reference to ft_statistics_crossvalidate) > It should work then. > > Best, > Irina > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers > Sent: Saturday, April 28, 2012 4:01 PM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Problem in ft_timelockstatistics() phase > > Hi, > > I am trying to rework a small FieldTrip experiment I did last year > (reproduction of larger experiment done by Irina Simanova). > > Calling ft_timelockstatistics() on two ERP data partitions results in > an error: "Undefined function 'fieldnames' for input arguments of > type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on > Linux. > > I see a possible cause of the problem, in that these data we > pre-analysed with ft_timelockanalysis() a year ago, or longer. I read > them from parts of the data set I was supplied with. Maybe there have > been breaking changes to this function in the meantime? The cfg > struct that I pass as parameter seems in line with the current > documentation, though. > > > LOG: > > >> main() > > data_set_location = > > /media/SAMSUNG/0,data_set/EEG/0 MATLAB > > > output_dir = > > /tmp/EEG > > Data set part file: timelock10_lp > Data set part file: timelock11_lp > > CONTRAST > [class 1, size = 220]: participant timelock10_lp on condition > avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on > condition avg_tls_aud_lp cfg > method: 'crossvalidate' > latency: [0 0.7000] > channel: {1x60 cell} > nfolds: 5 > mva: {2x1 cell} > design: [444x1 double] > > class_1_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [220x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > class_2_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [224x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing fixing > random number generator for reproducibility creating sample indices > using 5-fold cross-validation validating fold 1 of 5 for 1 datasets > validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 > datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 > for 1 datasets Undefined function 'fieldnames' for input arguments of > type 'cell'. > > Error in ft_statistics_crossvalidate (line 84) fn = > fieldnames(stat.model{1}); > > Error in statistics_wrapper (line 298) > [stat] = statmethod(cfg, dat, design); > > Error in ft_timelockstatistics (line 110) [stat, cfg] = > statistics_wrapper(cfg, varargin{:}); > > Error in main/modeling (line 203) > stat = ft_timelockstatistics(cfg, class_1_datastruct, > class_2_datastruct); > > Error in main/statistics (line 225) > stat = modeling(data_set, method, obj_class_1_and_2); > > Error in main/ERP_experiment (line 374) > stats = statistics(data_set, contrasts, method); > > Error in main (line 401) > stats_x = ERP_experiment(data_set_location, 'RR', output_dir) > > > Any suggestions would be welcom! > > Kind regards, > Sander Maijers > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Sat May 5 16:24:28 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 5 May 2012 09:24:28 -0500 Subject: [FieldTrip] Reading multiple files Message-ID: Hello Hamza, Does http://fieldtrip.fcdonders.nl/reference/ft_appenddata do what you need? Best, Steve > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 5 May 2012 12:46:26 +0300 > From: "Hamza Fawzi Altakroury (Student)" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Reading multiple files > Message-ID: > > > Content-Type: text/plain; charset="utf-8" > > Hello, > > I am planning to process the data of multiple files (training and test over > multiple sessions). > Is there a way to read more than one file then combine their data? Or > combine the bdf files before reading them? > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabanc? University > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120505/a5c5ae35/attachment-0001.html > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 5 20:38:12 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 5 May 2012 20:38:12 +0200 Subject: [FieldTrip] time-resolved coherence In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> Message-ID: Hi Alex, Yes, this has been done, see for example: http://www.sciencemag.org/content/308/5718/111.abstract Best wishes, Jan-Mathijs On May 4, 2012, at 4:23 PM, Santos, Alex wrote: > Hello everybody, > I am looking forward to do coherence analysis between EMG signals on a time continuum so I could verify any modulation of this estimate along my trials. > Has anyone done that ? > Alex > > Alex Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science > The University of Montana > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 5 21:15:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 5 May 2012 21:15:27 +0200 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis References: <4F97AD41.8090304@biomag.uni-jena.de> Message-ID: <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> Dear Theresa, I am forwarding your questions to the discussion list, as this is the forum on which we discuss this type of issues. Other people may benefit from it too, or may feel inclined to answer. Cheers, Jan-Mathijs Begin forwarded message: > From: Theresa Götz > Date: April 25, 2012 9:52:33 AM GMT+02:00 > To: j.schoffelen at donders.ru.nl > Subject: Question about unit of the wavelet analysis > > Dear Jan-Mathijs Schoeffelen, > > we have a question about the unit of the time-frequency power spectrum: > maybe you can help me with that. > > 1. In fieldtrip, we performed ft_frequanalysis with method 'wavelet' and > output 'power'. What is the exact unit of the resulting power spectrum > (e.g. V/sqrt(hz) or V^2/Hz or V^2 or V)? > > 2. Why does the amplitude of power spectrum decrease toward higher > frequencies even though we keep the amplitude of the input sine wave (in > time domain) constant? > > Thank you very much. > > Best, > Theresa > > > > > -- > Bitte denken Sie an die Umwelt, bevor Sie diese e-Mail ausdrucken. > > > Dr. Theresa Götz Phone: +49-3641-9325780 > University Hospital Jena Fax: +49-3641-9325772 > Dept. for Neurology > Biomagnetic Center > > Erlanger Allee 101 > D-07747 Jena > Germany > > > > > Universitätsklinikum Jena > Körperschaft des öffentlichen Rechts und > Teilkörperschaft der Friedrich-Schiller-Universität Jena > Bachstraße 18, 07743 Jena > > Verwaltungsratsvorsitzender: Prof. Dr. Thomas Deufel > Medizinischer Vorstand: Prof. Dr. Klaus Höffken > Wissenschaftlicher Vorstand: Prof. Dr. Klaus Benndorf > Kaufmännischer Vorstand und > Sprecher des Klinikumsvorstandes: Dr. Brunhilde Seidel-Kwem > > Bankverbindung: Sparkasse Jena > BLZ: 830 530 30, Kto.: 221 > > Gerichtsstand Jena > Steuernummer: 161/144/02978 USt.-IdNr. : DE 150545777 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Sun May 6 13:51:20 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sun, 6 May 2012 13:51:20 +0200 Subject: [FieldTrip] WARNING: The input units are cm for points and S/cm for conductivity In-Reply-To: References: Message-ID: Hi Fred As long as you are fine with arbitrary units of your results, you don't have to worry. We are working towards better support of units throughout the whole code, to allow computations return well-defined values and not "arbitrary units". This has the consequence that for a lot of data objects the physical units have to be added. In some cases we need backward compatibility and have to "guess" the units on the fly. At places where different physical units meet (i.e. in source reconstruction where conductivity, space/distance, and field strength come together), the units of the inputs have to be matched (i.e. all have to be converted to SI units). The purpose of the specific warning is indeed not clear. For now I have disabled it in the code. best Robert On 4 May 2012, at 14:51, Frederic Roux wrote: > Dear all, > > I am getting the following error message when using ft_sourceanalysis: > > WARNING: The input units are cm for points and S/cm for conductivity > > Is this something that could affect my results or can I simply ignore it? > > Best, > Fred > > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Sun May 6 20:22:01 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 6 May 2012 21:22:01 +0300 Subject: [FieldTrip] Reading multiple files In-Reply-To: References: Message-ID: Hello, I found a way to merges files. Hamza On Sat, May 5, 2012 at 12:46 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > I am planning to process the data of multiple files (training and test > over multiple sessions). > Is there a way to read more than one file then combine their data? Or > combine the bdf files before reading them? > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Sun May 6 22:50:02 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 6 May 2012 20:50:02 +0000 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> >Dear Elena >I used it recently with MEG data and local spheres model >I don't think it could work with eeg but I don't know. >Yuval Hi again, Theoretically SAM should work for EEG as well. Is there any particular reason it does not? I have found a previous message by Don Rojas and introduced the lambda correction he suggested. Now there is another error (see below). Dear developers, what is wrong? I would be very grateful for help! Elena *********************** sourcepst = ft_sourceanalysis(cfg, tlckavgpst); the input is timelock data with 30 channels and 1250 timebins using headmodel specified in the configuration using electrodes specified in the configuration creating dipole grid based on user specified dipole positions 15156 dipoles inside, 11814 dipoles outside brain the call to "ft_prepare_sourcemodel" took 0 seconds and an estimated 1 MB scanning repetition 1 using precomputed leadfields scanning grid Undefined function 'SAM_costfun' for input arguments of type 'double'. Error in fminsearch (line 191) fv(:,1) = funfcn(x,varargin{:}); Error in beamformer_sam (line 157) [opt_angle, fval, exitflag, output] = fminsearch('SAM_costfun', all_angles(min_ind), optim_options, vox_pos, tanu, tanv, lf, all_cov, inv_cov, noise_cov); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); ************************ ________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of Yuval Harpaz [yuvharpaz at gmail.com] Sent: Friday, May 04, 2012 8:56 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] SAM option in ft_sourceanalysis Dear Elena I used it recently with MEG data and local spheres model I don't think it could work with eeg but I don't know. Yuval On 4 May 2012 09:50, Elena Orekhova > wrote: Dear fieldtrippers! I tried to use SAM beamformer for the EEG analysis, But I have got en error (see below). I guess that there is a bug in ‘beamformer_sam’at line 112. I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in ‘ft_sourceanalysis’? Thanks, Elena *********************** Error using * Inner matrix dimensions must agree. Error in beamformer_sam (line 112) inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Mon May 7 02:49:14 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Sun, 6 May 2012 20:49:14 -0400 Subject: [FieldTrip] Artifact rejection using 'summary' mode Message-ID: Dear all FTers I want to use the artifact rejection module in the 'summary' mode. My data have just one channel (single electrode LFP recording), so, I want to summarize just the trial information (for trial rejection). Is it possible? Cheers Y -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Mon May 7 07:52:29 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Mon, 7 May 2012 08:52:29 +0300 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> Message-ID: Hi well, talking to Dr. Robinson he said he tried to make it work for EEG but since the impedance is unknown and may change during the experiment the forward solution wasn't stable enough. I noticed the fieldtrip team followed up on Dr. Robinson's SAM on few issues. since at the time it only worked with local spheres (or a single sphere but not with Nolte) sam in fieldtrip does not allow single shell for example. on the other hand, dipole orientation is not set according to Dr. Robinson's method (there is "stephen's" method there but it doesn't work now) so maybe fieldtrip went beyond Dr. Robinson and adjusted sam for EEG. Yuval On 6 May 2012 23:50, Elena Orekhova wrote: > >Dear Elena > >I used it recently with MEG data and local spheres model > >I don't think it could work with eeg but I don't know. > >Yuval > > Hi again, > Theoretically SAM should work for EEG as well. Is there any particular > reason it does not? > > I have found a previous message by Don Rojas and introduced the lambda > correction he suggested. > Now there is another error (see below). > > Dear developers, what is wrong? I would be very grateful for help! > > Elena > > > *********************** > sourcepst = ft_sourceanalysis(cfg, tlckavgpst); > the input is timelock data with 30 channels and 1250 timebins > using headmodel specified in the configuration > using electrodes specified in the configuration > creating dipole grid based on user specified dipole positions > 15156 dipoles inside, 11814 dipoles outside brain > the call to "ft_prepare_sourcemodel" took 0 seconds and an estimated 1 MB > scanning repetition 1 > using precomputed leadfields > scanning grid > Undefined function 'SAM_costfun' for input arguments of type 'double'. > > Error in fminsearch (line 191) > fv(:,1) = funfcn(x,varargin{:}); > > Error in beamformer_sam (line 157) > [opt_angle, fval, exitflag, output] = fminsearch('SAM_costfun', > all_angles(min_ind), optim_options, vox_pos, tanu, tanv, lf, all_cov, > inv_cov, noise_cov); > > > Error in ft_sourceanalysis (line 849) > dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), optarg{:}); > ************************ > > ------------------------------ > *From:* fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > on behalf of Yuval Harpaz [yuvharpaz at gmail.com] > *Sent:* Friday, May 04, 2012 8:56 PM > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] SAM option in ft_sourceanalysis > Dear Elena > I used it recently with MEG data and local spheres model > I don't think it could work with eeg but I don't know. > Yuval > > On 4 May 2012 09:50, Elena Orekhova wrote: > >> Dear fieldtrippers! >> >> >> >> I tried to use SAM beamformer for the EEG analysis, >> >> But I have got en error (see below). >> >> I guess that there is a bug in ‘beamformer_sam’at line 112. >> >> >> >> I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in >> ‘ft_sourceanalysis’? >> >> >> >> Thanks, >> >> Elena >> >> >> >> *********************** >> >> Error using * >> >> Inner matrix dimensions must agree. >> >> >> >> Error in beamformer_sam (line 112) >> >> inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); >> >> >> >> Error in ft_sourceanalysis (line 849) >> >> dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), >> >> squeeze(Cy(i,:,:)), optarg{:}); >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Mon May 7 10:00:51 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Mon, 7 May 2012 10:00:51 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hi Fawzi, If you do: stat = ft_timelockstatistics(cfg,avgP300{:},avgnonP300{:}) It should work. (this way the contents of each cell is used, instead the cell itself) Best, Roemer On May 5, 2012 11:51 AM, "Hamza Fawzi Altakroury (Student)" < hamzaf at sabanciuniv.edu> wrote: > Hello again Stephen and for all, > > I could not find out how to enter the following sturct into the > ft_timelockstatistics function > > The input is generated using the following loop: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); > end > > and > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > avgP300{i} = ft_timelockanalysis(cfg,p300); > end > > > Then I use > > cfg = []; > cfg.layout = 'CTF275.lay'; > cfg.method = 'crossvalidate'; > cfg.design = [ones(10,1); 2*ones(10,1)]'; > stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); > > I get the following error > > ??? Error using ==> ft_checkdata at 307 > This function requires timelock data as input. > > Error in ==> ft_timelockstatistics at 75 > varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', > 'feedback', > 'no'); > > Error in ==> test05 at 11 > stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); > > > Any thoughts > > Hamza > > > On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Thanks a lot Stephen for your help, >> >> Hamza >> >> >> >> On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < >> stephen.whitmarsh at gmail.com> wrote: >> >>> Dear Hamza, >>> >>> Actually, the statistic functions DO accept cellstructures of >>> datastructures, and what I suggested is therefor very convenient, >>> especially in that regard. >>> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >>> would recommend walking through it from the beginning, but you could >>> take a particular look at the statistics section. In there I try to >>> explain the data structure handling in detail which deals with your >>> question. >>> >>> Cheers, >>> Stephen >>> >>> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >>> wrote: >>> > Hello again, >>> > >>> > But I need to process my data later by ft_timelockstatistics. >>> > I don't think this funtion accepts cell containing many structs. >>> > >>> > I think its better to do average manually then call ft_lockanalysis, >>> then >>> > ft_timelockstatistics. Right? >>> > >>> > Hamza >>> > >>> > >>> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >>> > wrote: >>> >> >>> >> Dear Hamza, >>> >> >>> >> Fieldtrip functions in generally do not work on several different >>> >> 'sets' of data at the same time. >>> >> Call the function you are using (e.g. ft_timelockanalysis) separately >>> >> for every set of trials and if you want put the output in a >>> >> matrix{1:10} of datastructures (e.g. timelock). >>> >> You can easily put it in a loop. Something like this: >>> >> >>> >> for i = 1:10 >>> >> cfg = []; >>> >> cfg.trials = [(i-1)*10+1 : i*10]; >>> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >>> >> end >>> >> >>> >> Hope this helps, >>> >> Stephen >>> >> >>> >> >>> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >>> >> wrote: >>> >> > Hello, >>> >> > >>> >> > I want to average each 10 trials of 100 trials. >>> >> > I don't know what to put in (cfg.trials) >>> >> > >>> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >>> >> > >>> >> > It does not work? >>> >> > >>> >> > Note: at the end I want to have a cell of 10 matices, not just one >>> >> > matrix. >>> >> > >>> >> > Any thoughts? >>> >> > >>> >> > Best, >>> >> > >>> >> > -- >>> >> > Hamza Fawzi Altakroury >>> >> > Graduate student - MA >>> >> > Faculty of Engineering and Natural Sciences >>> >> > Sabancı University >>> >> > >>> >> > _______________________________________________ >>> >> > fieldtrip mailing list >>> >> > fieldtrip at donders.ru.nl >>> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >>> >> _______________________________________________ >>> >> fieldtrip mailing list >>> >> fieldtrip at donders.ru.nl >>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> > >>> > >>> > >>> > >>> > -- >>> > Hamza Fawzi Altakroury >>> > Graduate student - MA >>> > Faculty of Engineering and Natural Sciences >>> > Sabancı University >>> > >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Mon May 7 10:44:07 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Mon, 7 May 2012 11:44:07 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Yes, it works. Thanks a lot Roemer Best, Hamza On Mon, May 7, 2012 at 11:00 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Fawzi, > > If you do: > stat = ft_timelockstatistics(cfg,avgP300{:},avgnonP300{:}) > It should work. > (this way the contents of each cell is used, instead the cell itself) > > Best, > Roemer > On May 5, 2012 11:51 AM, "Hamza Fawzi Altakroury (Student)" < > hamzaf at sabanciuniv.edu> wrote: > >> Hello again Stephen and for all, >> >> I could not find out how to enter the following sturct into the >> ft_timelockstatistics function >> >> The input is generated using the following loop: >> >> for i = 1:10 >> cfg = []; >> cfg.trials = [(i-1)*10+1 : i*10]; >> avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); >> end >> >> and >> >> for i = 1:10 >> cfg = []; >> cfg.trials = [(i-1)*10+1 : i*10]; >> avgP300{i} = ft_timelockanalysis(cfg,p300); >> end >> >> >> Then I use >> >> cfg = []; >> cfg.layout = 'CTF275.lay'; >> cfg.method = 'crossvalidate'; >> cfg.design = [ones(10,1); 2*ones(10,1)]'; >> stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); >> >> I get the following error >> >> ??? Error using ==> ft_checkdata at 307 >> This function requires timelock data as input. >> >> Error in ==> ft_timelockstatistics at 75 >> varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', >> 'feedback', >> 'no'); >> >> Error in ==> test05 at 11 >> stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); >> >> >> Any thoughts >> >> Hamza >> >> >> On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < >> hamzaf at sabanciuniv.edu> wrote: >> >>> Thanks a lot Stephen for your help, >>> >>> Hamza >>> >>> >>> >>> On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < >>> stephen.whitmarsh at gmail.com> wrote: >>> >>>> Dear Hamza, >>>> >>>> Actually, the statistic functions DO accept cellstructures of >>>> datastructures, and what I suggested is therefor very convenient, >>>> especially in that regard. >>>> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >>>> would recommend walking through it from the beginning, but you could >>>> take a particular look at the statistics section. In there I try to >>>> explain the data structure handling in detail which deals with your >>>> question. >>>> >>>> Cheers, >>>> Stephen >>>> >>>> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >>>> wrote: >>>> > Hello again, >>>> > >>>> > But I need to process my data later by ft_timelockstatistics. >>>> > I don't think this funtion accepts cell containing many structs. >>>> > >>>> > I think its better to do average manually then call ft_lockanalysis, >>>> then >>>> > ft_timelockstatistics. Right? >>>> > >>>> > Hamza >>>> > >>>> > >>>> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >>>> > wrote: >>>> >> >>>> >> Dear Hamza, >>>> >> >>>> >> Fieldtrip functions in generally do not work on several different >>>> >> 'sets' of data at the same time. >>>> >> Call the function you are using (e.g. ft_timelockanalysis) separately >>>> >> for every set of trials and if you want put the output in a >>>> >> matrix{1:10} of datastructures (e.g. timelock). >>>> >> You can easily put it in a loop. Something like this: >>>> >> >>>> >> for i = 1:10 >>>> >> cfg = []; >>>> >> cfg.trials = [(i-1)*10+1 : i*10]; >>>> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >>>> >> end >>>> >> >>>> >> Hope this helps, >>>> >> Stephen >>>> >> >>>> >> >>>> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >>>> >> wrote: >>>> >> > Hello, >>>> >> > >>>> >> > I want to average each 10 trials of 100 trials. >>>> >> > I don't know what to put in (cfg.trials) >>>> >> > >>>> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >>>> >> > >>>> >> > It does not work? >>>> >> > >>>> >> > Note: at the end I want to have a cell of 10 matices, not just one >>>> >> > matrix. >>>> >> > >>>> >> > Any thoughts? >>>> >> > >>>> >> > Best, >>>> >> > >>>> >> > -- >>>> >> > Hamza Fawzi Altakroury >>>> >> > Graduate student - MA >>>> >> > Faculty of Engineering and Natural Sciences >>>> >> > Sabancı University >>>> >> > >>>> >> > _______________________________________________ >>>> >> > fieldtrip mailing list >>>> >> > fieldtrip at donders.ru.nl >>>> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >> >>>> >> _______________________________________________ >>>> >> fieldtrip mailing list >>>> >> fieldtrip at donders.ru.nl >>>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > Hamza Fawzi Altakroury >>>> > Graduate student - MA >>>> > Faculty of Engineering and Natural Sciences >>>> > Sabancı University >>>> > >>>> > _______________________________________________ >>>> > fieldtrip mailing list >>>> > fieldtrip at donders.ru.nl >>>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Mon May 7 17:36:16 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Mon, 7 May 2012 17:36:16 +0200 Subject: [FieldTrip] ICA before beamforming -> change in gradiometer -> workaround? Message-ID: Dear all, I am using ICA prior to beamforming for artefact cleaning (EOG & ECG). After running ft_componentanalysis I noticed that the gradiometer structure is removed from the data, which is required by ft_sourceanalysis. In a prior post I read that one could just add the grad structure from a previous version of the data before the ICA cleaning. http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004877.html Can anyone tell me if this is the best solution, or if there is any other strategies out there? Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Mon May 7 19:52:08 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 13:52:08 -0400 Subject: [FieldTrip] ft_sourceplot Message-ID: Hi, I am having trouble following the tutorial of 'source reconstruction of event-related fields using minimum-norm estimate'. So far, I have been successfully done with the freesurfer and am checking the mri result by freesurfer. The command is like this, % go to the Subject01/mri directory mri = ft_read_mri('filled.mgz'); cfg = []; cfg.interactive = 'yes'; figure;ft_sourceplot(cfg, mri); ft_sourceplot shows no figures at all. I do check the 'filled.mgz by converting it to nii and view it in afni. The white matter can be clearly seen. Can anybody help? Thanks a lot! Qi From yuvharpaz at gmail.com Mon May 7 20:03:49 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Mon, 7 May 2012 21:03:49 +0300 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: for work around try reading the nii with fieldtrip regards yuval On 7 May 2012 20:52, qi li wrote: > Hi, > > I am having trouble following the tutorial of 'source reconstruction > of event-related fields using minimum-norm estimate'. > > So far, I have been successfully done with the freesurfer and am > checking the mri result by freesurfer. > > The command is like this, > > % go to the Subject01/mri directory > mri = ft_read_mri('filled.mgz'); > cfg = []; > cfg.interactive = 'yes'; > figure;ft_sourceplot(cfg, mri); > > ft_sourceplot shows no figures at all. I do check the 'filled.mgz by > converting it to nii and view it in afni. The white matter can be > clearly seen. > > Can anybody help? Thanks a lot! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Mon May 7 21:19:20 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:19:20 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Hi Yuval, Thanks for your help but ft_sourceplot still can not show nii either. Now it is showing the message' Warning: no colorbar possible without functional data > In ft_sourceplot at 774 the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >> mri mri = dim: [256 256 256] anatomy: [256x256x256 double] hdr: [1x1 struct] transform: [4x4 double]' On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: > for work around try reading the nii with fieldtrip > regards > yuval > > On 7 May 2012 20:52, qi li wrote: >> >> Hi, >> >> I am having trouble following the tutorial of  'source reconstruction >> of event-related fields using minimum-norm estimate'. >> >> So far, I have been successfully done with the freesurfer and am >> checking the mri result by freesurfer. >> >> The command is like this, >> >> % go to the Subject01/mri directory >> mri = ft_read_mri('filled.mgz'); >> cfg = []; >> cfg.interactive = 'yes'; >> figure;ft_sourceplot(cfg, mri); >> >> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >> converting it to nii and view it in afni. The white matter can be >> clearly seen. >> >> Can anybody help? Thanks a lot! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Mon May 7 21:23:39 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:23:39 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Hi Yuval, I tried to show the slice by the command imagesc(squeeze(mri.anatomy(100,:,:))) and please take a look of the figure attached. On Mon, May 7, 2012 at 3:19 PM, qi li wrote: > Hi Yuval, > > Thanks for your help but ft_sourceplot still can not show nii either. > > Now it is showing the message' > Warning: no colorbar possible without functional data >> In ft_sourceplot at 774 > the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>> mri > > mri = > >          dim: [256 256 256] >      anatomy: [256x256x256 double] >          hdr: [1x1 struct] >    transform: [4x4 double]' > > On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >> for work around try reading the nii with fieldtrip >> regards >> yuval >> >> On 7 May 2012 20:52, qi li wrote: >>> >>> Hi, >>> >>> I am having trouble following the tutorial of  'source reconstruction >>> of event-related fields using minimum-norm estimate'. >>> >>> So far, I have been successfully done with the freesurfer and am >>> checking the mri result by freesurfer. >>> >>> The command is like this, >>> >>> % go to the Subject01/mri directory >>> mri = ft_read_mri('filled.mgz'); >>> cfg = []; >>> cfg.interactive = 'yes'; >>> figure;ft_sourceplot(cfg, mri); >>> >>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>> converting it to nii and view it in afni. The white matter can be >>> clearly seen. >>> >>> Can anybody help? Thanks a lot! >>> >>> Qi >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> >> Y.Harpaz >> >> a link to the BIU MEG lab: >> http://faculty.biu.ac.il/~goldsa/index.html >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: 100.jpg Type: image/jpeg Size: 11381 bytes Desc: not available URL: From nathanweisz at mac.com Mon May 7 21:43:27 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Mon, 07 May 2012 21:43:27 +0200 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: hi, do you encounter the same issue with ft_sourceplot_old? (the image in the tutorial looks like the old function, but i may be mistaken) good luck, n On 07.05.2012, at 21:19, qi li wrote: > Hi Yuval, > > Thanks for your help but ft_sourceplot still can not show nii either. > > Now it is showing the message' > Warning: no colorbar possible without functional data >> In ft_sourceplot at 774 > the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>> mri > > mri = > > dim: [256 256 256] > anatomy: [256x256x256 double] > hdr: [1x1 struct] > transform: [4x4 double]' > > On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >> for work around try reading the nii with fieldtrip >> regards >> yuval >> >> On 7 May 2012 20:52, qi li wrote: >>> >>> Hi, >>> >>> I am having trouble following the tutorial of 'source reconstruction >>> of event-related fields using minimum-norm estimate'. >>> >>> So far, I have been successfully done with the freesurfer and am >>> checking the mri result by freesurfer. >>> >>> The command is like this, >>> >>> % go to the Subject01/mri directory >>> mri = ft_read_mri('filled.mgz'); >>> cfg = []; >>> cfg.interactive = 'yes'; >>> figure;ft_sourceplot(cfg, mri); >>> >>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>> converting it to nii and view it in afni. The white matter can be >>> clearly seen. >>> >>> Can anybody help? Thanks a lot! >>> >>> Qi >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> >> Y.Harpaz >> >> a link to the BIU MEG lab: >> http://faculty.biu.ac.il/~goldsa/index.html >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Mon May 7 21:59:52 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:59:52 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Yes, I have the same problem with ft_sourceplot_old. No figures out. On Mon, May 7, 2012 at 3:43 PM, Nathan Weisz wrote: > hi, > > do you encounter the same issue with ft_sourceplot_old? (the image in the tutorial looks like the old function, but i may be mistaken) > > good luck, > n > > On 07.05.2012, at 21:19, qi li wrote: > >> Hi Yuval, >> >> Thanks for your help but ft_sourceplot still can not show nii either. >> >> Now it is showing the message' >> Warning: no colorbar possible without functional data >>> In ft_sourceplot at 774 >> the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>>> mri >> >> mri = >> >>          dim: [256 256 256] >>      anatomy: [256x256x256 double] >>          hdr: [1x1 struct] >>    transform: [4x4 double]' >> >> On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >>> for work around try reading the nii with fieldtrip >>> regards >>> yuval >>> >>> On 7 May 2012 20:52, qi li wrote: >>>> >>>> Hi, >>>> >>>> I am having trouble following the tutorial of  'source reconstruction >>>> of event-related fields using minimum-norm estimate'. >>>> >>>> So far, I have been successfully done with the freesurfer and am >>>> checking the mri result by freesurfer. >>>> >>>> The command is like this, >>>> >>>> % go to the Subject01/mri directory >>>> mri = ft_read_mri('filled.mgz'); >>>> cfg = []; >>>> cfg.interactive = 'yes'; >>>> figure;ft_sourceplot(cfg, mri); >>>> >>>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>>> converting it to nii and view it in afni. The white matter can be >>>> clearly seen. >>>> >>>> Can anybody help? Thanks a lot! >>>> >>>> Qi >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> -- >>> >>> Y.Harpaz >>> >>> a link to the BIU MEG lab: >>> http://faculty.biu.ac.il/~goldsa/index.html >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yuvharpaz at gmail.com Tue May 8 04:23:21 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 8 May 2012 05:23:21 +0300 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: well, there's something there. the no colorbar message only means that this is structural, not functional data so it will show in grayscale, no colors. do you want to send me the image if it is not too big? I am not a ft developer but I can take a look, maybe you need to play with the contrst On 7 May 2012 22:59, qi li wrote: > Yes, I have the same problem with ft_sourceplot_old. No figures out. > > On Mon, May 7, 2012 at 3:43 PM, Nathan Weisz wrote: > > hi, > > > > do you encounter the same issue with ft_sourceplot_old? (the image in > the tutorial looks like the old function, but i may be mistaken) > > > > good luck, > > n > > > > On 07.05.2012, at 21:19, qi li wrote: > > > >> Hi Yuval, > >> > >> Thanks for your help but ft_sourceplot still can not show nii either. > >> > >> Now it is showing the message' > >> Warning: no colorbar possible without functional data > >>> In ft_sourceplot at 774 > >> the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB > >>>> mri > >> > >> mri = > >> > >> dim: [256 256 256] > >> anatomy: [256x256x256 double] > >> hdr: [1x1 struct] > >> transform: [4x4 double]' > >> > >> On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz > wrote: > >>> for work around try reading the nii with fieldtrip > >>> regards > >>> yuval > >>> > >>> On 7 May 2012 20:52, qi li wrote: > >>>> > >>>> Hi, > >>>> > >>>> I am having trouble following the tutorial of 'source reconstruction > >>>> of event-related fields using minimum-norm estimate'. > >>>> > >>>> So far, I have been successfully done with the freesurfer and am > >>>> checking the mri result by freesurfer. > >>>> > >>>> The command is like this, > >>>> > >>>> % go to the Subject01/mri directory > >>>> mri = ft_read_mri('filled.mgz'); > >>>> cfg = []; > >>>> cfg.interactive = 'yes'; > >>>> figure;ft_sourceplot(cfg, mri); > >>>> > >>>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by > >>>> converting it to nii and view it in afni. The white matter can be > >>>> clearly seen. > >>>> > >>>> Can anybody help? Thanks a lot! > >>>> > >>>> Qi > >>>> _______________________________________________ > >>>> fieldtrip mailing list > >>>> fieldtrip at donders.ru.nl > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >>> > >>> > >>> > >>> -- > >>> > >>> Y.Harpaz > >>> > >>> a link to the BIU MEG lab: > >>> http://faculty.biu.ac.il/~goldsa/index.html > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Tue May 8 17:29:39 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Tue, 8 May 2012 17:29:39 +0200 Subject: [FieldTrip] center of sphere artefact Message-ID: Dear all, I was looking at my lcmv-beamformer maps of ~200 Sec of eyes closed resting state MEG activity and wondering if what I was seeing is the center of sphere artefact. The code I used is: %filtering of the data cfg = []; cfg.bpfilter = 'yes'; cfg.bpfilttype = 'but'; cfg.bpfreq = [5 45]; cfg.bpfiltord = 4; cfg.bpfiltdir = 'twopass'; [meg_data] = ft_preprocessing(cfg,meg_data); %PCA to extract components with max explained variance [cf,pcs,vexp] = princomp(meg_data.trial{1},'econ'); pexp = 100*vexp/sum(vexp); indx = find(cumsum(vexp) <=90); meg_data.trial{1} = (pcs(:,indx)*cv(:,indx)')'; % computing the covariance matrix cfg = []; cfg.channel = {'MEG'}; cfg.covariance = 'yes'; cfg.pad = 'maxperlen'; cfg.sgncmb = {'MEG' 'MEG'}; cfg.removemean = 'yes'; [cov_data] = ft_timelockanalysis(cfg,meg_data); %LCMV beamformer cfg = []; cfg.channel = {'MEG'}; cfg.grid = grid_data; cfg.vol = hdm; cfg.method = 'lcmv'; cfg.grid.dim = [Nx Ny Nz]; cfg.lcmv.fixedori = 'no'; cfg.lcmv.lambda = '5%'; cfg.lcmv.projectnoise = 'yes'; cfg.lcmv.keepfilters = 'yes'; cfg.lcmv.projectmom = 'no'; cfg.lcmv.keepmom = 'no'; cfg.lcmv.reducerank = 2; cfg.lcmv.normalize = 'yes'; [bf] = ft_sourceanalysis(cfg,cov_data); %make power unit invariant bf.avg.pow = bf.avg.pow./max(bf.avg.pow); Since I don't have enough experience to judge about that I wanted to ask if anybody out there with experience could tell me their opinion. The grid was computed using an inwardshift of -0.5 and a grid resolution of 2.5 mm. The head model using the ft_prepare_singleshell. Any help,advice, comments or suggestions would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cosa.jpg Type: image/jpeg Size: 76416 bytes Desc: not available URL: From k.muesch at uke.uni-hamburg.de Tue May 8 17:32:47 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Tue, 8 May 2012 17:32:47 +0200 Subject: [FieldTrip] specification of lambda in ft_sourceanalysis Message-ID: <1F981CD8-2F58-449D-B819-A4B383780519@uke.uni-hamburg.de> Dear all, I would like to regularize my data when calculating a DICS beamformer. In the discussion list, I found that most users set cfg.lambda = '5%' but I also found cfg.lambda = 0.05. Considering a previous post (http://mailman.science.ru.nl/pipermail/fieldtrip/2010-July/002947.html), I assume that these two options are not the same, right? Is there a rule of thumb for the specification of lambda? In addition, what aspects of my data and of my analysis should I also take into consideration? Any information is appreciated, Kathrin _____________________________________ Kathrin Müsch, PhD student Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany Phone: +49-40-7410-54680 Fax: +49-40-7410-57752 E-Mail: k.muesch at uke.uni-hamburg.de _____________________________________ -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From hamzaf at sabanciuniv.edu Wed May 9 10:33:05 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 9 May 2012 11:33:05 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions Message-ID: Hello, I am doing realtime processing, and I wanted to check ft_realtime_average function and ft_realtime_selectiveaverage functions. I faced a problem in defining cfg.trialfun Could you help me Best -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Wed May 9 10:59:36 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Wed, 9 May 2012 10:59:36 +0200 Subject: [FieldTrip] Post-doctoral and PhD position in Cognitive Neuroscience In-Reply-To: References: Message-ID: <4FAA31F8.7070606@charite.de> 1 Post-doctoral and 1 PhD position in Cognitive Neuroscience, Charité Berlin The Department of Psychiatry and Psychotherapy, Charité – Universitätsmedizin Berlin (http://psy-ccm.charite.de/en/) invites applications for a Post-doctoral and a PhD student position. A Starting Grant of the European Research Council (ERC) will fund both positions for initially 2 years with the possibility of extension. The main objective of this ERC research program is to examine neural and neurochemical markers of multisensory integration and to test a new hypothesis that considers dynamic interplay of synchronized neural populations as a key to multisensory processes (Senkowski et al. 2008, Trends in Neurosciences). The studies within this program include healthy subjects and patients with schizophrenia, as a prototype of a mental disorder with deficits in multisensory integration. Multisensory processes will be examined in a series of experiments requiring both bottom-up and top-down processing (Talsma et al. 2010, Trends in Cognitive Sciences). This comprises a combination of human EEG data as a macroscopic measure of cortical processing and source modeling of synchronized oscillatory activity. Applicants should have a background in psychology, medicine, biology, physics or neuroscience. Experience in human EEG/MEG studies or biosignal analysis (e.g., Matlab) is desirable (i.e. required for the Post-doctoral position). An interest in neurophysiologic studies in clinical populations is expected, as well as German language skills for interacting with patients. Applicants are asked to submit their CV, a short motivation letter, 2 names of referees, and documentation of relevant qualification (e.g., copies of diplomas and/or transcripts of grades) until May 20, 2012, electronically to PD Dr. Daniel Senkowski (daniel.senkowski at charite.de; www.danielsenkowski.com), Department of Psychiatry and Psychotherapy, Charité, University Medicine Berlin, 10115 Berlin, Germany, Phone: +49-30-2311-2738, Fax: +49-30-2311-2209. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreahelo at gmail.com Wed May 9 22:02:07 2012 From: andreahelo at gmail.com (Andrea Helo) Date: Wed, 9 May 2012 22:02:07 +0200 Subject: [FieldTrip] ICA Message-ID: Dear list, I'm trying to run ICA but I have a problem to plot ICA components using ft_topoplotIC(cfg,comp). It send me this error Could you help me please? ??? Error using ==> ft_prepare_layout>readlay at 668 could not open layout file: andreacoco1.lay Error in ==> ft_prepare_layout at 222 lay = readlay(cfg.layout); Error in ==> ft_topoplotER at 380 lay = ft_prepare_layout(cfg, data); Error in ==> ft_topoplotIC at 115 ft_topoplotER(cfg, varargin{:}); Andrea Thank you :) -- Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed May 9 22:09:48 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 9 May 2012 22:09:48 +0200 Subject: [FieldTrip] ICA In-Reply-To: References: Message-ID: Dear Andrea, It seems you specify cfg.layout='andreacoco1.lay'. The error message suggests Matlab is unable to open that file. Are you sure the file you refer to is present on your path, is readable, and is a valid layout file? Best, Eelke On 9 May 2012 22:02, Andrea Helo wrote: > Dear list, > > I'm trying to run ICA but I have a problem to plot ICA components using > ft_topoplotIC(cfg,comp). It send me this error > > Could you help me please? > > ??? Error using ==> ft_prepare_layout>readlay at 668 > > > could not open layout file: andreacoco1.lay > > Error in ==> ft_prepare_layout at 222 > lay = readlay(cfg.layout); > > Error in ==> ft_topoplotER at 380 > lay = ft_prepare_layout(cfg, data); > > Error in ==> ft_topoplotIC at 115 > > > ft_topoplotER(cfg, varargin{:}); > > Andrea > > > > Thank you :) > > > > -- > Andrea > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From explena at gmail.com Thu May 10 06:31:42 2012 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 10 May 2012 12:31:42 +0800 Subject: [FieldTrip] cluster-based permutation test on time-frequency data Message-ID: Dear Users, I wonder if anyone could provide any suggestion regarding an issue I encountered. According to the article (Maris, 2007), it seems that cluster-based permutation test is calculated under the permutation distribution of the maximum cluster-level statistics. In my tome-frequency data, there are two big clusters. Only one cluster reaches statistical significance; however, if I exclude this significant cluster and then rerun the test, the other cluster also reaches statistical significance. It seems to suggest that the sensitivity is lost for the second cluster. I wondered if there is any approach to resolve this issue. Many thanks! Best regards, Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreahelo at gmail.com Thu May 10 10:15:10 2012 From: andreahelo at gmail.com (Andrea Helo) Date: Thu, 10 May 2012 10:15:10 +0200 Subject: [FieldTrip] ICA In-Reply-To: References: Message-ID: Hi, Yes I'm sure I've cheked all those thing but I still have the same problen. Do you have some idea? Thank you for your help!!! On Wed, May 9, 2012 at 10:09 PM, Eelke Spaak wrote: > Dear Andrea, > > It seems you specify cfg.layout='andreacoco1.lay'. The error message > suggests Matlab is unable to open that file. Are you sure the file you > refer to is present on your path, is readable, and is a valid layout > file? > > Best, > Eelke > > On 9 May 2012 22:02, Andrea Helo wrote: > > Dear list, > > > > I'm trying to run ICA but I have a problem to plot ICA components using > > ft_topoplotIC(cfg,comp). It send me this error > > > > Could you help me please? > > > > ??? Error using ==> ft_prepare_layout>readlay at 668 > > > > > > could not open layout file: andreacoco1.lay > > > > Error in ==> ft_prepare_layout at 222 > > lay = readlay(cfg.layout); > > > > Error in ==> ft_topoplotER at 380 > > lay = ft_prepare_layout(cfg, data); > > > > Error in ==> ft_topoplotIC at 115 > > > > > > ft_topoplotER(cfg, varargin{:}); > > > > Andrea > > > > > > > > Thank you :) > > > > > > > > -- > > Andrea > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Thu May 10 12:09:51 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Thu, 10 May 2012 13:09:51 +0300 Subject: [FieldTrip] Excluding a subject Message-ID: Hi all, Is there an elegant way to exclude a subject from the statistical analysis when using ft_timelockstatistics, without computing the averages again while excluding the subject? Thanks! Roni -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 10 13:07:17 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 13:07:17 +0200 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Hi Tony, Thanks for your question. First of all, I do not fully understand what you mean with 'without computing the averages again', but I'll have a shot at it. In ft_freq/timelock-statistics you enter all your 'units of observations', i.e. data structures per subject or condition that you want to compare, together with the design matrix. The designmatrix is a one or two row matrix with as many columns as your have data-entries. One of the rows codes the group/condition membership of those entries (the independent variable). They can be subjects (group analysis) or trials (within-subjects analysis). Another row might be used to code the observation number in case you are doing a paired test. To exclude one data entry (i.e. subject) for your ft_timelockstatistics you could either: 1) not enter that datastructure as data in ft_freqstatistics, and also remove it from your design matrix. 2) keep your input to ft_timelockstatistics the same but use a zero for that entry in you design matrix. In this case that data input will not be used to calculate your statistics. I would say the second option is more elegant, but it is more prone to mistakes perhaps. You would do me a favour if you would doublecheck that it gives you the same results as option 1. I hope this answers your question, Stephen On 10 May 2012 12:09, Roni Tibon wrote: > Hi all, > Is there an elegant way to exclude a subject from the statistical analysis > when using ft_timelockstatistics, without computing the averages again while > excluding the subject? > > Thanks! > Roni > > -- >    /\.../\ >   ( -- ---)__{} >    (_.._...._) > > http://shkafkafim.blogspot.com/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 10 13:55:56 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 10 May 2012 14:55:56 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello, I don't know why should I define a function inside the ft_realtime_selectiveaverage. I just want to make an average of some segments. Could you provide me with an example of cfg.trialfun Hamza On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > I am doing realtime processing, and I wanted to check ft_realtime_average > function and ft_realtime_selectiveaverage functions. > > I faced a problem in defining cfg.trialfun > > Could you help me > > Best > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 10 14:51:56 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 14:51:56 +0200 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Dear Hamza, The trialfunction is an integral part of processing data in FieldTrip. It is how you define your timepoints of interest, i.e. trials based on recorded markers in your data, or based on user-defined events (e.g. sleep stages). If you are not yet familiar with the basic FieldTrip operations the documentation of the realtime analysis might indeed seem somewhat inadequate as it assumes this familiarity. FieldTrip's online analysis tools are using many of the same functions of the offline ones, and has a similar overall philosophy and approach. This makes it relatively easy to understand and to use online analysis approach once one is familiar with the offline one. Alas this translation is assymmetric and doesn't hold for the other way around. The good news is, however, that everything is there to get you on your way once your take a little detour. You could take a look at the tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and get a bit of hands-on working through some steps with the supplied tutorial-data. Specifically for your question these pages would be relevant: http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data http://fieldtrip.fcdonders.nl/tutorial/preprocessing http://fieldtrip.fcdonders.nl/tutorial/continuous For more overview and general operations I would advice reading through: http://fieldtrip.fcdonders.nl/walkthrough Most of all it might not be a bad idea to start with a pre-recorded dataset and work on it offline, using the more standard and more extensively documented offline functions for e.g. trial based averaging. Once that works out for you can adapt it to the realtime situation. Hope this helps, Stephen On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I don't know why should I define a function inside the > ft_realtime_selectiveaverage. > I just want to make an average of some segments. > > Could you provide me with an example of cfg.trialfun > > Hamza > > > On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) > wrote: >> >> Hello, >> >> I am doing realtime processing, and I wanted to check ft_realtime_average >> function and ft_realtime_selectiveaverage functions. >> >> I faced a problem in defining cfg.trialfun >> >> Could you help me >> >> Best >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Thu May 10 15:07:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 15:07:34 +0200 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hi Hamza, I just saw you've been posting on the FT list for quite a while and have been working on offline analysis already. To answer your question more specifically: The trialfunction could be very simple in the first instance, but is needed to know what samples to read when preprocessing the data. You can find some examples here that you can adapt to your own purpose here: http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition Cheers, Stephen On 10 May 2012 14:51, Stephen Whitmarsh wrote: > Dear Hamza, > > The trialfunction is an integral part of processing data in FieldTrip. > It is how you define your timepoints of interest, i.e. trials based on > recorded markers in your data, or based on user-defined events (e.g. > sleep stages). > > If you are not yet familiar with the basic FieldTrip operations the > documentation of the realtime analysis  might indeed seem somewhat > inadequate as it assumes this familiarity. FieldTrip's online analysis > tools are using many of the same functions of the offline ones, and > has a similar overall philosophy and approach. This makes it > relatively easy to understand and to use online analysis approach once > one is familiar with the offline one. Alas this translation is > assymmetric and doesn't hold for the other way around. > > The good news is, however, that everything is there to get you on your > way once your take a little detour. You could take a look at the > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and > get a bit of hands-on working through some steps with the supplied > tutorial-data. > > Specifically for your question these pages would be relevant: > http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data > http://fieldtrip.fcdonders.nl/tutorial/preprocessing > http://fieldtrip.fcdonders.nl/tutorial/continuous > > For more overview and general operations I would advice reading through: > http://fieldtrip.fcdonders.nl/walkthrough > > Most of all it might not be a bad idea to start with a pre-recorded > dataset and work on it offline, using the more standard and more > extensively documented offline functions for e.g. trial based > averaging. Once that works out for you can adapt it to the realtime > situation. > > Hope this helps, > Stephen > > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) > wrote: >> Hello, >> >> I don't know why should I define a function inside the >> ft_realtime_selectiveaverage. >> I just want to make an average of some segments. >> >> Could you provide me with an example of cfg.trialfun >> >> Hamza >> >> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >> wrote: >>> >>> Hello, >>> >>> I am doing realtime processing, and I wanted to check ft_realtime_average >>> function and ft_realtime_selectiveaverage functions. >>> >>> I faced a problem in defining cfg.trialfun >>> >>> Could you help me >>> >>> Best >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From david.m.groppe at gmail.com Thu May 10 16:42:45 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 10 May 2012 10:42:45 -0400 Subject: [FieldTrip] cluster-based permutation test on time-frequency data In-Reply-To: References: Message-ID: Hi Shen-Mou, Cluster-based permutation tests have great power for detecting broadly distributed effects, but this comes at the cost at being less sensitive to less broadly distributed effects. A good alternative to cluster-based permutation tests is Benjamini & Hochberg's false discovery rate (FDR) control algorithm. Like cluster-based permutation tests FDR control provides weak control of family-wise error, and we've found that it has relatively good power for broadly and narrowly distributed effects: Groppe, D.M., Urbach, T.P., & Kutas, M., Mass univariate analysis of event-related brain potentials/fields I: A critical tutorial review, Psychophysiology, 2011, DOI: 10.1111/j.1469-8986.2011.01273.x http://kutaslab.ucsd.edu/people/kutas/pdfs/2011.P.01273.pdf I'd recommend using that FDR control procedure over the cluster-based permutation procedure unless you are only interested in the broadly distributed effects. -David On Thu, May 10, 2012 at 12:31 AM, Shen-Mou Hsu wrote: > Dear Users, > > I wonder if anyone could provide any suggestion regarding an issue I > encountered. According to the article (Maris, 2007), it seems that > cluster-based permutation test is calculated under the permutation > distribution of the maximum cluster-level statistics. In my tome-frequency > data, there are two big clusters. Only one cluster reaches statistical > significance; however, if I exclude this significant cluster and then rerun > the test, the other cluster also reaches statistical significance. It seems > to suggest that the sensitivity is lost for the second cluster. I wondered > if there is any approach to resolve this issue. Many thanks! > > Best regards, > > Shen-Mou Hsu > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From aler1 at web.de Thu May 10 18:21:27 2012 From: aler1 at web.de (alla brodski) Date: Thu, 10 May 2012 18:21:27 +0200 (CEST) Subject: [FieldTrip] ft_sourceplot problems Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Negativeclusters_badplot_example.jpg Type: image/jpeg Size: 72058 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Positiveclusters_goodplot_example.jpg Type: image/jpeg Size: 76851 bytes Desc: not available URL: From politzerahless at gmail.com Thu May 10 18:30:31 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 10 May 2012 11:30:31 -0500 Subject: [FieldTrip] Excluding a subject Message-ID: Hi Roni, If your units of observation for the statistical test are subjects and your input to ft_timelockstatistics is a grand average structure (generated by ft_timelockgrandaverage with cfg.keepindividual='no'), then I think the easiest solution would be to just re-run ft_timelockgrandaverage again without those subjects, and use that output as the input to ft_timelockstatistics. It certainly seems easier and less error-prone than trying to change the design matrix (at least, for someone like me who has a hard time wrapping his head around statistics already!). Best, Steve > Message: 1 > Date: Thu, 10 May 2012 13:09:51 +0300 > From: Roni Tibon > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Excluding a subject > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > Is there an elegant way to exclude a subject from the statistical analysis > when using ft_timelockstatistics, without computing the averages again > while excluding the subject? > > Thanks! > Roni > > -- > /\.../\ > ( -- ---)__{} > (_.._...._) > > http://shkafkafim.blogspot.com/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120510/8ddffc61/attachment-0001.html > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Thu May 10 20:55:53 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Thu, 10 May 2012 21:55:53 +0300 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Dear Stephen and Steve, Thank you for your answers. Stephen, if I understand you correctly, option 1 means I have to compute the grand average again (using ft_timelockgrandaverage), which is what I tried to avoid. I tried option 2 though, and it didn't work. When I used a zero entry at the uvar line, the data stayed exactly the same (as if the subject was not excluded). When I used a zero entry at the ivar line (or at both lines), i get an error message saying "invalid specification for the design array". I also tried skipping the entry all together, but got an error message saying "the size of the design matrix does not match the number of observations in the data" An I doing something wrong? Steve, I guess I can do that.. the reason I'm asking is cause I want to "play" with the data a bit - remove a different subjects each time and see if I still get the same pattern. So I thought it would be easier if I did not have to compute the grand average again and again. Thanks! Roni On 10 May 2012 14:07, Stephen Whitmarsh wrote: > Hi Tony, > > Thanks for your question. > > First of all, I do not fully understand what you mean with 'without > computing the averages again', but I'll have a shot at it. > > In ft_freq/timelock-statistics you enter all your 'units of > observations', i.e. data structures per subject or condition that you > want to compare, together with the design matrix. The designmatrix is > a one or two row matrix with as many columns as your have > data-entries. One of the rows codes the group/condition membership of > those entries (the independent variable). They can be subjects (group > analysis) or trials (within-subjects analysis). Another row might be > used to code the observation number in case you are doing a paired > test. > > To exclude one data entry (i.e. subject) for your > ft_timelockstatistics you could either: > 1) not enter that datastructure as data in ft_freqstatistics, and also > remove it from your design matrix. > 2) keep your input to ft_timelockstatistics the same but use a zero > for that entry in you design matrix. In this case that data input will > not be used to calculate your statistics. > > I would say the second option is more elegant, but it is more prone to > mistakes perhaps. You would do me a favour if you would doublecheck > that it gives you the same results as option 1. > > I hope this answers your question, > > Stephen > > > > On 10 May 2012 12:09, Roni Tibon wrote: > > Hi all, > > Is there an elegant way to exclude a subject from the statistical > analysis > > when using ft_timelockstatistics, without computing the averages again > while > > excluding the subject? > > > > Thanks! > > Roni > > > > -- > > /\.../\ > > ( -- ---)__{} > > (_.._...._) > > > > http://shkafkafim.blogspot.com/ > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.sowman at mq.edu.au Fri May 11 06:01:16 2012 From: paul.sowman at mq.edu.au (Paul Sowman) Date: Fri, 11 May 2012 14:01:16 +1000 Subject: [FieldTrip] ft_sensorrealign error Message-ID: Hi, I am trying to use ft_sensorrealign to align my Yokogawa data. i am getting this error: sens2 = ft_sensorrealign(cfg, sens) using the fiducials instead of the sensor positions Warning: could be Yokogawa system > In forward/private/warning_once at 75 In ft_senstype at 280 In utilities/private/channelposition at 46 In ft_datatype_sens at 107 In ft_sensorrealign at 235 converting units from 'mm' to 'cm' ??? Subscripted assignment between dissimilar structures. Error in ==> ft_sensorrealign at 236 tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the units are consistent with the electrodes I have attached variable template and elec. Secondly, I presume also that I can only use 3 of the 5 fiducial markers? as line 395 has length(cfg.fiducial)~=3. I don't think this is causing the above issue though. Thanks, Paul -- Paul F Sowman NHMRC Postdoctoral Training Fellow Macquarie Centre for Cognitive Science (MACCS) MACQUARIE UNIVERSITY NSW 2109 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec_original.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: template.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: From stephen.whitmarsh at gmail.com Fri May 11 09:43:57 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 11 May 2012 09:43:57 +0200 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Dear Roni & Steve, Thank you for reminding me one can compare datastructures containing means computed by ft_timelockgrandaverage. I forgot about that. Then indeed the mean/var has to be re-computed every time if you are trying out different subject to reject (and the designmatrix has to stay the same). Ofcourse you are rejecting subjects based on a-priori criteria, not on the effect it has on the results, so you shouldn't have to do it too often ;-) However, to explain what I meant previously: you do not have to compute a grandaverage first, and then do statistics. You can put those subjects (of both groups) straight into ft_timelockstatistics, and use the designmatrix to specify group membership with 1's and 2's. Using a 0 instead for one of your subjects would exclude that subject from the analysis. (see http://fieldtrip.fcdonders.nl/walkthrough#non-paired_comparison). Have a nice day! Stephen On 10 May 2012 20:55, Roni Tibon wrote: > Dear Stephen and Steve, > > Thank you for your answers. > > Stephen, if I understand you correctly, option 1 means I have to compute the > grand average again (using ft_timelockgrandaverage), which is what I tried > to avoid. > > I tried option 2 though, and it didn't work. > When I used a zero entry at the uvar line, the data stayed exactly the same > (as if the subject was not excluded). When I used a zero entry at the ivar > line (or at both lines), i get an error message saying "invalid > specification for the design array". > > I also tried skipping the entry all together, but got an error message > saying "the size of the design matrix does not match the number of > observations in the data" > > An I doing something wrong? > > Steve, I guess I can do that.. the reason I'm asking is cause I want to > "play" with the data a bit - remove a different subjects each time and see > if I still get the same pattern. So I thought it would be easier if I did > not have to compute the grand average again and again. > > Thanks! > Roni > > On 10 May 2012 14:07, Stephen Whitmarsh wrote: >> >> Hi Tony, >> >> Thanks for your question. >> >> First of all, I do not fully understand what you mean with 'without >> computing the averages again', but I'll have a shot at it. >> >> In ft_freq/timelock-statistics you enter all your 'units of >> observations', i.e. data structures per subject or condition that you >> want to compare, together with the design matrix. The designmatrix is >> a one or two row matrix with as many columns as your have >> data-entries. One of the rows codes the group/condition membership of >> those entries (the independent variable). They can be subjects (group >> analysis) or trials (within-subjects analysis). Another row might be >> used to code the observation number in case you are doing a paired >> test. >> >> To exclude one data entry (i.e. subject) for your >> ft_timelockstatistics you could either: >> 1) not enter that datastructure as data in ft_freqstatistics, and also >> remove it from your design matrix. >> 2) keep your input to ft_timelockstatistics the same but use a zero >> for that entry in you design matrix. In this case that data input will >> not be used to calculate your statistics. >> >> I would say the second option is more elegant, but it is more prone to >> mistakes perhaps. You would do me a favour if you would doublecheck >> that it gives you the same results as option 1. >> >> I hope this answers your question, >> >> Stephen >> >> >> >> On 10 May 2012 12:09, Roni Tibon wrote: >> > Hi all, >> > Is there an elegant way to exclude a subject from the statistical >> > analysis >> > when using ft_timelockstatistics, without computing the averages again >> > while >> > excluding the subject? >> > >> > Thanks! >> > Roni >> > >> > -- >> >    /\.../\ >> >   ( -- ---)__{} >> >    (_.._...._) >> > >> > http://shkafkafim.blogspot.com/ >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- >    /\.../\ >   ( -- ---)__{} >    (_.._...._) > > http://shkafkafim.blogspot.com/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Fri May 11 12:05:07 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 11 May 2012 12:05:07 +0200 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis In-Reply-To: <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> References: <4F97AD41.8090304@biomag.uni-jena.de> <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> Message-ID: Hi Theresa, The answer to question #1 is a bit difficult because of scaling, I thought for a long time about it but I couldn't define a definite convincing answer, so I'll leave that to someone else. Without all the scaling that is going on, power for EEG is simply V^2. However, the fft/ifft in ft_specest_wavelet and the scaling by the square root of 2 over the sampling rate in line 176 of the same function complicate matters for me. I hope someone else can shine some light on it. For your second question, even though the total wavelet energy is the same at every frequency, the energy of the frequencies present in your data are not, and their energy decays with a 1/f pattern. This 1/f decrease found in EEG data is a pattern that is found in many natural phenomena. It is often referred to as 1/f noise, but I personally don't like that term, as it indicates something that is not interesting in any way. While doing some hand-waving, my intuition for neuronal recordings has always been that the time constants of lower frequencies are much further away from the 'noise' of EPSPs, dendritic and somatic currents, etc of neurons (and therefore have a higher amplitude) and that lower frequencies are thought to be generated by larger groups of neurons, which of course increases the total energy at those frequencies. This is just a vague notion of me however, surely there are more clever people on the mailinglist to give their insights, and give a more physically founded explanation of what the 1/f pattern means for neuronal recordings. But since nobody gave an answer, I'd thought I'd give it a shot anyway. Hope it helps, Cheers, Roemer On Sat, May 5, 2012 at 9:15 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Theresa, > > I am forwarding your questions to the discussion list, as this is the > forum on which we discuss this type of issues. Other people may benefit > from it too, or may feel inclined to answer. > > Cheers, > > Jan-Mathijs > > Begin forwarded message: > > *From: *Theresa Götz > *Date: *April 25, 2012 9:52:33 AM GMT+02:00 > *To: *j.schoffelen at donders.ru.nl > *Subject: **Question about unit of the wavelet analysis* > > Dear Jan-Mathijs Schoeffelen, > > we have a question about the unit of the time-frequency power spectrum: > maybe you can help me with that. > > 1. In fieldtrip, we performed ft_frequanalysis with method 'wavelet' and > output 'power'. What is the exact unit of the resulting power spectrum > (e.g. V/sqrt(hz) or V^2/Hz or V^2 or V)? > > 2. Why does the amplitude of power spectrum decrease toward higher > frequencies even though we keep the amplitude of the input sine wave (in > time domain) constant? > > Thank you very much. > > Best, > Theresa > > > > > -- > Bitte denken Sie an die Umwelt, bevor Sie diese e-Mail ausdrucken. > > > Dr. Theresa Götz Phone: +49-3641-9325780 > University Hospital Jena Fax: +49-3641-9325772 > Dept. for Neurology > Biomagnetic Center > > Erlanger Allee 101 > D-07747 Jena > Germany > > > > > Universitätsklinikum Jena > Körperschaft des öffentlichen Rechts und > Teilkörperschaft der Friedrich-Schiller-Universität Jena > Bachstraße 18, 07743 Jena > > Verwaltungsratsvorsitzender: Prof. Dr. Thomas Deufel > Medizinischer Vorstand: Prof. Dr. Klaus Höffken > Wissenschaftlicher Vorstand: Prof. Dr. Klaus Benndorf > Kaufmännischer Vorstand und > Sprecher des Klinikumsvorstandes: Dr. Brunhilde Seidel-Kwem > > Bankverbindung: Sparkasse Jena > BLZ: 830 530 30, Kto.: 221 > > Gerichtsstand Jena > Steuernummer: 161/144/02978 USt.-IdNr. : DE 150545777 > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From VenziM at cardiff.ac.uk Fri May 11 12:48:41 2012 From: VenziM at cardiff.ac.uk (Marcello Venzi) Date: Fri, 11 May 2012 11:48:41 +0100 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis Message-ID: Hello, I'm a first year PhD student in Neuroscience, so this is really my two cents... 1) If you sum two sine waves of the same amplitude but different frequency then you would expect the wavelet spectrum to show the higher-frequency peak smaller than the lower-frequency peak (while this would not happen with the Fourier power spectrum) . Have a look at 'Bias of the Global Wavelet Spectrum' on http://paos.colorado.edu/research/wavelets/faq.html for an explanation. 2) My limited understanding of the 1/f scaling in EEG/MEG is that there is no complete agreement on what its origin is. There are at two main hypothesis that I'm aware of : -  The 1/f scaling is due to low-pass filtering of the extracellular medium. See this paper and references therein  Bédard, C., & Destexhe, A. (2009). Macroscopic models of local field potentials and the apparent 1/f noise in brain activity. Biophysical journal, 96(7), 2589-603. doi:10.1016/j.bpj.2008.12.3951 - If instead the extracellular medium is purely resistive (as suggested in this Logothethis paper: Logothetis, N. K., Kayser, C., & Oeltermann, A. (2007). In vivo measurement of cortical impedance spectrum in monkeys: implications for signal propagation. Neuron, 55(5), 809-23. doi:10.1016/j.neuron.2007.07.027 ) the scaling could represent an organized phenomenon produced by neurons, ie. an aspect of neuronal computation. I hope people in the mailing list will be so kind to correct me if this is just gibberish talk: I'm learning about this topics as I'm writing! All the best, Marcello Venzi Marcello Venzi PhD Student in Integrative Neuroscience School of Biosciences Cardiff University +44(0)29 208 7515 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Fri May 11 14:27:00 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Fri, 11 May 2012 15:27:00 +0300 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Got it. Awesome :) Thanks! On 11 May 2012 10:43, Stephen Whitmarsh wrote: > Dear Roni & Steve, > > Thank you for reminding me one can compare datastructures containing > means computed by ft_timelockgrandaverage. I forgot about that. Then > indeed the mean/var has to be re-computed every time if you are trying > out different subject to reject (and the designmatrix has to stay the > same). Ofcourse you are rejecting subjects based on a-priori criteria, > not on the effect it has on the results, so you shouldn't have to do > it too often ;-) > > However, to explain what I meant previously: you do not have to > compute a grandaverage first, and then do statistics. You can put > those subjects (of both groups) straight into ft_timelockstatistics, > and use the designmatrix to specify group membership with 1's and 2's. > Using a 0 instead for one of your subjects would exclude that subject > from the analysis. > (see http://fieldtrip.fcdonders.nl/walkthrough#non-paired_comparison). > > Have a nice day! > > Stephen > > > > > On 10 May 2012 20:55, Roni Tibon wrote: > > Dear Stephen and Steve, > > > > Thank you for your answers. > > > > Stephen, if I understand you correctly, option 1 means I have to compute > the > > grand average again (using ft_timelockgrandaverage), which is what I > tried > > to avoid. > > > > I tried option 2 though, and it didn't work. > > When I used a zero entry at the uvar line, the data stayed exactly the > same > > (as if the subject was not excluded). When I used a zero entry at the > ivar > > line (or at both lines), i get an error message saying "invalid > > specification for the design array". > > > > I also tried skipping the entry all together, but got an error message > > saying "the size of the design matrix does not match the number of > > observations in the data" > > > > An I doing something wrong? > > > > Steve, I guess I can do that.. the reason I'm asking is cause I want to > > "play" with the data a bit - remove a different subjects each time and > see > > if I still get the same pattern. So I thought it would be easier if I did > > not have to compute the grand average again and again. > > > > Thanks! > > Roni > > > > On 10 May 2012 14:07, Stephen Whitmarsh > wrote: > >> > >> Hi Tony, > >> > >> Thanks for your question. > >> > >> First of all, I do not fully understand what you mean with 'without > >> computing the averages again', but I'll have a shot at it. > >> > >> In ft_freq/timelock-statistics you enter all your 'units of > >> observations', i.e. data structures per subject or condition that you > >> want to compare, together with the design matrix. The designmatrix is > >> a one or two row matrix with as many columns as your have > >> data-entries. One of the rows codes the group/condition membership of > >> those entries (the independent variable). They can be subjects (group > >> analysis) or trials (within-subjects analysis). Another row might be > >> used to code the observation number in case you are doing a paired > >> test. > >> > >> To exclude one data entry (i.e. subject) for your > >> ft_timelockstatistics you could either: > >> 1) not enter that datastructure as data in ft_freqstatistics, and also > >> remove it from your design matrix. > >> 2) keep your input to ft_timelockstatistics the same but use a zero > >> for that entry in you design matrix. In this case that data input will > >> not be used to calculate your statistics. > >> > >> I would say the second option is more elegant, but it is more prone to > >> mistakes perhaps. You would do me a favour if you would doublecheck > >> that it gives you the same results as option 1. > >> > >> I hope this answers your question, > >> > >> Stephen > >> > >> > >> > >> On 10 May 2012 12:09, Roni Tibon wrote: > >> > Hi all, > >> > Is there an elegant way to exclude a subject from the statistical > >> > analysis > >> > when using ft_timelockstatistics, without computing the averages again > >> > while > >> > excluding the subject? > >> > > >> > Thanks! > >> > Roni > >> > > >> > -- > >> > /\.../\ > >> > ( -- ---)__{} > >> > (_.._...._) > >> > > >> > http://shkafkafim.blogspot.com/ > >> > > >> > > >> > _______________________________________________ > >> > fieldtrip mailing list > >> > fieldtrip at donders.ru.nl > >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > /\.../\ > > ( -- ---)__{} > > (_.._...._) > > > > http://shkafkafim.blogspot.com/ > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri May 11 18:45:16 2012 From: lihqih at gmail.com (qi li) Date: Fri, 11 May 2012 12:45:16 -0400 Subject: [FieldTrip] ft_plot_mesh Message-ID: Hi there, I am having trouble for the use of ft_plot_mesh. Can someone load the attached files and type ft_plot_mesh(bnd, 'vertexcolor', m); to see what happens. I have a blank figure. Thanks! Qi -------------- next part -------------- A non-text attachment was scrubbed... Name: bnd.mat Type: application/octet-stream Size: 259261 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: m.mat Type: application/octet-stream Size: 62865 bytes Desc: not available URL: From hamzaf at sabanciuniv.edu Sun May 13 16:46:38 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 13 May 2012 17:46:38 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Thank you for your help Stephen Hamza On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Hamza, > > I just saw you've been posting on the FT list for quite a while and > have been working on offline analysis already. To answer your question > more specifically: The trialfunction could be very simple in the first > instance, but is needed to know what samples to read when > preprocessing the data. You can find some examples here that you can > adapt to your own purpose here: > > http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition > > Cheers, > Stephen > > On 10 May 2012 14:51, Stephen Whitmarsh > wrote: > > Dear Hamza, > > > > The trialfunction is an integral part of processing data in FieldTrip. > > It is how you define your timepoints of interest, i.e. trials based on > > recorded markers in your data, or based on user-defined events (e.g. > > sleep stages). > > > > If you are not yet familiar with the basic FieldTrip operations the > > documentation of the realtime analysis might indeed seem somewhat > > inadequate as it assumes this familiarity. FieldTrip's online analysis > > tools are using many of the same functions of the offline ones, and > > has a similar overall philosophy and approach. This makes it > > relatively easy to understand and to use online analysis approach once > > one is familiar with the offline one. Alas this translation is > > assymmetric and doesn't hold for the other way around. > > > > The good news is, however, that everything is there to get you on your > > way once your take a little detour. You could take a look at the > > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and > > get a bit of hands-on working through some steps with the supplied > > tutorial-data. > > > > Specifically for your question these pages would be relevant: > > > http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data > > http://fieldtrip.fcdonders.nl/tutorial/preprocessing > > http://fieldtrip.fcdonders.nl/tutorial/continuous > > > > For more overview and general operations I would advice reading through: > > http://fieldtrip.fcdonders.nl/walkthrough > > > > Most of all it might not be a bad idea to start with a pre-recorded > > dataset and work on it offline, using the more standard and more > > extensively documented offline functions for e.g. trial based > > averaging. Once that works out for you can adapt it to the realtime > > situation. > > > > Hope this helps, > > Stephen > > > > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) > > wrote: > >> Hello, > >> > >> I don't know why should I define a function inside the > >> ft_realtime_selectiveaverage. > >> I just want to make an average of some segments. > >> > >> Could you provide me with an example of cfg.trialfun > >> > >> Hamza > >> > >> > >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) > >> wrote: > >>> > >>> Hello, > >>> > >>> I am doing realtime processing, and I wanted to check > ft_realtime_average > >>> function and ft_realtime_selectiveaverage functions. > >>> > >>> I faced a problem in defining cfg.trialfun > >>> > >>> Could you help me > >>> > >>> Best > >>> > >>> -- > >>> Hamza Fawzi Altakroury > >>> Graduate student - MA > >>> Faculty of Engineering and Natural Sciences > >>> Sabancı University > >> > >> > >> > >> > >> -- > >> Hamza Fawzi Altakroury > >> Graduate student - MA > >> Faculty of Engineering and Natural Sciences > >> Sabancı University > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Mon May 14 15:57:05 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Mon, 14 May 2012 16:57:05 +0300 Subject: [FieldTrip] ft_realtime_average and ft_realtime_selective_average Message-ID: Hello, I am doing realtime processing. I wrote the following two simple codes: cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; ft_realtime_average(cfg) And cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; ft_realtime_selectiveaverage(cfg) In the first no error appeared but also I did not get a result (the generated figure was empty). In the second I got the following message: ??? Error using ==> ft_read_data at 243 cannot read data before the begin of the file Error in ==> ft_realtime_selectiveaverage at 94 dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx, 'checkboundary', false); Error in ==> online2 at 10 ft_realtime_selectiveaverage(cfg) Why I get so? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From dashiel.munding at gmail.com Mon May 14 18:29:31 2012 From: dashiel.munding at gmail.com (Dashiel Munding) Date: Mon, 14 May 2012 18:29:31 +0200 Subject: [FieldTrip] Create trialfun with stim lock baseline and resp locked t.o.i. Message-ID: Hi Everyone, I'm trying to analyse some picture naming data, and need to have a trial definition that has a baseline locked to the stimulus onset, but an analysis period locked to the response onset, which has a very varied latency. That is, I have two codes on my trigger channel, X and Y. I want to lock my baseline to X, but my analysis period to Y. The example for a custom, conditional 'trialfun' [http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition] goes partway to explaining how this might be possible, but can anyone help me work out how to ask Fieldtrip to build trials like this? Many thanks, Dashiel From Elena.Orekhova at neuro.gu.se Mon May 14 21:51:11 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Mon, 14 May 2012 19:51:11 +0000 Subject: [FieldTrip] MNE to dSPM? Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> Hi I calculated the MNE estimates for an evoked potential using the full brain grid with ‘loose’ dipole orientation. I would like to calculate the dSPM values (Dale et al, Neuron, Vol. 26, 55–67). Is there a simple way to do it in the Fieldtrip? Thank you! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Mon May 14 23:37:00 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Mon, 14 May 2012 21:37:00 +0000 Subject: [FieldTrip] where is the inverse operator? Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> Dear Fieldtrip Developers, I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? Thank you! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mollison at gmail.com Tue May 15 01:05:10 2012 From: matt.mollison at gmail.com (Matt Mollison) Date: Mon, 14 May 2012 17:05:10 -0600 Subject: [FieldTrip] Oscillatory power normalization In-Reply-To: <454AC917-60FD-4CF6-BF21-242DF4B5B4D0@mac.com> References: <454AC917-60FD-4CF6-BF21-242DF4B5B4D0@mac.com> Message-ID: Eelke, I know this is a slow reply, but I was waiting to see if someone would comment on Joe's questions. Anyway, thank you for your explanation. It makes sense that the subtraction would control for 1/f within each frequency. However, I am curious about the points that Joe brought up and I hope someone can still comment on them. Joe, Your first point seems quite important, especially when averaging across a range of frequencies is a common thing to do in the literature. Does anyone know if it's correct that higher frequencies will get washed out by lower ones when averaging within a frequency band? To add to Joe's questions, could normalizing power ever be a bad thing to do? It seems like it would be reasonable for FieldTrip to at least have the option so that one could use cfg.keeptrials='no' with ft_freqanalysis and would not need to have cfg.keeptrials='yes' for followed by the ft_freqbaseline steps that Stephan mentioned. Not sure about your second point regarding spectral density, but I would also like to know more. Thanks, everyone, for your knowledge in these matters. Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Tue, Apr 24, 2012 at 12:41 AM, Joseph Dien wrote: > I'm new to spectral analysis so take anything I say with a grain of salt: > > 1) If one intends on taking the average of a band (like 8-12Hz for alpha), > seems like maybe helpful to correct for 1/f so the lower bands don't > dominate? > > 2) Another issue is spectral density (correcting for frequency bin width > for discrete Fourier). As far as I can tell, FieldTrip isn't doing this. > Seems like it should be standard. Or at least it should say in the > documentation whether it is being done. Am I wrong? > > Cheers! > > Joe > > > > On Apr 23, 2012, at 5:54 AM, Eelke Spaak wrote: > > > Hi Matt, > > > > When you are comparing power across conditions, it is not really > > necessary to apply an explicit correction for the dominant 1/f > > component of the raw spectrum. Since this 1/f component is present in > > both conditions, when you subtract power in one condition from power > > in another condition (or compute the ratio, or log-ratio, or relative > > change, or whatever), the 1/f will cancel out and you will only be > > left with whatever is due to your experimental manipulation. This is > > true because the contrast is done per frequency. (Note that comparing > > activity versus baseline is just a special case of looking at a > > contrast between conditions, so the same argument holds there.) > > > > The only time when an explicit correction for 1/f is useful, is when > > you want to look at raw power. The most dominant oscillatory features > > (visual alpha, visual contrast induced gamma...) will usually be > > evident in raw spectra without such a correction, by the way. > > Correcting for 1/f can be done in many ways, the most simple one is > > simply taking the logarithm of power, something like: > > > > freqCorrected = freqUncorrected; > > freqCorrected.powspctrm = log10(freqCorrected.powspctrm); > > > > Or you could take the first derivative in the time domain (equivalent > > to multiplying the spectrum with f, search for post by Robert on this > > on the FT list). Or you could take the log of both the frequency- and > > power axes, then fit a line, and subtract it, then transform back > > (10^corrected data). > > > > But, the main point is: in the vast majority of typical cognitive > > experiments, correcting for 1/f is not needed. > > > > Best, > > Eelke > > > > On 23 April 2012 05:54, Matt Mollison wrote: > >> Hi FieldTrippers, > >> > >> In almost all the papers I've read involving oscillatory power, some > kind of > >> transformation is done to the data due to the 1/f power spectrum effect > >> (power decreases as frequency increases). I'm mostly looking at > >> within-subjects experiments (every subject behaved in all conditions) > >> comparing conditions across subjects, but it seems like normalizing the > >> power spectrum should apply in any case (especially if any kind of > >> parametric stats are done—right?). > >> > >> Anyway, it's not apparent to me how to use FT functions like > ft_freqanalysis > >> to make these transformations (e.g., log10 normalization, dB > normalization > >> [EEGLab does this], vector length normalization, etc.; the only thing I > see > >> is in ft_sourcedescriptives, but I'm not doing source analyses), and it > >> confuses me why this is the case. I can't find much discussion > regarding the > >> 1/f issue on the FT wiki or the mailing list. This seems like an > important > >> step that is missing from any frequency analysis workflow. Am I missing > >> something (meaning I just don't see the option), am I misunderstanding > >> something (meaning I'm incorrect in this assumption), or is this an > issue > >> that needs to be fixed? > >> > >> Thanks, > >> Matt > >> > >> -- > >> Univ. of Colorado at Boulder > >> Dept. of Psychology and Neuroscience > >> matthew.mollison at colorado.edu > >> http://psych.colorado.edu/~mollison/ > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 09:23:15 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 09:23:15 +0200 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> Message-ID: Hi Elena, You can specify cfg.mne.keepfilter = 'yes'. Best, Jan-Mathijs On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: > > Dear Fieldtrip Developers, > > I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? > > Thank you! > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 09:23:56 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 09:23:56 +0200 Subject: [FieldTrip] MNE to dSPM? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> Message-ID: Hi Elena, You can specify cfg.mne.projectnoise = 'yes'. This will give you an estimate of the projected noise. This can be used as normalization term to compute the dSPM. Best, Jan-Mathijs On May 14, 2012, at 9:51 PM, Elena Orekhova wrote: > > Hi > > I calculated the MNE estimates for an evoked potential using the full brain grid with ‘loose’ dipole orientation. I would like to calculate the dSPM values (Dale et al, Neuron, Vol. 26, 55–67). Is there a simple way to do it in the Fieldtrip? > > Thank you! > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 15 10:29:19 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 15 May 2012 11:29:19 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello again Realtime functions should work if I define the function as: cfg.trialfun = 'trialfun_general'; Right? Hamza On Sun, May 13, 2012 at 5:46 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Thank you for your help Stephen > > Hamza > > > On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Hi Hamza, >> >> I just saw you've been posting on the FT list for quite a while and >> have been working on offline analysis already. To answer your question >> more specifically: The trialfunction could be very simple in the first >> instance, but is needed to know what samples to read when >> preprocessing the data. You can find some examples here that you can >> adapt to your own purpose here: >> >> http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition >> >> Cheers, >> Stephen >> >> On 10 May 2012 14:51, Stephen Whitmarsh >> wrote: >> > Dear Hamza, >> > >> > The trialfunction is an integral part of processing data in FieldTrip. >> > It is how you define your timepoints of interest, i.e. trials based on >> > recorded markers in your data, or based on user-defined events (e.g. >> > sleep stages). >> > >> > If you are not yet familiar with the basic FieldTrip operations the >> > documentation of the realtime analysis might indeed seem somewhat >> > inadequate as it assumes this familiarity. FieldTrip's online analysis >> > tools are using many of the same functions of the offline ones, and >> > has a similar overall philosophy and approach. This makes it >> > relatively easy to understand and to use online analysis approach once >> > one is familiar with the offline one. Alas this translation is >> > assymmetric and doesn't hold for the other way around. >> > >> > The good news is, however, that everything is there to get you on your >> > way once your take a little detour. You could take a look at the >> > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and >> > get a bit of hands-on working through some steps with the supplied >> > tutorial-data. >> > >> > Specifically for your question these pages would be relevant: >> > >> http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data >> > http://fieldtrip.fcdonders.nl/tutorial/preprocessing >> > http://fieldtrip.fcdonders.nl/tutorial/continuous >> > >> > For more overview and general operations I would advice reading through: >> > http://fieldtrip.fcdonders.nl/walkthrough >> > >> > Most of all it might not be a bad idea to start with a pre-recorded >> > dataset and work on it offline, using the more standard and more >> > extensively documented offline functions for e.g. trial based >> > averaging. Once that works out for you can adapt it to the realtime >> > situation. >> > >> > Hope this helps, >> > Stephen >> > >> > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) >> > wrote: >> >> Hello, >> >> >> >> I don't know why should I define a function inside the >> >> ft_realtime_selectiveaverage. >> >> I just want to make an average of some segments. >> >> >> >> Could you provide me with an example of cfg.trialfun >> >> >> >> Hamza >> >> >> >> >> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >> >> wrote: >> >>> >> >>> Hello, >> >>> >> >>> I am doing realtime processing, and I wanted to check >> ft_realtime_average >> >>> function and ft_realtime_selectiveaverage functions. >> >>> >> >>> I faced a problem in defining cfg.trialfun >> >>> >> >>> Could you help me >> >>> >> >>> Best >> >>> >> >>> -- >> >>> Hamza Fawzi Altakroury >> >>> Graduate student - MA >> >>> Faculty of Engineering and Natural Sciences >> >>> Sabancı University >> >> >> >> >> >> >> >> >> >> -- >> >> Hamza Fawzi Altakroury >> >> Graduate student - MA >> >> Faculty of Engineering and Natural Sciences >> >> Sabancı University >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Tue May 15 11:18:07 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Tue, 15 May 2012 09:18:07 +0000 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> Thank you! I have dot source.avg.filter variable as an output. I guess that the inverse operator should have size of N-sources x M-channels and that it should be the same for all the time points. Am I correct? The structural variable source.avg.filter, however, contains 3xNchannels data for each of N-sources. What is it? Are there different inverse operators for different time points? Elena ________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Tuesday, May 15, 2012 9:23 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] where is the inverse operator? Hi Elena, You can specify cfg.mne.keepfilter = 'yes'. Best, Jan-Mathijs On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: Dear Fieldtrip Developers, I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? Thank you! Elena _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 11:29:51 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 11:29:51 +0200 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se>, <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> Message-ID: <9BE88D19-44DA-4CAC-A72D-5145E45F4DB0@donders.ru.nl> Each dipole location has a spatial filter, and each dipole is defined in 3D, hence the 3xchannels per dipole location. Jan-Mathijs On May 15, 2012, at 11:18 AM, Elena Orekhova wrote: > Thank you! > > I have dot source.avg.filter variable as an output. > > I guess that the inverse operator should have size of > N-sources x M-channels and that it should be the same for all the time points. Am I correct? > > The structural variable source.avg.filter, however, contains 3xNchannels data for each of N-sources. What is it? Are there different inverse operators for different time points? > > Elena > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, May 15, 2012 9:23 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] where is the inverse operator? > > Hi Elena, > > You can specify cfg.mne.keepfilter = 'yes'. > > Best, > > Jan-Mathijs > > On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: > >> >> Dear Fieldtrip Developers, >> >> I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? >> >> Thank you! >> Elena >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Wed May 16 09:06:30 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 16 May 2012 10:06:30 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello, The function can be run when I put cfg.trialfun = 'trialfun_general'; But I don't get the result that I supposed The file: cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'stimulus'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; %cfg = ft_definetrial(cfg); ft_realtime_average(cfg) Is there any wrong in my function? Hamza On Tue, May 15, 2012 at 11:29 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello again > > Realtime functions should work if I define the function as: > > cfg.trialfun = 'trialfun_general'; > > Right? > > Hamza > > > On Sun, May 13, 2012 at 5:46 PM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Thank you for your help Stephen >> >> Hamza >> >> >> On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < >> stephen.whitmarsh at gmail.com> wrote: >> >>> Hi Hamza, >>> >>> I just saw you've been posting on the FT list for quite a while and >>> have been working on offline analysis already. To answer your question >>> more specifically: The trialfunction could be very simple in the first >>> instance, but is needed to know what samples to read when >>> preprocessing the data. You can find some examples here that you can >>> adapt to your own purpose here: >>> >>> http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition >>> >>> Cheers, >>> Stephen >>> >>> On 10 May 2012 14:51, Stephen Whitmarsh >>> wrote: >>> > Dear Hamza, >>> > >>> > The trialfunction is an integral part of processing data in FieldTrip. >>> > It is how you define your timepoints of interest, i.e. trials based on >>> > recorded markers in your data, or based on user-defined events (e.g. >>> > sleep stages). >>> > >>> > If you are not yet familiar with the basic FieldTrip operations the >>> > documentation of the realtime analysis might indeed seem somewhat >>> > inadequate as it assumes this familiarity. FieldTrip's online analysis >>> > tools are using many of the same functions of the offline ones, and >>> > has a similar overall philosophy and approach. This makes it >>> > relatively easy to understand and to use online analysis approach once >>> > one is familiar with the offline one. Alas this translation is >>> > assymmetric and doesn't hold for the other way around. >>> > >>> > The good news is, however, that everything is there to get you on your >>> > way once your take a little detour. You could take a look at the >>> > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and >>> > get a bit of hands-on working through some steps with the supplied >>> > tutorial-data. >>> > >>> > Specifically for your question these pages would be relevant: >>> > >>> http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data >>> > http://fieldtrip.fcdonders.nl/tutorial/preprocessing >>> > http://fieldtrip.fcdonders.nl/tutorial/continuous >>> > >>> > For more overview and general operations I would advice reading >>> through: >>> > http://fieldtrip.fcdonders.nl/walkthrough >>> > >>> > Most of all it might not be a bad idea to start with a pre-recorded >>> > dataset and work on it offline, using the more standard and more >>> > extensively documented offline functions for e.g. trial based >>> > averaging. Once that works out for you can adapt it to the realtime >>> > situation. >>> > >>> > Hope this helps, >>> > Stephen >>> > >>> > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) >>> > wrote: >>> >> Hello, >>> >> >>> >> I don't know why should I define a function inside the >>> >> ft_realtime_selectiveaverage. >>> >> I just want to make an average of some segments. >>> >> >>> >> Could you provide me with an example of cfg.trialfun >>> >> >>> >> Hamza >>> >> >>> >> >>> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >>> >> wrote: >>> >>> >>> >>> Hello, >>> >>> >>> >>> I am doing realtime processing, and I wanted to check >>> ft_realtime_average >>> >>> function and ft_realtime_selectiveaverage functions. >>> >>> >>> >>> I faced a problem in defining cfg.trialfun >>> >>> >>> >>> Could you help me >>> >>> >>> >>> Best >>> >>> >>> >>> -- >>> >>> Hamza Fawzi Altakroury >>> >>> Graduate student - MA >>> >>> Faculty of Engineering and Natural Sciences >>> >>> Sabancı University >>> >> >>> >> >>> >> >>> >> >>> >> -- >>> >> Hamza Fawzi Altakroury >>> >> Graduate student - MA >>> >> Faculty of Engineering and Natural Sciences >>> >> Sabancı University >>> >> >>> >> _______________________________________________ >>> >> fieldtrip mailing list >>> >> fieldtrip at donders.ru.nl >>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Wed May 16 09:54:56 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Wed, 16 May 2012 10:54:56 +0300 Subject: [FieldTrip] ICA for merged EEG recordings Message-ID: Hi all, I have a question which is not directly related to fieldtrip, but I bet you can help me with that :) I'm running a very long EEG experiment (takes about 3 hours), so we decided to run it in two sessions, in two following days. I used the Biosemi Merger to merge the files from day 1 and day 2, and want to run ICA to remove blinks and eye-movements. Would you say it's better to run ICA on the merged file, or do you think it would be best to run ICA separately for each file, and then merge the data? Thanks! Roni -------------- next part -------------- An HTML attachment was scrubbed... URL: From maarten.de.vos at uni-oldenburg.de Wed May 16 11:08:00 2012 From: maarten.de.vos at uni-oldenburg.de (Maarten De Vos) Date: Wed, 16 May 2012 09:08:00 +0000 Subject: [FieldTrip] ICA for merged EEG recordings In-Reply-To: References: Message-ID: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> dear Roni, I would definitely suggest to run ICA on separate blocks. Because you removed the cap, also the relative position of eyes to the electrodes can have (has) been changed. Seems you have enough data in both sessions to run a reliable ICA. so I would run ICA on separate blocks, remove artifacts, and then merge the data. best maarten ________________________________ Van: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] namens Roni Tibon [ronitibon at gmail.com] Verzonden: woensdag 16 mei 2012 9:54 Aan: Email discussion list for the FieldTrip project Onderwerp: [FieldTrip] ICA for merged EEG recordings Hi all, I have a question which is not directly related to fieldtrip, but I bet you can help me with that :) I'm running a very long EEG experiment (takes about 3 hours), so we decided to run it in two sessions, in two following days. I used the Biosemi Merger to merge the files from day 1 and day 2, and want to run ICA to remove blinks and eye-movements. Would you say it's better to run ICA on the merged file, or do you think it would be best to run ICA separately for each file, and then merge the data? Thanks! Roni -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Wed May 16 11:58:53 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Wed, 16 May 2012 12:58:53 +0300 Subject: [FieldTrip] ICA for merged EEG recordings In-Reply-To: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> References: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> Message-ID: Thanks! On 16 May 2012 12:08, Maarten De Vos wrote: > dear Roni, > > I would definitely suggest to run ICA on separate blocks. Because you > removed the cap, also the relative position of eyes to the electrodes can > have (has) been changed. Seems you have enough data in both sessions to > run a reliable ICA. > so I would run ICA on separate blocks, remove artifacts, and then merge > the data. > best > maarten > ------------------------------ > *Van:* fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > namens Roni Tibon [ronitibon at gmail.com] > *Verzonden:* woensdag 16 mei 2012 9:54 > *Aan:* Email discussion list for the FieldTrip project > *Onderwerp:* [FieldTrip] ICA for merged EEG recordings > > Hi all, > > I have a question which is not directly related to fieldtrip, but I bet > you can help me with that :) > > I'm running a very long EEG experiment (takes about 3 hours), so we > decided to run it in two sessions, in two following days. > I used the Biosemi Merger to merge the files from day 1 and day 2, and > want to run ICA to remove blinks and eye-movements. > > Would you say it's better to run ICA on the merged file, or do you think > it would be best to run ICA separately for each file, and then merge the > data? > > Thanks! > Roni > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Wed May 16 13:25:54 2012 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Wed, 16 May 2012 13:25:54 +0200 Subject: [FieldTrip] TFR map couldn't display negative value Message-ID: Hi Fieldtripers, I try to plot the TRP map using ft_singleplotTFR, but the colour map cannot display negative value. My code likes this: cfg = []; cfg.baseline = [-0.3 -0.1]; cfg.baselinetype = 'absolute'; cfg.channelname = {'MLP','MRP','MLO','MRO'}; figure; ft_singleplotTFR(cfg, TFR); I attach one example I plotted. Does anyone know how to solve it ? I think maybe this is a bug. Thanks in advance ! Best, Haiteng -- Haiteng Jiang PhD candidate Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Visiting address Room 2.32 Donders Centre for Cognitive Neuroimaging Kapittelweg 29 6525 EN Nijmegen the Netherlands Tel.: +31 (0)243668291 Web: https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: examples.jpg Type: image/jpeg Size: 60048 bytes Desc: not available URL: From nuria.donamayor at neuro.uni-luebeck.de Wed May 16 13:49:15 2012 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Wed, 16 May 2012 13:49:15 +0200 Subject: [FieldTrip] between-groups cluster stats Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> Dear fieldtrip users, I am currently analyzing data from a between-groups study and I am having some trouble programming the stats... Data are from a neuromag 306 system and I am using grand averages (keepindividual = yes) of the combined planar gradiometer data. I have followed the fieldtrip tutorial on cluster-based permutation tests on ERFs, so my script currently looks like this: cfg = []; cfg.latency = [0 .5]; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 3; cfg.neighbours = neighbours; cfg.tail = 0; cfg.clustertail = 0; cfg.numrandomization = 500; design = zeros(1,(size(g1.individual,1)+size(g2.individual,1))); design(1,1:size(g1.individual,1)) = 1; design(1,(size(g1.individual,1)+1):(size(g1.individual,1)+size(g2.individual,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_timelockstatistics(cfg, g1, g2); Still, though the script works, creates one or two clusters and produces no error, the output makes no sense. For example, there is a pretty huge difference in the ERFs between around 50-150 ms, but the output only shows a couple of sensors forming a cluster at 32 ms. Up to now, I had just performed within-subjects stats, so I guess there is probably something wrong in my design... I would be very thankful to any help! Thanks, Nuria From johanna.zumer at donders.ru.nl Wed May 16 14:08:45 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 16 May 2012 14:08:45 +0200 Subject: [FieldTrip] TFR map couldn't display negative value In-Reply-To: References: Message-ID: Hi Haiteng, Does this solve it for you? http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity Cheers, Johanna 2012/5/16 Haiteng Jiang > Hi Fieldtripers, > > I try to plot the TRP map using ft_singleplotTFR, but the colour map > cannot display negative value. My code likes this: > > cfg = []; > cfg.baseline = [-0.3 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.channelname = {'MLP','MRP','MLO','MRO'}; > figure; ft_singleplotTFR(cfg, TFR); > > I attach one example I plotted. Does anyone know how to solve it ? I think > maybe this is a bug. Thanks in advance ! > > > Best, > Haiteng > > > -- > Haiteng Jiang > PhD candidate > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Visiting address > Room 2.32 > Donders Centre for Cognitive Neuroimaging > Kapittelweg 29 > 6525 EN Nijmegen > the Netherlands > > Tel.: +31 (0)243668291 > Web: https://sites.google.com/site/haitengjiang/ > > > _______________________________________________ > 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.vandermeij at donders.ru.nl Wed May 16 14:48:55 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 16 May 2012 14:48:55 +0200 Subject: [FieldTrip] TFR map couldn't display negative value In-Reply-To: References: Message-ID: Hey Haiting, This is a very annoying Matlab OpenGL bug, please see the following FAQ on how to bypass it: http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity In your case, you could try the second option mentioned, it should look fine: cfg.maskstyle = 'saturation' Best, Roemer On Wed, May 16, 2012 at 2:47 PM, Roemer van der Meij < roemer.van.der.meij at gmail.com> wrote: > Hey Haiting, > > This is a very annoying Matlab OpenGL bug, please see the following FAQ on > how to bypass it: > > http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity > > In your case, you could try the second option mentioned, it should look > fine: > cfg.maskstyle = 'saturation' > > Best, > Roemer > > > On Wed, May 16, 2012 at 1:25 PM, Haiteng Jiang wrote: > >> Hi Fieldtripers, >> >> I try to plot the TRP map using ft_singleplotTFR, but the colour map >> cannot display negative value. My code likes this: >> >> cfg = []; >> cfg.baseline = [-0.3 -0.1]; >> cfg.baselinetype = 'absolute'; >> cfg.channelname = {'MLP','MRP','MLO','MRO'}; >> figure; ft_singleplotTFR(cfg, TFR); >> >> I attach one example I plotted. Does anyone know how to solve it ? I >> think maybe this is a bug. Thanks in advance ! >> >> >> Best, >> Haiteng >> >> >> -- >> Haiteng Jiang >> PhD candidate >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Visiting address >> Room 2.32 >> Donders Centre for Cognitive Neuroimaging >> Kapittelweg 29 >> 6525 EN Nijmegen >> the Netherlands >> >> Tel.: +31 (0)243668291 >> Web: https://sites.google.com/site/haitengjiang/ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed May 16 15:36:57 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 May 2012 15:36:57 +0200 Subject: [FieldTrip] between-groups cluster stats In-Reply-To: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> References: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> Message-ID: Dear Nuria, I don't see anything wrong with your design, its just the 1's and 2's I would expect. (although: design = [ones(1,size(g1.individual,1)) ones(1,size(g1.individual,1))*2]; would be a bit shorter ;-) Two points though: 1) Statistics don't neccecarily make sense looking only at means (or mean differences), since it depends on the variance of the data as well. Take a look at the .stat field to get a sense of how the time-by-time and sensor-by-sensor statistics are corresponding to the clusters, as well as to your mean-differences. You can also plot these values topographically to see if they make sense. 2) I would not start with clustercorrection as a first step in appreciating your effects, especially when it comes to possibly noisy intermediate data such as your within subject data. Clustercorrection is meant as a means to deal with multiple comparison corrections, nothing more nothing less. For a first look at significant differences per sensor I would not specify a .correctm at all. Going from there, and to group level, the clusters might start to make more sense though. Good luck! Stephen On 16 May 2012 13:49, Nuria Doñamayor Alonso wrote: > Dear fieldtrip users, > I am currently analyzing data from a between-groups study and I am having some trouble programming the stats... Data are from a neuromag 306 system and I am using grand averages (keepindividual = yes) of the combined planar gradiometer data. I have followed the fieldtrip tutorial on cluster-based permutation tests on ERFs, so my script currently looks like this: > > cfg = []; > cfg.latency = [0 .5]; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 3; > cfg.neighbours = neighbours; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.numrandomization = 500; > > design = zeros(1,(size(g1.individual,1)+size(g2.individual,1))); > design(1,1:size(g1.individual,1)) = 1; > design(1,(size(g1.individual,1)+1):(size(g1.individual,1)+size(g2.individual,1))) = 2; > > cfg.design = design; > cfg.ivar  = 1; > > [stat] = ft_timelockstatistics(cfg, g1, g2); > > Still, though the script works, creates one or two clusters and produces no error, the output makes no sense. For example, there is a pretty huge difference in the ERFs between around 50-150 ms, but the output only shows a couple of sensors forming a cluster at 32 ms. Up to now, I had just performed within-subjects stats, so I guess there is probably something wrong in my design... I would be very thankful to any help! > Thanks, > Nuria > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Thu May 17 15:37:06 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 17 May 2012 15:37:06 +0200 Subject: [FieldTrip] center of sphere artefact In-Reply-To: References: Message-ID: Dear Frederic, I see that you have computed the 'noise' (from cfg.lcmv.projectnoise='yes'). You can often use this output to remove the center of sphere artifact to which you refer. Have you tried this (i.e. described here http://fieldtrip.fcdonders.nl/tutorial/beamformer#neural_activity_index ) and does this help? Also, how much is the rank of the covariance matrix (i.e. cov_data.cov) reduced relative to number of sensors you have? In other words, if length(indx) is much less than the number of sensors, then you may need a cfg.lcmv.lambda greater than 5%. Best, Johanna 2012/5/8 Frederic Roux > Dear all, > > I was looking at my lcmv-beamformer maps of ~200 Sec of > eyes closed resting state MEG activity and wondering if > what I was seeing is the center of sphere artefact. > > The code I used is: > > %filtering of the data > cfg = []; > cfg.bpfilter = 'yes'; > cfg.bpfilttype = 'but'; > cfg.bpfreq = [5 45]; > cfg.bpfiltord = 4; > cfg.bpfiltdir = 'twopass'; > > [meg_data] = ft_preprocessing(cfg,meg_data); > > %PCA to extract components with max explained variance > [cf,pcs,vexp] = princomp(meg_data.trial{1},'econ'); > pexp = 100*vexp/sum(vexp); > indx = find(cumsum(vexp) <=90); > meg_data.trial{1} = (pcs(:,indx)*cv(:,indx)')'; > > % computing the covariance matrix > cfg = []; > cfg.channel = {'MEG'}; > cfg.covariance = 'yes'; > cfg.pad = 'maxperlen'; > cfg.sgncmb = {'MEG' 'MEG'}; > cfg.removemean = 'yes'; > > [cov_data] = ft_timelockanalysis(cfg,meg_data); > > %LCMV beamformer > cfg = []; > cfg.channel = {'MEG'}; > cfg.grid = grid_data; > cfg.vol = hdm; > cfg.method = 'lcmv'; > cfg.grid.dim = [Nx Ny Nz]; > > cfg.lcmv.fixedori = 'no'; > cfg.lcmv.lambda = '5%'; > cfg.lcmv.projectnoise = 'yes'; > cfg.lcmv.keepfilters = 'yes'; > cfg.lcmv.projectmom = 'no'; > cfg.lcmv.keepmom = 'no'; > cfg.lcmv.reducerank = 2; > cfg.lcmv.normalize = 'yes'; > > [bf] = ft_sourceanalysis(cfg,cov_data); > > %make power unit invariant > bf.avg.pow = bf.avg.pow./max(bf.avg.pow); > > Since I don't have enough experience to judge about that > I wanted to ask if anybody out there with experience > could tell me their opinion. > > The grid was computed using an inwardshift of -0.5 and a grid > resolution of 2.5 mm. The head model using the ft_prepare_singleshell. > > Any help,advice, comments or suggestions would be highly appreciated. > > Best, > Fred > > > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > _______________________________________________ > 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 johanna.zumer at donders.ru.nl Thu May 17 15:59:10 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 17 May 2012 15:59:10 +0200 Subject: [FieldTrip] ICA before beamforming -> change in gradiometer -> workaround? In-Reply-To: References: Message-ID: Dear Frederic, It is possible to keep the .grad structure, with updated .grad.tra, by including, in the third argument to ft_rejectcomponent, the original data structure, like this: comp=ft_componentanalysis(cfg1,rawdata) cleanedraw=ft_rejectcomponent(cfg2,comp,rawdata); Best, Johanna 2012/5/7 Frederic Roux > Dear all, > > I am using ICA prior to beamforming for artefact cleaning (EOG & ECG). > > After running ft_componentanalysis I noticed that the gradiometer structure > is removed from the data, which is required by ft_sourceanalysis. > > In a prior post I read that one could just add the grad structure from a > previous version > of the data before the ICA cleaning. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004877.html > > Can anyone tell me if this is the best solution, or if there is any other > strategies out there? > > Best, > Fred > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > _______________________________________________ > 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 jonas at obleser.de Fri May 18 17:51:40 2012 From: jonas at obleser.de (Jonas Obleser) Date: Fri, 18 May 2012 17:51:40 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions Message-ID: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> Dear FT colleagues, after a great FT workshop and a fresh FT release in my matlab path, I am all the more confused on how to “beam“ my single trials (DICS, cfg.realfilter='yes'). Now, here I have this filter (allsource.avg.filter) constructed from the CSD of, say 300 trials (a struct called allfreq, baseline and post-stim together; obtained with ft_freqanalysis, 'mtmfft', cfg.keeptrials ='yes'). In order to “filter them all and let God sort ’em out” later, I somehow must now funnel my allfreq.trials through the filter (cfg.grid.filter = allsource.avg.filter). But: Somehow, cfg.rawtrials seems to be deprecated, can this be true? I understand that in principle it would simply be the single-trial CSD “sandwiched” between the filter and the filter transposed, so I probably can do it by hand easily, but I thought there still must be a handy way of having FT do this for me? Thanks for a quick hint by anybody! Best wishes, Jonas Dr. Jonas Obleser Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Leipzig, Germany (p) +49 (0)341 9940 114 (e) obleser at cbs.mpg.de From johanna.zumer at donders.ru.nl Fri May 18 18:15:45 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 18 May 2012 18:15:45 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions In-Reply-To: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> References: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> Message-ID: Dear Jonas, Sorry that this part is indeed confusing. cfg.rawtrial is not deprecated, but rather you should specify cfg.grid.filter = allsource.avg.filter and cfg.rawtrial = 'yes' and cfg.keeptrials = 'yes', but cfg.singletrial='no' (i.e. default). On what line exactly are you finding an error? or is the mistake that you are calling it 'rawtrials' not 'rawtrial'? Best regards, Johanna 2012/5/18 Jonas Obleser > > Dear FT colleagues, > > after a great FT workshop and a fresh FT release in my matlab path, > I am all the more confused on how to “beam“ my single trials (DICS, > cfg.realfilter='yes'). > > Now, here I have this filter (allsource.avg.filter) constructed from the > CSD of, say 300 trials (a struct called allfreq, baseline and post-stim > together; obtained with ft_freqanalysis, 'mtmfft', cfg.keeptrials ='yes'). > > In order to “filter them all and let God sort ’em out” later, I somehow > must now funnel my allfreq.trials through the filter (cfg.grid.filter = > allsource.avg.filter). > > But: Somehow, cfg.rawtrials seems to be deprecated, can this be true? > > I understand that in principle it would simply be the single-trial CSD > “sandwiched” between the filter and the filter transposed, so I probably > can do it by hand easily, but I thought there still must be a handy way of > having FT do this for me? > > Thanks for a quick hint by anybody! > Best wishes, Jonas > > > > > Dr. Jonas Obleser > Auditory Cognition Group > Max Planck Institute for Human Cognitive and Brain Sciences > Leipzig, Germany > (p) +49 (0)341 9940 114 > (e) obleser at cbs.mpg.de > > > > > _______________________________________________ > 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 jonas at obleser.de Sat May 19 12:14:43 2012 From: jonas at obleser.de (Jonas Obleser) Date: Sat, 19 May 2012 12:14:43 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions Message-ID: Dear Johanna, thanks, it really *was* one of these notorious plural/singular cfg errors (“cfg.rawtrials” rather than the correct “cfg.rawtrial”). Am getting “scanning repetition 1 … 2 … 3 ” now with the precomputed filter and leadfield, so it seems to work. [I must say that three options named cfg.singletrial, cfg.rawtrial, and cfg.keeptrials is a pretty daring combo!] Best wishes, Jonas Dr. Jonas Obleser Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Leipzig, Germany (p) +49 (0)341 9940 114 (e) obleser at cbs.mpg.de From daria.laptinskaya at googlemail.com Sat May 19 17:21:37 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sat, 19 May 2012 17:21:37 +0200 Subject: [FieldTrip] Changing samplingrate for EGI-data Message-ID: Dear All, I wish to subsample my EGI-data from 1000 to 250 Hz before preprocessing to speed up the whole analysis. For the step descriped at http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the structure as obtained from the FT_PREPROCESSING function is needed. Does anyone have an idea for read the data with a changing samplingrate before preprocessing? It would really help me a lot! Thanks, Daria From inieuwenhuis at berkeley.edu Sat May 19 20:58:02 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Sat, 19 May 2012 11:58:02 -0700 Subject: [FieldTrip] Changing samplingrate for EGI-data In-Reply-To: References: Message-ID: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> Hi Daria, Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. Hope this helps, Ingrid On May 19, 2012, at 8:21, Daria Laptinskaya wrote: > Dear All, > > I wish to subsample my EGI-data from 1000 to 250 Hz before > preprocessing to speed up the whole analysis. > For the step descriped at > http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the > structure as obtained from the FT_PREPROCESSING function is needed. > Does anyone have an idea for read the data with a changing > samplingrate before preprocessing? > It would really help me a lot! > > Thanks, > Daria > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Sun May 20 11:53:58 2012 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 20 May 2012 11:53:58 +0200 Subject: [FieldTrip] equal number of trials across conditions Message-ID: <4FB8BF36.8050909@gmail.com> Hi everyone, I'm working on a dataset (ERPs, but this is not that relevant for the question, I believe) for which one condition elicited more errors than the other. I'd like to have both conditions with the same number of trials in the analyses. Ideally, I'd throw away the noisiest trials from one condition, instead of just start throwing away trials at random. I was thinking of using z-scores for that but I was wondering if any of you has already done this before and how. What would be the best way to go? Take the mean amplitude across all trials (collapsed over condition or not?) and calculate the z-score for each trial individually? Then take out the one with the largest scores? How does this approach sound? Does FT keep information about the variance for each trial somewhere in the output of an artefact rejection function? Or would I have to compute that myself? I'd appreciate any suggestions or feedback. Cheers, Vitória From inbalots at gmail.com Sun May 20 13:02:58 2012 From: inbalots at gmail.com (Inbal Shapira Lots) Date: Sun, 20 May 2012 14:02:58 +0300 Subject: [FieldTrip] error using ft_databrowser Message-ID: Hello I call the function in the following way: cfg = []; cfg.dataset=fileName; cfg.trialdef.beginning=0.1; cfg.trialdef.end=0.2; cfg.trialfun='trialfun_raw'; cfg=ft_definetrial(cfg); % to create all needed fields additionally to trl cfg.demean='yes'; cfg.baselinewindow=[-0.2,0]; cfg.trl = trl; cfg.channel = {'MEG'}; BLC =ft_preprocessing(cfg); cfg.layout='4D248.lay'; cfg.channel = {BLC.label{1:10:end}}; cfgbo=ft_databrowser(cfg,BLC); and I get the following error: ??? Attempt to reference field of non-structure array. Error in ==> ft_databrowser at 411 eventtypes = unique({event.type}); What do I do wrong? a similar error occure when I call in this way as well: cfgc = []; cfgc.method='pca'; cfgc.numcomponent=20; comp = ft_componentanalysis(cfgc, BLC); cfgb=[]; cfgb.layout='4D248.lay'; cfgb.channel = {comp.label{1:5}}; %cfgb.ploteventlabels ='colorvalue' ;%(default = 'type=value'); cfgbo=ft_databrowser(cfgb,comp); Thanks Inbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Sun May 20 13:25:52 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Sun, 20 May 2012 13:25:52 +0200 Subject: [FieldTrip] Changing samplingrate for EGI-data In-Reply-To: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> References: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> Message-ID: Hi Daria, 1. you may want to check out the EGI software. there should be some resampling tool. the you can read the downsampled data into FT. 2. you can read chunks of trials using ft_preprocessing. resample. at the end concatenate them with ft_appenddata ciao, n On 19.05.2012, at 20:58, Ingrid Nieuwenhuis wrote: > Hi Daria, > > Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. > > Hope this helps, > Ingrid > > On May 19, 2012, at 8:21, Daria Laptinskaya wrote: > >> Dear All, >> >> I wish to subsample my EGI-data from 1000 to 250 Hz before >> preprocessing to speed up the whole analysis. >> For the step descriped at >> http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the >> structure as obtained from the FT_PREPROCESSING function is needed. >> Does anyone have an idea for read the data with a changing >> samplingrate before preprocessing? >> It would really help me a lot! >> >> Thanks, >> Daria >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.stolk at fcdonders.ru.nl Mon May 21 09:18:59 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 21 May 2012 09:18:59 +0200 (CEST) Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: <4FB8BF36.8050909@gmail.com> Message-ID: <96701170.281413.1337584739634.JavaMail.root@sculptor.zimbra.ru.nl> Hi Vitoria, With 'randperm' you can randomly select a number of trials from one set. If you think order is important, for example indicated by the the trialnumber, have a look at ft_stratify and method 'histogram'. I would perform these randomization steps after regular cleaning. Perhaps someone else has more fine-grained idea for your desired approach. Yours, Arjen ----- Oorspronkelijk bericht ----- > Van: "Vitória Magalhães Piai" > Aan: fieldtrip at donders.ru.nl > Verzonden: Zondag 20 mei 2012 11:53:58 > Onderwerp: [FieldTrip] equal number of trials across conditions > Hi everyone, > > I'm working on a dataset (ERPs, but this is not that relevant for the > question, I believe) for which one condition elicited more errors than > the other. > > I'd like to have both conditions with the same number of trials in the > analyses. > Ideally, I'd throw away the noisiest trials from one condition, > instead > of just start throwing away trials at random. > > I was thinking of using z-scores for that but I was wondering if any > of > you has already done this before and how. What would be the best way > to go? > Take the mean amplitude across all trials (collapsed over condition or > not?) and calculate the z-score for each trial individually? Then take > out the one with the largest scores? How does this approach sound? > Does FT keep information about the variance for each trial somewhere > in > the output of an artefact rejection function? Or would I have to > compute > that myself? > > I'd appreciate any suggestions or feedback. > > Cheers, Vitória > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From g.piantoni at nin.knaw.nl Mon May 21 11:19:12 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Mon, 21 May 2012 11:19:12 +0200 Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: <4FB8BF36.8050909@gmail.com> References: <4FB8BF36.8050909@gmail.com> Message-ID: Hi Vitória, I like the intuitive appeal of your approach, in order to keep only the "most representative" trials. However, I'd have serious concerns that your approach might not be valid. If you reject only the noisiest trials from condition A, you're applying a sort of extra preprocessing step to your data and this makes the comparison between conditions A and B not very meaningful. You cannot unequivocally attribute the difference between A and B to a real difference between experimental conditions or to the extra preprocessing step. More critically, if you only reject noisy trials in condition A, you'll systematically introduce heteroscedasticity in your data; this is against one of the assumptions of parametric testing. I agree with Arjen to use random sampling of the trials of condition A. Depending on what you want to do next, you can even get standard errors from this randomization, similarly to the bootstrap approach. I find this a very elegant way to deal with very unequal numbers of trials. Hope this helps, Best, Gio -- Giovanni Piantoni, MSc Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 20 5665492 gio at gpiantoni.com www.gpiantoni.com On Sun, May 20, 2012 at 11:53 AM, Vitória Magalhães Piai wrote: > Hi everyone, > > I'm working on a dataset (ERPs, but this is not that relevant for the > question, I believe) for which one condition elicited more errors than the > other. > > I'd like to have both conditions with the same number of trials in the > analyses. > Ideally, I'd throw away the noisiest trials from one condition, instead of > just start throwing away trials at random. > > I was thinking of using z-scores for that but I was wondering if any of you > has already done this before and how. What would be the best way to go? > Take the mean amplitude across all trials (collapsed over condition or not?) > and calculate the z-score for each trial individually? Then take out the one > with the largest scores? How does this approach sound? > Does FT keep information about the variance for each trial somewhere in the > output of an artefact rejection function? Or would I have to compute that > myself? > > I'd appreciate any suggestions or feedback. > > Cheers, Vitória > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Mon May 21 12:07:02 2012 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Mon, 21 May 2012 12:07:02 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 18, Issue 33 In-Reply-To: References: Message-ID: <4FBA13C6.205@gmail.com> Thank you Arjen and Giovanni, and good point Gio, didn't think of that before but now that you mention, it's really obvious that that would create a difference between the conditions in itself. I'll go for random then. Cheers, Vitória On 21-5-2012 12:00, fieldtrip-request at donders.ru.nl wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. error using ft_databrowser (Inbal Shapira Lots) > 2. Re: Changing samplingrate for EGI-data (Nathan Weisz) > 3. Re: equal number of trials across conditions (Stolk, A.) > 4. Re: equal number of trials across conditions (Gio Piantoni) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 20 May 2012 14:02:58 +0300 > From: Inbal Shapira Lots > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] error using ft_databrowser > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hello > I call the function in the following way: > cfg = []; > cfg.dataset=fileName; > cfg.trialdef.beginning=0.1; > cfg.trialdef.end=0.2; > cfg.trialfun='trialfun_raw'; > cfg=ft_definetrial(cfg); % to create all needed fields additionally to trl > cfg.demean='yes'; > cfg.baselinewindow=[-0.2,0]; > cfg.trl = trl; > cfg.channel = {'MEG'}; > BLC =ft_preprocessing(cfg); > > cfg.layout='4D248.lay'; > cfg.channel = {BLC.label{1:10:end}}; > cfgbo=ft_databrowser(cfg,BLC); > > and I get the following error: > > ??? Attempt to reference field of non-structure array. > Error in ==> ft_databrowser at 411 > eventtypes = unique({event.type}); > > What do I do wrong? > > a similar error occure when I call in this way as well: > cfgc = []; > cfgc.method='pca'; > cfgc.numcomponent=20; > comp = ft_componentanalysis(cfgc, BLC); > > cfgb=[]; > cfgb.layout='4D248.lay'; > cfgb.channel = {comp.label{1:5}}; > %cfgb.ploteventlabels ='colorvalue' ;%(default = 'type=value'); > cfgbo=ft_databrowser(cfgb,comp); > > > Thanks > Inbal > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Sun, 20 May 2012 13:25:52 +0200 > From: Nathan Weisz > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Changing samplingrate for EGI-data > Message-ID: > Content-Type: text/plain; CHARSET=US-ASCII > > Hi Daria, > > 1. you may want to check out the EGI software. there should be some resampling tool. the you can read the downsampled data into FT. > 2. you can read chunks of trials using ft_preprocessing. resample. at the end concatenate them with ft_appenddata > > ciao, > n > > On 19.05.2012, at 20:58, Ingrid Nieuwenhuis wrote: > >> Hi Daria, >> >> Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. >> >> Hope this helps, >> Ingrid >> >> On May 19, 2012, at 8:21, Daria Laptinskaya wrote: >> >>> Dear All, >>> >>> I wish to subsample my EGI-data from 1000 to 250 Hz before >>> preprocessing to speed up the whole analysis. >>> For the step descriped at >>> http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the >>> structure as obtained from the FT_PREPROCESSING function is needed. >>> Does anyone have an idea for read the data with a changing >>> samplingrate before preprocessing? >>> It would really help me a lot! >>> >>> Thanks, >>> Daria >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ------------------------------ > > Message: 3 > Date: Mon, 21 May 2012 09:18:59 +0200 (CEST) > From: "Stolk, A." > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] equal number of trials across conditions > Message-ID: > <96701170.281413.1337584739634.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Vitoria, > > With 'randperm' you can randomly select a number of trials from one set. If you think order is important, for example indicated by the the trialnumber, have a look at ft_stratify and method 'histogram'. > > I would perform these randomization steps after regular cleaning. Perhaps someone else has more fine-grained idea for your desired approach. > > Yours, > Arjen > > > > ----- Oorspronkelijk bericht ----- >> Van: "Vit?ria Magalh?es Piai" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Zondag 20 mei 2012 11:53:58 >> Onderwerp: [FieldTrip] equal number of trials across conditions >> Hi everyone, >> >> I'm working on a dataset (ERPs, but this is not that relevant for the >> question, I believe) for which one condition elicited more errors than >> the other. >> >> I'd like to have both conditions with the same number of trials in the >> analyses. >> Ideally, I'd throw away the noisiest trials from one condition, >> instead >> of just start throwing away trials at random. >> >> I was thinking of using z-scores for that but I was wondering if any >> of >> you has already done this before and how. What would be the best way >> to go? >> Take the mean amplitude across all trials (collapsed over condition or >> not?) and calculate the z-score for each trial individually? Then take >> out the one with the largest scores? How does this approach sound? >> Does FT keep information about the variance for each trial somewhere >> in >> the output of an artefact rejection function? Or would I have to >> compute >> that myself? >> >> I'd appreciate any suggestions or feedback. >> >> Cheers, Vit?ria >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ------------------------------ > > Message: 4 > Date: Mon, 21 May 2012 11:19:12 +0200 > From: Gio Piantoni > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] equal number of trials across conditions > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Hi Vit?ria, > > I like the intuitive appeal of your approach, in order to keep only > the "most representative" trials. However, I'd have serious concerns > that your approach might not be valid. > > If you reject only the noisiest trials from condition A, you're > applying a sort of extra preprocessing step to your data and this > makes the comparison between conditions A and B not very meaningful. > You cannot unequivocally attribute the difference between A and B to a > real difference between experimental conditions or to the extra > preprocessing step. > More critically, if you only reject noisy trials in condition A, > you'll systematically introduce heteroscedasticity in your data; this > is against one of the assumptions of parametric testing. > > I agree with Arjen to use random sampling of the trials of condition > A. Depending on what you want to do next, you can even get standard > errors from this randomization, similarly to the bootstrap approach. I > find this a very elegant way to deal with very unequal numbers of > trials. > > Hope this helps, > > Best, > > Gio > > > -- > ** Please consider the environment - do you really need to print? ** From y.j.w.rozendaal at student.tue.nl Mon May 21 13:28:08 2012 From: y.j.w.rozendaal at student.tue.nl (Rozendaal, Y.J.W.) Date: Mon, 21 May 2012 13:28:08 +0200 Subject: [FieldTrip] out of memory when executing ft_volumesegmentation Message-ID: <0C957C2F55FC6447A1F237B48EA8604801025D97777F@EXCHANGE12.campus.tue.nl> Hi, I'm trying to create a head model using an MRI to use it for dipole fitting of MEG data. However, currently my Matlab (R2007b on Windows Vista) gives an 'out of memory' error when executing the ft_volumesegment statement. I already tried several things to improve memory handling by Matlab (not keeping trials, not keeping intermediate and the 'pack' statement). The first part of the output seems fine: the input is volume data with dimensions [240 240 170] Converting the coordinate system from ctf to spm performing the segmentation on the specified volume creating scalpmask smoothing anatomy with a 5-voxel FWHM kernel thresholding anatomy at a relative threshold of 0.100 ??? Error using ==> spm_bwlabel Out of memory. Type HELP MEMORY for your options. Error in ==> ft_volumesegment>threshold at 535 [tmp, N] = spm_bwlabel(output, 6); Error in ==> ft_volumesegment at 490 if dothresh, anatomy = threshold(anatomy, cfg.threshold(k), 'anatomy'); end This problem also occured when using the mri of the provided tutorial data. How could I fix this and what causes this large memory consumption? Could using another version of Matlab help or is there an error in my code? Thanks in advance, Yvonne ----- %% load MRI file mri = ft_read_mri(filename_mri); %% realign MRI to head coordinates cfg = []; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg,mri); %% segment MRI cfg = []; cfg.units = 'mm'; cfg.output = {'scalp,'skull','brain'}; cfg.keeptrials = 'no'; cfg.keepintermediate = 'no'; pack mri_segmented = ft_volumesegment(cfg,mri_realigned); From wljj09 at gmail.com Mon May 21 13:44:17 2012 From: wljj09 at gmail.com (Jing Wang) Date: Mon, 21 May 2012 13:44:17 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? Message-ID: Dear Fieldtrip developers and users, I have found same error when I using ft_spiketriggeredaverage and ft_spiketriggeredspectrum.m. After I run the following script, an error appeared at line 51 cfg=ft_checkconfig. This error also is same when I run ft_spiketriggeredspectrum.m. But after I use comment to silent a part of these functions. it could work well. It is same for both the latese and 20120420 version of Fieldtrip. I donnot know whether it is a bug or something wrong with my data? Would anybody who knows can help me? That will be really appreciated! Thanks in advance! Jing I have append spike and LFP into data. The folloing is the script and error information. *cfg=[]; cfg.timwin = [-0.01 0.01]; cfg.spikechannel =data.label{1}; cfg.channel = data.label{2}; cfg.keeptrials ='yes'; cfg.feedback='yes'; [timelock] = ft_spiketriggeredaverage(cfg, data);* ** *Error using ft_getopt the first input should contain key-value pairs* *Error in ft_checkconfig (line 83) renamed = ft_getopt(varargin, 'renamed');* *Error in ft_spiketriggeredaverage (line 51) cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ...* For ft_spikertriggerespectrum, I silent the line like this, the script can work well. *% cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... % 'outputfile'); % see ** http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056* For ft_spiketriggeredaverage, the script can work when I silent these part. it can work well. * % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); % cfg.channel = ft_getopt(cfg,'channel', 'all'); % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); * -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon May 21 13:57:10 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 21 May 2012 13:57:10 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: Dear Jing Wang, This is a bug in the functions you mention. ft_checkconfig should be called like this: cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); so with the forbidden options grouped in a cell array, rather than as it was done in the code snippet you posted. There also seem to be a few other minor bugs in the ft_getopt/checkopt calls. Could you file a bug on this on our Bugzilla tracking system? http://bugzilla.fcdonders.nl/ Thank you for reporting this! Best, Eelke On 21 May 2012 13:44, Jing Wang wrote: > Dear Fieldtrip developers and users, > > I have found same error when I using ft_spiketriggeredaverage and > ft_spiketriggeredspectrum.m. > After I run the following script, an error appeared at line 51 > cfg=ft_checkconfig. This error also is same when I run > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > these functions. it could work well. It is same for both the latese and > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > something wrong with my data? Would anybody who knows can help me? > That will be really appreciated! Thanks in advance! > Jing > > I have append spike and LFP into data. The folloing is the script and error > information. > cfg=[]; > cfg.timwin = [-0.01 0.01]; > cfg.spikechannel =data.label{1}; > cfg.channel = data.label{2}; > cfg.keeptrials ='yes'; > cfg.feedback='yes'; > [timelock] = ft_spiketriggeredaverage(cfg, data); > > Error using ft_getopt > the first input should contain key-value pairs > Error in ft_checkconfig (line 83) > renamed         = ft_getopt(varargin, 'renamed'); > Error in ft_spiketriggeredaverage (line 51) > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > For ft_spikertriggerespectrum, I silent the line like this, the script can > work well. > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > %                                        'outputfile');  % see > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > For ft_spiketriggeredaverage, the script can work when I silent these part. > it can work well. >  % cfg.timwin       = ft_getopt(cfg, 'timwin',[-0.1 0.1]); >  % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); >  % cfg.channel      = ft_getopt(cfg,'channel', 'all'); >  % cfg.keeptrials   = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); >  % cfg.feedback     = ft_checkopt(cfg,'feedback', 'yes'); > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Mon May 21 15:08:23 2012 From: wljj09 at gmail.com (Jing Wang) Date: Mon, 21 May 2012 15:08:23 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: Hello Eelke, Thank you very much for your answers. I will file this bug in Bugzilla tracking system. I also found that there are some functions which are used in the ft_spike* function are not in the Fieldtrip. One is *specest_nanfft.m* which is used in ft_spiketriggeredspectrum.m and another is *ft_write_spike* which is used in ft_spikedetection. We could not find the two functions in Fieldtrip to run these main functions about spike analysis. Whether it has been changed names or put somewhere else? Would you please give me some idea about that? Thanks again! Best Regards Jing 2012/5/21 Eelke Spaak > Dear Jing Wang, > > This is a bug in the functions you mention. ft_checkconfig should be > called like this: > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > so with the forbidden options grouped in a cell array, rather than as > it was done in the code snippet you posted. There also seem to be a > few other minor bugs in the ft_getopt/checkopt calls. > > Could you file a bug on this on our Bugzilla tracking system? > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > Best, > Eelke > > On 21 May 2012 13:44, Jing Wang wrote: > > Dear Fieldtrip developers and users, > > > > I have found same error when I using ft_spiketriggeredaverage and > > ft_spiketriggeredspectrum.m. > > After I run the following script, an error appeared at line 51 > > cfg=ft_checkconfig. This error also is same when I run > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > > these functions. it could work well. It is same for both the latese and > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > something wrong with my data? Would anybody who knows can help me? > > That will be really appreciated! Thanks in advance! > > Jing > > > > I have append spike and LFP into data. The folloing is the script and > error > > information. > > cfg=[]; > > cfg.timwin = [-0.01 0.01]; > > cfg.spikechannel =data.label{1}; > > cfg.channel = data.label{2}; > > cfg.keeptrials ='yes'; > > cfg.feedback='yes'; > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > Error using ft_getopt > > the first input should contain key-value pairs > > Error in ft_checkconfig (line 83) > > renamed = ft_getopt(varargin, 'renamed'); > > Error in ft_spiketriggeredaverage (line 51) > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > For ft_spikertriggerespectrum, I silent the line like this, the script > can > > work well. > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > % 'outputfile'); % see > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > For ft_spiketriggeredaverage, the script can work when I silent these > part. > > it can work well. > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', > 'no'}); > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrecravo at gmail.com Mon May 21 17:08:31 2012 From: andrecravo at gmail.com (Andre Cravo) Date: Mon, 21 May 2012 12:08:31 -0300 Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: References: <4FB8BF36.8050909@gmail.com> Message-ID: Hi Vitória, Although using random sampling is a good approach, it is not a big problem to have a different number of trials between conditions, specially in ERP studies. If you're just going to do classical analyses (mean, grand-mean and statistics in mean), it might be better just to stay with different number of trials. There has been a similar discussion in the eeglab list, which might be worth reading for those interested ( http://sccn.ucsd.edu/pipermail/eeglablist/2010/003240.html) There is also a nice essay written by Steve Luck about this, which can be found in this website : http://erpinfo.org/Members/sjluck Best, -- Andre M. Cravo Postdoctoral Researcher University of Sao Paulo-Brazil On 21 May 2012 06:19, Gio Piantoni wrote: > Hi Vitória, > > I like the intuitive appeal of your approach, in order to keep only > the "most representative" trials. However, I'd have serious concerns > that your approach might not be valid. > > If you reject only the noisiest trials from condition A, you're > applying a sort of extra preprocessing step to your data and this > makes the comparison between conditions A and B not very meaningful. > You cannot unequivocally attribute the difference between A and B to a > real difference between experimental conditions or to the extra > preprocessing step. > More critically, if you only reject noisy trials in condition A, > you'll systematically introduce heteroscedasticity in your data; this > is against one of the assumptions of parametric testing. > > I agree with Arjen to use random sampling of the trials of condition > A. Depending on what you want to do next, you can even get standard > errors from this randomization, similarly to the bootstrap approach. I > find this a very elegant way to deal with very unequal numbers of > trials. > > Hope this helps, > > Best, > > Gio > > -- > Giovanni Piantoni, MSc > Dept. Sleep & Cognition > Netherlands Institute for Neuroscience > Meibergdreef 47 > 1105 BA Amsterdam (NL) > > +31 20 5665492 > gio at gpiantoni.com > www.gpiantoni.com > > > On Sun, May 20, 2012 at 11:53 AM, Vitória Magalhães Piai > wrote: > > Hi everyone, > > > > I'm working on a dataset (ERPs, but this is not that relevant for the > > question, I believe) for which one condition elicited more errors than > the > > other. > > > > I'd like to have both conditions with the same number of trials in the > > analyses. > > Ideally, I'd throw away the noisiest trials from one condition, instead > of > > just start throwing away trials at random. > > > > I was thinking of using z-scores for that but I was wondering if any of > you > > has already done this before and how. What would be the best way to go? > > Take the mean amplitude across all trials (collapsed over condition or > not?) > > and calculate the z-score for each trial individually? Then take out the > one > > with the largest scores? How does this approach sound? > > Does FT keep information about the variance for each trial somewhere in > the > > output of an artefact rejection function? Or would I have to compute that > > myself? > > > > I'd appreciate any suggestions or feedback. > > > > Cheers, Vitória > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.taubert at uk-koeln.de Wed May 23 15:46:49 2012 From: max.taubert at uk-koeln.de (Taubert, Max) Date: Wed, 23 May 2012 15:46:49 +0200 (CEST) Subject: [FieldTrip] Dipole time course Message-ID: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> Hi, I'd like to use the leadfield from the ft_compute_leadfield function to compute the time course of two dipoles, given their location and orientation. So I searched on the mailing list and found a thread from Apr-1 2011 (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-April/003690.html) with a nice explanation. By using this approach it is not very difficult to obtain the waveform of a single dipole, but in my case there are TWO dipoles. This works when assuming a single dipole: dip.pos = [0 0.5 0]; dip.ori = [1 0 0]; lf = ft_compute_leadfield(dip.pos,elec,vol); li = pinv(lf); ori = dip.mom; ori = repmat(ori,length(li),1)'; w = dot(li,ori); waveform = dot(D.Data,repmat(w,size(D.Data,2),1)'); Is there any way to make this work with a two-dipole-model, so I get the waveforms of both of them? Thanks in advance Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From rapela at ucsd.edu Thu May 24 05:03:52 2012 From: rapela at ucsd.edu (Joaquin Rapela) Date: Wed, 23 May 2012 20:03:52 -0700 Subject: [FieldTrip] Postdoc, motor control, Buenos Aires (Argentina) Message-ID: <20120524030352.GA25028@sccn.ucsd.edu> Prof. Della-Maggiore, in the lively city of Buenos Aires, Argentina, is looking for a postdoctoral scholar. Please contact her directly (vdellamaggiore at fmed.uba.ar) if interested. Cordially, Joaquin The Physiology of Action Lab (www.physiologyofactionlab.info) is looking for a candidate to fill a postdoctoral position in the Department of Physiology of the University of Buenos Aires. The Laboratory focuses on Human Behavioral Neuroscience, particularly in the area of motor control. We use Transcranial Magnetic Stimulation, Magnetic Resonance Imaging, EEG and psychophysics to study the neural mechanisms at the basis of different aspects of control motor. These include motor resonance and action understanding during action observation, online motor control and motor learning. Plastic changes induced by learning and stroke are also main interests of the lab. We are looking for a Ph.D with a background in motor control and, preferably, with experience in Magnetic Resonance imaging. Candidates with knowledge of Matlab would have priority. The postdoc is funded by a fellowship from the National Agency for the Promotion of Science and Technology (Argentina). Interested candidates could contact Dr. Valeria Della Maggiore at vdellamaggiore at fmed.uba.ar with a CV, a letter of interest and one or two references (email). Many thanks -- Valeria Della-Maggiore, Ph. D Department of Physiology, School of Medicine University of Buenos Aires Paraguay 2155, Capital Federal Buenos Aires, C1121ABG Argentina phone 54 11 5 950 9500 (2132) http://www.physiologyofactionlab.info ------------------------------------------------------------ being wild and disciplined at the same time.... From t.marshall at fcdonders.ru.nl Thu May 24 16:18:38 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Thu, 24 May 2012 16:18:38 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... Message-ID: <4FBE433E.8050804@fcdonders.ru.nl> Hi 'trippers... So I'm having some trouble with the following pipeline: Import and filter continuous data using ft_preprocessing Create trial definition using ft_definetrial Apply trial definition to imported, filtered data using ft_redefinetrial (in case it helps, full code is below) When I call ft_redefinetrial, it fails with:- *??? Error using ==> ft_checkdata at 307 This function requires raw data as input. Error in ==> ft_redefinetrial at 103 data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* However, when I check my data myself using ft_checkdata... *ft_checkdata(data,'datatype','raw','feedback','yes')* ...the feedback it gives me is... *the input is raw data with 2 channels and 1 trials* ...which is exactly what I'd expect. (There are only two channels because I am just looking at my heog and veog data). It seems that my zenlike data are both raw and not raw, depending on whether ft_checkdata is called within ft_redefinetrial or by me. Any ideas why it could be failing in the former case? Best, Tom PS - full code here:- * % import eog data veog_chan='UADC001'; heog_chan='UADC002'; cfg = []; cfg.dataset = full_file; cfg.channel = {heog_chan, veog_chan}; cfg.continuous = 'yes'; data = ft_preprocessing(cfg); % define trials cfg = []; cfg.dataset = meg_file; cfg.trialdef.prestim = -0.1; % ie 100ms after stim cfg.trialdef.poststim = 5; % in seconds cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); cfg.trialfun = 'trialfun_find_eog'; cfg = ft_definetrial(cfg); % apply trial def to continuous data data=ft_redefinetrial(data,cfg);* -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Thu May 24 17:07:13 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Thu, 24 May 2012 17:07:13 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... In-Reply-To: <4FBE433E.8050804@fcdonders.ru.nl> References: <4FBE433E.8050804@fcdonders.ru.nl> Message-ID: <4FBE4EA1.3000506@fcdonders.ru.nl> Rats, I've seen it :( Sorry to bother you guys... should have checked more thoroughly before posting to the mailing list! *redface* Best, Tom On 5/24/2012 4:18 PM, Tom Marshall wrote: > Hi 'trippers... > > So I'm having some trouble with the following pipeline: > > Import and filter continuous data using ft_preprocessing > Create trial definition using ft_definetrial > Apply trial definition to imported, filtered data using ft_redefinetrial > (in case it helps, full code is below) > > When I call ft_redefinetrial, it fails with:- > *??? Error using ==> ft_checkdata at 307 > This function requires raw data as input. > > Error in ==> ft_redefinetrial at 103 > data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* > > However, when I check my data myself using ft_checkdata... > *ft_checkdata(data,'datatype','raw','feedback','yes')* > ...the feedback it gives me is... > *the input is raw data with 2 channels and 1 trials* > ...which is exactly what I'd expect. (There are only two channels > because I am just looking at my heog and veog data). > > It seems that my zenlike data are both raw and not raw, depending on > whether ft_checkdata is called within ft_redefinetrial or by me. Any > ideas why it could be failing in the former case? > > Best, > Tom > > PS - full code here:- > * > % import eog data > > veog_chan='UADC001'; > heog_chan='UADC002'; > > cfg = []; > cfg.dataset = full_file; > cfg.channel = {heog_chan, veog_chan}; > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > % define trials > > cfg = []; > cfg.dataset = meg_file; > cfg.trialdef.prestim = -0.1; % ie 100ms after stim > cfg.trialdef.poststim = 5; % in seconds > cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); > > cfg.trialfun = 'trialfun_find_eog'; > > cfg = ft_definetrial(cfg); > > % apply trial def to continuous data > > data=ft_redefinetrial(data,cfg);* > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email:t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Thu May 24 17:14:26 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Thu, 24 May 2012 17:14:26 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... In-Reply-To: <4FBE433E.8050804@fcdonders.ru.nl> References: <4FBE433E.8050804@fcdonders.ru.nl> Message-ID: Hey Tom, It seems like you accidentally switched input arguments in your call to redefine_trial: * data=ft_redefinetrial(data,cfg);* This should read: *data=ft_redefinetrial(cfg,data);* Cheers, Roemer On Thu, May 24, 2012 at 4:18 PM, Tom Marshall wrote: > Hi 'trippers... > > So I'm having some trouble with the following pipeline: > > Import and filter continuous data using ft_preprocessing > Create trial definition using ft_definetrial > Apply trial definition to imported, filtered data using ft_redefinetrial > (in case it helps, full code is below) > > When I call ft_redefinetrial, it fails with:- > *??? Error using ==> ft_checkdata at 307 > This function requires raw data as input. > > Error in ==> ft_redefinetrial at 103 > data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* > > However, when I check my data myself using ft_checkdata... > *ft_checkdata(data,'datatype','raw','feedback','yes')* > ...the feedback it gives me is... > *the input is raw data with 2 channels and 1 trials* > ...which is exactly what I'd expect. (There are only two channels because > I am just looking at my heog and veog data). > > It seems that my zenlike data are both raw and not raw, depending on > whether ft_checkdata is called within ft_redefinetrial or by me. Any ideas > why it could be failing in the former case? > > Best, > Tom > > PS - full code here:- > * > % import eog data > > veog_chan='UADC001'; > heog_chan='UADC002'; > > cfg = []; > cfg.dataset = full_file; > cfg.channel = {heog_chan, veog_chan}; > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > % define trials > > cfg = []; > cfg.dataset = meg_file; > cfg.trialdef.prestim = -0.1; % ie 100ms after stim > cfg.trialdef.poststim = 5; % in seconds > cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); > > cfg.trialfun = 'trialfun_find_eog'; > > cfg = ft_definetrial(cfg); > > % apply trial def to continuous data > > data=ft_redefinetrial(data,cfg);* > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Fri May 25 10:12:58 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Fri, 25 May 2012 10:12:58 +0200 Subject: [FieldTrip] topoplot of vector Message-ID: Dear Fieldtrip-User, I am trying to plot some results ( one value per channel) using a topoplot function. Since I am working with ECoG data, I specified my own layout with ft_prepare_layout. Plotting my results obtain from ft_freqanalysis using ft_topoplotER works just fine. Now 2 Questions: 1) Is there a way to plot data, using ft_topoplotER , which is not obtain from freqanalysis or timelocked analysis, but which is only a vector. 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg contained the layout. However I get the following error message. It might be that some points of my mask fall outside the outline, which does not cause a problem using ft_topoplotER. Undefined function 'inside_contour' for input arguments of type 'double'. Error in topoplot (line 488) maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; I would very much appreciate any help. Best, Fanny From a.stolk at fcdonders.ru.nl Fri May 25 11:00:59 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 May 2012 11:00:59 +0200 (CEST) Subject: [FieldTrip] topoplot of vector In-Reply-To: Message-ID: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Hi Fanny, If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. For example; data.powspctrm = your_vector_here; % [N x 1] data.freq = 1; data.label = your_label_here; % {1 x N} data.dimord = 'chan_freq'; ft_topoplotER(cfg,data) The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. Hope this helps, Arjen ----- Oorspronkelijk bericht ----- > Van: "Fanny Quandt" > Aan: fieldtrip at donders.ru.nl > Verzonden: Vrijdag 25 mei 2012 10:12:58 > Onderwerp: [FieldTrip] topoplot of vector > Dear Fieldtrip-User, > > I am trying to plot some results ( one value per channel) using a > topoplot function. > Since I am working with ECoG data, I specified my own layout with > ft_prepare_layout. Plotting my results obtain from ft_freqanalysis > using ft_topoplotER works just fine. > > Now 2 Questions: > > 1) Is there a way to plot data, using ft_topoplotER , which is not > obtain from freqanalysis or timelocked analysis, but which is only a > vector. > > 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg > contained the layout. However I get the following error message. It > might be that some points of my mask fall outside the outline, which > does not cause a problem using ft_topoplotER. > > Undefined function 'inside_contour' for input arguments of type > 'double'. > > Error in topoplot (line 488) > maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; > > > I would very much appreciate any help. > Best, > Fanny > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From fannyquandt at gmail.com Fri May 25 11:08:57 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Fri, 25 May 2012 11:08:57 +0200 Subject: [FieldTrip] topoplot of vector In-Reply-To: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> References: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Arjen, thank you very much! It works perfectly and seems way easier than to go into ft_plot_topo ( which I also tried earlier :)). I appreciate your help, Fanny Am 25.05.2012 um 11:00 schrieb Stolk, A.: > Hi Fanny, > > If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. > > For example; > data.powspctrm = your_vector_here; % [N x 1] > data.freq = 1; > data.label = your_label_here; % {1 x N} > data.dimord = 'chan_freq'; > ft_topoplotER(cfg,data) > > The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. > > Hope this helps, > Arjen > > > ----- Oorspronkelijk bericht ----- >> Van: "Fanny Quandt" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Vrijdag 25 mei 2012 10:12:58 >> Onderwerp: [FieldTrip] topoplot of vector >> Dear Fieldtrip-User, >> >> I am trying to plot some results ( one value per channel) using a >> topoplot function. >> Since I am working with ECoG data, I specified my own layout with >> ft_prepare_layout. Plotting my results obtain from ft_freqanalysis >> using ft_topoplotER works just fine. >> >> Now 2 Questions: >> >> 1) Is there a way to plot data, using ft_topoplotER , which is not >> obtain from freqanalysis or timelocked analysis, but which is only a >> vector. >> >> 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg >> contained the layout. However I get the following error message. It >> might be that some points of my mask fall outside the outline, which >> does not cause a problem using ft_topoplotER. >> >> Undefined function 'inside_contour' for input arguments of type >> 'double'. >> >> Error in topoplot (line 488) >> maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; >> >> >> I would very much appreciate any help. >> Best, >> Fanny >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Fri May 25 11:16:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 25 May 2012 11:16:34 +0200 Subject: [FieldTrip] topoplot of vector In-Reply-To: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> References: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Fanny, Arjen, I would like to add something to that. Like Arjen said, first make a ft-like structure, but don't 'fake it' by naming your datafield e.g. 'powspctrm', but name it appropriately and use the cfg.parameter field in the plotting functions to specify the field you want to plot. In similar cases what I always do is to add extra field to my main data structure. This could be, e.g. different statistical maps, different ways of normalizing etc: data.dimord = 'chan_freq' data.powspctrm = [N x 1]; data.powspctrmLOG = [N x 1]; data.stat_difference = [N x 1]; data.conditionA_minus_B = [N x 1]; etc. This is memory efficient, makes it easy to keep things together (the repetition/trial dimension with the trialinfo, for instance), don't mix up the field and to them without messing around with temporary data structures. Note that many functions that work on datastructures use the cfg.parameter field. For instance averaging, baselinecorrection, grandaverage etc. all should work in this way. cheers, Stephen On 25 May 2012 11:00, Stolk, A. wrote: > Hi Fanny, > > If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. > > For example; > data.powspctrm = your_vector_here; % [N x 1] > data.freq = 1; > data.label = your_label_here; % {1 x N} > data.dimord = 'chan_freq'; > ft_topoplotER(cfg,data) > > The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. > > Hope this helps, > Arjen > > > ----- Oorspronkelijk bericht ----- >> Van: "Fanny Quandt" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Vrijdag 25 mei 2012 10:12:58 >> Onderwerp: [FieldTrip] topoplot of vector >> Dear Fieldtrip-User, >> >> I am trying to plot some results ( one value per channel) using a >> topoplot function. >> Since I am working with ECoG data, I specified my own layout with >> ft_prepare_layout. Plotting my results obtain from ft_freqanalysis >> using ft_topoplotER works just fine. >> >> Now 2 Questions: >> >> 1) Is there a way to plot data, using ft_topoplotER , which is not >> obtain from freqanalysis or timelocked analysis, but which is only a >> vector. >> >> 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg >> contained the layout. However I get the following error message. It >> might be that some points of my mask fall outside the outline, which >> does not cause a problem using ft_topoplotER. >> >> Undefined function 'inside_contour' for input arguments of type >> 'double'. >> >> Error in topoplot (line 488) >> maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; >> >> >> I would very much appreciate any help. >> Best, >> Fanny >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From v.poghosyan at humanbraindynamics.com Fri May 25 11:37:08 2012 From: v.poghosyan at humanbraindynamics.com (Vahe Poghosyan) Date: Fri, 25 May 2012 12:37:08 +0300 Subject: [FieldTrip] MEG forward problem Message-ID: <03e001cd3a59$f61cb7f0$e25627d0$@poghosyan@humanbraindynamics.com> Dear fieldtrip developers, In MEG forward problem computations (in ft_compute_leadfield or in its subfunctions), do you numerically integrate the MEG signal over the coil area or a single point is used for each coil? I found some functions in the fieldtrip's SVN (trunc) version (on googlecode), which are not available in the daily releases on the ftp server (e.g. ft_surfacecheck). Is it safe to use those functions (I understand that the toolbox is released under GPL)? Thanks in advance Vahe Poghosyan, Ph.D. Senior Scientist Lab. for Human Brain Dynamics AAI Scientific Cultural Services Ltd. http://aaiscs.com/LHBD/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri May 25 15:40:18 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 25 May 2012 07:40:18 -0600 Subject: [FieldTrip] Dipole time course In-Reply-To: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> References: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> Message-ID: <8C72D77A-A56F-438C-8077-7EB47EFC2E8A@ucdenver.edu> Max, There is no reason why you can't simply use the same strategy for both dipoles. Each will produce its own leadfields, and then your inner product of the pinv'd leadfields and the waveforms will give you two separate waveforms. Note that by using this pseudoinverse of the leadfield approach, depending on how far apart the sources are, you may have substantial correlation between the two waveforms that is an artifact of their leadfield correlation. This shouldn't be a big problem for things like auditory sources for the left and right hemisphere, or anterior and posterior sources within a hemisphere, but once you start getting sources closer together, you might consider an alternative approach. You can try using a beamformer to suppress correlated source activity, but you could also just adopt a beamformer-like set of weights for your dipole model instead. For that, you would ideally compute a covariance matrix on the epoched data, prior to averaging. Then, you can extend the logic of the pseudoinverse method by multiplication with inverse of the covariance matrix. You can see this in the fieldtrip functions that do beamformers, such as beamformer_lcmv. Around line 255, you can see: filt = pinv(lf' * invCy * lf) * lf' * invCy; where lf = leadfield and invCy = inverse of covariance matrix and filt = the resulting weight vector for your sensors for that particular source location. You can then do: waveform = filt * data to get your timecourse. In the previous example, I used the dot function to remind myself it was an inner product, but it isn't strictly necessary in matlab. Don On May 23, 2012, at 7:46 AM, Taubert, Max wrote: Hi, I'd like to use the leadfield from the ft_compute_leadfield function to compute the time course of two dipoles, given their location and orientation. So I searched on the mailing list and found a thread from Apr-1 2011 (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-April/003690.html) with a nice explanation. By using this approach it is not very difficult to obtain the waveform of a single dipole, but in my case there are TWO dipoles. This works when assuming a single dipole: dip.pos = [0 0.5 0]; dip.ori = [1 0 0]; lf = ft_compute_leadfield(dip.pos,elec,vol); li = pinv(lf); ori = dip.mom; ori = repmat(ori,length(li),1)'; w = dot(li,ori); waveform = dot(D.Data,repmat(w,size(D.Data,2),1)'); Is there any way to make this work with a two-dipole-model, so I get the waveforms of both of them? Thanks in advance Max _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.buiatti at gmail.com Fri May 25 15:58:32 2012 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Fri, 25 May 2012 15:58:32 +0200 Subject: [FieldTrip] interactions between two factors Message-ID: Dear FieldTrippers, I am analysing an EEG study with 2x4 factors: one varies between 4 parametrically varying levels (1 to 4), the second between two levels. I have three questions concerning the use of Fieldtrip cluster-based non parametric statistical analysis in this case: 1) How to compute the interaction between the two factors. Let's start from the simplest case of a 2x2 design, factors varying between values A1 and A2 for the first factor, B1 and B2 for the second. Please tell me if it is correct to compute the interaction by: - computing the difference diffA=ERP(A1)-ERP(A2) separately in condition B1 and B2, for every subject - performing a within-subjects statistical analysis between diffA in condition B1 and diffA in condition B2 (function statfun_depsamplesT.m). 2) Now consider that factor A varies parametrically between values 1 to 4. For the main effect of this factor, I have used the Fieldtrip function statfun_depsamplesregrT.m and I'm satisfied with it. Is it correct to compute the interaction by - computing the regression regrA=regression(ERP(A1),ERP(A2),ERP(A3),ERP(A4)) (computed as inside function statfun_depsamplesregrT.m) separately in condition B1 and B2, for every subject - performing a within-subjects statistical analysis between regrA in condition B1 and regrA in condition B2 (function statfun_depsamplesT.m)? 3) Since BEFORE looking at the data (this is to prevent Eric's contestation...) I expect a dipolar topography for the regression (data are in average reference), I would like to combine into a joint cluster negative and positive clusters. I have tried by changing statfun_depsamplesregrT.m by just taking the absolute value of the regression, but I get weird results (a huge, non significant cluster). Is it possible that since values are now all positive, I should use a different statistical test at the single bin level? Any other suggestions? Thanks in advance for your help, Marco -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191  FRANCE Ph:  +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From arno at cerco.ups-tlse.fr Sat May 26 02:19:55 2012 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Fri, 25 May 2012 17:19:55 -0700 Subject: [FieldTrip] Potential function conflicts in Fieldtrip Message-ID: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Dear all, I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. Thanks, Arno Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m -------------- next part -------------- A non-text attachment was scrubbed... Name: find_function_conflict.m Type: application/octet-stream Size: 1219 bytes Desc: not available URL: -------------- next part -------------- -- Arnaud Delorme, PhD Centre de Recherche Cerveau et Cognition - UMR 5549 Pavillon Baudot, Hopital Purpan, BP 25202 31052 Toulouse Cedex, France From caspervanheck at gmail.com Tue May 29 09:44:24 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Tue, 29 May 2012 09:44:24 +0200 Subject: [FieldTrip] Coherency parameters Message-ID: Dear Fieldtrip users, I'm currently working on coherency between EEG and EMG, so far without any significant problems. However, I'd like to get statistical significancy (in the hope that's possible) tested on my coherency-data. In the Fieldtrip reference there's a mention of something resembling statistics in combination with coherency (in the help of the 'STATISTICS_MONTECARLO' function), but I've not found how to call this function. My question is: is there a standard method to perform statistical analysis on coherency data? Sincerely, Casper van Heck (Intern) Clinical Neurophysiology, UMC St. Radboud, Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 29 10:28:42 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 29 May 2012 10:28:42 +0200 Subject: [FieldTrip] Coherency parameters In-Reply-To: References: Message-ID: Hi Casper, The approach I would take depends on your question. If you want to test for coherence differences within a subject, your unit of observation is a trial, so the permutation test shuffles the trials between the experimental condition. In this instance you can use statfun_indepsamplesZcoh (with fourier-data in the input (i.e. cfg.output = 'fourier' when calling ft_freqanalysis). If you want to test across subjects, your unit of observation is a subject, so there you can compute the coherence per subject and condition and then do the statistical test by shuffling the conditions. This has for example been done in the following paper: J Neuroscience 2011, 31(18): 6750-6758; doi: 10.1523/​JNEUROSCI.4882-10.2011 Best Jan-Mathijs On May 29, 2012, at 9:44 AM, Casper van Heck wrote: > Dear Fieldtrip users, > > I'm currently working on coherency between EEG and EMG, so far without any significant problems. However, I'd like to get statistical significancy (in the hope that's possible) tested on my coherency-data. > In the Fieldtrip reference there's a mention of something resembling statistics in combination with coherency (in the help of the 'STATISTICS_MONTECARLO' function), but I've not found how to call this function. > > My question is: is there a standard method to perform statistical analysis on coherency data? > > Sincerely, > > Casper van Heck (Intern) > Clinical Neurophysiology, UMC St. Radboud, Nijmegen > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue May 29 16:36:49 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:36:49 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> Dear Jing, The missing ft_write_spike function has been re-added to the release version as of last week, it was also reported missing by someone else in a personal mail by me. The specest_nanfft function should be located in the fieldtrip/private directory, where ft_spiketriggeredspectrum should be able to find it. best regards, Robert On 21 May 2012, at 15:08, Jing Wang wrote: > Hello Eelke, > > Thank you very much for your answers. I will file this bug in Bugzilla tracking system. > > I also found that there are some functions which are used in the ft_spike* function are not in the Fieldtrip. One is specest_nanfft.m which is used in ft_spiketriggeredspectrum.m and another is ft_write_spike which is used in ft_spikedetection. We could not find the two functions in Fieldtrip to run these main functions about spike analysis. > > Whether it has been changed names or put somewhere else? Would you please give me some idea about that? > Thanks again! > > Best Regards > > Jing > > > > 2012/5/21 Eelke Spaak > Dear Jing Wang, > > This is a bug in the functions you mention. ft_checkconfig should be > called like this: > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > so with the forbidden options grouped in a cell array, rather than as > it was done in the code snippet you posted. There also seem to be a > few other minor bugs in the ft_getopt/checkopt calls. > > Could you file a bug on this on our Bugzilla tracking system? > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > Best, > Eelke > > On 21 May 2012 13:44, Jing Wang wrote: > > Dear Fieldtrip developers and users, > > > > I have found same error when I using ft_spiketriggeredaverage and > > ft_spiketriggeredspectrum.m. > > After I run the following script, an error appeared at line 51 > > cfg=ft_checkconfig. This error also is same when I run > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > > these functions. it could work well. It is same for both the latese and > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > something wrong with my data? Would anybody who knows can help me? > > That will be really appreciated! Thanks in advance! > > Jing > > > > I have append spike and LFP into data. The folloing is the script and error > > information. > > cfg=[]; > > cfg.timwin = [-0.01 0.01]; > > cfg.spikechannel =data.label{1}; > > cfg.channel = data.label{2}; > > cfg.keeptrials ='yes'; > > cfg.feedback='yes'; > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > Error using ft_getopt > > the first input should contain key-value pairs > > Error in ft_checkconfig (line 83) > > renamed = ft_getopt(varargin, 'renamed'); > > Error in ft_spiketriggeredaverage (line 51) > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > For ft_spikertriggerespectrum, I silent the line like this, the script can > > work well. > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > % 'outputfile'); % see > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > For ft_spiketriggeredaverage, the script can work when I silent these part. > > it can work well. > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:52:00 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:52:00 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <4805EB64-6057-43F1-93DE-2E81037CC6E6@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:55:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:55:36 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <872DD16A-9C02-4EA7-B8A3-EAB4B490E6A1@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:58:41 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:58:41 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <62459FD6-3D40-47F9-A06B-E0F5D290AD2E@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Tue May 29 20:09:29 2012 From: wljj09 at gmail.com (Jing Wang) Date: Tue, 29 May 2012 20:09:29 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> References: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> Message-ID: Dear Robert, Thank you so much for letting me know this. It is really very helpful. Thanks a lot. I will work on that! Best wishes Jing 2012/5/29 Robert Oostenveld > Dear Jing, > > The missing ft_write_spike function has been re-added to the release > version as of last week, it was also reported missing by someone else in a > personal mail by me. > > The specest_nanfft function should be located in the fieldtrip/private > directory, where ft_spiketriggeredspectrum should be able to find it. > > best regards, > Robert > > > > > On 21 May 2012, at 15:08, Jing Wang wrote: > > > Hello Eelke, > > > > Thank you very much for your answers. I will file this bug in Bugzilla > tracking system. > > > > I also found that there are some functions which are used in the > ft_spike* function are not in the Fieldtrip. One is specest_nanfft.m which > is used in ft_spiketriggeredspectrum.m and another is ft_write_spike which > is used in ft_spikedetection. We could not find the two functions in > Fieldtrip to run these main functions about spike analysis. > > > > Whether it has been changed names or put somewhere else? Would you > please give me some idea about that? > > Thanks again! > > > > Best Regards > > > > Jing > > > > > > > > 2012/5/21 Eelke Spaak > > Dear Jing Wang, > > > > This is a bug in the functions you mention. ft_checkconfig should be > > called like this: > > > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > > > so with the forbidden options grouped in a cell array, rather than as > > it was done in the code snippet you posted. There also seem to be a > > few other minor bugs in the ft_getopt/checkopt calls. > > > > Could you file a bug on this on our Bugzilla tracking system? > > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > > > Best, > > Eelke > > > > On 21 May 2012 13:44, Jing Wang wrote: > > > Dear Fieldtrip developers and users, > > > > > > I have found same error when I using ft_spiketriggeredaverage and > > > ft_spiketriggeredspectrum.m. > > > After I run the following script, an error appeared at line 51 > > > cfg=ft_checkconfig. This error also is same when I run > > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part > of > > > these functions. it could work well. It is same for both the latese and > > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > > something wrong with my data? Would anybody who knows can help me? > > > That will be really appreciated! Thanks in advance! > > > Jing > > > > > > I have append spike and LFP into data. The folloing is the script and > error > > > information. > > > cfg=[]; > > > cfg.timwin = [-0.01 0.01]; > > > cfg.spikechannel =data.label{1}; > > > cfg.channel = data.label{2}; > > > cfg.keeptrials ='yes'; > > > cfg.feedback='yes'; > > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > > > Error using ft_getopt > > > the first input should contain key-value pairs > > > Error in ft_checkconfig (line 83) > > > renamed = ft_getopt(varargin, 'renamed'); > > > Error in ft_spiketriggeredaverage (line 51) > > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > > > For ft_spikertriggerespectrum, I silent the line like this, the script > can > > > work well. > > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > % 'outputfile'); % see > > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > > > For ft_spiketriggeredaverage, the script can work when I silent these > part. > > > it can work well. > > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', > 'no'}); > > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From recasensmarc at gmail.com Wed May 30 11:47:51 2012 From: recasensmarc at gmail.com (Marc Recasens) Date: Wed, 30 May 2012 11:47:51 +0200 Subject: [FieldTrip] megrealign across runs/sessions Message-ID: Hi everyone, I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, However, in the literature this is mainly used to average data across subjects rather than across runs. I did a test using the following code: *cfg= [];* *cfg.template{1} = run1.grad;* *cfg.template{2} = run2.grad;* *cfg.template{3} = run3.grad;* * * *cfg.vol = vol; % single shell headmodel computed from individual MRI* *cfg.inwardshift = 3;* *cfg.verify = 'yes';* *cfg.feedback = 'yes';* *[interp1] = ft_megrealign(cfg, run1); % trial-based data* *[interp1] = ft_megrealign(cfg, run1);* [interp1] = ft_megrealign(cfg, run1); acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) *original -> template RV 2.22 %* *original -> original RV 2.11 %* *original -> template -> original RV 2.14 %* I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) Can affect the accuracy of the subsequent source reconstruction? -- Marc Recasens PhD Student Universitat de Barcelona Tel.: +34 639 24 15 98 -------------- next part -------------- An HTML attachment was scrubbed... URL: From maess at cbs.mpg.de Wed May 30 17:54:00 2012 From: maess at cbs.mpg.de (Burkhard Maess) Date: Wed, 30 May 2012 17:54:00 +0200 (CEST) Subject: [FieldTrip] megrealign across runs/sessions In-Reply-To: Message-ID: <305149289.6076.1338393240619.JavaMail.root@zimbra> Hi Marc, this comment is not related to your code example below, because I did not understand it. The Knösche (2002) paper suggests to use a minimum norm solution as a plausible, but temporary model to carry the information from the original sensor position to the new positions. If you use a plausible spatial arrangement of the MEG sensors and the source space together with a low regularization you might easily achieve even smaller RV values than 2% for the transformation original-to-original. For all other transformations, you need to keep in mind, that you always extrapolate the magnetic field distribution from the position & orientation of your measurement towards the position & orientation you finally wish to have. Nevertheless, it works as long as the differences in position & orientation are not too big (see the Knösche paper for some tests). The critical examples are those in which you try to get closer to the sensor via the head position correction. In these cases, you actually ask for an improvement of your signals which were unfortunately measured suboptimally. Due to the larger distance between sensors and brain, your data most likely suffers from a complete loss of impact of some of the more distant sources - it is therefore impossible to get this information back by whatsoever mathematical method. We have used this method on a regular basis from about 2000 on until 2006 to correct for different head positions between measurement blocks whenever the signal-to-noise ratio in single blocks was too low to get stable inverse solutions from the single block data already. In the latter case, there is no need to use this method as the computation of the inverse solution for each single block is an simpler, alternative option. best wishes, Burkhard -- Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- From: "Marc Recasens" To: fieldtrip at science.ru.nl Sent: Wednesday, 30 May, 2012 11:47:51 AM Subject: [FieldTrip] megrealign across runs/sessions Hi everyone, I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, However, in the literature this is mainly used to average data across subjects rather than across runs. I did a test using the following code: cfg= []; cfg.template{1} = run1.grad; cfg.template{2} = run2.grad; cfg.template{3} = run3.grad; cfg.vol = vol; % single shell headmodel computed from individual MRI cfg.inwardshift = 3; cfg.verify = 'yes'; cfg.feedback = 'yes'; [interp1] = ft_megrealign(cfg, run1); % trial-based data [interp1] = ft_megrealign(cfg, run1); [interp1] = ft_megrealign(cfg, run1); acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) original -> template RV 2.22 % original -> original RV 2.11 % original -> template -> original RV 2.14 % I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) Can affect the accuracy of the subsequent source reconstruction? -- Marc Recasens PhD Student Universitat de Barcelona Tel.: +34 639 24 15 98 _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Thu May 31 11:48:41 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 11:48:41 +0200 Subject: [FieldTrip] change radiological to neurological convention Message-ID: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Dear all, Unfortunately, the result of my source analysis seems to be flipped when calling ft_sourceplot. The transformation matrix of the anatomy seems to be in radiological convention (left is right). I have two questions on that: 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? Any help is very much appreciated. Best, Kathrin -------------- next part -------------- -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From jan.schoffelen at donders.ru.nl Thu May 31 12:21:11 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 31 May 2012 12:21:11 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: Hi Kathrin, > 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? Yes. FieldTrip does not have any of the 'conventions'. It just takes the data as it is represented in the mri-file (i.e. the block of voxels is oriented in a certain way, and FT just plots along the 3 cardinal voxel axes). For example, in DICOM images the voxel axes are often left-handed, leading to visualization according the 'radiological' convention. > 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? If the coordinate system in which the data are defined is right-handed, you can use ft_volumereslice to get the anatomical image to be visualized in neurological convention. This function only works on anatomical data, so you should first reslice the anatomical data and only then interpolate the functional data onto the resliced anatomy. Best, Jan-Mathijs > Any help is very much appreciated. > > Best, > Kathrin > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.mohr at psy.gla.ac.uk Thu May 31 12:43:45 2012 From: s.mohr at psy.gla.ac.uk (sibylle) Date: Thu, 31 May 2012 11:43:45 +0100 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> Hey Kathrin, which SPM version are you using? As far as I know spm2 uses neurological convention (right is right), while spm8 uses radiological convention (right is left). So using spm8, the slice and ortho plots will 'seem' flipped, but you can check the Talairach coordinates to be sure. Whereas in the surface plots, the right of the brain will appear on R side of image (maybe you could revert back to spm2 using T1.mnc template mri for sourceinterpolate..?). Hope that helps! Sibylle On 31 May 2012, at 10:48, Kathrin Müsch wrote: > Dear all, > > Unfortunately, the result of my source analysis seems to be flipped > when calling ft_sourceplot. The transformation matrix of the anatomy > seems to be in radiological convention (left is right). I have two > questions on that: > > 1) Is it correct that the functional data is flipped when the > anatomy is in radiological convention (left is right)? > > 2 ) How can I change the transformation matrix of my anatomy so that > my results are plotted in neurological convention (i.e. left is > left) - with ft_volumenormalise or ft_volumerealign? > > Any help is very much appreciated. > > Best, > Kathrin > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des > öffentlichen Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des > Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. > Uwe Koch-Gromus > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From k.muesch at uke.uni-hamburg.de Thu May 31 13:18:18 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 13:18:18 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <6518E3D3-B254-40FE-AB9A-F056C85F3A2B@uke.uni-hamburg.de> Thanks, Jan-Mathijs! Am 31.05.2012 um 12:21 schrieb jan-mathijs schoffelen: > Hi Kathrin, > >> 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? > > Yes. FieldTrip does not have any of the 'conventions'. It just takes the data as it is represented in the mri-file (i.e. the block of voxels is oriented in a certain way, and FT just plots along the 3 cardinal voxel axes). For example, in DICOM images the voxel axes are often left-handed, leading to visualization according the 'radiological' convention. > > >> 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? > > If the coordinate system in which the data are defined is right-handed, you can use ft_volumereslice to get the anatomical image to be visualized in neurological convention. > This function only works on anatomical data, so you should first reslice the anatomical data and only then interpolate the functional data onto the resliced anatomy. > > Best, > > Jan-Mathijs > > >> Any help is very much appreciated. >> >> Best, >> Kathrin >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu May 31 13:56:40 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 31 May 2012 13:56:40 +0200 Subject: [FieldTrip] megrealign across runs/sessions In-Reply-To: References: Message-ID: <121B4C60-2EC8-4ACF-A701-55D460407DCA@donders.ru.nl> Dear Marc, In principle it is not different to realign the MEG data from three sessions if those sessions were recorded on the same subject (as in your case) or in three different subjects (or a larger number of subjest, as the more common usage scenario). The way you use the function is also correct. However, you should not interpret the residual variance as a measure of the quality of teh realignment procedure. The realignment does not know the ground truth, so cannot tell how the attempted realignment matches with the ground truth. It only expresses the difference in the data when the data is compared between original and template position (and when the realignment is repeated but then inversely). An important aspect however is that you should be careful with applying source reconstruction on the realigned data. In general I would recommend against it, especially if you are planning to apply a beamformer afterwards. The realignment works by making a crude source estimation on on a sheet that is just in the outer grey matter. That crude source estimate (which is a minimum norm estimate with a slight bit of regularization) affects the spatial correlations (i.e. between channels) in the data. Consequently, subsequent source reconstruction might not be able to pick up the spatial correlation any more and might mislocalize. Better (although not always possible) is to source reconstruct the three conditions separate and then combine them. best Robert On 30 May 2012, at 11:47, Marc Recasens wrote: > Hi everyone, > > I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. > I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, > However, in the literature this is mainly used to average data across subjects rather than across runs. > > I did a test using the following code: > cfg= []; > cfg.template{1} = run1.grad; > cfg.template{2} = run2.grad; > cfg.template{3} = run3.grad; > > cfg.vol = vol; % single shell headmodel computed from individual MRI > cfg.inwardshift = 3; > cfg.verify = 'yes'; > cfg.feedback = 'yes'; > [interp1] = ft_megrealign(cfg, run1); % trial-based data > [interp1] = ft_megrealign(cfg, run1); > [interp1] = ft_megrealign(cfg, run1); > > acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) > original -> template RV 2.22 % > original -> original RV 2.11 % > original -> template -> original RV 2.14 % > > > I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). > According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) > > Can affect the accuracy of the subsequent source reconstruction? > > > -- > Marc Recasens > PhD Student > Universitat de Barcelona > Tel.: +34 639 24 15 98 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From k.muesch at uke.uni-hamburg.de Thu May 31 14:11:06 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 14:11:06 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> Message-ID: It's working, thank you! Am 31.05.2012 um 12:43 schrieb sibylle: > Hey Kathrin, > > which SPM version are you using? > > As far as I know spm2 uses neurological convention (right is right), while spm8 uses radiological convention (right is left). > So using spm8, the slice and ortho plots will 'seem' flipped, but you can check the Talairach coordinates to be sure. > Whereas in the surface plots, the right of the brain will appear on R side of image (maybe you could revert back to spm2 using T1.mnc template mri for sourceinterpolate..?). > > Hope that helps! > > Sibylle > > > On 31 May 2012, at 10:48, Kathrin Müsch wrote: > >> Dear all, >> >> Unfortunately, the result of my source analysis seems to be flipped when calling ft_sourceplot. The transformation matrix of the anatomy seems to be in radiological convention (left is right). I have two questions on that: >> >> 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? >> >> 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? >> >> Any help is very much appreciated. >> >> Best, >> Kathrin >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From r.oostenveld at donders.ru.nl Thu May 31 14:30:52 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 31 May 2012 14:30:52 +0200 Subject: [FieldTrip] megrealign across runs/sessions Message-ID: Dear Marc, In principle it is not different to realign the MEG data from three sessions if those sessions were recorded on the same subject (as in your case) or in three different subjects (or a larger number of subjest, as the more common usage scenario). The way you use the function is also correct. However, you should not interpret the residual variance as a measure of the quality of the realignment procedure. The realignment does not know the ground truth, so cannot tell how the attempted realignment matches with the ground truth. It only expresses the difference in the data when the data is compared between original and template position (and when the realignment is repeated but then inversely). An important aspect however is that you should be careful with applying source reconstruction on the realigned data. In general I would recommend against it, especially if you are planning to apply a beamformer afterwards. The realignment works by making a crude source estimation on on a sheet that is just in the outer grey matter. That crude source estimate (which is a minimum norm estimate with a slight bit of regularization) affects the spatial correlations (i.e. between channels) in the data. Consequently, subsequent source reconstruction might not be able to pick up the spatial correlation any more and might mislocalize. Better (although not always possible) is to source reconstruct the three conditions separate and then combine them. best Robert On 30 May 2012, at 11:47, Marc Recasens wrote: > Hi everyone, > > I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. > I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, > However, in the literature this is mainly used to average data across subjects rather than across runs. > > I did a test using the following code: > cfg= []; > cfg.template{1} = run1.grad; > cfg.template{2} = run2.grad; > cfg.template{3} = run3.grad; > > cfg.vol = vol; % single shell headmodel computed from individual MRI > cfg.inwardshift = 3; > cfg.verify = 'yes'; > cfg.feedback = 'yes'; > [interp1] = ft_megrealign(cfg, run1); % trial-based data > [interp1] = ft_megrealign(cfg, run1); > [interp1] = ft_megrealign(cfg, run1); > > acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) > original -> template RV 2.22 % > original -> original RV 2.11 % > original -> template -> original RV 2.14 % > > > I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). > According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) > > Can affect the accuracy of the subsequent source reconstruction? > > > -- > Marc Recasens > PhD Student > Universitat de Barcelona > Tel.: +34 639 24 15 98 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gauthierb.ens at gmail.com Thu May 31 15:56:15 2012 From: gauthierb.ens at gmail.com (Baptiste Gauthier) Date: Thu, 31 May 2012 15:56:15 +0200 Subject: [FieldTrip] mismatch between volume conduction model and sourcespace Message-ID: Dear Fieldtrippers, I recently tried to follow the fieldtrip tutorial for source reconstruction of event-related field with MNE method ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate?s[]=grey&s[]=matter). All the steps look ok but when it comes to check the matching between volume conduction model and sourcespace, there's an inconsistency along the x-axis. What I found strange is that all parameters (size, shape, y and z- coordinates) seems ok (cf attached picture), so basically the error looks like a simple translation. Have someone ever experimented this problem or have a idea of where it comes from? Regards, Baptiste -- Baptiste Gauthier PhD student INSERM-CEA Cognitive Neuroimaging unit CEA/SAC/DSV/DRM/Neurospin center Bât 145, Point Courier 156 F-91191 Gif-sur-Yvette Cedex FRANCE -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MISMATCH.png Type: image/png Size: 134747 bytes Desc: not available URL: From t.grent-tjong at donders.ru.nl Tue May 1 09:28:54 2012 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Tue, 1 May 2012 09:28:54 +0200 Subject: [FieldTrip] problem ft_timelockanalysis after using ft_appenddata Message-ID: Hi all, I have encountered a weird problem with ft_timelockanalysis. The problem occurs only when running ft_timelockanalysis on some data from some subjects. I get the following error: averaging trial 239 of 252??? Error using ==> plus Matrix dimensions must agree. Error in ==> ft_timelockanalysis at 298 s = s + dat; % compute the sum This error was produced running ft_timelockanalysis on data that originated from two conditions (INCGR & INCGL), which were concatenated using ft_appenddata (resulting in INCGRL). So, I thought it made sense to test whether something was wrong with one of the two input datasets (likely the second one, since the error occurs while processing one of the last trials originating from the second dataset). So, I ran ft_timelockanalysis on INCGR and INCGL separately, and, believe it or not, no errors this time. But as soon as I concatenate the files again, ft_timelockanalysis reproduces the error. Anyone any idea what the problem could be? Thanks, Tineke Grent - 't Jong Radboud University Medical Centre Nijmegen Donders Institute for Brain, Cognition and Behaviour The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Tue May 1 10:09:49 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Tue, 1 May 2012 10:09:49 +0200 Subject: [FieldTrip] subplot clusterplot Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96@gmail.com> Hi, I am performing a monte-carlo cluster statistic, comparing a 200 ms activation period and a baseline of a spectrogram. I get positive and negative clusters which are significant, and would like to plot them using ft_clusterplot. However, the function gives me 7 subplot (for 7 timepoints) , all so small that one is barely able to identify the highlighted channels. Therefore, I would either like to only plot 1 big topoplot or arrange the subplots differently. Is there a way to plot only one timepoint? I would appreciate any help, Best, Fanny From r.vandermeij at donders.ru.nl Tue May 1 10:52:13 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 1 May 2012 10:52:13 +0200 Subject: [FieldTrip] error in ft_databrowser In-Reply-To: <4F9D3FD4.2050301@gmail.com> References: <4F9D3FD4.2050301@gmail.com> Message-ID: Hey Vitoria, Are you sure you are using an up to date version of FieldTrip? The error mentions a line in ft_plot_text that hasn't been there since at least October last year. Best, Roemer On Sun, Apr 29, 2012 at 3:19 PM, Vitória Magalhães Piai < vitoria.piai at gmail.com> wrote: > Hi there, > > I'm getting the following error when trying ft_databrowser on the output > of ft_componentanalysis (ft_topoplotIC on the same dataset works fine): > > ??? Error using ==> keyvalcheck at 77 > the input argument 'tag' is forbidden > > Error in ==> ft_plot_text at 44 > keyvalcheck(varargin, 'optional', {'hpos', 'vpos', 'width', 'height', > 'hlim', 'vlim', 'Color', .... > > Error in ==> ft_databrowser>redraw_cb at 1346 > ft_plot_text(labelx(laysel), labely(laysel), > opt.hdr.label(chanindx(i)), 'tag', 'timecourse', 'HorizontalAlignment', > 'right'); > > Error in ==> ft_databrowser at 548 > redraw_cb(h); > > I'm using the ft_databrowser version updated on the 25th of April. Is this > a bug? > Thank you, Vitória > > -- > ** Please consider the environment - do you really need to print? ** > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 1 11:23:06 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 1 May 2012 12:23:06 +0300 Subject: [FieldTrip] Subsampling Message-ID: Hello, Is there anything to do subsampling (ex: decreasing the samples from 2048 to128) during the preprocessing Thanks -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue May 1 11:28:59 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 1 May 2012 11:28:59 +0200 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Hi Hamza, Have a look at ft_resampledata (http://fieldtrip.fcdonders.nl/reference/ft_resampledata). Best, Eelke On 1 May 2012 11:23, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Tue May 1 15:15:27 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 1 May 2012 08:15:27 -0500 Subject: [FieldTrip] subplot clusterplot Message-ID: Fanny, With ft_topoplotER, you can plot the average activation over a time interval rather than activation at a single point, using cfg.xlim; this apparently is not possible with ft_clusterplot (although I haven't used clusterplot recently). And the functionality of ft_clusterplot can be replicated by using cfg.highlightchannel. There is an example at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results(I can also send you my script, which is based on that), although it's for time-locked ERPs; I'm not sure if things will work differently for time-frequency data. Best, Steve Politzer-Ahles Message: 2 > Date: Tue, 1 May 2012 10:09:49 +0200 > From: Fanny Quandt > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] subplot clusterplot > Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I am performing a monte-carlo cluster statistic, comparing a 200 ms > activation period and a baseline of a spectrogram. > I get positive and negative clusters which are significant, and would like > to plot them using ft_clusterplot. > > However, the function gives me 7 subplot (for 7 timepoints) , all so small > that one is barely able to identify the highlighted channels. > > Therefore, I would either like to only plot 1 big topoplot or arrange the > subplots differently. Is there a way to plot only one timepoint? > > I would appreciate any help, > Best, > Fanny > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 1 15:23:42 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 1 May 2012 16:23:42 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Thank you Eelke Hamza On Tue, May 1, 2012 at 12:28 PM, Eelke Spaak wrote: > Hi Hamza, > > Have a look at ft_resampledata > (http://fieldtrip.fcdonders.nl/reference/ft_resampledata). > > Best, > Eelke > > On 1 May 2012 11:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > > to128) during the preprocessing > > > > Thanks > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.N.Maijers at student.ru.nl Tue May 1 20:03:20 2012 From: S.N.Maijers at student.ru.nl (Sander Maijers) Date: Tue, 1 May 2012 20:03:20 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <003d01cd278c$bc6fca40$354f5ec0$@simanova@mpi.nl> References: <20120428160125.521cf366@sander-H57M-USB3> <003d01cd278c$bc6fca40$354f5ec0$@simanova@mpi.nl> Message-ID: <20120501200320.4cc1c1f3@sander-H57M-USB3> Hi Irina, Nice to hear from you again! I will get back in touch with you once I've made enough preparations to redo my experiment. :) I was using the latest version from the source code repository at http://code.google.com/p/fieldtrip/ . I just updated it (to revision 5718), but the error remains. The source code and output for my current experiment script is at http://pastebin.com/zjXKFE0N . (This link will remain active for a day or so.) I intend to convert the experiment script to the new Donders Machine Learning Toolkit, if that is the best way to go forward. Hopefully someone knows what the problem is! Best, Sander On Tue, 1 May 2012 13:22:46 +0200 "Irina Simanova" wrote: > Hi Sander, > > Which version of Fieldtrip are you using? > > I have not been able to replicate your error, however, when I am > trying to run that old piece of code, I am getting a different error > in ft_statistics_crossvalidate ??? Undefined variable "dml" or class > "dml.standardizer" (see below). > > I cc this to Marcel van Gerven. There have been changes introduced to > the multivariate analysis toolbox, and it indeed might explain the > errors. Marcel, is it possible that there are compatibility errors in > the ft_statistics_crossvalidate? Regarding the error that I got: how > should I set the "dml" object when I call the function via Fieldtip? > > Best, > Irina > > cfg = []; > cfg.method = 'crossvalidate'; > cfg.nfolds = 6; > cfg.channel = avg_tls_txt_lp.label(1:60); > cfg.latency = [0 0.7]; > s1 = size(avg_anm_txt_lp.trial,1); > s2 = size(avg_tls_txt_lp.trial,1); > design = [ones(s1,1); ones(s2,1)*2]; > cfg.design = design; > class = ft_timelockstatistics(cfg, avg_anm_txt_lp, avg_tls_txt_lp); > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing > ??? Undefined variable "dml" or class "dml.standardizer". > > Error in ==> ft_statistics_crossvalidate at 44 > cfg.mva = dml.analysis({ ... > > Error in ==> statistics_wrapper at 298 > [stat] = statmethod(cfg, dat, design); > > Error in ==> ft_timelockstatistics at 110 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers > Sent: Saturday, April 28, 2012 4:01 PM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Problem in ft_timelockstatistics() phase > > Hi, > > I am trying to rework a small FieldTrip experiment I did last year > (reproduction of larger experiment done by Irina Simanova). > > Calling ft_timelockstatistics() on two ERP data partitions results in > an error: "Undefined function 'fieldnames' for input arguments of > type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on > Linux. > > I see a possible cause of the problem, in that these data we > pre-analysed with ft_timelockanalysis() a year ago, or longer. I read > them from parts of the data set I was supplied with. Maybe there have > been breaking changes to this function in the meantime? The cfg > struct that I pass as parameter seems in line with the current > documentation, though. > > > LOG: > > >> main() > > data_set_location = > > /media/SAMSUNG/0,data_set/EEG/0 MATLAB > > > output_dir = > > /tmp/EEG > > Data set part file: timelock10_lp > Data set part file: timelock11_lp > > CONTRAST > [class 1, size = 220]: participant timelock10_lp on condition > avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on > condition avg_tls_aud_lp cfg > method: 'crossvalidate' > latency: [0 0.7000] > channel: {1x60 cell} > nfolds: 5 > mva: {2x1 cell} > design: [444x1 double] > > class_1_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [220x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > class_2_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [224x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing fixing > random number generator for reproducibility creating sample indices > using 5-fold cross-validation validating fold 1 of 5 for 1 datasets > validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 > datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 > for 1 datasets Undefined function 'fieldnames' for input arguments of > type 'cell'. > > Error in ft_statistics_crossvalidate (line 84) fn = > fieldnames(stat.model{1}); > > Error in statistics_wrapper (line 298) > [stat] = statmethod(cfg, dat, design); > > Error in ft_timelockstatistics (line 110) [stat, cfg] = > statistics_wrapper(cfg, varargin{:}); > > Error in main/modeling (line 203) > stat = ft_timelockstatistics(cfg, class_1_datastruct, > class_2_datastruct); > > Error in main/statistics (line 225) > stat = modeling(data_set, method, obj_class_1_and_2); > > Error in main/ERP_experiment (line 374) > stats = statistics(data_set, contrasts, method); > > Error in main (line 401) > stats_x = ERP_experiment(data_set_location, 'RR', output_dir) > > > Any suggestions would be welcom! > > Kind regards, > Sander Maijers > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From bibi.raquel at gmail.com Wed May 2 06:09:01 2012 From: bibi.raquel at gmail.com (Raquel Bibi) Date: Wed, 2 May 2012 00:09:01 -0400 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Hamza, Please view the Fieldtrip reference wiki on FT_resampledata. I believe it is what you are looking for. Best, Raquel On Tue, May 1, 2012 at 5:23 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Wed May 2 06:31:25 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 2 May 2012 07:31:25 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Yes, thank you Raquel I also get an answer from Eelke Best On Wed, May 2, 2012 at 7:09 AM, Raquel Bibi wrote: > Hamza, > Please view the Fieldtrip reference wiki on FT_resampledata. I believe it > is what you are looking for. > > Best, > > Raquel > > On Tue, May 1, 2012 at 5:23 AM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Hello, >> >> Is there anything to do subsampling (ex: decreasing the samples from 2048 >> to128) during the preprocessing >> >> Thanks >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Wed May 2 13:19:23 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Wed, 2 May 2012 13:19:23 +0200 Subject: [FieldTrip] subplot clusterplot In-Reply-To: References: Message-ID: Thanks Steve, it worked out well and I now got plots that are actually readable. Best, Fanny Am 01.05.2012 um 15:15 schrieb Stephen Politzer-Ahles: > Fanny, > > With ft_topoplotER, you can plot the average activation over a time interval rather than activation at a single point, using cfg.xlim; this apparently is not possible with ft_clusterplot (although I haven't used clusterplot recently). And the functionality of ft_clusterplot can be replicated by using cfg.highlightchannel. There is an example at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results (I can also send you my script, which is based on that), although it's for time-locked ERPs; I'm not sure if things will work differently for time-frequency data. > > Best, > Steve Politzer-Ahles > > Message: 2 > Date: Tue, 1 May 2012 10:09:49 +0200 > From: Fanny Quandt > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] subplot clusterplot > Message-ID: <66CCFA48-3695-42CD-9830-3AC4DB959F96 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I am performing a monte-carlo cluster statistic, comparing a 200 ms activation period and a baseline of a spectrogram. > I get positive and negative clusters which are significant, and would like to plot them using ft_clusterplot. > > However, the function gives me 7 subplot (for 7 timepoints) , all so small that one is barely able to identify the highlighted channels. > > Therefore, I would either like to only plot 1 big topoplot or arrange the subplots differently. Is there a way to plot only one timepoint? > > I would appreciate any help, > Best, > Fanny > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.rotonda at gmail.com Wed May 2 14:05:14 2012 From: marco.rotonda at gmail.com (Marco Rotonda) Date: Wed, 2 May 2012 14:05:14 +0200 Subject: [FieldTrip] Methodological question on connectivity Message-ID: Hi fieldtrippers, I have some methodological questions on connectivity and I would like to share you my doubts in the hope to solve them. I would like to ask you if I could apply Granger Causality or other connectivity analysis to a non transient event. I mean I would like to know if it is possible to analyse an hypnosis induction. In this case I have not many events to check but only one long session where I could take 2-3 minutes in between. I would like to analyze at the beginning, during the induction and after the induction what's going on. So now my questions are: - is it correct to think using GC in this case? - is it correct to take these 3 moments during the induction and treat them as 3 different conditions? - if yes, how long should be the ideal temporal window (in classical FFT analysis is 4 seconds) Thanks in advance Marco From marco.rotonda at gmail.com Wed May 2 14:06:17 2012 From: marco.rotonda at gmail.com (Marco Rotonda) Date: Wed, 2 May 2012 14:06:17 +0200 Subject: [FieldTrip] Methodological question on connectivity Message-ID: Hi fieldtrippers, I have some methodological questions on connectivity and I would like to share you my doubts in the hope to solve them. I would like to ask you if I could apply Granger Causality or other connectivity analysis to a non transient event. I mean I would like to know if it is possible to analyse an hypnosis induction. In this case I have not many events to check but only one long session where I could take 2-3 minutes in between. I would like to analyze at the beginning, during the induction and after the induction what's going on. So now my questions are: - is it correct to think using GC in this case? - is it correct to take these 3 moments during the induction and treat them as 3 different conditions? - if yes, how long should be the ideal temporal window (in classical FFT analysis is 4 seconds) Thanks in advance Marco From Elena.Orekhova at neuro.gu.se Wed May 2 16:24:53 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Wed, 2 May 2012 14:24:53 +0000 Subject: [FieldTrip] grid problem Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253923E6@exchccr1.neuro.gu.se> Dear fieldtrippers, I try to construct leadfield grid using ft_prepare_leadfield. I use a template MRI (/spm8/canonical/single_subj_T1.nii) and template electrode positions (subsample of /template/electrode/standard_1005.elc). The resulting grid covers only part of the brain. My attempts to extend it manually using cfg.grid.xgrid, cfg.grid.ygrid, cfg.grid.zgrid do not help. The grid is still too small (see the attached figure). My code is: cfg = []; cfg.vol = vol; cfg.channel = {'all', '-HEOG', '-VEOG'} cfg.grid.xgrid = [ -80:10:80]; cfg.grid.ygrid = [ -100:10:100]; cfg.grid.zgrid = [ -110:10:80]; [grid] = ft_prepare_leadfield(cfg, data); Why this happens and what may I do wrong? I am new to the Fieldtrip and I would appreciate any help very much. Thanks, Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grid.tif Type: image/tiff Size: 44684 bytes Desc: grid.tif URL: From alex.santos at mso.umt.edu Wed May 2 18:19:31 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 16:19:31 +0000 Subject: [FieldTrip] loading .txt files Message-ID: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Hello all, I am new using the fieldtrip suite and for now my problem is being the loading of recorded .txt files. These files are simple 36000lines x 9 columns matrices with no headers containing signals I collected previously. I have tried to use the 'ft_preprocessing' file but obviously it did not work. Any help on this matter will be really appreciated. Alex Santos -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed May 2 18:32:13 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 2 May 2012 18:32:13 +0200 Subject: [FieldTrip] loading .txt files In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Message-ID: Dear Alex, Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format I hope this helps, Stephen On 2 May 2012 18:19, Santos, Alex wrote: > Hello all, > I am new using the fieldtrip suite and for now my problem is being the > loading of recorded .txt files. > These files are simple 36000lines x 9 columns matrices with no headers > containing signals I collected previously. I have tried to use the > ‘ft_preprocessing’ file but obviously it did not work. > Any help on this matter will be really appreciated. > > Alex Santos > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 18:42:35 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 16:42:35 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Hi Stephen, The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. I will try the option you suggested and let you know. Thank you very much. Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 10:32 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Dear Alex, Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format I hope this helps, Stephen On 2 May 2012 18:19, Santos, Alex wrote: > Hello all, > I am new using the fieldtrip suite and for now my problem is being the > loading of recorded .txt files. > These files are simple 36000lines x 9 columns matrices with no headers > containing signals I collected previously. I have tried to use the > 'ft_preprocessing' file but obviously it did not work. > Any help on this matter will be really appreciated. > > Alex Santos > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Wed May 2 19:14:53 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 2 May 2012 19:14:53 +0200 Subject: [FieldTrip] loading .txt files In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science > The University of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) > Missoula - Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being the >> loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no headers >> containing signals I collected previously. I have tried to use the >> 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 19:18:50 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 17:18:50 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C58735@UMMAIL03.gs.umt.edu> Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 11:15 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science The University > of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - > Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen > Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_ > defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being >> the loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no >> headers containing signals I collected previously. I have tried to >> use the 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From alex.santos at mso.umt.edu Wed May 2 19:19:21 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Wed, 2 May 2012 17:19:21 +0000 Subject: [FieldTrip] loading .txt files In-Reply-To: References: <1209002844CCFB42B0C14BC515E5012A64C57658@UMMAIL03.gs.umt.edu> <1209002844CCFB42B0C14BC515E5012A64C586F0@UMMAIL03.gs.umt.edu> Message-ID: <1209002844CCFB42B0C14BC515E5012A64C58740@UMMAIL03.gs.umt.edu> Thanks Stephen. I will try it and let you know. Alessander D Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana 106 Skaggs Building, 32 Campus Drive Phone: (406) 243-2530 (office) (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - Montana - 59812 -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen Whitmarsh Sent: Wednesday, May 02, 2012 11:15 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading .txt files Hi Alex, Then I expect you to have no trouble at all going from .c3d to Fieldtrip directly or via the .txt conversion. One thing you might keep in mind, depending on how you want to use event and how they are coded in your data. 1) You could read in all the data into one trial: data.trial{1} = yourdata(timepointsxchannels) This would be similar in reading in data with ft_preprocessing without specifying a cfg.trl (trialdefinition). In a next step you could use the FT function ft_redefinetrial to segment your data in trials, using a cfg.trl that has the start, duration and offset of every trial in every row (http://fieldtrip.fcdonders.nl/reference/ft_redefinetrial) 2) Or you could do the whole thing with your own script, ending up with a raw datastructure with multiple trials ( data.trial{1:nroftrial} ). The first option might give you some more flexibility in the long run though. Good luck, Stephen p.s. If all goes well and you like working with FT and would like to contribute, your code and experience would be much appreciate on the wiki (i.e. 'getting started with Vicon data' on the http://fieldtrip.fcdonders.nl/getting_started) On 2 May 2012 18:42, Santos, Alex wrote: > Hi Stephen, > The data set I have was converted into ascii by myself. The same set contains EMG signals I collected with a Delsys EMG module thorough a Vicon system. The extension is .c3d and it seems that this format is not supported. > I will try the option you suggested and let you know. > Thank you very much. > > Alessander D Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science The University > of Montana > 106 Skaggs Building, 32 Campus Drive > Phone: (406) 243-2530 (office) >           (406) 243-4015 (Motor Control Laboratory- MCLab) Missoula - > Montana - 59812 > > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Stephen > Whitmarsh > Sent: Wednesday, May 02, 2012 10:32 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] loading .txt files > > Dear Alex, > > Have you converted your data into an ascii file yourself? What data acquisition hard/software are you using? Fieldtrip supports the reading of many EEG/MEG data formats. Perhaps in http://fieldtrip.fcdonders.nl/getting_started you can find a reference to the original dataformat? > > If not you probably can't avoid making your own matlab script to load your data from (.txt) file and put it in a (data) structure that FieldTrip can handle. Take a look at the 'raw data format': > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_ > defined?s[]=data&s[]=format > > I hope this helps, > > Stephen > > On 2 May 2012 18:19, Santos, Alex wrote: >> Hello all, >> I am new using the fieldtrip suite and for now my problem is being >> the loading of recorded .txt files. >> These files are simple 36000lines x 9 columns matrices with no >> headers containing signals I collected previously. I have tried to >> use the 'ft_preprocessing' file but obviously it did not work. >> Any help on this matter will be really appreciated. >> >> Alex Santos >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Thu May 3 01:53:03 2012 From: wljj09 at gmail.com (Jing Wang) Date: Thu, 3 May 2012 01:53:03 +0200 Subject: [FieldTrip] About the ft_spikedetection Message-ID: Dear all, I have recently use the function ft_spikedetection to extract spike information from continous data. When I set the cfg.interactive= 'yes' , the function can run well only with the warning that data was not write in to disk in interactive mode. When I change the cfg.interactive ='no' to let the function write the spike into disk, there is a error like this ??? Undefined function or method 'ft_write_spike' for input arguments of type 'struct'. Error in ==> ft_spikedetection at 377 ft_write_spike(datafile, spike, 'dataformat', cfg.dataformat, 'fsample', hdr.Fs, 'TimeStampPerSample', hdr.TimeStampPerSample*hdr.Fs); So, it seems because it did not find the ft_write_spike. I check the latest and old Fieldtrip versions but did not find ft_write_spike neither. I have no idea how to solve this problem. Thank you for your kind help in advance. Any help on this matter will be really appreciated All the best Jing -------------- next part -------------- An HTML attachment was scrubbed... URL: From hame at meg.re.kr Thu May 3 06:29:24 2012 From: hame at meg.re.kr (Hame Park) Date: Thu, 3 May 2012 13:29:24 +0900 Subject: [FieldTrip] comparing time-series Message-ID: Hello I am trying to compare three time series, that is, to find the time windows where the three time series have statistical differences. Can anybody give me some useful advice? I would really appreciate it. THANK YOU! Hame -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu May 3 09:45:03 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 03 May 2012 09:45:03 +0200 Subject: [FieldTrip] comparing time-series In-Reply-To: References: Message-ID: <4FA2377F.9080005@donders.ru.nl> Dear Hame. I would start by looking into the tutorial: http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics If you've done that, you need to think about what precisely you would like to find out. The most intuitive way would be to check for differences between two of the three time series, and that for each combination (1vs2, 2vs3, 1vs3), and then report those differences. Best regards, Jörn On 5/3/2012 6:29 AM, Hame Park wrote: > Hello > > I am trying to compare three time series, that is, > to find the time windows where the three time series > have statistical differences. > > Can anybody give me some useful advice? > > I would really appreciate it. > > THANK YOU! > > Hame > > > _______________________________________________ > 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 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 hamzaf at sabanciuniv.edu Thu May 3 10:23:35 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 11:23:35 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) Message-ID: Hello, I want to average each 10 trials of 100 trials. I don't know what to put in (cfg.trials) I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; It does not work? Note: at the end I want to have a cell of 10 matices, not just one matrix. Any thoughts? Best, -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 3 10:36:13 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 3 May 2012 10:36:13 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Dear Hamza, Fieldtrip functions in generally do not work on several different 'sets' of data at the same time. Call the function you are using (e.g. ft_timelockanalysis) separately for every set of trials and if you want put the output in a matrix{1:10} of datastructures (e.g. timelock). You can easily put it in a loop. Something like this: for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; yourtimelockdata{i} = ft_function(cfg,yourdata) end Hope this helps, Stephen On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I want to average each 10 trials of 100 trials. > I don't know what to put in (cfg.trials) > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > It does not work? > > Note: at the end I want to have a cell of 10 matices, not just one matrix. > > Any thoughts? > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 3 10:44:30 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 11:44:30 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Yes, it helps a lot Thanks Stephen Hamza On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Fieldtrip functions in generally do not work on several different > 'sets' of data at the same time. > Call the function you are using (e.g. ft_timelockanalysis) separately > for every set of trials and if you want put the output in a > matrix{1:10} of datastructures (e.g. timelock). > You can easily put it in a loop. Something like this: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > yourtimelockdata{i} = ft_function(cfg,yourdata) > end > > Hope this helps, > Stephen > > > On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > I want to average each 10 trials of 100 trials. > > I don't know what to put in (cfg.trials) > > > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > > > It does not work? > > > > Note: at the end I want to have a cell of 10 matices, not just one > matrix. > > > > Any thoughts? > > > > Best, > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Thu May 3 11:09:52 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 12:09:52 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hello again, But I need to process my data later by ft_timelockstatistics. I don't think this funtion accepts cell containing many structs. I think its better to do average manually then call ft_lockanalysis, then ft_timelockstatistics. Right? Hamza On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Fieldtrip functions in generally do not work on several different > 'sets' of data at the same time. > Call the function you are using (e.g. ft_timelockanalysis) separately > for every set of trials and if you want put the output in a > matrix{1:10} of datastructures (e.g. timelock). > You can easily put it in a loop. Something like this: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > yourtimelockdata{i} = ft_function(cfg,yourdata) > end > > Hope this helps, > Stephen > > > On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > I want to average each 10 trials of 100 trials. > > I don't know what to put in (cfg.trials) > > > > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > > > > It does not work? > > > > Note: at the end I want to have a cell of 10 matices, not just one > matrix. > > > > Any thoughts? > > > > Best, > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 3 11:20:23 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 3 May 2012 11:20:23 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Dear Hamza, Actually, the statistic functions DO accept cellstructures of datastructures, and what I suggested is therefor very convenient, especially in that regard. Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I would recommend walking through it from the beginning, but you could take a particular look at the statistics section. In there I try to explain the data structure handling in detail which deals with your question. Cheers, Stephen On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) wrote: > Hello again, > > But I need to process my data later by ft_timelockstatistics. > I don't think this funtion accepts cell containing many structs. > > I think its better to do average manually then call ft_lockanalysis, then > ft_timelockstatistics. Right? > > Hamza > > > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh > wrote: >> >> Dear Hamza, >> >> Fieldtrip functions in generally do not work on several different >> 'sets' of data at the same time. >> Call the function you are using (e.g. ft_timelockanalysis) separately >> for every set of trials and if you want put the output in a >> matrix{1:10} of datastructures (e.g. timelock). >> You can easily put it in a loop. Something like this: >> >> for i = 1:10 >>     cfg = []; >>     cfg.trials = [(i-1)*10+1 : i*10]; >>     yourtimelockdata{i} = ft_function(cfg,yourdata) >> end >> >> Hope this helps, >> Stephen >> >> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello, >> > >> > I want to average each 10 trials of 100 trials. >> > I don't know what to put in (cfg.trials) >> > >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >> > >> > It does not work? >> > >> > Note: at the end I want to have a cell of 10 matices, not just one >> > matrix. >> > >> > Any thoughts? >> > >> > Best, >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 3 11:28:23 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 3 May 2012 12:28:23 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Thanks a lot Stephen for your help, Hamza On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Dear Hamza, > > Actually, the statistic functions DO accept cellstructures of > datastructures, and what I suggested is therefor very convenient, > especially in that regard. > Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I > would recommend walking through it from the beginning, but you could > take a particular look at the statistics section. In there I try to > explain the data structure handling in detail which deals with your > question. > > Cheers, > Stephen > > On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) > wrote: > > Hello again, > > > > But I need to process my data later by ft_timelockstatistics. > > I don't think this funtion accepts cell containing many structs. > > > > I think its better to do average manually then call ft_lockanalysis, then > > ft_timelockstatistics. Right? > > > > Hamza > > > > > > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh > > wrote: > >> > >> Dear Hamza, > >> > >> Fieldtrip functions in generally do not work on several different > >> 'sets' of data at the same time. > >> Call the function you are using (e.g. ft_timelockanalysis) separately > >> for every set of trials and if you want put the output in a > >> matrix{1:10} of datastructures (e.g. timelock). > >> You can easily put it in a loop. Something like this: > >> > >> for i = 1:10 > >> cfg = []; > >> cfg.trials = [(i-1)*10+1 : i*10]; > >> yourtimelockdata{i} = ft_function(cfg,yourdata) > >> end > >> > >> Hope this helps, > >> Stephen > >> > >> > >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) > >> wrote: > >> > Hello, > >> > > >> > I want to average each 10 trials of 100 trials. > >> > I don't know what to put in (cfg.trials) > >> > > >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; > >> > > >> > It does not work? > >> > > >> > Note: at the end I want to have a cell of 10 matices, not just one > >> > matrix. > >> > > >> > Any thoughts? > >> > > >> > Best, > >> > > >> > -- > >> > Hamza Fawzi Altakroury > >> > Graduate student - MA > >> > Faculty of Engineering and Natural Sciences > >> > Sabancı University > >> > > >> > _______________________________________________ > >> > fieldtrip mailing list > >> > fieldtrip at donders.ru.nl > >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkuepper at uni-muenster.de Thu May 3 14:58:18 2012 From: pkuepper at uni-muenster.de (=?ISO-8859-15?Q?P_K=FCpper?=) Date: Thu, 03 May 2012 14:58:18 +0200 Subject: [FieldTrip] ft_spikedetection Message-ID: <4FA280EA.7080503@uni-muenster.de> Hello, using "ft_spikedetection.m" I get the error message referring to a function called "ft_write_spike.m". I cannot find this function included in the current package (fieldtrip-20120423). The included function "write_fcdc_spike.m" is marked as deprecated. Can anyone help with this issue? Thanks P Kuepper Institute for Biomagnetism and Biosignalanalysis University of Muenster From irina.simanova at mpi.nl Thu May 3 16:43:08 2012 From: irina.simanova at mpi.nl (Irina Simanova) Date: Thu, 3 May 2012 16:43:08 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <20120428160125.521cf366@sander-H57M-USB3> References: <20120428160125.521cf366@sander-H57M-USB3> Message-ID: <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> Hi Sander, The multivariate analysis module is now being re-structured, so that it will eventually become a stand-alone toolbox - Donders Machine Learning Toolbox, DMLT. Your error is caused by a conflict between the old and the new versions of the functions. You should just change the way you specify the mva method: cfg.mva = {dml.standardizer dml.svm} (check the reference to ft_statistics_crossvalidate) It should work then. Best, Irina -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers Sent: Saturday, April 28, 2012 4:01 PM To: fieldtrip at donders.ru.nl Subject: [FieldTrip] Problem in ft_timelockstatistics() phase Hi, I am trying to rework a small FieldTrip experiment I did last year (reproduction of larger experiment done by Irina Simanova). Calling ft_timelockstatistics() on two ERP data partitions results in an error: "Undefined function 'fieldnames' for input arguments of type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on Linux. I see a possible cause of the problem, in that these data we pre-analysed with ft_timelockanalysis() a year ago, or longer. I read them from parts of the data set I was supplied with. Maybe there have been breaking changes to this function in the meantime? The cfg struct that I pass as parameter seems in line with the current documentation, though. LOG: >> main() data_set_location = /media/SAMSUNG/0,data_set/EEG/0 MATLAB output_dir = /tmp/EEG Data set part file: timelock10_lp Data set part file: timelock11_lp CONTRAST [class 1, size = 220]: participant timelock10_lp on condition avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on condition avg_tls_aud_lp cfg method: 'crossvalidate' latency: [0 0.7000] channel: {1x60 cell} nfolds: 5 mva: {2x1 cell} design: [444x1 double] class_1_data__struct avg: [62x501 double] var: [62x501 double] fsample: 500 time: [1x501 double] dof: [62x501 double] label: {62x1 cell} trial: [220x62x501 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] class_2_data__struct avg: [62x501 double] var: [62x501 double] fsample: 500 time: [1x501 double] dof: [62x501 double] label: {62x1 cell} trial: [224x62x501 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] selected 60 channels selected 351 time bins selected 1 frequency bins using "ft_statistics_crossvalidate" for the statistical testing fixing random number generator for reproducibility creating sample indices using 5-fold cross-validation validating fold 1 of 5 for 1 datasets validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 for 1 datasets Undefined function 'fieldnames' for input arguments of type 'cell'. Error in ft_statistics_crossvalidate (line 84) fn = fieldnames(stat.model{1}); Error in statistics_wrapper (line 298) [stat] = statmethod(cfg, dat, design); Error in ft_timelockstatistics (line 110) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in main/modeling (line 203) stat = ft_timelockstatistics(cfg, class_1_datastruct, class_2_datastruct); Error in main/statistics (line 225) stat = modeling(data_set, method, obj_class_1_and_2); Error in main/ERP_experiment (line 374) stats = statistics(data_set, contrasts, method); Error in main (line 401) stats_x = ERP_experiment(data_set_location, 'RR', output_dir) Any suggestions would be welcom! Kind regards, Sander Maijers _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From joscha.schmiedt at esi-frankfurt.de Thu May 3 16:48:32 2012 From: joscha.schmiedt at esi-frankfurt.de (Schmiedt, Joscha) Date: Thu, 3 May 2012 14:48:32 +0000 Subject: [FieldTrip] isrealmat & isrealvec Message-ID: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> Dear Fieldtrip community, I'd like to use the Fieldtrip framework for my spike data analysis, but encountered something strange: a couple of spike analysis-related functions (e.g. ft_spikedensity, ft_spike_plot_raster) make use of the functions isrealmat and isrealvec, which seem to be non-standard matlab functions and also not present in the standard Fieldtrip installation. I'm using Matlab R2011a and a pretty recent version of Fieldtrip (ft_spikedensity.m 5157 2012-01-22 14:49:34Z, ft_spike_plot_raster.m 5157 2012-01-22 14:49:34Z). Did I miss something there? Though it is easy to implement these functions, I'd very happy about any hints on this issue. Thanks! Best, Joscha From Christos.Papadelis at childrens.harvard.edu Thu May 3 21:08:52 2012 From: Christos.Papadelis at childrens.harvard.edu (Papadelis, Christos) Date: Thu, 3 May 2012 19:08:52 +0000 Subject: [FieldTrip] Research Technologist, Boston, MA Message-ID: <876E0E5B34DB6A4DBD0E65B9091B435010D4AB63@CHEXMBX2A.CHBOSTON.ORG> Research Technologist, Boston, MA The MEG program at Children’s Hospital Boston (CHB)/HMS is now recruiting a Research Technologist. The successful candidate will work as a member of the team to help carry out studies of human brain development using a combination of MEG, EEG and MRI (tractography). This position is best for a person interested in working with babies and children, studying brain development either as a career or as an educational/training opportunity for further studies. Below is a description of the responsibilities and minimum and preferred qualifications. Responsibilities: o Acquisition/collection of MEG and related data (i.e. EEG, EOG, Polaris, Polhemus etc). o Ordering of supplies and equipment for the lab. o Scheduling healthy subjects and patients for the different studies running in the lab. o Analysis and evaluation of MEG and related data for investigators by using sophisticated software analysis tools such as BrainStorm, FieldTrip, BESA, etc. o Training of members of the Center and external users in the acceptable use and maintenance of the BabyMEG System hardware and software. o Performance of periodic liquid helium refills of the BabyMEG system, three times per week. o Maintains all safety documentation of the laboratory as well as the IRB approved signed consent forms of the different studies running in the lab. o Preparation of documents concerning the smooth operation of the lab (family education sheets, brochures, technical specifications documents, liquid helium refill records, etc). o Performance of routine tests for specific research projects, using sophisticated and intricate research equipment and techniques. Performance of research procedures, troubleshooting problems with own and other researchers' results. Minimum qualifications: o MSc or MA in the area of Biomedical Engineering or Neuroscience is preferred. The minimum requirement is BA or BSc degree in Biomedical, Electrical or Computer Engineering, or in a Biological Science. Previous experience in Biomagnetism research is not required. o Basic understanding of the electromagnetic theory needed for signal analysis. o Native speaker of English is preferred. Required is complete fluency in English since there will be frequent interactions with the family members as well as children. Abilities to relate to children and their parents are essential. Conditions of Employment: o Position available beginning June 2012. o Salary: commensurate with education and experience (minimum = $ 40,000). o CHB has excellent benefits, including health benefits and retirement plans with employer contributions. o CHB values diversity and is committed to equal opportunity in employment. How to Apply: o Please visit the website of Children's Hospital Boston (www.childrenshospital.jobs) AutoReqID 27106. o If you have any questions please contact: Christos Papadelis Lab Manager of the BabyMEG/EEG Facility Children’s Hospital Boston/Harvard Medical School 9 Hope Ave, Waltham MA 02453, USA E-mail: christos.papadelis at childrens.harvard.edu Phone: +1-781-216-1128 ______________________________________________ Christos Papadelis, PhD Instructor in Neurology, Harvard Medical School MEG Lab Manager, Children's Hospital Boston 9 Hope Avenue Waltham, MA 02453 USA Phone: +1-781-216-1128 Fax: +1-781-216-1172 From r.oostenveld at donders.ru.nl Thu May 3 21:40:32 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 3 May 2012 21:40:32 +0200 Subject: [FieldTrip] isrealmat & isrealvec In-Reply-To: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> References: <17F994D43E9ADA418DE0040CC6F4A96B021023@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <2818E365-AAE5-45AC-8303-7651E8E5D16E@donders.ru.nl> Dear Josha, Hmm, those functions seem to be part of the "Identification_Toolbox". No idea what that toolbox does, but our University has a few licenses for it, that is why the use of that external toolbox went undetected. Of course there is no reason to use an external toolbox for such simple functions. I'll add a replacement implementation to FieldTrip. See already attached for the two functions, please put them in your fieldtrip/private folder. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: isrealmat.m Type: application/octet-stream Size: 1573 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: isrealvec.m Type: application/octet-stream Size: 1606 bytes Desc: not available URL: -------------- next part -------------- On 3 May 2012, at 16:48, Schmiedt, Joscha wrote: > Dear Fieldtrip community, > > I'd like to use the Fieldtrip framework for my spike data analysis, but > encountered something strange: a couple of spike analysis-related > functions (e.g. ft_spikedensity, ft_spike_plot_raster) make use of the > functions isrealmat and isrealvec, which seem to be non-standard matlab > functions and also not present in the standard Fieldtrip installation. > I'm using Matlab R2011a and a pretty recent version of Fieldtrip > (ft_spikedensity.m 5157 2012-01-22 14:49:34Z, ft_spike_plot_raster.m > 5157 2012-01-22 14:49:34Z). > > Did I miss something there? Though it is easy to implement these > functions, I'd very happy about any hints on this issue. Thanks! > > Best, > Joscha > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Elena.Orekhova at neuro.gu.se Fri May 4 08:50:08 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Fri, 4 May 2012 06:50:08 +0000 Subject: [FieldTrip] SAM option in ft_sourceanalysis Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> Dear fieldtrippers! I tried to use SAM beamformer for the EEG analysis, But I have got en error (see below). I guess that there is a bug in ‘beamformer_sam’at line 112. I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in ‘ft_sourceanalysis’? Thanks, Elena *********************** Error using * Inner matrix dimensions must agree. Error in beamformer_sam (line 112) inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Fri May 4 14:51:47 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Fri, 4 May 2012 14:51:47 +0200 Subject: [FieldTrip] WARNING: The input units are cm for points and S/cm for conductivity Message-ID: Dear all, I am getting the following error message when using ft_sourceanalysis: WARNING: The input units are cm for points and S/cm for conductivity Is this something that could affect my results or can I simply ignore it? Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Fri May 4 16:21:43 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Fri, 4 May 2012 16:21:43 +0200 Subject: [FieldTrip] computing the covariance matrix from trials with different lengths Message-ID: Dear all, I want to do a beamforming analysis using the LCMV beamformer on MEG resting state activity. After the artifcat rejection, my data is chopped into trials of different lengths. My question is related as to how to compute the covariance matrix. If I use cfg = []; cfg.vartrllength = 2; cov = ft_timelockanalysis(cfg,data); a covariance matrix will be computed for each trial while padding all the segments that are smaller than the longest segment with zeros. I believe that in the end the average covariance matrix across the trials is used. Am I correct? Another alternative would be to chop all the trials into epochs of the same length, ie 2 seconds. cfg = []; cfg.trllength = 2; data = ft_redefinetrial(cfg,data); cfg = []; cfg.vartrllength = 0; cov = ft_timelockanalysis(cfg,data); Finally, one could also concatenate all the trials into one long epoch and run the same code. I would be curious to know what the differences would be regarding the computation of the covariance matrix and which would be the most appropriate way to do this. Any suggestions, help or comments would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.santos at mso.umt.edu Fri May 4 16:23:53 2012 From: alex.santos at mso.umt.edu (Santos, Alex) Date: Fri, 4 May 2012 14:23:53 +0000 Subject: [FieldTrip] time-resolved coherence Message-ID: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> Hello everybody, I am looking forward to do coherence analysis between EMG signals on a time continuum so I could verify any modulation of this estimate along my trials. Has anyone done that ? Alex Alex Santos, PT, PhD Assistant Professor School of Physical Therapy and Rehabilitation Science The University of Montana -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Fri May 4 18:10:01 2012 From: michael.wibral at web.de (Michael Wibral) Date: Fri, 4 May 2012 18:10:01 +0200 (CEST) Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Fri May 4 20:56:19 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Fri, 4 May 2012 21:56:19 +0300 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> Message-ID: Dear Elena I used it recently with MEG data and local spheres model I don't think it could work with eeg but I don't know. Yuval On 4 May 2012 09:50, Elena Orekhova wrote: > Dear fieldtrippers! > > > > I tried to use SAM beamformer for the EEG analysis, > > But I have got en error (see below). > > I guess that there is a bug in ‘beamformer_sam’at line 112. > > > > I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in > ‘ft_sourceanalysis’? > > > > Thanks, > > Elena > > > > *********************** > > Error using * > > Inner matrix dimensions must agree. > > > > Error in beamformer_sam (line 112) > > inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); > > > > Error in ft_sourceanalysis (line 849) > > dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), > > squeeze(Cy(i,:,:)), optarg{:}); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 06:43:47 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 07:43:47 +0300 Subject: [FieldTrip] Subsampling In-Reply-To: References: Message-ID: Thanks Michael Hamza On Fri, May 4, 2012 at 7:10 PM, Michael Wibral wrote: > Hi Hamza, > > if you serach for downsampling instead of subsampling you should find an > FT function. > > Best Michael > > *Gesendet:* Dienstag, 01. Mai 2012 um 11:23 Uhr > *Von:* "Hamza Fawzi Altakroury (Student)" > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* [FieldTrip] Subsampling > Hello, > > Is there anything to do subsampling (ex: decreasing the samples from 2048 > to128) during the preprocessing > > Thanks > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 11:15:40 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 12:15:40 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hello again Stephen and for all, I could not find out how to enter the following sturct into the ft_timelockstatistics function The input is generated using the following loop: for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); end and for i = 1:10 cfg = []; cfg.trials = [(i-1)*10+1 : i*10]; avgP300{i} = ft_timelockanalysis(cfg,p300); end Then I use cfg = []; cfg.layout = 'CTF275.lay'; cfg.method = 'crossvalidate'; cfg.design = [ones(10,1); 2*ones(10,1)]'; stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); I get the following error ??? Error using ==> ft_checkdata at 307 This function requires timelock data as input. Error in ==> ft_timelockstatistics at 75 varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', 'feedback', 'no'); Error in ==> test05 at 11 stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); Any thoughts Hamza On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Thanks a lot Stephen for your help, > > Hamza > > > > On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Dear Hamza, >> >> Actually, the statistic functions DO accept cellstructures of >> datastructures, and what I suggested is therefor very convenient, >> especially in that regard. >> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >> would recommend walking through it from the beginning, but you could >> take a particular look at the statistics section. In there I try to >> explain the data structure handling in detail which deals with your >> question. >> >> Cheers, >> Stephen >> >> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello again, >> > >> > But I need to process my data later by ft_timelockstatistics. >> > I don't think this funtion accepts cell containing many structs. >> > >> > I think its better to do average manually then call ft_lockanalysis, >> then >> > ft_timelockstatistics. Right? >> > >> > Hamza >> > >> > >> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >> > wrote: >> >> >> >> Dear Hamza, >> >> >> >> Fieldtrip functions in generally do not work on several different >> >> 'sets' of data at the same time. >> >> Call the function you are using (e.g. ft_timelockanalysis) separately >> >> for every set of trials and if you want put the output in a >> >> matrix{1:10} of datastructures (e.g. timelock). >> >> You can easily put it in a loop. Something like this: >> >> >> >> for i = 1:10 >> >> cfg = []; >> >> cfg.trials = [(i-1)*10+1 : i*10]; >> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >> >> end >> >> >> >> Hope this helps, >> >> Stephen >> >> >> >> >> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >> >> wrote: >> >> > Hello, >> >> > >> >> > I want to average each 10 trials of 100 trials. >> >> > I don't know what to put in (cfg.trials) >> >> > >> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >> >> > >> >> > It does not work? >> >> > >> >> > Note: at the end I want to have a cell of 10 matices, not just one >> >> > matrix. >> >> > >> >> > Any thoughts? >> >> > >> >> > Best, >> >> > >> >> > -- >> >> > Hamza Fawzi Altakroury >> >> > Graduate student - MA >> >> > Faculty of Engineering and Natural Sciences >> >> > Sabancı University >> >> > >> >> > _______________________________________________ >> >> > fieldtrip mailing list >> >> > fieldtrip at donders.ru.nl >> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> > >> > >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Sat May 5 11:46:26 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sat, 5 May 2012 12:46:26 +0300 Subject: [FieldTrip] Reading multiple files Message-ID: Hello, I am planning to process the data of multiple files (training and test over multiple sessions). Is there a way to read more than one file then combine their data? Or combine the bdf files before reading them? Hamza -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.N.Maijers at student.ru.nl Sat May 5 11:54:25 2012 From: S.N.Maijers at student.ru.nl (Sander Maijers) Date: Sat, 5 May 2012 11:54:25 +0200 Subject: [FieldTrip] Problem in ft_timelockstatistics() phase In-Reply-To: <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> References: <20120428160125.521cf366@sander-H57M-USB3> <005001cd293b$0f1eabd0$2d5c0370$@simanova@mpi.nl> Message-ID: <20120505115425.4441dd23@sander-H57M-USB3> Hi Irina, Thank you for your solution! I changed the code as per your suggestion, and other shortcomings too. It works correctly now. I will start working further on the experiment (correcting the remaining issues, and expand its scope a bit I hope). I will ask you if I have questions. I was aware of the DMLT effort, and I had installed it already. Perhaps I am mistaken, but I could not find clear guidance about the transition between the old FieldTrip function names and the the new DMLT names. Thanks for your help and dedication. Best, Sander On Thu, 3 May 2012 16:43:08 +0200 "Irina Simanova" wrote: > Hi Sander, > > The multivariate analysis module is now being re-structured, so that > it will eventually become a stand-alone toolbox - Donders Machine > Learning Toolbox, DMLT. Your error is caused by a conflict between > the old and the new versions of the functions. You should just change > the way you specify the mva method: cfg.mva = {dml.standardizer > dml.svm} (check the reference to ft_statistics_crossvalidate) > It should work then. > > Best, > Irina > > -----Original Message----- > From: fieldtrip-bounces at donders.ru.nl > [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers > Sent: Saturday, April 28, 2012 4:01 PM > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Problem in ft_timelockstatistics() phase > > Hi, > > I am trying to rework a small FieldTrip experiment I did last year > (reproduction of larger experiment done by Irina Simanova). > > Calling ft_timelockstatistics() on two ERP data partitions results in > an error: "Undefined function 'fieldnames' for input arguments of > type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on > Linux. > > I see a possible cause of the problem, in that these data we > pre-analysed with ft_timelockanalysis() a year ago, or longer. I read > them from parts of the data set I was supplied with. Maybe there have > been breaking changes to this function in the meantime? The cfg > struct that I pass as parameter seems in line with the current > documentation, though. > > > LOG: > > >> main() > > data_set_location = > > /media/SAMSUNG/0,data_set/EEG/0 MATLAB > > > output_dir = > > /tmp/EEG > > Data set part file: timelock10_lp > Data set part file: timelock11_lp > > CONTRAST > [class 1, size = 220]: participant timelock10_lp on condition > avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on > condition avg_tls_aud_lp cfg > method: 'crossvalidate' > latency: [0 0.7000] > channel: {1x60 cell} > nfolds: 5 > mva: {2x1 cell} > design: [444x1 double] > > class_1_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [220x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > class_2_data__struct > avg: [62x501 double] > var: [62x501 double] > fsample: 500 > time: [1x501 double] > dof: [62x501 double] > label: {62x1 cell} > trial: [224x62x501 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > selected 60 channels > selected 351 time bins > selected 1 frequency bins > using "ft_statistics_crossvalidate" for the statistical testing fixing > random number generator for reproducibility creating sample indices > using 5-fold cross-validation validating fold 1 of 5 for 1 datasets > validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1 > datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5 > for 1 datasets Undefined function 'fieldnames' for input arguments of > type 'cell'. > > Error in ft_statistics_crossvalidate (line 84) fn = > fieldnames(stat.model{1}); > > Error in statistics_wrapper (line 298) > [stat] = statmethod(cfg, dat, design); > > Error in ft_timelockstatistics (line 110) [stat, cfg] = > statistics_wrapper(cfg, varargin{:}); > > Error in main/modeling (line 203) > stat = ft_timelockstatistics(cfg, class_1_datastruct, > class_2_datastruct); > > Error in main/statistics (line 225) > stat = modeling(data_set, method, obj_class_1_and_2); > > Error in main/ERP_experiment (line 374) > stats = statistics(data_set, contrasts, method); > > Error in main (line 401) > stats_x = ERP_experiment(data_set_location, 'RR', output_dir) > > > Any suggestions would be welcom! > > Kind regards, > Sander Maijers > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From politzerahless at gmail.com Sat May 5 16:24:28 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 5 May 2012 09:24:28 -0500 Subject: [FieldTrip] Reading multiple files Message-ID: Hello Hamza, Does http://fieldtrip.fcdonders.nl/reference/ft_appenddata do what you need? Best, Steve > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 5 May 2012 12:46:26 +0300 > From: "Hamza Fawzi Altakroury (Student)" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Reading multiple files > Message-ID: > > > Content-Type: text/plain; charset="utf-8" > > Hello, > > I am planning to process the data of multiple files (training and test over > multiple sessions). > Is there a way to read more than one file then combine their data? Or > combine the bdf files before reading them? > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabanc? University > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120505/a5c5ae35/attachment-0001.html > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 5 20:38:12 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 5 May 2012 20:38:12 +0200 Subject: [FieldTrip] time-resolved coherence In-Reply-To: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> References: <1209002844CCFB42B0C14BC515E5012A64C5D7B4@UMMAIL03.gs.umt.edu> Message-ID: Hi Alex, Yes, this has been done, see for example: http://www.sciencemag.org/content/308/5718/111.abstract Best wishes, Jan-Mathijs On May 4, 2012, at 4:23 PM, Santos, Alex wrote: > Hello everybody, > I am looking forward to do coherence analysis between EMG signals on a time continuum so I could verify any modulation of this estimate along my trials. > Has anyone done that ? > Alex > > Alex Santos, PT, PhD > Assistant Professor > School of Physical Therapy and Rehabilitation Science > The University of Montana > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 5 21:15:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 5 May 2012 21:15:27 +0200 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis References: <4F97AD41.8090304@biomag.uni-jena.de> Message-ID: <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> Dear Theresa, I am forwarding your questions to the discussion list, as this is the forum on which we discuss this type of issues. Other people may benefit from it too, or may feel inclined to answer. Cheers, Jan-Mathijs Begin forwarded message: > From: Theresa Götz > Date: April 25, 2012 9:52:33 AM GMT+02:00 > To: j.schoffelen at donders.ru.nl > Subject: Question about unit of the wavelet analysis > > Dear Jan-Mathijs Schoeffelen, > > we have a question about the unit of the time-frequency power spectrum: > maybe you can help me with that. > > 1. In fieldtrip, we performed ft_frequanalysis with method 'wavelet' and > output 'power'. What is the exact unit of the resulting power spectrum > (e.g. V/sqrt(hz) or V^2/Hz or V^2 or V)? > > 2. Why does the amplitude of power spectrum decrease toward higher > frequencies even though we keep the amplitude of the input sine wave (in > time domain) constant? > > Thank you very much. > > Best, > Theresa > > > > > -- > Bitte denken Sie an die Umwelt, bevor Sie diese e-Mail ausdrucken. > > > Dr. Theresa Götz Phone: +49-3641-9325780 > University Hospital Jena Fax: +49-3641-9325772 > Dept. for Neurology > Biomagnetic Center > > Erlanger Allee 101 > D-07747 Jena > Germany > > > > > Universitätsklinikum Jena > Körperschaft des öffentlichen Rechts und > Teilkörperschaft der Friedrich-Schiller-Universität Jena > Bachstraße 18, 07743 Jena > > Verwaltungsratsvorsitzender: Prof. Dr. Thomas Deufel > Medizinischer Vorstand: Prof. Dr. Klaus Höffken > Wissenschaftlicher Vorstand: Prof. Dr. Klaus Benndorf > Kaufmännischer Vorstand und > Sprecher des Klinikumsvorstandes: Dr. Brunhilde Seidel-Kwem > > Bankverbindung: Sparkasse Jena > BLZ: 830 530 30, Kto.: 221 > > Gerichtsstand Jena > Steuernummer: 161/144/02978 USt.-IdNr. : DE 150545777 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Sun May 6 13:51:20 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sun, 6 May 2012 13:51:20 +0200 Subject: [FieldTrip] WARNING: The input units are cm for points and S/cm for conductivity In-Reply-To: References: Message-ID: Hi Fred As long as you are fine with arbitrary units of your results, you don't have to worry. We are working towards better support of units throughout the whole code, to allow computations return well-defined values and not "arbitrary units". This has the consequence that for a lot of data objects the physical units have to be added. In some cases we need backward compatibility and have to "guess" the units on the fly. At places where different physical units meet (i.e. in source reconstruction where conductivity, space/distance, and field strength come together), the units of the inputs have to be matched (i.e. all have to be converted to SI units). The purpose of the specific warning is indeed not clear. For now I have disabled it in the code. best Robert On 4 May 2012, at 14:51, Frederic Roux wrote: > Dear all, > > I am getting the following error message when using ft_sourceanalysis: > > WARNING: The input units are cm for points and S/cm for conductivity > > Is this something that could affect my results or can I simply ignore it? > > Best, > Fred > > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Sun May 6 20:22:01 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 6 May 2012 21:22:01 +0300 Subject: [FieldTrip] Reading multiple files In-Reply-To: References: Message-ID: Hello, I found a way to merges files. Hamza On Sat, May 5, 2012 at 12:46 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > I am planning to process the data of multiple files (training and test > over multiple sessions). > Is there a way to read more than one file then combine their data? Or > combine the bdf files before reading them? > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Sun May 6 22:50:02 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Sun, 6 May 2012 20:50:02 +0000 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> >Dear Elena >I used it recently with MEG data and local spheres model >I don't think it could work with eeg but I don't know. >Yuval Hi again, Theoretically SAM should work for EEG as well. Is there any particular reason it does not? I have found a previous message by Don Rojas and introduced the lambda correction he suggested. Now there is another error (see below). Dear developers, what is wrong? I would be very grateful for help! Elena *********************** sourcepst = ft_sourceanalysis(cfg, tlckavgpst); the input is timelock data with 30 channels and 1250 timebins using headmodel specified in the configuration using electrodes specified in the configuration creating dipole grid based on user specified dipole positions 15156 dipoles inside, 11814 dipoles outside brain the call to "ft_prepare_sourcemodel" took 0 seconds and an estimated 1 MB scanning repetition 1 using precomputed leadfields scanning grid Undefined function 'SAM_costfun' for input arguments of type 'double'. Error in fminsearch (line 191) fv(:,1) = funfcn(x,varargin{:}); Error in beamformer_sam (line 157) [opt_angle, fval, exitflag, output] = fminsearch('SAM_costfun', all_angles(min_ind), optim_options, vox_pos, tanu, tanv, lf, all_cov, inv_cov, noise_cov); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); ************************ ________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of Yuval Harpaz [yuvharpaz at gmail.com] Sent: Friday, May 04, 2012 8:56 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] SAM option in ft_sourceanalysis Dear Elena I used it recently with MEG data and local spheres model I don't think it could work with eeg but I don't know. Yuval On 4 May 2012 09:50, Elena Orekhova > wrote: Dear fieldtrippers! I tried to use SAM beamformer for the EEG analysis, But I have got en error (see below). I guess that there is a bug in ‘beamformer_sam’at line 112. I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in ‘ft_sourceanalysis’? Thanks, Elena *********************** Error using * Inner matrix dimensions must agree. Error in beamformer_sam (line 112) inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); Error in ft_sourceanalysis (line 849) dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Mon May 7 02:49:14 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Sun, 6 May 2012 20:49:14 -0400 Subject: [FieldTrip] Artifact rejection using 'summary' mode Message-ID: Dear all FTers I want to use the artifact rejection module in the 'summary' mode. My data have just one channel (single electrode LFP recording), so, I want to summarize just the trial information (for trial rejection). Is it possible? Cheers Y -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvharpaz at gmail.com Mon May 7 07:52:29 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Mon, 7 May 2012 08:52:29 +0300 Subject: [FieldTrip] SAM option in ft_sourceanalysis In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25392603@exchccr1.neuro.gu.se> <32CC77C0C8A7AD4B9410934642608E1F25392C58@exchccr1.neuro.gu.se> Message-ID: Hi well, talking to Dr. Robinson he said he tried to make it work for EEG but since the impedance is unknown and may change during the experiment the forward solution wasn't stable enough. I noticed the fieldtrip team followed up on Dr. Robinson's SAM on few issues. since at the time it only worked with local spheres (or a single sphere but not with Nolte) sam in fieldtrip does not allow single shell for example. on the other hand, dipole orientation is not set according to Dr. Robinson's method (there is "stephen's" method there but it doesn't work now) so maybe fieldtrip went beyond Dr. Robinson and adjusted sam for EEG. Yuval On 6 May 2012 23:50, Elena Orekhova wrote: > >Dear Elena > >I used it recently with MEG data and local spheres model > >I don't think it could work with eeg but I don't know. > >Yuval > > Hi again, > Theoretically SAM should work for EEG as well. Is there any particular > reason it does not? > > I have found a previous message by Don Rojas and introduced the lambda > correction he suggested. > Now there is another error (see below). > > Dear developers, what is wrong? I would be very grateful for help! > > Elena > > > *********************** > sourcepst = ft_sourceanalysis(cfg, tlckavgpst); > the input is timelock data with 30 channels and 1250 timebins > using headmodel specified in the configuration > using electrodes specified in the configuration > creating dipole grid based on user specified dipole positions > 15156 dipoles inside, 11814 dipoles outside brain > the call to "ft_prepare_sourcemodel" took 0 seconds and an estimated 1 MB > scanning repetition 1 > using precomputed leadfields > scanning grid > Undefined function 'SAM_costfun' for input arguments of type 'double'. > > Error in fminsearch (line 191) > fv(:,1) = funfcn(x,varargin{:}); > > Error in beamformer_sam (line 157) > [opt_angle, fval, exitflag, output] = fminsearch('SAM_costfun', > all_angles(min_ind), optim_options, vox_pos, tanu, tanv, lf, all_cov, > inv_cov, noise_cov); > > > Error in ft_sourceanalysis (line 849) > dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), optarg{:}); > ************************ > > ------------------------------ > *From:* fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > on behalf of Yuval Harpaz [yuvharpaz at gmail.com] > *Sent:* Friday, May 04, 2012 8:56 PM > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] SAM option in ft_sourceanalysis > Dear Elena > I used it recently with MEG data and local spheres model > I don't think it could work with eeg but I don't know. > Yuval > > On 4 May 2012 09:50, Elena Orekhova wrote: > >> Dear fieldtrippers! >> >> >> >> I tried to use SAM beamformer for the EEG analysis, >> >> But I have got en error (see below). >> >> I guess that there is a bug in ‘beamformer_sam’at line 112. >> >> >> >> I wonder if ‘SAM’ option works at all? Did anybody used ‘SAM’ in >> ‘ft_sourceanalysis’? >> >> >> >> Thanks, >> >> Elena >> >> >> >> *********************** >> >> Error using * >> >> Inner matrix dimensions must agree. >> >> >> >> Error in beamformer_sam (line 112) >> >> inv_cov = pinv(all_cov + lambda * eye(size(all_cov))); >> >> >> >> Error in ft_sourceanalysis (line 849) >> >> dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), >> >> squeeze(Cy(i,:,:)), optarg{:}); >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Mon May 7 10:00:51 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Mon, 7 May 2012 10:00:51 +0200 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Hi Fawzi, If you do: stat = ft_timelockstatistics(cfg,avgP300{:},avgnonP300{:}) It should work. (this way the contents of each cell is used, instead the cell itself) Best, Roemer On May 5, 2012 11:51 AM, "Hamza Fawzi Altakroury (Student)" < hamzaf at sabanciuniv.edu> wrote: > Hello again Stephen and for all, > > I could not find out how to enter the following sturct into the > ft_timelockstatistics function > > The input is generated using the following loop: > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); > end > > and > > for i = 1:10 > cfg = []; > cfg.trials = [(i-1)*10+1 : i*10]; > avgP300{i} = ft_timelockanalysis(cfg,p300); > end > > > Then I use > > cfg = []; > cfg.layout = 'CTF275.lay'; > cfg.method = 'crossvalidate'; > cfg.design = [ones(10,1); 2*ones(10,1)]'; > stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); > > I get the following error > > ??? Error using ==> ft_checkdata at 307 > This function requires timelock data as input. > > Error in ==> ft_timelockstatistics at 75 > varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', > 'feedback', > 'no'); > > Error in ==> test05 at 11 > stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); > > > Any thoughts > > Hamza > > > On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Thanks a lot Stephen for your help, >> >> Hamza >> >> >> >> On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < >> stephen.whitmarsh at gmail.com> wrote: >> >>> Dear Hamza, >>> >>> Actually, the statistic functions DO accept cellstructures of >>> datastructures, and what I suggested is therefor very convenient, >>> especially in that regard. >>> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >>> would recommend walking through it from the beginning, but you could >>> take a particular look at the statistics section. In there I try to >>> explain the data structure handling in detail which deals with your >>> question. >>> >>> Cheers, >>> Stephen >>> >>> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >>> wrote: >>> > Hello again, >>> > >>> > But I need to process my data later by ft_timelockstatistics. >>> > I don't think this funtion accepts cell containing many structs. >>> > >>> > I think its better to do average manually then call ft_lockanalysis, >>> then >>> > ft_timelockstatistics. Right? >>> > >>> > Hamza >>> > >>> > >>> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >>> > wrote: >>> >> >>> >> Dear Hamza, >>> >> >>> >> Fieldtrip functions in generally do not work on several different >>> >> 'sets' of data at the same time. >>> >> Call the function you are using (e.g. ft_timelockanalysis) separately >>> >> for every set of trials and if you want put the output in a >>> >> matrix{1:10} of datastructures (e.g. timelock). >>> >> You can easily put it in a loop. Something like this: >>> >> >>> >> for i = 1:10 >>> >> cfg = []; >>> >> cfg.trials = [(i-1)*10+1 : i*10]; >>> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >>> >> end >>> >> >>> >> Hope this helps, >>> >> Stephen >>> >> >>> >> >>> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >>> >> wrote: >>> >> > Hello, >>> >> > >>> >> > I want to average each 10 trials of 100 trials. >>> >> > I don't know what to put in (cfg.trials) >>> >> > >>> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >>> >> > >>> >> > It does not work? >>> >> > >>> >> > Note: at the end I want to have a cell of 10 matices, not just one >>> >> > matrix. >>> >> > >>> >> > Any thoughts? >>> >> > >>> >> > Best, >>> >> > >>> >> > -- >>> >> > Hamza Fawzi Altakroury >>> >> > Graduate student - MA >>> >> > Faculty of Engineering and Natural Sciences >>> >> > Sabancı University >>> >> > >>> >> > _______________________________________________ >>> >> > fieldtrip mailing list >>> >> > fieldtrip at donders.ru.nl >>> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >>> >> _______________________________________________ >>> >> fieldtrip mailing list >>> >> fieldtrip at donders.ru.nl >>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> > >>> > >>> > >>> > >>> > -- >>> > Hamza Fawzi Altakroury >>> > Graduate student - MA >>> > Faculty of Engineering and Natural Sciences >>> > Sabancı University >>> > >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > 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 hamzaf at sabanciuniv.edu Mon May 7 10:44:07 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Mon, 7 May 2012 11:44:07 +0300 Subject: [FieldTrip] Averaging trials (ft_timelockanalysis) In-Reply-To: References: Message-ID: Yes, it works. Thanks a lot Roemer Best, Hamza On Mon, May 7, 2012 at 11:00 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Fawzi, > > If you do: > stat = ft_timelockstatistics(cfg,avgP300{:},avgnonP300{:}) > It should work. > (this way the contents of each cell is used, instead the cell itself) > > Best, > Roemer > On May 5, 2012 11:51 AM, "Hamza Fawzi Altakroury (Student)" < > hamzaf at sabanciuniv.edu> wrote: > >> Hello again Stephen and for all, >> >> I could not find out how to enter the following sturct into the >> ft_timelockstatistics function >> >> The input is generated using the following loop: >> >> for i = 1:10 >> cfg = []; >> cfg.trials = [(i-1)*10+1 : i*10]; >> avgnonP300{i} = ft_timelockanalysis(cfg,nonp300); >> end >> >> and >> >> for i = 1:10 >> cfg = []; >> cfg.trials = [(i-1)*10+1 : i*10]; >> avgP300{i} = ft_timelockanalysis(cfg,p300); >> end >> >> >> Then I use >> >> cfg = []; >> cfg.layout = 'CTF275.lay'; >> cfg.method = 'crossvalidate'; >> cfg.design = [ones(10,1); 2*ones(10,1)]'; >> stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); >> >> I get the following error >> >> ??? Error using ==> ft_checkdata at 307 >> This function requires timelock data as input. >> >> Error in ==> ft_timelockstatistics at 75 >> varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', >> 'feedback', >> 'no'); >> >> Error in ==> test05 at 11 >> stat = ft_timelockstatistics(cfg,avgP300,avgnonP300); >> >> >> Any thoughts >> >> Hamza >> >> >> On Thu, May 3, 2012 at 12:28 PM, Hamza Fawzi Altakroury (Student) < >> hamzaf at sabanciuniv.edu> wrote: >> >>> Thanks a lot Stephen for your help, >>> >>> Hamza >>> >>> >>> >>> On Thu, May 3, 2012 at 12:20 PM, Stephen Whitmarsh < >>> stephen.whitmarsh at gmail.com> wrote: >>> >>>> Dear Hamza, >>>> >>>> Actually, the statistic functions DO accept cellstructures of >>>> datastructures, and what I suggested is therefor very convenient, >>>> especially in that regard. >>>> Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I >>>> would recommend walking through it from the beginning, but you could >>>> take a particular look at the statistics section. In there I try to >>>> explain the data structure handling in detail which deals with your >>>> question. >>>> >>>> Cheers, >>>> Stephen >>>> >>>> On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student) >>>> wrote: >>>> > Hello again, >>>> > >>>> > But I need to process my data later by ft_timelockstatistics. >>>> > I don't think this funtion accepts cell containing many structs. >>>> > >>>> > I think its better to do average manually then call ft_lockanalysis, >>>> then >>>> > ft_timelockstatistics. Right? >>>> > >>>> > Hamza >>>> > >>>> > >>>> > On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh >>>> > wrote: >>>> >> >>>> >> Dear Hamza, >>>> >> >>>> >> Fieldtrip functions in generally do not work on several different >>>> >> 'sets' of data at the same time. >>>> >> Call the function you are using (e.g. ft_timelockanalysis) separately >>>> >> for every set of trials and if you want put the output in a >>>> >> matrix{1:10} of datastructures (e.g. timelock). >>>> >> You can easily put it in a loop. Something like this: >>>> >> >>>> >> for i = 1:10 >>>> >> cfg = []; >>>> >> cfg.trials = [(i-1)*10+1 : i*10]; >>>> >> yourtimelockdata{i} = ft_function(cfg,yourdata) >>>> >> end >>>> >> >>>> >> Hope this helps, >>>> >> Stephen >>>> >> >>>> >> >>>> >> On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student) >>>> >> wrote: >>>> >> > Hello, >>>> >> > >>>> >> > I want to average each 10 trials of 100 trials. >>>> >> > I don't know what to put in (cfg.trials) >>>> >> > >>>> >> > I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20]; >>>> >> > >>>> >> > It does not work? >>>> >> > >>>> >> > Note: at the end I want to have a cell of 10 matices, not just one >>>> >> > matrix. >>>> >> > >>>> >> > Any thoughts? >>>> >> > >>>> >> > Best, >>>> >> > >>>> >> > -- >>>> >> > Hamza Fawzi Altakroury >>>> >> > Graduate student - MA >>>> >> > Faculty of Engineering and Natural Sciences >>>> >> > Sabancı University >>>> >> > >>>> >> > _______________________________________________ >>>> >> > fieldtrip mailing list >>>> >> > fieldtrip at donders.ru.nl >>>> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >> >>>> >> _______________________________________________ >>>> >> fieldtrip mailing list >>>> >> fieldtrip at donders.ru.nl >>>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > Hamza Fawzi Altakroury >>>> > Graduate student - MA >>>> > Faculty of Engineering and Natural Sciences >>>> > Sabancı University >>>> > >>>> > _______________________________________________ >>>> > fieldtrip mailing list >>>> > fieldtrip at donders.ru.nl >>>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Mon May 7 17:36:16 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Mon, 7 May 2012 17:36:16 +0200 Subject: [FieldTrip] ICA before beamforming -> change in gradiometer -> workaround? Message-ID: Dear all, I am using ICA prior to beamforming for artefact cleaning (EOG & ECG). After running ft_componentanalysis I noticed that the gradiometer structure is removed from the data, which is required by ft_sourceanalysis. In a prior post I read that one could just add the grad structure from a previous version of the data before the ICA cleaning. http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004877.html Can anyone tell me if this is the best solution, or if there is any other strategies out there? Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Mon May 7 19:52:08 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 13:52:08 -0400 Subject: [FieldTrip] ft_sourceplot Message-ID: Hi, I am having trouble following the tutorial of 'source reconstruction of event-related fields using minimum-norm estimate'. So far, I have been successfully done with the freesurfer and am checking the mri result by freesurfer. The command is like this, % go to the Subject01/mri directory mri = ft_read_mri('filled.mgz'); cfg = []; cfg.interactive = 'yes'; figure;ft_sourceplot(cfg, mri); ft_sourceplot shows no figures at all. I do check the 'filled.mgz by converting it to nii and view it in afni. The white matter can be clearly seen. Can anybody help? Thanks a lot! Qi From yuvharpaz at gmail.com Mon May 7 20:03:49 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Mon, 7 May 2012 21:03:49 +0300 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: for work around try reading the nii with fieldtrip regards yuval On 7 May 2012 20:52, qi li wrote: > Hi, > > I am having trouble following the tutorial of 'source reconstruction > of event-related fields using minimum-norm estimate'. > > So far, I have been successfully done with the freesurfer and am > checking the mri result by freesurfer. > > The command is like this, > > % go to the Subject01/mri directory > mri = ft_read_mri('filled.mgz'); > cfg = []; > cfg.interactive = 'yes'; > figure;ft_sourceplot(cfg, mri); > > ft_sourceplot shows no figures at all. I do check the 'filled.mgz by > converting it to nii and view it in afni. The white matter can be > clearly seen. > > Can anybody help? Thanks a lot! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Mon May 7 21:19:20 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:19:20 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Hi Yuval, Thanks for your help but ft_sourceplot still can not show nii either. Now it is showing the message' Warning: no colorbar possible without functional data > In ft_sourceplot at 774 the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >> mri mri = dim: [256 256 256] anatomy: [256x256x256 double] hdr: [1x1 struct] transform: [4x4 double]' On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: > for work around try reading the nii with fieldtrip > regards > yuval > > On 7 May 2012 20:52, qi li wrote: >> >> Hi, >> >> I am having trouble following the tutorial of  'source reconstruction >> of event-related fields using minimum-norm estimate'. >> >> So far, I have been successfully done with the freesurfer and am >> checking the mri result by freesurfer. >> >> The command is like this, >> >> % go to the Subject01/mri directory >> mri = ft_read_mri('filled.mgz'); >> cfg = []; >> cfg.interactive = 'yes'; >> figure;ft_sourceplot(cfg, mri); >> >> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >> converting it to nii and view it in afni. The white matter can be >> clearly seen. >> >> Can anybody help? Thanks a lot! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > > Y.Harpaz > > a link to the BIU MEG lab: > http://faculty.biu.ac.il/~goldsa/index.html > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Mon May 7 21:23:39 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:23:39 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Hi Yuval, I tried to show the slice by the command imagesc(squeeze(mri.anatomy(100,:,:))) and please take a look of the figure attached. On Mon, May 7, 2012 at 3:19 PM, qi li wrote: > Hi Yuval, > > Thanks for your help but ft_sourceplot still can not show nii either. > > Now it is showing the message' > Warning: no colorbar possible without functional data >> In ft_sourceplot at 774 > the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>> mri > > mri = > >          dim: [256 256 256] >      anatomy: [256x256x256 double] >          hdr: [1x1 struct] >    transform: [4x4 double]' > > On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >> for work around try reading the nii with fieldtrip >> regards >> yuval >> >> On 7 May 2012 20:52, qi li wrote: >>> >>> Hi, >>> >>> I am having trouble following the tutorial of  'source reconstruction >>> of event-related fields using minimum-norm estimate'. >>> >>> So far, I have been successfully done with the freesurfer and am >>> checking the mri result by freesurfer. >>> >>> The command is like this, >>> >>> % go to the Subject01/mri directory >>> mri = ft_read_mri('filled.mgz'); >>> cfg = []; >>> cfg.interactive = 'yes'; >>> figure;ft_sourceplot(cfg, mri); >>> >>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>> converting it to nii and view it in afni. The white matter can be >>> clearly seen. >>> >>> Can anybody help? Thanks a lot! >>> >>> Qi >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> >> Y.Harpaz >> >> a link to the BIU MEG lab: >> http://faculty.biu.ac.il/~goldsa/index.html >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: 100.jpg Type: image/jpeg Size: 11381 bytes Desc: not available URL: From nathanweisz at mac.com Mon May 7 21:43:27 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Mon, 07 May 2012 21:43:27 +0200 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: hi, do you encounter the same issue with ft_sourceplot_old? (the image in the tutorial looks like the old function, but i may be mistaken) good luck, n On 07.05.2012, at 21:19, qi li wrote: > Hi Yuval, > > Thanks for your help but ft_sourceplot still can not show nii either. > > Now it is showing the message' > Warning: no colorbar possible without functional data >> In ft_sourceplot at 774 > the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>> mri > > mri = > > dim: [256 256 256] > anatomy: [256x256x256 double] > hdr: [1x1 struct] > transform: [4x4 double]' > > On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >> for work around try reading the nii with fieldtrip >> regards >> yuval >> >> On 7 May 2012 20:52, qi li wrote: >>> >>> Hi, >>> >>> I am having trouble following the tutorial of 'source reconstruction >>> of event-related fields using minimum-norm estimate'. >>> >>> So far, I have been successfully done with the freesurfer and am >>> checking the mri result by freesurfer. >>> >>> The command is like this, >>> >>> % go to the Subject01/mri directory >>> mri = ft_read_mri('filled.mgz'); >>> cfg = []; >>> cfg.interactive = 'yes'; >>> figure;ft_sourceplot(cfg, mri); >>> >>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>> converting it to nii and view it in afni. The white matter can be >>> clearly seen. >>> >>> Can anybody help? Thanks a lot! >>> >>> Qi >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> >> Y.Harpaz >> >> a link to the BIU MEG lab: >> http://faculty.biu.ac.il/~goldsa/index.html >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Mon May 7 21:59:52 2012 From: lihqih at gmail.com (qi li) Date: Mon, 7 May 2012 15:59:52 -0400 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: Yes, I have the same problem with ft_sourceplot_old. No figures out. On Mon, May 7, 2012 at 3:43 PM, Nathan Weisz wrote: > hi, > > do you encounter the same issue with ft_sourceplot_old? (the image in the tutorial looks like the old function, but i may be mistaken) > > good luck, > n > > On 07.05.2012, at 21:19, qi li wrote: > >> Hi Yuval, >> >> Thanks for your help but ft_sourceplot still can not show nii either. >> >> Now it is showing the message' >> Warning: no colorbar possible without functional data >>> In ft_sourceplot at 774 >> the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB >>>> mri >> >> mri = >> >>          dim: [256 256 256] >>      anatomy: [256x256x256 double] >>          hdr: [1x1 struct] >>    transform: [4x4 double]' >> >> On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz wrote: >>> for work around try reading the nii with fieldtrip >>> regards >>> yuval >>> >>> On 7 May 2012 20:52, qi li wrote: >>>> >>>> Hi, >>>> >>>> I am having trouble following the tutorial of  'source reconstruction >>>> of event-related fields using minimum-norm estimate'. >>>> >>>> So far, I have been successfully done with the freesurfer and am >>>> checking the mri result by freesurfer. >>>> >>>> The command is like this, >>>> >>>> % go to the Subject01/mri directory >>>> mri = ft_read_mri('filled.mgz'); >>>> cfg = []; >>>> cfg.interactive = 'yes'; >>>> figure;ft_sourceplot(cfg, mri); >>>> >>>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by >>>> converting it to nii and view it in afni. The white matter can be >>>> clearly seen. >>>> >>>> Can anybody help? Thanks a lot! >>>> >>>> Qi >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> -- >>> >>> Y.Harpaz >>> >>> a link to the BIU MEG lab: >>> http://faculty.biu.ac.il/~goldsa/index.html >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yuvharpaz at gmail.com Tue May 8 04:23:21 2012 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 8 May 2012 05:23:21 +0300 Subject: [FieldTrip] ft_sourceplot In-Reply-To: References: Message-ID: well, there's something there. the no colorbar message only means that this is structural, not functional data so it will show in grayscale, no colors. do you want to send me the image if it is not too big? I am not a ft developer but I can take a look, maybe you need to play with the contrst On 7 May 2012 22:59, qi li wrote: > Yes, I have the same problem with ft_sourceplot_old. No figures out. > > On Mon, May 7, 2012 at 3:43 PM, Nathan Weisz wrote: > > hi, > > > > do you encounter the same issue with ft_sourceplot_old? (the image in > the tutorial looks like the old function, but i may be mistaken) > > > > good luck, > > n > > > > On 07.05.2012, at 21:19, qi li wrote: > > > >> Hi Yuval, > >> > >> Thanks for your help but ft_sourceplot still can not show nii either. > >> > >> Now it is showing the message' > >> Warning: no colorbar possible without functional data > >>> In ft_sourceplot at 774 > >> the call to "ft_sourceplot" took 12 seconds and an estimated 15 MB > >>>> mri > >> > >> mri = > >> > >> dim: [256 256 256] > >> anatomy: [256x256x256 double] > >> hdr: [1x1 struct] > >> transform: [4x4 double]' > >> > >> On Mon, May 7, 2012 at 2:03 PM, Yuval Harpaz > wrote: > >>> for work around try reading the nii with fieldtrip > >>> regards > >>> yuval > >>> > >>> On 7 May 2012 20:52, qi li wrote: > >>>> > >>>> Hi, > >>>> > >>>> I am having trouble following the tutorial of 'source reconstruction > >>>> of event-related fields using minimum-norm estimate'. > >>>> > >>>> So far, I have been successfully done with the freesurfer and am > >>>> checking the mri result by freesurfer. > >>>> > >>>> The command is like this, > >>>> > >>>> % go to the Subject01/mri directory > >>>> mri = ft_read_mri('filled.mgz'); > >>>> cfg = []; > >>>> cfg.interactive = 'yes'; > >>>> figure;ft_sourceplot(cfg, mri); > >>>> > >>>> ft_sourceplot shows no figures at all. I do check the 'filled.mgz by > >>>> converting it to nii and view it in afni. The white matter can be > >>>> clearly seen. > >>>> > >>>> Can anybody help? Thanks a lot! > >>>> > >>>> Qi > >>>> _______________________________________________ > >>>> fieldtrip mailing list > >>>> fieldtrip at donders.ru.nl > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >>> > >>> > >>> > >>> -- > >>> > >>> Y.Harpaz > >>> > >>> a link to the BIU MEG lab: > >>> http://faculty.biu.ac.il/~goldsa/index.html > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Tue May 8 17:29:39 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Tue, 8 May 2012 17:29:39 +0200 Subject: [FieldTrip] center of sphere artefact Message-ID: Dear all, I was looking at my lcmv-beamformer maps of ~200 Sec of eyes closed resting state MEG activity and wondering if what I was seeing is the center of sphere artefact. The code I used is: %filtering of the data cfg = []; cfg.bpfilter = 'yes'; cfg.bpfilttype = 'but'; cfg.bpfreq = [5 45]; cfg.bpfiltord = 4; cfg.bpfiltdir = 'twopass'; [meg_data] = ft_preprocessing(cfg,meg_data); %PCA to extract components with max explained variance [cf,pcs,vexp] = princomp(meg_data.trial{1},'econ'); pexp = 100*vexp/sum(vexp); indx = find(cumsum(vexp) <=90); meg_data.trial{1} = (pcs(:,indx)*cv(:,indx)')'; % computing the covariance matrix cfg = []; cfg.channel = {'MEG'}; cfg.covariance = 'yes'; cfg.pad = 'maxperlen'; cfg.sgncmb = {'MEG' 'MEG'}; cfg.removemean = 'yes'; [cov_data] = ft_timelockanalysis(cfg,meg_data); %LCMV beamformer cfg = []; cfg.channel = {'MEG'}; cfg.grid = grid_data; cfg.vol = hdm; cfg.method = 'lcmv'; cfg.grid.dim = [Nx Ny Nz]; cfg.lcmv.fixedori = 'no'; cfg.lcmv.lambda = '5%'; cfg.lcmv.projectnoise = 'yes'; cfg.lcmv.keepfilters = 'yes'; cfg.lcmv.projectmom = 'no'; cfg.lcmv.keepmom = 'no'; cfg.lcmv.reducerank = 2; cfg.lcmv.normalize = 'yes'; [bf] = ft_sourceanalysis(cfg,cov_data); %make power unit invariant bf.avg.pow = bf.avg.pow./max(bf.avg.pow); Since I don't have enough experience to judge about that I wanted to ask if anybody out there with experience could tell me their opinion. The grid was computed using an inwardshift of -0.5 and a grid resolution of 2.5 mm. The head model using the ft_prepare_singleshell. Any help,advice, comments or suggestions would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cosa.jpg Type: image/jpeg Size: 76416 bytes Desc: not available URL: From k.muesch at uke.uni-hamburg.de Tue May 8 17:32:47 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Tue, 8 May 2012 17:32:47 +0200 Subject: [FieldTrip] specification of lambda in ft_sourceanalysis Message-ID: <1F981CD8-2F58-449D-B819-A4B383780519@uke.uni-hamburg.de> Dear all, I would like to regularize my data when calculating a DICS beamformer. In the discussion list, I found that most users set cfg.lambda = '5%' but I also found cfg.lambda = 0.05. Considering a previous post (http://mailman.science.ru.nl/pipermail/fieldtrip/2010-July/002947.html), I assume that these two options are not the same, right? Is there a rule of thumb for the specification of lambda? In addition, what aspects of my data and of my analysis should I also take into consideration? Any information is appreciated, Kathrin _____________________________________ Kathrin Müsch, PhD student Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany Phone: +49-40-7410-54680 Fax: +49-40-7410-57752 E-Mail: k.muesch at uke.uni-hamburg.de _____________________________________ -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From hamzaf at sabanciuniv.edu Wed May 9 10:33:05 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 9 May 2012 11:33:05 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions Message-ID: Hello, I am doing realtime processing, and I wanted to check ft_realtime_average function and ft_realtime_selectiveaverage functions. I faced a problem in defining cfg.trialfun Could you help me Best -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Wed May 9 10:59:36 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Wed, 9 May 2012 10:59:36 +0200 Subject: [FieldTrip] Post-doctoral and PhD position in Cognitive Neuroscience In-Reply-To: References: Message-ID: <4FAA31F8.7070606@charite.de> 1 Post-doctoral and 1 PhD position in Cognitive Neuroscience, Charité Berlin The Department of Psychiatry and Psychotherapy, Charité – Universitätsmedizin Berlin (http://psy-ccm.charite.de/en/) invites applications for a Post-doctoral and a PhD student position. A Starting Grant of the European Research Council (ERC) will fund both positions for initially 2 years with the possibility of extension. The main objective of this ERC research program is to examine neural and neurochemical markers of multisensory integration and to test a new hypothesis that considers dynamic interplay of synchronized neural populations as a key to multisensory processes (Senkowski et al. 2008, Trends in Neurosciences). The studies within this program include healthy subjects and patients with schizophrenia, as a prototype of a mental disorder with deficits in multisensory integration. Multisensory processes will be examined in a series of experiments requiring both bottom-up and top-down processing (Talsma et al. 2010, Trends in Cognitive Sciences). This comprises a combination of human EEG data as a macroscopic measure of cortical processing and source modeling of synchronized oscillatory activity. Applicants should have a background in psychology, medicine, biology, physics or neuroscience. Experience in human EEG/MEG studies or biosignal analysis (e.g., Matlab) is desirable (i.e. required for the Post-doctoral position). An interest in neurophysiologic studies in clinical populations is expected, as well as German language skills for interacting with patients. Applicants are asked to submit their CV, a short motivation letter, 2 names of referees, and documentation of relevant qualification (e.g., copies of diplomas and/or transcripts of grades) until May 20, 2012, electronically to PD Dr. Daniel Senkowski (daniel.senkowski at charite.de; www.danielsenkowski.com), Department of Psychiatry and Psychotherapy, Charité, University Medicine Berlin, 10115 Berlin, Germany, Phone: +49-30-2311-2738, Fax: +49-30-2311-2209. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreahelo at gmail.com Wed May 9 22:02:07 2012 From: andreahelo at gmail.com (Andrea Helo) Date: Wed, 9 May 2012 22:02:07 +0200 Subject: [FieldTrip] ICA Message-ID: Dear list, I'm trying to run ICA but I have a problem to plot ICA components using ft_topoplotIC(cfg,comp). It send me this error Could you help me please? ??? Error using ==> ft_prepare_layout>readlay at 668 could not open layout file: andreacoco1.lay Error in ==> ft_prepare_layout at 222 lay = readlay(cfg.layout); Error in ==> ft_topoplotER at 380 lay = ft_prepare_layout(cfg, data); Error in ==> ft_topoplotIC at 115 ft_topoplotER(cfg, varargin{:}); Andrea Thank you :) -- Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed May 9 22:09:48 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 9 May 2012 22:09:48 +0200 Subject: [FieldTrip] ICA In-Reply-To: References: Message-ID: Dear Andrea, It seems you specify cfg.layout='andreacoco1.lay'. The error message suggests Matlab is unable to open that file. Are you sure the file you refer to is present on your path, is readable, and is a valid layout file? Best, Eelke On 9 May 2012 22:02, Andrea Helo wrote: > Dear list, > > I'm trying to run ICA but I have a problem to plot ICA components using > ft_topoplotIC(cfg,comp). It send me this error > > Could you help me please? > > ??? Error using ==> ft_prepare_layout>readlay at 668 > > > could not open layout file: andreacoco1.lay > > Error in ==> ft_prepare_layout at 222 > lay = readlay(cfg.layout); > > Error in ==> ft_topoplotER at 380 > lay = ft_prepare_layout(cfg, data); > > Error in ==> ft_topoplotIC at 115 > > > ft_topoplotER(cfg, varargin{:}); > > Andrea > > > > Thank you :) > > > > -- > Andrea > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From explena at gmail.com Thu May 10 06:31:42 2012 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 10 May 2012 12:31:42 +0800 Subject: [FieldTrip] cluster-based permutation test on time-frequency data Message-ID: Dear Users, I wonder if anyone could provide any suggestion regarding an issue I encountered. According to the article (Maris, 2007), it seems that cluster-based permutation test is calculated under the permutation distribution of the maximum cluster-level statistics. In my tome-frequency data, there are two big clusters. Only one cluster reaches statistical significance; however, if I exclude this significant cluster and then rerun the test, the other cluster also reaches statistical significance. It seems to suggest that the sensitivity is lost for the second cluster. I wondered if there is any approach to resolve this issue. Many thanks! Best regards, Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreahelo at gmail.com Thu May 10 10:15:10 2012 From: andreahelo at gmail.com (Andrea Helo) Date: Thu, 10 May 2012 10:15:10 +0200 Subject: [FieldTrip] ICA In-Reply-To: References: Message-ID: Hi, Yes I'm sure I've cheked all those thing but I still have the same problen. Do you have some idea? Thank you for your help!!! On Wed, May 9, 2012 at 10:09 PM, Eelke Spaak wrote: > Dear Andrea, > > It seems you specify cfg.layout='andreacoco1.lay'. The error message > suggests Matlab is unable to open that file. Are you sure the file you > refer to is present on your path, is readable, and is a valid layout > file? > > Best, > Eelke > > On 9 May 2012 22:02, Andrea Helo wrote: > > Dear list, > > > > I'm trying to run ICA but I have a problem to plot ICA components using > > ft_topoplotIC(cfg,comp). It send me this error > > > > Could you help me please? > > > > ??? Error using ==> ft_prepare_layout>readlay at 668 > > > > > > could not open layout file: andreacoco1.lay > > > > Error in ==> ft_prepare_layout at 222 > > lay = readlay(cfg.layout); > > > > Error in ==> ft_topoplotER at 380 > > lay = ft_prepare_layout(cfg, data); > > > > Error in ==> ft_topoplotIC at 115 > > > > > > ft_topoplotER(cfg, varargin{:}); > > > > Andrea > > > > > > > > Thank you :) > > > > > > > > -- > > Andrea > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Thu May 10 12:09:51 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Thu, 10 May 2012 13:09:51 +0300 Subject: [FieldTrip] Excluding a subject Message-ID: Hi all, Is there an elegant way to exclude a subject from the statistical analysis when using ft_timelockstatistics, without computing the averages again while excluding the subject? Thanks! Roni -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 10 13:07:17 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 13:07:17 +0200 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Hi Tony, Thanks for your question. First of all, I do not fully understand what you mean with 'without computing the averages again', but I'll have a shot at it. In ft_freq/timelock-statistics you enter all your 'units of observations', i.e. data structures per subject or condition that you want to compare, together with the design matrix. The designmatrix is a one or two row matrix with as many columns as your have data-entries. One of the rows codes the group/condition membership of those entries (the independent variable). They can be subjects (group analysis) or trials (within-subjects analysis). Another row might be used to code the observation number in case you are doing a paired test. To exclude one data entry (i.e. subject) for your ft_timelockstatistics you could either: 1) not enter that datastructure as data in ft_freqstatistics, and also remove it from your design matrix. 2) keep your input to ft_timelockstatistics the same but use a zero for that entry in you design matrix. In this case that data input will not be used to calculate your statistics. I would say the second option is more elegant, but it is more prone to mistakes perhaps. You would do me a favour if you would doublecheck that it gives you the same results as option 1. I hope this answers your question, Stephen On 10 May 2012 12:09, Roni Tibon wrote: > Hi all, > Is there an elegant way to exclude a subject from the statistical analysis > when using ft_timelockstatistics, without computing the averages again while > excluding the subject? > > Thanks! > Roni > > -- >    /\.../\ >   ( -- ---)__{} >    (_.._...._) > > http://shkafkafim.blogspot.com/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Thu May 10 13:55:56 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 10 May 2012 14:55:56 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello, I don't know why should I define a function inside the ft_realtime_selectiveaverage. I just want to make an average of some segments. Could you provide me with an example of cfg.trialfun Hamza On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello, > > I am doing realtime processing, and I wanted to check ft_realtime_average > function and ft_realtime_selectiveaverage functions. > > I faced a problem in defining cfg.trialfun > > Could you help me > > Best > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu May 10 14:51:56 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 14:51:56 +0200 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Dear Hamza, The trialfunction is an integral part of processing data in FieldTrip. It is how you define your timepoints of interest, i.e. trials based on recorded markers in your data, or based on user-defined events (e.g. sleep stages). If you are not yet familiar with the basic FieldTrip operations the documentation of the realtime analysis might indeed seem somewhat inadequate as it assumes this familiarity. FieldTrip's online analysis tools are using many of the same functions of the offline ones, and has a similar overall philosophy and approach. This makes it relatively easy to understand and to use online analysis approach once one is familiar with the offline one. Alas this translation is assymmetric and doesn't hold for the other way around. The good news is, however, that everything is there to get you on your way once your take a little detour. You could take a look at the tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and get a bit of hands-on working through some steps with the supplied tutorial-data. Specifically for your question these pages would be relevant: http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data http://fieldtrip.fcdonders.nl/tutorial/preprocessing http://fieldtrip.fcdonders.nl/tutorial/continuous For more overview and general operations I would advice reading through: http://fieldtrip.fcdonders.nl/walkthrough Most of all it might not be a bad idea to start with a pre-recorded dataset and work on it offline, using the more standard and more extensively documented offline functions for e.g. trial based averaging. Once that works out for you can adapt it to the realtime situation. Hope this helps, Stephen On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I don't know why should I define a function inside the > ft_realtime_selectiveaverage. > I just want to make an average of some segments. > > Could you provide me with an example of cfg.trialfun > > Hamza > > > On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) > wrote: >> >> Hello, >> >> I am doing realtime processing, and I wanted to check ft_realtime_average >> function and ft_realtime_selectiveaverage functions. >> >> I faced a problem in defining cfg.trialfun >> >> Could you help me >> >> Best >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Thu May 10 15:07:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 May 2012 15:07:34 +0200 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hi Hamza, I just saw you've been posting on the FT list for quite a while and have been working on offline analysis already. To answer your question more specifically: The trialfunction could be very simple in the first instance, but is needed to know what samples to read when preprocessing the data. You can find some examples here that you can adapt to your own purpose here: http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition Cheers, Stephen On 10 May 2012 14:51, Stephen Whitmarsh wrote: > Dear Hamza, > > The trialfunction is an integral part of processing data in FieldTrip. > It is how you define your timepoints of interest, i.e. trials based on > recorded markers in your data, or based on user-defined events (e.g. > sleep stages). > > If you are not yet familiar with the basic FieldTrip operations the > documentation of the realtime analysis  might indeed seem somewhat > inadequate as it assumes this familiarity. FieldTrip's online analysis > tools are using many of the same functions of the offline ones, and > has a similar overall philosophy and approach. This makes it > relatively easy to understand and to use online analysis approach once > one is familiar with the offline one. Alas this translation is > assymmetric and doesn't hold for the other way around. > > The good news is, however, that everything is there to get you on your > way once your take a little detour. You could take a look at the > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and > get a bit of hands-on working through some steps with the supplied > tutorial-data. > > Specifically for your question these pages would be relevant: > http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data > http://fieldtrip.fcdonders.nl/tutorial/preprocessing > http://fieldtrip.fcdonders.nl/tutorial/continuous > > For more overview and general operations I would advice reading through: > http://fieldtrip.fcdonders.nl/walkthrough > > Most of all it might not be a bad idea to start with a pre-recorded > dataset and work on it offline, using the more standard and more > extensively documented offline functions for e.g. trial based > averaging. Once that works out for you can adapt it to the realtime > situation. > > Hope this helps, > Stephen > > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) > wrote: >> Hello, >> >> I don't know why should I define a function inside the >> ft_realtime_selectiveaverage. >> I just want to make an average of some segments. >> >> Could you provide me with an example of cfg.trialfun >> >> Hamza >> >> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >> wrote: >>> >>> Hello, >>> >>> I am doing realtime processing, and I wanted to check ft_realtime_average >>> function and ft_realtime_selectiveaverage functions. >>> >>> I faced a problem in defining cfg.trialfun >>> >>> Could you help me >>> >>> Best >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From david.m.groppe at gmail.com Thu May 10 16:42:45 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 10 May 2012 10:42:45 -0400 Subject: [FieldTrip] cluster-based permutation test on time-frequency data In-Reply-To: References: Message-ID: Hi Shen-Mou, Cluster-based permutation tests have great power for detecting broadly distributed effects, but this comes at the cost at being less sensitive to less broadly distributed effects. A good alternative to cluster-based permutation tests is Benjamini & Hochberg's false discovery rate (FDR) control algorithm. Like cluster-based permutation tests FDR control provides weak control of family-wise error, and we've found that it has relatively good power for broadly and narrowly distributed effects: Groppe, D.M., Urbach, T.P., & Kutas, M., Mass univariate analysis of event-related brain potentials/fields I: A critical tutorial review, Psychophysiology, 2011, DOI: 10.1111/j.1469-8986.2011.01273.x http://kutaslab.ucsd.edu/people/kutas/pdfs/2011.P.01273.pdf I'd recommend using that FDR control procedure over the cluster-based permutation procedure unless you are only interested in the broadly distributed effects. -David On Thu, May 10, 2012 at 12:31 AM, Shen-Mou Hsu wrote: > Dear Users, > > I wonder if anyone could provide any suggestion regarding an issue I > encountered. According to the article (Maris, 2007), it seems that > cluster-based permutation test is calculated under the permutation > distribution of the maximum cluster-level statistics. In my tome-frequency > data, there are two big clusters. Only one cluster reaches statistical > significance; however, if I exclude this significant cluster and then rerun > the test, the other cluster also reaches statistical significance. It seems > to suggest that the sensitivity is lost for the second cluster. I wondered > if there is any approach to resolve this issue. Many thanks! > > Best regards, > > Shen-Mou Hsu > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From aler1 at web.de Thu May 10 18:21:27 2012 From: aler1 at web.de (alla brodski) Date: Thu, 10 May 2012 18:21:27 +0200 (CEST) Subject: [FieldTrip] ft_sourceplot problems Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Negativeclusters_badplot_example.jpg Type: image/jpeg Size: 72058 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Positiveclusters_goodplot_example.jpg Type: image/jpeg Size: 76851 bytes Desc: not available URL: From politzerahless at gmail.com Thu May 10 18:30:31 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 10 May 2012 11:30:31 -0500 Subject: [FieldTrip] Excluding a subject Message-ID: Hi Roni, If your units of observation for the statistical test are subjects and your input to ft_timelockstatistics is a grand average structure (generated by ft_timelockgrandaverage with cfg.keepindividual='no'), then I think the easiest solution would be to just re-run ft_timelockgrandaverage again without those subjects, and use that output as the input to ft_timelockstatistics. It certainly seems easier and less error-prone than trying to change the design matrix (at least, for someone like me who has a hard time wrapping his head around statistics already!). Best, Steve > Message: 1 > Date: Thu, 10 May 2012 13:09:51 +0300 > From: Roni Tibon > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Excluding a subject > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > Is there an elegant way to exclude a subject from the statistical analysis > when using ft_timelockstatistics, without computing the averages again > while excluding the subject? > > Thanks! > Roni > > -- > /\.../\ > ( -- ---)__{} > (_.._...._) > > http://shkafkafim.blogspot.com/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120510/8ddffc61/attachment-0001.html > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Thu May 10 20:55:53 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Thu, 10 May 2012 21:55:53 +0300 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Dear Stephen and Steve, Thank you for your answers. Stephen, if I understand you correctly, option 1 means I have to compute the grand average again (using ft_timelockgrandaverage), which is what I tried to avoid. I tried option 2 though, and it didn't work. When I used a zero entry at the uvar line, the data stayed exactly the same (as if the subject was not excluded). When I used a zero entry at the ivar line (or at both lines), i get an error message saying "invalid specification for the design array". I also tried skipping the entry all together, but got an error message saying "the size of the design matrix does not match the number of observations in the data" An I doing something wrong? Steve, I guess I can do that.. the reason I'm asking is cause I want to "play" with the data a bit - remove a different subjects each time and see if I still get the same pattern. So I thought it would be easier if I did not have to compute the grand average again and again. Thanks! Roni On 10 May 2012 14:07, Stephen Whitmarsh wrote: > Hi Tony, > > Thanks for your question. > > First of all, I do not fully understand what you mean with 'without > computing the averages again', but I'll have a shot at it. > > In ft_freq/timelock-statistics you enter all your 'units of > observations', i.e. data structures per subject or condition that you > want to compare, together with the design matrix. The designmatrix is > a one or two row matrix with as many columns as your have > data-entries. One of the rows codes the group/condition membership of > those entries (the independent variable). They can be subjects (group > analysis) or trials (within-subjects analysis). Another row might be > used to code the observation number in case you are doing a paired > test. > > To exclude one data entry (i.e. subject) for your > ft_timelockstatistics you could either: > 1) not enter that datastructure as data in ft_freqstatistics, and also > remove it from your design matrix. > 2) keep your input to ft_timelockstatistics the same but use a zero > for that entry in you design matrix. In this case that data input will > not be used to calculate your statistics. > > I would say the second option is more elegant, but it is more prone to > mistakes perhaps. You would do me a favour if you would doublecheck > that it gives you the same results as option 1. > > I hope this answers your question, > > Stephen > > > > On 10 May 2012 12:09, Roni Tibon wrote: > > Hi all, > > Is there an elegant way to exclude a subject from the statistical > analysis > > when using ft_timelockstatistics, without computing the averages again > while > > excluding the subject? > > > > Thanks! > > Roni > > > > -- > > /\.../\ > > ( -- ---)__{} > > (_.._...._) > > > > http://shkafkafim.blogspot.com/ > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.sowman at mq.edu.au Fri May 11 06:01:16 2012 From: paul.sowman at mq.edu.au (Paul Sowman) Date: Fri, 11 May 2012 14:01:16 +1000 Subject: [FieldTrip] ft_sensorrealign error Message-ID: Hi, I am trying to use ft_sensorrealign to align my Yokogawa data. i am getting this error: sens2 = ft_sensorrealign(cfg, sens) using the fiducials instead of the sensor positions Warning: could be Yokogawa system > In forward/private/warning_once at 75 In ft_senstype at 280 In utilities/private/channelposition at 46 In ft_datatype_sens at 107 In ft_sensorrealign at 235 converting units from 'mm' to 'cm' ??? Subscripted assignment between dissimilar structures. Error in ==> ft_sensorrealign at 236 tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the units are consistent with the electrodes I have attached variable template and elec. Secondly, I presume also that I can only use 3 of the 5 fiducial markers? as line 395 has length(cfg.fiducial)~=3. I don't think this is causing the above issue though. Thanks, Paul -- Paul F Sowman NHMRC Postdoctoral Training Fellow Macquarie Centre for Cognitive Science (MACCS) MACQUARIE UNIVERSITY NSW 2109 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec_original.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: template.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec.mat Type: application/octet-stream Size: 10870 bytes Desc: not available URL: From stephen.whitmarsh at gmail.com Fri May 11 09:43:57 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 11 May 2012 09:43:57 +0200 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Dear Roni & Steve, Thank you for reminding me one can compare datastructures containing means computed by ft_timelockgrandaverage. I forgot about that. Then indeed the mean/var has to be re-computed every time if you are trying out different subject to reject (and the designmatrix has to stay the same). Ofcourse you are rejecting subjects based on a-priori criteria, not on the effect it has on the results, so you shouldn't have to do it too often ;-) However, to explain what I meant previously: you do not have to compute a grandaverage first, and then do statistics. You can put those subjects (of both groups) straight into ft_timelockstatistics, and use the designmatrix to specify group membership with 1's and 2's. Using a 0 instead for one of your subjects would exclude that subject from the analysis. (see http://fieldtrip.fcdonders.nl/walkthrough#non-paired_comparison). Have a nice day! Stephen On 10 May 2012 20:55, Roni Tibon wrote: > Dear Stephen and Steve, > > Thank you for your answers. > > Stephen, if I understand you correctly, option 1 means I have to compute the > grand average again (using ft_timelockgrandaverage), which is what I tried > to avoid. > > I tried option 2 though, and it didn't work. > When I used a zero entry at the uvar line, the data stayed exactly the same > (as if the subject was not excluded). When I used a zero entry at the ivar > line (or at both lines), i get an error message saying "invalid > specification for the design array". > > I also tried skipping the entry all together, but got an error message > saying "the size of the design matrix does not match the number of > observations in the data" > > An I doing something wrong? > > Steve, I guess I can do that.. the reason I'm asking is cause I want to > "play" with the data a bit - remove a different subjects each time and see > if I still get the same pattern. So I thought it would be easier if I did > not have to compute the grand average again and again. > > Thanks! > Roni > > On 10 May 2012 14:07, Stephen Whitmarsh wrote: >> >> Hi Tony, >> >> Thanks for your question. >> >> First of all, I do not fully understand what you mean with 'without >> computing the averages again', but I'll have a shot at it. >> >> In ft_freq/timelock-statistics you enter all your 'units of >> observations', i.e. data structures per subject or condition that you >> want to compare, together with the design matrix. The designmatrix is >> a one or two row matrix with as many columns as your have >> data-entries. One of the rows codes the group/condition membership of >> those entries (the independent variable). They can be subjects (group >> analysis) or trials (within-subjects analysis). Another row might be >> used to code the observation number in case you are doing a paired >> test. >> >> To exclude one data entry (i.e. subject) for your >> ft_timelockstatistics you could either: >> 1) not enter that datastructure as data in ft_freqstatistics, and also >> remove it from your design matrix. >> 2) keep your input to ft_timelockstatistics the same but use a zero >> for that entry in you design matrix. In this case that data input will >> not be used to calculate your statistics. >> >> I would say the second option is more elegant, but it is more prone to >> mistakes perhaps. You would do me a favour if you would doublecheck >> that it gives you the same results as option 1. >> >> I hope this answers your question, >> >> Stephen >> >> >> >> On 10 May 2012 12:09, Roni Tibon wrote: >> > Hi all, >> > Is there an elegant way to exclude a subject from the statistical >> > analysis >> > when using ft_timelockstatistics, without computing the averages again >> > while >> > excluding the subject? >> > >> > Thanks! >> > Roni >> > >> > -- >> >    /\.../\ >> >   ( -- ---)__{} >> >    (_.._...._) >> > >> > http://shkafkafim.blogspot.com/ >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- >    /\.../\ >   ( -- ---)__{} >    (_.._...._) > > http://shkafkafim.blogspot.com/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Fri May 11 12:05:07 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 11 May 2012 12:05:07 +0200 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis In-Reply-To: <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> References: <4F97AD41.8090304@biomag.uni-jena.de> <90F2CDAB-75CB-4E3F-AADC-94ACDD77EB90@donders.ru.nl> Message-ID: Hi Theresa, The answer to question #1 is a bit difficult because of scaling, I thought for a long time about it but I couldn't define a definite convincing answer, so I'll leave that to someone else. Without all the scaling that is going on, power for EEG is simply V^2. However, the fft/ifft in ft_specest_wavelet and the scaling by the square root of 2 over the sampling rate in line 176 of the same function complicate matters for me. I hope someone else can shine some light on it. For your second question, even though the total wavelet energy is the same at every frequency, the energy of the frequencies present in your data are not, and their energy decays with a 1/f pattern. This 1/f decrease found in EEG data is a pattern that is found in many natural phenomena. It is often referred to as 1/f noise, but I personally don't like that term, as it indicates something that is not interesting in any way. While doing some hand-waving, my intuition for neuronal recordings has always been that the time constants of lower frequencies are much further away from the 'noise' of EPSPs, dendritic and somatic currents, etc of neurons (and therefore have a higher amplitude) and that lower frequencies are thought to be generated by larger groups of neurons, which of course increases the total energy at those frequencies. This is just a vague notion of me however, surely there are more clever people on the mailinglist to give their insights, and give a more physically founded explanation of what the 1/f pattern means for neuronal recordings. But since nobody gave an answer, I'd thought I'd give it a shot anyway. Hope it helps, Cheers, Roemer On Sat, May 5, 2012 at 9:15 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Theresa, > > I am forwarding your questions to the discussion list, as this is the > forum on which we discuss this type of issues. Other people may benefit > from it too, or may feel inclined to answer. > > Cheers, > > Jan-Mathijs > > Begin forwarded message: > > *From: *Theresa Götz > *Date: *April 25, 2012 9:52:33 AM GMT+02:00 > *To: *j.schoffelen at donders.ru.nl > *Subject: **Question about unit of the wavelet analysis* > > Dear Jan-Mathijs Schoeffelen, > > we have a question about the unit of the time-frequency power spectrum: > maybe you can help me with that. > > 1. In fieldtrip, we performed ft_frequanalysis with method 'wavelet' and > output 'power'. What is the exact unit of the resulting power spectrum > (e.g. V/sqrt(hz) or V^2/Hz or V^2 or V)? > > 2. Why does the amplitude of power spectrum decrease toward higher > frequencies even though we keep the amplitude of the input sine wave (in > time domain) constant? > > Thank you very much. > > Best, > Theresa > > > > > -- > Bitte denken Sie an die Umwelt, bevor Sie diese e-Mail ausdrucken. > > > Dr. Theresa Götz Phone: +49-3641-9325780 > University Hospital Jena Fax: +49-3641-9325772 > Dept. for Neurology > Biomagnetic Center > > Erlanger Allee 101 > D-07747 Jena > Germany > > > > > Universitätsklinikum Jena > Körperschaft des öffentlichen Rechts und > Teilkörperschaft der Friedrich-Schiller-Universität Jena > Bachstraße 18, 07743 Jena > > Verwaltungsratsvorsitzender: Prof. Dr. Thomas Deufel > Medizinischer Vorstand: Prof. Dr. Klaus Höffken > Wissenschaftlicher Vorstand: Prof. Dr. Klaus Benndorf > Kaufmännischer Vorstand und > Sprecher des Klinikumsvorstandes: Dr. Brunhilde Seidel-Kwem > > Bankverbindung: Sparkasse Jena > BLZ: 830 530 30, Kto.: 221 > > Gerichtsstand Jena > Steuernummer: 161/144/02978 USt.-IdNr. : DE 150545777 > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From VenziM at cardiff.ac.uk Fri May 11 12:48:41 2012 From: VenziM at cardiff.ac.uk (Marcello Venzi) Date: Fri, 11 May 2012 11:48:41 +0100 Subject: [FieldTrip] Fwd: Question about unit of the wavelet analysis Message-ID: Hello, I'm a first year PhD student in Neuroscience, so this is really my two cents... 1) If you sum two sine waves of the same amplitude but different frequency then you would expect the wavelet spectrum to show the higher-frequency peak smaller than the lower-frequency peak (while this would not happen with the Fourier power spectrum) . Have a look at 'Bias of the Global Wavelet Spectrum' on http://paos.colorado.edu/research/wavelets/faq.html for an explanation. 2) My limited understanding of the 1/f scaling in EEG/MEG is that there is no complete agreement on what its origin is. There are at two main hypothesis that I'm aware of : -  The 1/f scaling is due to low-pass filtering of the extracellular medium. See this paper and references therein  Bédard, C., & Destexhe, A. (2009). Macroscopic models of local field potentials and the apparent 1/f noise in brain activity. Biophysical journal, 96(7), 2589-603. doi:10.1016/j.bpj.2008.12.3951 - If instead the extracellular medium is purely resistive (as suggested in this Logothethis paper: Logothetis, N. K., Kayser, C., & Oeltermann, A. (2007). In vivo measurement of cortical impedance spectrum in monkeys: implications for signal propagation. Neuron, 55(5), 809-23. doi:10.1016/j.neuron.2007.07.027 ) the scaling could represent an organized phenomenon produced by neurons, ie. an aspect of neuronal computation. I hope people in the mailing list will be so kind to correct me if this is just gibberish talk: I'm learning about this topics as I'm writing! All the best, Marcello Venzi Marcello Venzi PhD Student in Integrative Neuroscience School of Biosciences Cardiff University +44(0)29 208 7515 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Fri May 11 14:27:00 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Fri, 11 May 2012 15:27:00 +0300 Subject: [FieldTrip] Excluding a subject In-Reply-To: References: Message-ID: Got it. Awesome :) Thanks! On 11 May 2012 10:43, Stephen Whitmarsh wrote: > Dear Roni & Steve, > > Thank you for reminding me one can compare datastructures containing > means computed by ft_timelockgrandaverage. I forgot about that. Then > indeed the mean/var has to be re-computed every time if you are trying > out different subject to reject (and the designmatrix has to stay the > same). Ofcourse you are rejecting subjects based on a-priori criteria, > not on the effect it has on the results, so you shouldn't have to do > it too often ;-) > > However, to explain what I meant previously: you do not have to > compute a grandaverage first, and then do statistics. You can put > those subjects (of both groups) straight into ft_timelockstatistics, > and use the designmatrix to specify group membership with 1's and 2's. > Using a 0 instead for one of your subjects would exclude that subject > from the analysis. > (see http://fieldtrip.fcdonders.nl/walkthrough#non-paired_comparison). > > Have a nice day! > > Stephen > > > > > On 10 May 2012 20:55, Roni Tibon wrote: > > Dear Stephen and Steve, > > > > Thank you for your answers. > > > > Stephen, if I understand you correctly, option 1 means I have to compute > the > > grand average again (using ft_timelockgrandaverage), which is what I > tried > > to avoid. > > > > I tried option 2 though, and it didn't work. > > When I used a zero entry at the uvar line, the data stayed exactly the > same > > (as if the subject was not excluded). When I used a zero entry at the > ivar > > line (or at both lines), i get an error message saying "invalid > > specification for the design array". > > > > I also tried skipping the entry all together, but got an error message > > saying "the size of the design matrix does not match the number of > > observations in the data" > > > > An I doing something wrong? > > > > Steve, I guess I can do that.. the reason I'm asking is cause I want to > > "play" with the data a bit - remove a different subjects each time and > see > > if I still get the same pattern. So I thought it would be easier if I did > > not have to compute the grand average again and again. > > > > Thanks! > > Roni > > > > On 10 May 2012 14:07, Stephen Whitmarsh > wrote: > >> > >> Hi Tony, > >> > >> Thanks for your question. > >> > >> First of all, I do not fully understand what you mean with 'without > >> computing the averages again', but I'll have a shot at it. > >> > >> In ft_freq/timelock-statistics you enter all your 'units of > >> observations', i.e. data structures per subject or condition that you > >> want to compare, together with the design matrix. The designmatrix is > >> a one or two row matrix with as many columns as your have > >> data-entries. One of the rows codes the group/condition membership of > >> those entries (the independent variable). They can be subjects (group > >> analysis) or trials (within-subjects analysis). Another row might be > >> used to code the observation number in case you are doing a paired > >> test. > >> > >> To exclude one data entry (i.e. subject) for your > >> ft_timelockstatistics you could either: > >> 1) not enter that datastructure as data in ft_freqstatistics, and also > >> remove it from your design matrix. > >> 2) keep your input to ft_timelockstatistics the same but use a zero > >> for that entry in you design matrix. In this case that data input will > >> not be used to calculate your statistics. > >> > >> I would say the second option is more elegant, but it is more prone to > >> mistakes perhaps. You would do me a favour if you would doublecheck > >> that it gives you the same results as option 1. > >> > >> I hope this answers your question, > >> > >> Stephen > >> > >> > >> > >> On 10 May 2012 12:09, Roni Tibon wrote: > >> > Hi all, > >> > Is there an elegant way to exclude a subject from the statistical > >> > analysis > >> > when using ft_timelockstatistics, without computing the averages again > >> > while > >> > excluding the subject? > >> > > >> > Thanks! > >> > Roni > >> > > >> > -- > >> > /\.../\ > >> > ( -- ---)__{} > >> > (_.._...._) > >> > > >> > http://shkafkafim.blogspot.com/ > >> > > >> > > >> > _______________________________________________ > >> > fieldtrip mailing list > >> > fieldtrip at donders.ru.nl > >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > /\.../\ > > ( -- ---)__{} > > (_.._...._) > > > > http://shkafkafim.blogspot.com/ > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri May 11 18:45:16 2012 From: lihqih at gmail.com (qi li) Date: Fri, 11 May 2012 12:45:16 -0400 Subject: [FieldTrip] ft_plot_mesh Message-ID: Hi there, I am having trouble for the use of ft_plot_mesh. Can someone load the attached files and type ft_plot_mesh(bnd, 'vertexcolor', m); to see what happens. I have a blank figure. Thanks! Qi -------------- next part -------------- A non-text attachment was scrubbed... Name: bnd.mat Type: application/octet-stream Size: 259261 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: m.mat Type: application/octet-stream Size: 62865 bytes Desc: not available URL: From hamzaf at sabanciuniv.edu Sun May 13 16:46:38 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Sun, 13 May 2012 17:46:38 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Thank you for your help Stephen Hamza On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < stephen.whitmarsh at gmail.com> wrote: > Hi Hamza, > > I just saw you've been posting on the FT list for quite a while and > have been working on offline analysis already. To answer your question > more specifically: The trialfunction could be very simple in the first > instance, but is needed to know what samples to read when > preprocessing the data. You can find some examples here that you can > adapt to your own purpose here: > > http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition > > Cheers, > Stephen > > On 10 May 2012 14:51, Stephen Whitmarsh > wrote: > > Dear Hamza, > > > > The trialfunction is an integral part of processing data in FieldTrip. > > It is how you define your timepoints of interest, i.e. trials based on > > recorded markers in your data, or based on user-defined events (e.g. > > sleep stages). > > > > If you are not yet familiar with the basic FieldTrip operations the > > documentation of the realtime analysis might indeed seem somewhat > > inadequate as it assumes this familiarity. FieldTrip's online analysis > > tools are using many of the same functions of the offline ones, and > > has a similar overall philosophy and approach. This makes it > > relatively easy to understand and to use online analysis approach once > > one is familiar with the offline one. Alas this translation is > > assymmetric and doesn't hold for the other way around. > > > > The good news is, however, that everything is there to get you on your > > way once your take a little detour. You could take a look at the > > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and > > get a bit of hands-on working through some steps with the supplied > > tutorial-data. > > > > Specifically for your question these pages would be relevant: > > > http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data > > http://fieldtrip.fcdonders.nl/tutorial/preprocessing > > http://fieldtrip.fcdonders.nl/tutorial/continuous > > > > For more overview and general operations I would advice reading through: > > http://fieldtrip.fcdonders.nl/walkthrough > > > > Most of all it might not be a bad idea to start with a pre-recorded > > dataset and work on it offline, using the more standard and more > > extensively documented offline functions for e.g. trial based > > averaging. Once that works out for you can adapt it to the realtime > > situation. > > > > Hope this helps, > > Stephen > > > > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) > > wrote: > >> Hello, > >> > >> I don't know why should I define a function inside the > >> ft_realtime_selectiveaverage. > >> I just want to make an average of some segments. > >> > >> Could you provide me with an example of cfg.trialfun > >> > >> Hamza > >> > >> > >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) > >> wrote: > >>> > >>> Hello, > >>> > >>> I am doing realtime processing, and I wanted to check > ft_realtime_average > >>> function and ft_realtime_selectiveaverage functions. > >>> > >>> I faced a problem in defining cfg.trialfun > >>> > >>> Could you help me > >>> > >>> Best > >>> > >>> -- > >>> Hamza Fawzi Altakroury > >>> Graduate student - MA > >>> Faculty of Engineering and Natural Sciences > >>> Sabancı University > >> > >> > >> > >> > >> -- > >> Hamza Fawzi Altakroury > >> Graduate student - MA > >> Faculty of Engineering and Natural Sciences > >> Sabancı University > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Mon May 14 15:57:05 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Mon, 14 May 2012 16:57:05 +0300 Subject: [FieldTrip] ft_realtime_average and ft_realtime_selective_average Message-ID: Hello, I am doing realtime processing. I wrote the following two simple codes: cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; ft_realtime_average(cfg) And cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; ft_realtime_selectiveaverage(cfg) In the first no error appeared but also I did not get a result (the generated figure was empty). In the second I got the following message: ??? Error using ==> ft_read_data at 243 cannot read data before the begin of the file Error in ==> ft_realtime_selectiveaverage at 94 dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx, 'checkboundary', false); Error in ==> online2 at 10 ft_realtime_selectiveaverage(cfg) Why I get so? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From dashiel.munding at gmail.com Mon May 14 18:29:31 2012 From: dashiel.munding at gmail.com (Dashiel Munding) Date: Mon, 14 May 2012 18:29:31 +0200 Subject: [FieldTrip] Create trialfun with stim lock baseline and resp locked t.o.i. Message-ID: Hi Everyone, I'm trying to analyse some picture naming data, and need to have a trial definition that has a baseline locked to the stimulus onset, but an analysis period locked to the response onset, which has a very varied latency. That is, I have two codes on my trigger channel, X and Y. I want to lock my baseline to X, but my analysis period to Y. The example for a custom, conditional 'trialfun' [http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition] goes partway to explaining how this might be possible, but can anyone help me work out how to ask Fieldtrip to build trials like this? Many thanks, Dashiel From Elena.Orekhova at neuro.gu.se Mon May 14 21:51:11 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Mon, 14 May 2012 19:51:11 +0000 Subject: [FieldTrip] MNE to dSPM? Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> Hi I calculated the MNE estimates for an evoked potential using the full brain grid with ‘loose’ dipole orientation. I would like to calculate the dSPM values (Dale et al, Neuron, Vol. 26, 55–67). Is there a simple way to do it in the Fieldtrip? Thank you! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Mon May 14 23:37:00 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Mon, 14 May 2012 21:37:00 +0000 Subject: [FieldTrip] where is the inverse operator? Message-ID: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> Dear Fieldtrip Developers, I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? Thank you! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mollison at gmail.com Tue May 15 01:05:10 2012 From: matt.mollison at gmail.com (Matt Mollison) Date: Mon, 14 May 2012 17:05:10 -0600 Subject: [FieldTrip] Oscillatory power normalization In-Reply-To: <454AC917-60FD-4CF6-BF21-242DF4B5B4D0@mac.com> References: <454AC917-60FD-4CF6-BF21-242DF4B5B4D0@mac.com> Message-ID: Eelke, I know this is a slow reply, but I was waiting to see if someone would comment on Joe's questions. Anyway, thank you for your explanation. It makes sense that the subtraction would control for 1/f within each frequency. However, I am curious about the points that Joe brought up and I hope someone can still comment on them. Joe, Your first point seems quite important, especially when averaging across a range of frequencies is a common thing to do in the literature. Does anyone know if it's correct that higher frequencies will get washed out by lower ones when averaging within a frequency band? To add to Joe's questions, could normalizing power ever be a bad thing to do? It seems like it would be reasonable for FieldTrip to at least have the option so that one could use cfg.keeptrials='no' with ft_freqanalysis and would not need to have cfg.keeptrials='yes' for followed by the ft_freqbaseline steps that Stephan mentioned. Not sure about your second point regarding spectral density, but I would also like to know more. Thanks, everyone, for your knowledge in these matters. Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Tue, Apr 24, 2012 at 12:41 AM, Joseph Dien wrote: > I'm new to spectral analysis so take anything I say with a grain of salt: > > 1) If one intends on taking the average of a band (like 8-12Hz for alpha), > seems like maybe helpful to correct for 1/f so the lower bands don't > dominate? > > 2) Another issue is spectral density (correcting for frequency bin width > for discrete Fourier). As far as I can tell, FieldTrip isn't doing this. > Seems like it should be standard. Or at least it should say in the > documentation whether it is being done. Am I wrong? > > Cheers! > > Joe > > > > On Apr 23, 2012, at 5:54 AM, Eelke Spaak wrote: > > > Hi Matt, > > > > When you are comparing power across conditions, it is not really > > necessary to apply an explicit correction for the dominant 1/f > > component of the raw spectrum. Since this 1/f component is present in > > both conditions, when you subtract power in one condition from power > > in another condition (or compute the ratio, or log-ratio, or relative > > change, or whatever), the 1/f will cancel out and you will only be > > left with whatever is due to your experimental manipulation. This is > > true because the contrast is done per frequency. (Note that comparing > > activity versus baseline is just a special case of looking at a > > contrast between conditions, so the same argument holds there.) > > > > The only time when an explicit correction for 1/f is useful, is when > > you want to look at raw power. The most dominant oscillatory features > > (visual alpha, visual contrast induced gamma...) will usually be > > evident in raw spectra without such a correction, by the way. > > Correcting for 1/f can be done in many ways, the most simple one is > > simply taking the logarithm of power, something like: > > > > freqCorrected = freqUncorrected; > > freqCorrected.powspctrm = log10(freqCorrected.powspctrm); > > > > Or you could take the first derivative in the time domain (equivalent > > to multiplying the spectrum with f, search for post by Robert on this > > on the FT list). Or you could take the log of both the frequency- and > > power axes, then fit a line, and subtract it, then transform back > > (10^corrected data). > > > > But, the main point is: in the vast majority of typical cognitive > > experiments, correcting for 1/f is not needed. > > > > Best, > > Eelke > > > > On 23 April 2012 05:54, Matt Mollison wrote: > >> Hi FieldTrippers, > >> > >> In almost all the papers I've read involving oscillatory power, some > kind of > >> transformation is done to the data due to the 1/f power spectrum effect > >> (power decreases as frequency increases). I'm mostly looking at > >> within-subjects experiments (every subject behaved in all conditions) > >> comparing conditions across subjects, but it seems like normalizing the > >> power spectrum should apply in any case (especially if any kind of > >> parametric stats are done—right?). > >> > >> Anyway, it's not apparent to me how to use FT functions like > ft_freqanalysis > >> to make these transformations (e.g., log10 normalization, dB > normalization > >> [EEGLab does this], vector length normalization, etc.; the only thing I > see > >> is in ft_sourcedescriptives, but I'm not doing source analyses), and it > >> confuses me why this is the case. I can't find much discussion > regarding the > >> 1/f issue on the FT wiki or the mailing list. This seems like an > important > >> step that is missing from any frequency analysis workflow. Am I missing > >> something (meaning I just don't see the option), am I misunderstanding > >> something (meaning I'm incorrect in this assumption), or is this an > issue > >> that needs to be fixed? > >> > >> Thanks, > >> Matt > >> > >> -- > >> Univ. of Colorado at Boulder > >> Dept. of Psychology and Neuroscience > >> matthew.mollison at colorado.edu > >> http://psych.colorado.edu/~mollison/ > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://homepage.mac.com/jdien07/ > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 09:23:15 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 09:23:15 +0200 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se> Message-ID: Hi Elena, You can specify cfg.mne.keepfilter = 'yes'. Best, Jan-Mathijs On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: > > Dear Fieldtrip Developers, > > I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? > > Thank you! > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 09:23:56 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 09:23:56 +0200 Subject: [FieldTrip] MNE to dSPM? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F253932E1@exchccr1.neuro.gu.se> Message-ID: Hi Elena, You can specify cfg.mne.projectnoise = 'yes'. This will give you an estimate of the projected noise. This can be used as normalization term to compute the dSPM. Best, Jan-Mathijs On May 14, 2012, at 9:51 PM, Elena Orekhova wrote: > > Hi > > I calculated the MNE estimates for an evoked potential using the full brain grid with ‘loose’ dipole orientation. I would like to calculate the dSPM values (Dale et al, Neuron, Vol. 26, 55–67). Is there a simple way to do it in the Fieldtrip? > > Thank you! > Elena > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Tue May 15 10:29:19 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Tue, 15 May 2012 11:29:19 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello again Realtime functions should work if I define the function as: cfg.trialfun = 'trialfun_general'; Right? Hamza On Sun, May 13, 2012 at 5:46 PM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Thank you for your help Stephen > > Hamza > > > On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> wrote: > >> Hi Hamza, >> >> I just saw you've been posting on the FT list for quite a while and >> have been working on offline analysis already. To answer your question >> more specifically: The trialfunction could be very simple in the first >> instance, but is needed to know what samples to read when >> preprocessing the data. You can find some examples here that you can >> adapt to your own purpose here: >> >> http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition >> >> Cheers, >> Stephen >> >> On 10 May 2012 14:51, Stephen Whitmarsh >> wrote: >> > Dear Hamza, >> > >> > The trialfunction is an integral part of processing data in FieldTrip. >> > It is how you define your timepoints of interest, i.e. trials based on >> > recorded markers in your data, or based on user-defined events (e.g. >> > sleep stages). >> > >> > If you are not yet familiar with the basic FieldTrip operations the >> > documentation of the realtime analysis might indeed seem somewhat >> > inadequate as it assumes this familiarity. FieldTrip's online analysis >> > tools are using many of the same functions of the offline ones, and >> > has a similar overall philosophy and approach. This makes it >> > relatively easy to understand and to use online analysis approach once >> > one is familiar with the offline one. Alas this translation is >> > assymmetric and doesn't hold for the other way around. >> > >> > The good news is, however, that everything is there to get you on your >> > way once your take a little detour. You could take a look at the >> > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and >> > get a bit of hands-on working through some steps with the supplied >> > tutorial-data. >> > >> > Specifically for your question these pages would be relevant: >> > >> http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data >> > http://fieldtrip.fcdonders.nl/tutorial/preprocessing >> > http://fieldtrip.fcdonders.nl/tutorial/continuous >> > >> > For more overview and general operations I would advice reading through: >> > http://fieldtrip.fcdonders.nl/walkthrough >> > >> > Most of all it might not be a bad idea to start with a pre-recorded >> > dataset and work on it offline, using the more standard and more >> > extensively documented offline functions for e.g. trial based >> > averaging. Once that works out for you can adapt it to the realtime >> > situation. >> > >> > Hope this helps, >> > Stephen >> > >> > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) >> > wrote: >> >> Hello, >> >> >> >> I don't know why should I define a function inside the >> >> ft_realtime_selectiveaverage. >> >> I just want to make an average of some segments. >> >> >> >> Could you provide me with an example of cfg.trialfun >> >> >> >> Hamza >> >> >> >> >> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >> >> wrote: >> >>> >> >>> Hello, >> >>> >> >>> I am doing realtime processing, and I wanted to check >> ft_realtime_average >> >>> function and ft_realtime_selectiveaverage functions. >> >>> >> >>> I faced a problem in defining cfg.trialfun >> >>> >> >>> Could you help me >> >>> >> >>> Best >> >>> >> >>> -- >> >>> Hamza Fawzi Altakroury >> >>> Graduate student - MA >> >>> Faculty of Engineering and Natural Sciences >> >>> Sabancı University >> >> >> >> >> >> >> >> >> >> -- >> >> Hamza Fawzi Altakroury >> >> Graduate student - MA >> >> Faculty of Engineering and Natural Sciences >> >> Sabancı University >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elena.Orekhova at neuro.gu.se Tue May 15 11:18:07 2012 From: Elena.Orekhova at neuro.gu.se (Elena Orekhova) Date: Tue, 15 May 2012 09:18:07 +0000 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se>, Message-ID: <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> Thank you! I have dot source.avg.filter variable as an output. I guess that the inverse operator should have size of N-sources x M-channels and that it should be the same for all the time points. Am I correct? The structural variable source.avg.filter, however, contains 3xNchannels data for each of N-sources. What is it? Are there different inverse operators for different time points? Elena ________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Tuesday, May 15, 2012 9:23 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] where is the inverse operator? Hi Elena, You can specify cfg.mne.keepfilter = 'yes'. Best, Jan-Mathijs On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: Dear Fieldtrip Developers, I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? Thank you! Elena _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 15 11:29:51 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 May 2012 11:29:51 +0200 Subject: [FieldTrip] where is the inverse operator? In-Reply-To: <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> References: <32CC77C0C8A7AD4B9410934642608E1F25393308@exchccr1.neuro.gu.se>, <32CC77C0C8A7AD4B9410934642608E1F253933B8@exchccr1.neuro.gu.se> Message-ID: <9BE88D19-44DA-4CAC-A72D-5145E45F4DB0@donders.ru.nl> Each dipole location has a spatial filter, and each dipole is defined in 3D, hence the 3xchannels per dipole location. Jan-Mathijs On May 15, 2012, at 11:18 AM, Elena Orekhova wrote: > Thank you! > > I have dot source.avg.filter variable as an output. > > I guess that the inverse operator should have size of > N-sources x M-channels and that it should be the same for all the time points. Am I correct? > > The structural variable source.avg.filter, however, contains 3xNchannels data for each of N-sources. What is it? Are there different inverse operators for different time points? > > Elena > From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, May 15, 2012 9:23 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] where is the inverse operator? > > Hi Elena, > > You can specify cfg.mne.keepfilter = 'yes'. > > Best, > > Jan-Mathijs > > On May 14, 2012, at 11:37 PM, Elena Orekhova wrote: > >> >> Dear Fieldtrip Developers, >> >> I have one more question. I try to calculate dSPM values following formula by Dale et al (2000). For this I need the inverse operator. I have not found it in the output of the ft_sourceanalysis function. Where can it be found? >> >> Thank you! >> Elena >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Wed May 16 09:06:30 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 16 May 2012 10:06:30 +0300 Subject: [FieldTrip] cfg.trialfun in realtime functions In-Reply-To: References: Message-ID: Hello, The function can be run when I put cfg.trialfun = 'trialfun_general'; But I don't get the result that I supposed The file: cfg = []; cfg.dataset = 'buffer://localhost:1972'; cfg.channel = {'A1'}; cfg.trialfun = 'trialfun_general'; cfg.trialdef.eventtype = 'stimulus'; cfg.trialdef.eventvalue = 1; cfg.trialdef.prestim = 0; cfg.trialdef.poststim = 1; %cfg = ft_definetrial(cfg); ft_realtime_average(cfg) Is there any wrong in my function? Hamza On Tue, May 15, 2012 at 11:29 AM, Hamza Fawzi Altakroury (Student) < hamzaf at sabanciuniv.edu> wrote: > Hello again > > Realtime functions should work if I define the function as: > > cfg.trialfun = 'trialfun_general'; > > Right? > > Hamza > > > On Sun, May 13, 2012 at 5:46 PM, Hamza Fawzi Altakroury (Student) < > hamzaf at sabanciuniv.edu> wrote: > >> Thank you for your help Stephen >> >> Hamza >> >> >> On Thu, May 10, 2012 at 4:07 PM, Stephen Whitmarsh < >> stephen.whitmarsh at gmail.com> wrote: >> >>> Hi Hamza, >>> >>> I just saw you've been posting on the FT list for quite a while and >>> have been working on offline analysis already. To answer your question >>> more specifically: The trialfunction could be very simple in the first >>> instance, but is needed to know what samples to read when >>> preprocessing the data. You can find some examples here that you can >>> adapt to your own purpose here: >>> >>> http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition >>> >>> Cheers, >>> Stephen >>> >>> On 10 May 2012 14:51, Stephen Whitmarsh >>> wrote: >>> > Dear Hamza, >>> > >>> > The trialfunction is an integral part of processing data in FieldTrip. >>> > It is how you define your timepoints of interest, i.e. trials based on >>> > recorded markers in your data, or based on user-defined events (e.g. >>> > sleep stages). >>> > >>> > If you are not yet familiar with the basic FieldTrip operations the >>> > documentation of the realtime analysis might indeed seem somewhat >>> > inadequate as it assumes this familiarity. FieldTrip's online analysis >>> > tools are using many of the same functions of the offline ones, and >>> > has a similar overall philosophy and approach. This makes it >>> > relatively easy to understand and to use online analysis approach once >>> > one is familiar with the offline one. Alas this translation is >>> > assymmetric and doesn't hold for the other way around. >>> > >>> > The good news is, however, that everything is there to get you on your >>> > way once your take a little detour. You could take a look at the >>> > tutorial documentation (http://fieldtrip.fcdonders.nl/tutorial) and >>> > get a bit of hands-on working through some steps with the supplied >>> > tutorial-data. >>> > >>> > Specifically for your question these pages would be relevant: >>> > >>> http://fieldtrip.fcdonders.nl/example/getting_started_with_reading_raw_eeg_or_meg_data >>> > http://fieldtrip.fcdonders.nl/tutorial/preprocessing >>> > http://fieldtrip.fcdonders.nl/tutorial/continuous >>> > >>> > For more overview and general operations I would advice reading >>> through: >>> > http://fieldtrip.fcdonders.nl/walkthrough >>> > >>> > Most of all it might not be a bad idea to start with a pre-recorded >>> > dataset and work on it offline, using the more standard and more >>> > extensively documented offline functions for e.g. trial based >>> > averaging. Once that works out for you can adapt it to the realtime >>> > situation. >>> > >>> > Hope this helps, >>> > Stephen >>> > >>> > On 10 May 2012 13:55, Hamza Fawzi Altakroury (Student) >>> > wrote: >>> >> Hello, >>> >> >>> >> I don't know why should I define a function inside the >>> >> ft_realtime_selectiveaverage. >>> >> I just want to make an average of some segments. >>> >> >>> >> Could you provide me with an example of cfg.trialfun >>> >> >>> >> Hamza >>> >> >>> >> >>> >> On Wed, May 9, 2012 at 11:33 AM, Hamza Fawzi Altakroury (Student) >>> >> wrote: >>> >>> >>> >>> Hello, >>> >>> >>> >>> I am doing realtime processing, and I wanted to check >>> ft_realtime_average >>> >>> function and ft_realtime_selectiveaverage functions. >>> >>> >>> >>> I faced a problem in defining cfg.trialfun >>> >>> >>> >>> Could you help me >>> >>> >>> >>> Best >>> >>> >>> >>> -- >>> >>> Hamza Fawzi Altakroury >>> >>> Graduate student - MA >>> >>> Faculty of Engineering and Natural Sciences >>> >>> Sabancı University >>> >> >>> >> >>> >> >>> >> >>> >> -- >>> >> Hamza Fawzi Altakroury >>> >> Graduate student - MA >>> >> Faculty of Engineering and Natural Sciences >>> >> Sabancı University >>> >> >>> >> _______________________________________________ >>> >> fieldtrip mailing list >>> >> fieldtrip at donders.ru.nl >>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Wed May 16 09:54:56 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Wed, 16 May 2012 10:54:56 +0300 Subject: [FieldTrip] ICA for merged EEG recordings Message-ID: Hi all, I have a question which is not directly related to fieldtrip, but I bet you can help me with that :) I'm running a very long EEG experiment (takes about 3 hours), so we decided to run it in two sessions, in two following days. I used the Biosemi Merger to merge the files from day 1 and day 2, and want to run ICA to remove blinks and eye-movements. Would you say it's better to run ICA on the merged file, or do you think it would be best to run ICA separately for each file, and then merge the data? Thanks! Roni -------------- next part -------------- An HTML attachment was scrubbed... URL: From maarten.de.vos at uni-oldenburg.de Wed May 16 11:08:00 2012 From: maarten.de.vos at uni-oldenburg.de (Maarten De Vos) Date: Wed, 16 May 2012 09:08:00 +0000 Subject: [FieldTrip] ICA for merged EEG recordings In-Reply-To: References: Message-ID: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> dear Roni, I would definitely suggest to run ICA on separate blocks. Because you removed the cap, also the relative position of eyes to the electrodes can have (has) been changed. Seems you have enough data in both sessions to run a reliable ICA. so I would run ICA on separate blocks, remove artifacts, and then merge the data. best maarten ________________________________ Van: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] namens Roni Tibon [ronitibon at gmail.com] Verzonden: woensdag 16 mei 2012 9:54 Aan: Email discussion list for the FieldTrip project Onderwerp: [FieldTrip] ICA for merged EEG recordings Hi all, I have a question which is not directly related to fieldtrip, but I bet you can help me with that :) I'm running a very long EEG experiment (takes about 3 hours), so we decided to run it in two sessions, in two following days. I used the Biosemi Merger to merge the files from day 1 and day 2, and want to run ICA to remove blinks and eye-movements. Would you say it's better to run ICA on the merged file, or do you think it would be best to run ICA separately for each file, and then merge the data? Thanks! Roni -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronitibon at gmail.com Wed May 16 11:58:53 2012 From: ronitibon at gmail.com (Roni Tibon) Date: Wed, 16 May 2012 12:58:53 +0300 Subject: [FieldTrip] ICA for merged EEG recordings In-Reply-To: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> References: <6B899ABA74598247B5D363A7FE14D03EC241E5@mbx03.w2kroot.uni-oldenburg.de> Message-ID: Thanks! On 16 May 2012 12:08, Maarten De Vos wrote: > dear Roni, > > I would definitely suggest to run ICA on separate blocks. Because you > removed the cap, also the relative position of eyes to the electrodes can > have (has) been changed. Seems you have enough data in both sessions to > run a reliable ICA. > so I would run ICA on separate blocks, remove artifacts, and then merge > the data. > best > maarten > ------------------------------ > *Van:* fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > namens Roni Tibon [ronitibon at gmail.com] > *Verzonden:* woensdag 16 mei 2012 9:54 > *Aan:* Email discussion list for the FieldTrip project > *Onderwerp:* [FieldTrip] ICA for merged EEG recordings > > Hi all, > > I have a question which is not directly related to fieldtrip, but I bet > you can help me with that :) > > I'm running a very long EEG experiment (takes about 3 hours), so we > decided to run it in two sessions, in two following days. > I used the Biosemi Merger to merge the files from day 1 and day 2, and > want to run ICA to remove blinks and eye-movements. > > Would you say it's better to run ICA on the merged file, or do you think > it would be best to run ICA separately for each file, and then merge the > data? > > Thanks! > Roni > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- /\.../\ ( -- ---)__{} (_.._...._) http://shkafkafim.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Wed May 16 13:25:54 2012 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Wed, 16 May 2012 13:25:54 +0200 Subject: [FieldTrip] TFR map couldn't display negative value Message-ID: Hi Fieldtripers, I try to plot the TRP map using ft_singleplotTFR, but the colour map cannot display negative value. My code likes this: cfg = []; cfg.baseline = [-0.3 -0.1]; cfg.baselinetype = 'absolute'; cfg.channelname = {'MLP','MRP','MLO','MRO'}; figure; ft_singleplotTFR(cfg, TFR); I attach one example I plotted. Does anyone know how to solve it ? I think maybe this is a bug. Thanks in advance ! Best, Haiteng -- Haiteng Jiang PhD candidate Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Visiting address Room 2.32 Donders Centre for Cognitive Neuroimaging Kapittelweg 29 6525 EN Nijmegen the Netherlands Tel.: +31 (0)243668291 Web: https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: examples.jpg Type: image/jpeg Size: 60048 bytes Desc: not available URL: From nuria.donamayor at neuro.uni-luebeck.de Wed May 16 13:49:15 2012 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Wed, 16 May 2012 13:49:15 +0200 Subject: [FieldTrip] between-groups cluster stats Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> Dear fieldtrip users, I am currently analyzing data from a between-groups study and I am having some trouble programming the stats... Data are from a neuromag 306 system and I am using grand averages (keepindividual = yes) of the combined planar gradiometer data. I have followed the fieldtrip tutorial on cluster-based permutation tests on ERFs, so my script currently looks like this: cfg = []; cfg.latency = [0 .5]; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 3; cfg.neighbours = neighbours; cfg.tail = 0; cfg.clustertail = 0; cfg.numrandomization = 500; design = zeros(1,(size(g1.individual,1)+size(g2.individual,1))); design(1,1:size(g1.individual,1)) = 1; design(1,(size(g1.individual,1)+1):(size(g1.individual,1)+size(g2.individual,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_timelockstatistics(cfg, g1, g2); Still, though the script works, creates one or two clusters and produces no error, the output makes no sense. For example, there is a pretty huge difference in the ERFs between around 50-150 ms, but the output only shows a couple of sensors forming a cluster at 32 ms. Up to now, I had just performed within-subjects stats, so I guess there is probably something wrong in my design... I would be very thankful to any help! Thanks, Nuria From johanna.zumer at donders.ru.nl Wed May 16 14:08:45 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 16 May 2012 14:08:45 +0200 Subject: [FieldTrip] TFR map couldn't display negative value In-Reply-To: References: Message-ID: Hi Haiteng, Does this solve it for you? http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity Cheers, Johanna 2012/5/16 Haiteng Jiang > Hi Fieldtripers, > > I try to plot the TRP map using ft_singleplotTFR, but the colour map > cannot display negative value. My code likes this: > > cfg = []; > cfg.baseline = [-0.3 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.channelname = {'MLP','MRP','MLO','MRO'}; > figure; ft_singleplotTFR(cfg, TFR); > > I attach one example I plotted. Does anyone know how to solve it ? I think > maybe this is a bug. Thanks in advance ! > > > Best, > Haiteng > > > -- > Haiteng Jiang > PhD candidate > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Visiting address > Room 2.32 > Donders Centre for Cognitive Neuroimaging > Kapittelweg 29 > 6525 EN Nijmegen > the Netherlands > > Tel.: +31 (0)243668291 > Web: https://sites.google.com/site/haitengjiang/ > > > _______________________________________________ > 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.vandermeij at donders.ru.nl Wed May 16 14:48:55 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 16 May 2012 14:48:55 +0200 Subject: [FieldTrip] TFR map couldn't display negative value In-Reply-To: References: Message-ID: Hey Haiting, This is a very annoying Matlab OpenGL bug, please see the following FAQ on how to bypass it: http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity In your case, you could try the second option mentioned, it should look fine: cfg.maskstyle = 'saturation' Best, Roemer On Wed, May 16, 2012 at 2:47 PM, Roemer van der Meij < roemer.van.der.meij at gmail.com> wrote: > Hey Haiting, > > This is a very annoying Matlab OpenGL bug, please see the following FAQ on > how to bypass it: > > http://fieldtrip.fcdonders.nl/faq/i_am_getting_strange_artifacts_in_figures_that_use_opacity > > In your case, you could try the second option mentioned, it should look > fine: > cfg.maskstyle = 'saturation' > > Best, > Roemer > > > On Wed, May 16, 2012 at 1:25 PM, Haiteng Jiang wrote: > >> Hi Fieldtripers, >> >> I try to plot the TRP map using ft_singleplotTFR, but the colour map >> cannot display negative value. My code likes this: >> >> cfg = []; >> cfg.baseline = [-0.3 -0.1]; >> cfg.baselinetype = 'absolute'; >> cfg.channelname = {'MLP','MRP','MLO','MRO'}; >> figure; ft_singleplotTFR(cfg, TFR); >> >> I attach one example I plotted. Does anyone know how to solve it ? I >> think maybe this is a bug. Thanks in advance ! >> >> >> Best, >> Haiteng >> >> >> -- >> Haiteng Jiang >> PhD candidate >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Visiting address >> Room 2.32 >> Donders Centre for Cognitive Neuroimaging >> Kapittelweg 29 >> 6525 EN Nijmegen >> the Netherlands >> >> Tel.: +31 (0)243668291 >> Web: https://sites.google.com/site/haitengjiang/ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed May 16 15:36:57 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 May 2012 15:36:57 +0200 Subject: [FieldTrip] between-groups cluster stats In-Reply-To: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> References: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F231C@solaris.neuro.uni-luebeck.de> Message-ID: Dear Nuria, I don't see anything wrong with your design, its just the 1's and 2's I would expect. (although: design = [ones(1,size(g1.individual,1)) ones(1,size(g1.individual,1))*2]; would be a bit shorter ;-) Two points though: 1) Statistics don't neccecarily make sense looking only at means (or mean differences), since it depends on the variance of the data as well. Take a look at the .stat field to get a sense of how the time-by-time and sensor-by-sensor statistics are corresponding to the clusters, as well as to your mean-differences. You can also plot these values topographically to see if they make sense. 2) I would not start with clustercorrection as a first step in appreciating your effects, especially when it comes to possibly noisy intermediate data such as your within subject data. Clustercorrection is meant as a means to deal with multiple comparison corrections, nothing more nothing less. For a first look at significant differences per sensor I would not specify a .correctm at all. Going from there, and to group level, the clusters might start to make more sense though. Good luck! Stephen On 16 May 2012 13:49, Nuria Doñamayor Alonso wrote: > Dear fieldtrip users, > I am currently analyzing data from a between-groups study and I am having some trouble programming the stats... Data are from a neuromag 306 system and I am using grand averages (keepindividual = yes) of the combined planar gradiometer data. I have followed the fieldtrip tutorial on cluster-based permutation tests on ERFs, so my script currently looks like this: > > cfg = []; > cfg.latency = [0 .5]; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 3; > cfg.neighbours = neighbours; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.numrandomization = 500; > > design = zeros(1,(size(g1.individual,1)+size(g2.individual,1))); > design(1,1:size(g1.individual,1)) = 1; > design(1,(size(g1.individual,1)+1):(size(g1.individual,1)+size(g2.individual,1))) = 2; > > cfg.design = design; > cfg.ivar  = 1; > > [stat] = ft_timelockstatistics(cfg, g1, g2); > > Still, though the script works, creates one or two clusters and produces no error, the output makes no sense. For example, there is a pretty huge difference in the ERFs between around 50-150 ms, but the output only shows a couple of sensors forming a cluster at 32 ms. Up to now, I had just performed within-subjects stats, so I guess there is probably something wrong in my design... I would be very thankful to any help! > Thanks, > Nuria > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Thu May 17 15:37:06 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 17 May 2012 15:37:06 +0200 Subject: [FieldTrip] center of sphere artefact In-Reply-To: References: Message-ID: Dear Frederic, I see that you have computed the 'noise' (from cfg.lcmv.projectnoise='yes'). You can often use this output to remove the center of sphere artifact to which you refer. Have you tried this (i.e. described here http://fieldtrip.fcdonders.nl/tutorial/beamformer#neural_activity_index ) and does this help? Also, how much is the rank of the covariance matrix (i.e. cov_data.cov) reduced relative to number of sensors you have? In other words, if length(indx) is much less than the number of sensors, then you may need a cfg.lcmv.lambda greater than 5%. Best, Johanna 2012/5/8 Frederic Roux > Dear all, > > I was looking at my lcmv-beamformer maps of ~200 Sec of > eyes closed resting state MEG activity and wondering if > what I was seeing is the center of sphere artefact. > > The code I used is: > > %filtering of the data > cfg = []; > cfg.bpfilter = 'yes'; > cfg.bpfilttype = 'but'; > cfg.bpfreq = [5 45]; > cfg.bpfiltord = 4; > cfg.bpfiltdir = 'twopass'; > > [meg_data] = ft_preprocessing(cfg,meg_data); > > %PCA to extract components with max explained variance > [cf,pcs,vexp] = princomp(meg_data.trial{1},'econ'); > pexp = 100*vexp/sum(vexp); > indx = find(cumsum(vexp) <=90); > meg_data.trial{1} = (pcs(:,indx)*cv(:,indx)')'; > > % computing the covariance matrix > cfg = []; > cfg.channel = {'MEG'}; > cfg.covariance = 'yes'; > cfg.pad = 'maxperlen'; > cfg.sgncmb = {'MEG' 'MEG'}; > cfg.removemean = 'yes'; > > [cov_data] = ft_timelockanalysis(cfg,meg_data); > > %LCMV beamformer > cfg = []; > cfg.channel = {'MEG'}; > cfg.grid = grid_data; > cfg.vol = hdm; > cfg.method = 'lcmv'; > cfg.grid.dim = [Nx Ny Nz]; > > cfg.lcmv.fixedori = 'no'; > cfg.lcmv.lambda = '5%'; > cfg.lcmv.projectnoise = 'yes'; > cfg.lcmv.keepfilters = 'yes'; > cfg.lcmv.projectmom = 'no'; > cfg.lcmv.keepmom = 'no'; > cfg.lcmv.reducerank = 2; > cfg.lcmv.normalize = 'yes'; > > [bf] = ft_sourceanalysis(cfg,cov_data); > > %make power unit invariant > bf.avg.pow = bf.avg.pow./max(bf.avg.pow); > > Since I don't have enough experience to judge about that > I wanted to ask if anybody out there with experience > could tell me their opinion. > > The grid was computed using an inwardshift of -0.5 and a grid > resolution of 2.5 mm. The head model using the ft_prepare_singleshell. > > Any help,advice, comments or suggestions would be highly appreciated. > > Best, > Fred > > > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > _______________________________________________ > 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 johanna.zumer at donders.ru.nl Thu May 17 15:59:10 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 17 May 2012 15:59:10 +0200 Subject: [FieldTrip] ICA before beamforming -> change in gradiometer -> workaround? In-Reply-To: References: Message-ID: Dear Frederic, It is possible to keep the .grad structure, with updated .grad.tra, by including, in the third argument to ft_rejectcomponent, the original data structure, like this: comp=ft_componentanalysis(cfg1,rawdata) cleanedraw=ft_rejectcomponent(cfg2,comp,rawdata); Best, Johanna 2012/5/7 Frederic Roux > Dear all, > > I am using ICA prior to beamforming for artefact cleaning (EOG & ECG). > > After running ft_componentanalysis I noticed that the gradiometer structure > is removed from the data, which is required by ft_sourceanalysis. > > In a prior post I read that one could just add the grad structure from a > previous version > of the data before the ICA cleaning. > > http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004877.html > > Can anyone tell me if this is the best solution, or if there is any other > strategies out there? > > Best, > Fred > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > _______________________________________________ > 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 jonas at obleser.de Fri May 18 17:51:40 2012 From: jonas at obleser.de (Jonas Obleser) Date: Fri, 18 May 2012 17:51:40 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions Message-ID: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> Dear FT colleagues, after a great FT workshop and a fresh FT release in my matlab path, I am all the more confused on how to “beam“ my single trials (DICS, cfg.realfilter='yes'). Now, here I have this filter (allsource.avg.filter) constructed from the CSD of, say 300 trials (a struct called allfreq, baseline and post-stim together; obtained with ft_freqanalysis, 'mtmfft', cfg.keeptrials ='yes'). In order to “filter them all and let God sort ’em out” later, I somehow must now funnel my allfreq.trials through the filter (cfg.grid.filter = allsource.avg.filter). But: Somehow, cfg.rawtrials seems to be deprecated, can this be true? I understand that in principle it would simply be the single-trial CSD “sandwiched” between the filter and the filter transposed, so I probably can do it by hand easily, but I thought there still must be a handy way of having FT do this for me? Thanks for a quick hint by anybody! Best wishes, Jonas Dr. Jonas Obleser Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Leipzig, Germany (p) +49 (0)341 9940 114 (e) obleser at cbs.mpg.de From johanna.zumer at donders.ru.nl Fri May 18 18:15:45 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 18 May 2012 18:15:45 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions In-Reply-To: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> References: <49E77A44-1EA0-4B68-AFA5-16EC886D194B@obleser.de> Message-ID: Dear Jonas, Sorry that this part is indeed confusing. cfg.rawtrial is not deprecated, but rather you should specify cfg.grid.filter = allsource.avg.filter and cfg.rawtrial = 'yes' and cfg.keeptrials = 'yes', but cfg.singletrial='no' (i.e. default). On what line exactly are you finding an error? or is the mistake that you are calling it 'rawtrials' not 'rawtrial'? Best regards, Johanna 2012/5/18 Jonas Obleser > > Dear FT colleagues, > > after a great FT workshop and a fresh FT release in my matlab path, > I am all the more confused on how to “beam“ my single trials (DICS, > cfg.realfilter='yes'). > > Now, here I have this filter (allsource.avg.filter) constructed from the > CSD of, say 300 trials (a struct called allfreq, baseline and post-stim > together; obtained with ft_freqanalysis, 'mtmfft', cfg.keeptrials ='yes'). > > In order to “filter them all and let God sort ’em out” later, I somehow > must now funnel my allfreq.trials through the filter (cfg.grid.filter = > allsource.avg.filter). > > But: Somehow, cfg.rawtrials seems to be deprecated, can this be true? > > I understand that in principle it would simply be the single-trial CSD > “sandwiched” between the filter and the filter transposed, so I probably > can do it by hand easily, but I thought there still must be a handy way of > having FT do this for me? > > Thanks for a quick hint by anybody! > Best wishes, Jonas > > > > > Dr. Jonas Obleser > Auditory Cognition Group > Max Planck Institute for Human Cognitive and Brain Sciences > Leipzig, Germany > (p) +49 (0)341 9940 114 > (e) obleser at cbs.mpg.de > > > > > _______________________________________________ > 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 jonas at obleser.de Sat May 19 12:14:43 2012 From: jonas at obleser.de (Jonas Obleser) Date: Sat, 19 May 2012 12:14:43 +0200 Subject: [FieldTrip] beamforming single trials with recent FT versions Message-ID: Dear Johanna, thanks, it really *was* one of these notorious plural/singular cfg errors (“cfg.rawtrials” rather than the correct “cfg.rawtrial”). Am getting “scanning repetition 1 … 2 … 3 ” now with the precomputed filter and leadfield, so it seems to work. [I must say that three options named cfg.singletrial, cfg.rawtrial, and cfg.keeptrials is a pretty daring combo!] Best wishes, Jonas Dr. Jonas Obleser Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Leipzig, Germany (p) +49 (0)341 9940 114 (e) obleser at cbs.mpg.de From daria.laptinskaya at googlemail.com Sat May 19 17:21:37 2012 From: daria.laptinskaya at googlemail.com (Daria Laptinskaya) Date: Sat, 19 May 2012 17:21:37 +0200 Subject: [FieldTrip] Changing samplingrate for EGI-data Message-ID: Dear All, I wish to subsample my EGI-data from 1000 to 250 Hz before preprocessing to speed up the whole analysis. For the step descriped at http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the structure as obtained from the FT_PREPROCESSING function is needed. Does anyone have an idea for read the data with a changing samplingrate before preprocessing? It would really help me a lot! Thanks, Daria From inieuwenhuis at berkeley.edu Sat May 19 20:58:02 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Sat, 19 May 2012 11:58:02 -0700 Subject: [FieldTrip] Changing samplingrate for EGI-data In-Reply-To: References: Message-ID: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> Hi Daria, Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. Hope this helps, Ingrid On May 19, 2012, at 8:21, Daria Laptinskaya wrote: > Dear All, > > I wish to subsample my EGI-data from 1000 to 250 Hz before > preprocessing to speed up the whole analysis. > For the step descriped at > http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the > structure as obtained from the FT_PREPROCESSING function is needed. > Does anyone have an idea for read the data with a changing > samplingrate before preprocessing? > It would really help me a lot! > > Thanks, > Daria > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Sun May 20 11:53:58 2012 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 20 May 2012 11:53:58 +0200 Subject: [FieldTrip] equal number of trials across conditions Message-ID: <4FB8BF36.8050909@gmail.com> Hi everyone, I'm working on a dataset (ERPs, but this is not that relevant for the question, I believe) for which one condition elicited more errors than the other. I'd like to have both conditions with the same number of trials in the analyses. Ideally, I'd throw away the noisiest trials from one condition, instead of just start throwing away trials at random. I was thinking of using z-scores for that but I was wondering if any of you has already done this before and how. What would be the best way to go? Take the mean amplitude across all trials (collapsed over condition or not?) and calculate the z-score for each trial individually? Then take out the one with the largest scores? How does this approach sound? Does FT keep information about the variance for each trial somewhere in the output of an artefact rejection function? Or would I have to compute that myself? I'd appreciate any suggestions or feedback. Cheers, Vitória From inbalots at gmail.com Sun May 20 13:02:58 2012 From: inbalots at gmail.com (Inbal Shapira Lots) Date: Sun, 20 May 2012 14:02:58 +0300 Subject: [FieldTrip] error using ft_databrowser Message-ID: Hello I call the function in the following way: cfg = []; cfg.dataset=fileName; cfg.trialdef.beginning=0.1; cfg.trialdef.end=0.2; cfg.trialfun='trialfun_raw'; cfg=ft_definetrial(cfg); % to create all needed fields additionally to trl cfg.demean='yes'; cfg.baselinewindow=[-0.2,0]; cfg.trl = trl; cfg.channel = {'MEG'}; BLC =ft_preprocessing(cfg); cfg.layout='4D248.lay'; cfg.channel = {BLC.label{1:10:end}}; cfgbo=ft_databrowser(cfg,BLC); and I get the following error: ??? Attempt to reference field of non-structure array. Error in ==> ft_databrowser at 411 eventtypes = unique({event.type}); What do I do wrong? a similar error occure when I call in this way as well: cfgc = []; cfgc.method='pca'; cfgc.numcomponent=20; comp = ft_componentanalysis(cfgc, BLC); cfgb=[]; cfgb.layout='4D248.lay'; cfgb.channel = {comp.label{1:5}}; %cfgb.ploteventlabels ='colorvalue' ;%(default = 'type=value'); cfgbo=ft_databrowser(cfgb,comp); Thanks Inbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Sun May 20 13:25:52 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Sun, 20 May 2012 13:25:52 +0200 Subject: [FieldTrip] Changing samplingrate for EGI-data In-Reply-To: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> References: <68B9C121-A39A-45B3-BA63-9DDFBF7302F4@berkeley.edu> Message-ID: Hi Daria, 1. you may want to check out the EGI software. there should be some resampling tool. the you can read the downsampled data into FT. 2. you can read chunks of trials using ft_preprocessing. resample. at the end concatenate them with ft_appenddata ciao, n On 19.05.2012, at 20:58, Ingrid Nieuwenhuis wrote: > Hi Daria, > > Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. > > Hope this helps, > Ingrid > > On May 19, 2012, at 8:21, Daria Laptinskaya wrote: > >> Dear All, >> >> I wish to subsample my EGI-data from 1000 to 250 Hz before >> preprocessing to speed up the whole analysis. >> For the step descriped at >> http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the >> structure as obtained from the FT_PREPROCESSING function is needed. >> Does anyone have an idea for read the data with a changing >> samplingrate before preprocessing? >> It would really help me a lot! >> >> Thanks, >> Daria >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.stolk at fcdonders.ru.nl Mon May 21 09:18:59 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 21 May 2012 09:18:59 +0200 (CEST) Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: <4FB8BF36.8050909@gmail.com> Message-ID: <96701170.281413.1337584739634.JavaMail.root@sculptor.zimbra.ru.nl> Hi Vitoria, With 'randperm' you can randomly select a number of trials from one set. If you think order is important, for example indicated by the the trialnumber, have a look at ft_stratify and method 'histogram'. I would perform these randomization steps after regular cleaning. Perhaps someone else has more fine-grained idea for your desired approach. Yours, Arjen ----- Oorspronkelijk bericht ----- > Van: "Vitória Magalhães Piai" > Aan: fieldtrip at donders.ru.nl > Verzonden: Zondag 20 mei 2012 11:53:58 > Onderwerp: [FieldTrip] equal number of trials across conditions > Hi everyone, > > I'm working on a dataset (ERPs, but this is not that relevant for the > question, I believe) for which one condition elicited more errors than > the other. > > I'd like to have both conditions with the same number of trials in the > analyses. > Ideally, I'd throw away the noisiest trials from one condition, > instead > of just start throwing away trials at random. > > I was thinking of using z-scores for that but I was wondering if any > of > you has already done this before and how. What would be the best way > to go? > Take the mean amplitude across all trials (collapsed over condition or > not?) and calculate the z-score for each trial individually? Then take > out the one with the largest scores? How does this approach sound? > Does FT keep information about the variance for each trial somewhere > in > the output of an artefact rejection function? Or would I have to > compute > that myself? > > I'd appreciate any suggestions or feedback. > > Cheers, Vitória > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From g.piantoni at nin.knaw.nl Mon May 21 11:19:12 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Mon, 21 May 2012 11:19:12 +0200 Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: <4FB8BF36.8050909@gmail.com> References: <4FB8BF36.8050909@gmail.com> Message-ID: Hi Vitória, I like the intuitive appeal of your approach, in order to keep only the "most representative" trials. However, I'd have serious concerns that your approach might not be valid. If you reject only the noisiest trials from condition A, you're applying a sort of extra preprocessing step to your data and this makes the comparison between conditions A and B not very meaningful. You cannot unequivocally attribute the difference between A and B to a real difference between experimental conditions or to the extra preprocessing step. More critically, if you only reject noisy trials in condition A, you'll systematically introduce heteroscedasticity in your data; this is against one of the assumptions of parametric testing. I agree with Arjen to use random sampling of the trials of condition A. Depending on what you want to do next, you can even get standard errors from this randomization, similarly to the bootstrap approach. I find this a very elegant way to deal with very unequal numbers of trials. Hope this helps, Best, Gio -- Giovanni Piantoni, MSc Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 20 5665492 gio at gpiantoni.com www.gpiantoni.com On Sun, May 20, 2012 at 11:53 AM, Vitória Magalhães Piai wrote: > Hi everyone, > > I'm working on a dataset (ERPs, but this is not that relevant for the > question, I believe) for which one condition elicited more errors than the > other. > > I'd like to have both conditions with the same number of trials in the > analyses. > Ideally, I'd throw away the noisiest trials from one condition, instead of > just start throwing away trials at random. > > I was thinking of using z-scores for that but I was wondering if any of you > has already done this before and how. What would be the best way to go? > Take the mean amplitude across all trials (collapsed over condition or not?) > and calculate the z-score for each trial individually? Then take out the one > with the largest scores? How does this approach sound? > Does FT keep information about the variance for each trial somewhere in the > output of an artefact rejection function? Or would I have to compute that > myself? > > I'd appreciate any suggestions or feedback. > > Cheers, Vitória > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Mon May 21 12:07:02 2012 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Mon, 21 May 2012 12:07:02 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 18, Issue 33 In-Reply-To: References: Message-ID: <4FBA13C6.205@gmail.com> Thank you Arjen and Giovanni, and good point Gio, didn't think of that before but now that you mention, it's really obvious that that would create a difference between the conditions in itself. I'll go for random then. Cheers, Vitória On 21-5-2012 12:00, fieldtrip-request at donders.ru.nl wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. error using ft_databrowser (Inbal Shapira Lots) > 2. Re: Changing samplingrate for EGI-data (Nathan Weisz) > 3. Re: equal number of trials across conditions (Stolk, A.) > 4. Re: equal number of trials across conditions (Gio Piantoni) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 20 May 2012 14:02:58 +0300 > From: Inbal Shapira Lots > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] error using ft_databrowser > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hello > I call the function in the following way: > cfg = []; > cfg.dataset=fileName; > cfg.trialdef.beginning=0.1; > cfg.trialdef.end=0.2; > cfg.trialfun='trialfun_raw'; > cfg=ft_definetrial(cfg); % to create all needed fields additionally to trl > cfg.demean='yes'; > cfg.baselinewindow=[-0.2,0]; > cfg.trl = trl; > cfg.channel = {'MEG'}; > BLC =ft_preprocessing(cfg); > > cfg.layout='4D248.lay'; > cfg.channel = {BLC.label{1:10:end}}; > cfgbo=ft_databrowser(cfg,BLC); > > and I get the following error: > > ??? Attempt to reference field of non-structure array. > Error in ==> ft_databrowser at 411 > eventtypes = unique({event.type}); > > What do I do wrong? > > a similar error occure when I call in this way as well: > cfgc = []; > cfgc.method='pca'; > cfgc.numcomponent=20; > comp = ft_componentanalysis(cfgc, BLC); > > cfgb=[]; > cfgb.layout='4D248.lay'; > cfgb.channel = {comp.label{1:5}}; > %cfgb.ploteventlabels ='colorvalue' ;%(default = 'type=value'); > cfgbo=ft_databrowser(cfgb,comp); > > > Thanks > Inbal > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Sun, 20 May 2012 13:25:52 +0200 > From: Nathan Weisz > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Changing samplingrate for EGI-data > Message-ID: > Content-Type: text/plain; CHARSET=US-ASCII > > Hi Daria, > > 1. you may want to check out the EGI software. there should be some resampling tool. the you can read the downsampled data into FT. > 2. you can read chunks of trials using ft_preprocessing. resample. at the end concatenate them with ft_appenddata > > ciao, > n > > On 19.05.2012, at 20:58, Ingrid Nieuwenhuis wrote: > >> Hi Daria, >> >> Although the name of the ft_preprocessing function may have you suspect differently,with this function you can just 'read in' your data (given your computer has enough memory to contain the whole data) with out any extra preprocessing. Subsequently you can then just resample your data with, indeed, ft_resampledata. For the ins and outs of the ft_preprocessing function, I recommend you take a look at the FieldTrip wiki (fieldrtip.fcdonders.nl) and the preprocessing - reading continuous data tutorial (http://fieldtrip.fcdonders.nl/tutorial/continuous) in particular. >> >> Hope this helps, >> Ingrid >> >> On May 19, 2012, at 8:21, Daria Laptinskaya wrote: >> >>> Dear All, >>> >>> I wish to subsample my EGI-data from 1000 to 250 Hz before >>> preprocessing to speed up the whole analysis. >>> For the step descriped at >>> http://fieldtrip.googlecode.com/svn/trunk/ft_resampledata.m the >>> structure as obtained from the FT_PREPROCESSING function is needed. >>> Does anyone have an idea for read the data with a changing >>> samplingrate before preprocessing? >>> It would really help me a lot! >>> >>> Thanks, >>> Daria >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ------------------------------ > > Message: 3 > Date: Mon, 21 May 2012 09:18:59 +0200 (CEST) > From: "Stolk, A." > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] equal number of trials across conditions > Message-ID: > <96701170.281413.1337584739634.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Vitoria, > > With 'randperm' you can randomly select a number of trials from one set. If you think order is important, for example indicated by the the trialnumber, have a look at ft_stratify and method 'histogram'. > > I would perform these randomization steps after regular cleaning. Perhaps someone else has more fine-grained idea for your desired approach. > > Yours, > Arjen > > > > ----- Oorspronkelijk bericht ----- >> Van: "Vit?ria Magalh?es Piai" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Zondag 20 mei 2012 11:53:58 >> Onderwerp: [FieldTrip] equal number of trials across conditions >> Hi everyone, >> >> I'm working on a dataset (ERPs, but this is not that relevant for the >> question, I believe) for which one condition elicited more errors than >> the other. >> >> I'd like to have both conditions with the same number of trials in the >> analyses. >> Ideally, I'd throw away the noisiest trials from one condition, >> instead >> of just start throwing away trials at random. >> >> I was thinking of using z-scores for that but I was wondering if any >> of >> you has already done this before and how. What would be the best way >> to go? >> Take the mean amplitude across all trials (collapsed over condition or >> not?) and calculate the z-score for each trial individually? Then take >> out the one with the largest scores? How does this approach sound? >> Does FT keep information about the variance for each trial somewhere >> in >> the output of an artefact rejection function? Or would I have to >> compute >> that myself? >> >> I'd appreciate any suggestions or feedback. >> >> Cheers, Vit?ria >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > ------------------------------ > > Message: 4 > Date: Mon, 21 May 2012 11:19:12 +0200 > From: Gio Piantoni > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] equal number of trials across conditions > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Hi Vit?ria, > > I like the intuitive appeal of your approach, in order to keep only > the "most representative" trials. However, I'd have serious concerns > that your approach might not be valid. > > If you reject only the noisiest trials from condition A, you're > applying a sort of extra preprocessing step to your data and this > makes the comparison between conditions A and B not very meaningful. > You cannot unequivocally attribute the difference between A and B to a > real difference between experimental conditions or to the extra > preprocessing step. > More critically, if you only reject noisy trials in condition A, > you'll systematically introduce heteroscedasticity in your data; this > is against one of the assumptions of parametric testing. > > I agree with Arjen to use random sampling of the trials of condition > A. Depending on what you want to do next, you can even get standard > errors from this randomization, similarly to the bootstrap approach. I > find this a very elegant way to deal with very unequal numbers of > trials. > > Hope this helps, > > Best, > > Gio > > > -- > ** Please consider the environment - do you really need to print? ** From y.j.w.rozendaal at student.tue.nl Mon May 21 13:28:08 2012 From: y.j.w.rozendaal at student.tue.nl (Rozendaal, Y.J.W.) Date: Mon, 21 May 2012 13:28:08 +0200 Subject: [FieldTrip] out of memory when executing ft_volumesegmentation Message-ID: <0C957C2F55FC6447A1F237B48EA8604801025D97777F@EXCHANGE12.campus.tue.nl> Hi, I'm trying to create a head model using an MRI to use it for dipole fitting of MEG data. However, currently my Matlab (R2007b on Windows Vista) gives an 'out of memory' error when executing the ft_volumesegment statement. I already tried several things to improve memory handling by Matlab (not keeping trials, not keeping intermediate and the 'pack' statement). The first part of the output seems fine: the input is volume data with dimensions [240 240 170] Converting the coordinate system from ctf to spm performing the segmentation on the specified volume creating scalpmask smoothing anatomy with a 5-voxel FWHM kernel thresholding anatomy at a relative threshold of 0.100 ??? Error using ==> spm_bwlabel Out of memory. Type HELP MEMORY for your options. Error in ==> ft_volumesegment>threshold at 535 [tmp, N] = spm_bwlabel(output, 6); Error in ==> ft_volumesegment at 490 if dothresh, anatomy = threshold(anatomy, cfg.threshold(k), 'anatomy'); end This problem also occured when using the mri of the provided tutorial data. How could I fix this and what causes this large memory consumption? Could using another version of Matlab help or is there an error in my code? Thanks in advance, Yvonne ----- %% load MRI file mri = ft_read_mri(filename_mri); %% realign MRI to head coordinates cfg = []; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg,mri); %% segment MRI cfg = []; cfg.units = 'mm'; cfg.output = {'scalp,'skull','brain'}; cfg.keeptrials = 'no'; cfg.keepintermediate = 'no'; pack mri_segmented = ft_volumesegment(cfg,mri_realigned); From wljj09 at gmail.com Mon May 21 13:44:17 2012 From: wljj09 at gmail.com (Jing Wang) Date: Mon, 21 May 2012 13:44:17 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? Message-ID: Dear Fieldtrip developers and users, I have found same error when I using ft_spiketriggeredaverage and ft_spiketriggeredspectrum.m. After I run the following script, an error appeared at line 51 cfg=ft_checkconfig. This error also is same when I run ft_spiketriggeredspectrum.m. But after I use comment to silent a part of these functions. it could work well. It is same for both the latese and 20120420 version of Fieldtrip. I donnot know whether it is a bug or something wrong with my data? Would anybody who knows can help me? That will be really appreciated! Thanks in advance! Jing I have append spike and LFP into data. The folloing is the script and error information. *cfg=[]; cfg.timwin = [-0.01 0.01]; cfg.spikechannel =data.label{1}; cfg.channel = data.label{2}; cfg.keeptrials ='yes'; cfg.feedback='yes'; [timelock] = ft_spiketriggeredaverage(cfg, data);* ** *Error using ft_getopt the first input should contain key-value pairs* *Error in ft_checkconfig (line 83) renamed = ft_getopt(varargin, 'renamed');* *Error in ft_spiketriggeredaverage (line 51) cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ...* For ft_spikertriggerespectrum, I silent the line like this, the script can work well. *% cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... % 'outputfile'); % see ** http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056* For ft_spiketriggeredaverage, the script can work when I silent these part. it can work well. * % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); % cfg.channel = ft_getopt(cfg,'channel', 'all'); % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); * -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon May 21 13:57:10 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 21 May 2012 13:57:10 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: Dear Jing Wang, This is a bug in the functions you mention. ft_checkconfig should be called like this: cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); so with the forbidden options grouped in a cell array, rather than as it was done in the code snippet you posted. There also seem to be a few other minor bugs in the ft_getopt/checkopt calls. Could you file a bug on this on our Bugzilla tracking system? http://bugzilla.fcdonders.nl/ Thank you for reporting this! Best, Eelke On 21 May 2012 13:44, Jing Wang wrote: > Dear Fieldtrip developers and users, > > I have found same error when I using ft_spiketriggeredaverage and > ft_spiketriggeredspectrum.m. > After I run the following script, an error appeared at line 51 > cfg=ft_checkconfig. This error also is same when I run > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > these functions. it could work well. It is same for both the latese and > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > something wrong with my data? Would anybody who knows can help me? > That will be really appreciated! Thanks in advance! > Jing > > I have append spike and LFP into data. The folloing is the script and error > information. > cfg=[]; > cfg.timwin = [-0.01 0.01]; > cfg.spikechannel =data.label{1}; > cfg.channel = data.label{2}; > cfg.keeptrials ='yes'; > cfg.feedback='yes'; > [timelock] = ft_spiketriggeredaverage(cfg, data); > > Error using ft_getopt > the first input should contain key-value pairs > Error in ft_checkconfig (line 83) > renamed         = ft_getopt(varargin, 'renamed'); > Error in ft_spiketriggeredaverage (line 51) > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > For ft_spikertriggerespectrum, I silent the line like this, the script can > work well. > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > %                                        'outputfile');  % see > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > For ft_spiketriggeredaverage, the script can work when I silent these part. > it can work well. >  % cfg.timwin       = ft_getopt(cfg, 'timwin',[-0.1 0.1]); >  % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); >  % cfg.channel      = ft_getopt(cfg,'channel', 'all'); >  % cfg.keeptrials   = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); >  % cfg.feedback     = ft_checkopt(cfg,'feedback', 'yes'); > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Mon May 21 15:08:23 2012 From: wljj09 at gmail.com (Jing Wang) Date: Mon, 21 May 2012 15:08:23 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: Hello Eelke, Thank you very much for your answers. I will file this bug in Bugzilla tracking system. I also found that there are some functions which are used in the ft_spike* function are not in the Fieldtrip. One is *specest_nanfft.m* which is used in ft_spiketriggeredspectrum.m and another is *ft_write_spike* which is used in ft_spikedetection. We could not find the two functions in Fieldtrip to run these main functions about spike analysis. Whether it has been changed names or put somewhere else? Would you please give me some idea about that? Thanks again! Best Regards Jing 2012/5/21 Eelke Spaak > Dear Jing Wang, > > This is a bug in the functions you mention. ft_checkconfig should be > called like this: > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > so with the forbidden options grouped in a cell array, rather than as > it was done in the code snippet you posted. There also seem to be a > few other minor bugs in the ft_getopt/checkopt calls. > > Could you file a bug on this on our Bugzilla tracking system? > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > Best, > Eelke > > On 21 May 2012 13:44, Jing Wang wrote: > > Dear Fieldtrip developers and users, > > > > I have found same error when I using ft_spiketriggeredaverage and > > ft_spiketriggeredspectrum.m. > > After I run the following script, an error appeared at line 51 > > cfg=ft_checkconfig. This error also is same when I run > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > > these functions. it could work well. It is same for both the latese and > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > something wrong with my data? Would anybody who knows can help me? > > That will be really appreciated! Thanks in advance! > > Jing > > > > I have append spike and LFP into data. The folloing is the script and > error > > information. > > cfg=[]; > > cfg.timwin = [-0.01 0.01]; > > cfg.spikechannel =data.label{1}; > > cfg.channel = data.label{2}; > > cfg.keeptrials ='yes'; > > cfg.feedback='yes'; > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > Error using ft_getopt > > the first input should contain key-value pairs > > Error in ft_checkconfig (line 83) > > renamed = ft_getopt(varargin, 'renamed'); > > Error in ft_spiketriggeredaverage (line 51) > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > For ft_spikertriggerespectrum, I silent the line like this, the script > can > > work well. > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > % 'outputfile'); % see > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > For ft_spiketriggeredaverage, the script can work when I silent these > part. > > it can work well. > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', > 'no'}); > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrecravo at gmail.com Mon May 21 17:08:31 2012 From: andrecravo at gmail.com (Andre Cravo) Date: Mon, 21 May 2012 12:08:31 -0300 Subject: [FieldTrip] equal number of trials across conditions In-Reply-To: References: <4FB8BF36.8050909@gmail.com> Message-ID: Hi Vitória, Although using random sampling is a good approach, it is not a big problem to have a different number of trials between conditions, specially in ERP studies. If you're just going to do classical analyses (mean, grand-mean and statistics in mean), it might be better just to stay with different number of trials. There has been a similar discussion in the eeglab list, which might be worth reading for those interested ( http://sccn.ucsd.edu/pipermail/eeglablist/2010/003240.html) There is also a nice essay written by Steve Luck about this, which can be found in this website : http://erpinfo.org/Members/sjluck Best, -- Andre M. Cravo Postdoctoral Researcher University of Sao Paulo-Brazil On 21 May 2012 06:19, Gio Piantoni wrote: > Hi Vitória, > > I like the intuitive appeal of your approach, in order to keep only > the "most representative" trials. However, I'd have serious concerns > that your approach might not be valid. > > If you reject only the noisiest trials from condition A, you're > applying a sort of extra preprocessing step to your data and this > makes the comparison between conditions A and B not very meaningful. > You cannot unequivocally attribute the difference between A and B to a > real difference between experimental conditions or to the extra > preprocessing step. > More critically, if you only reject noisy trials in condition A, > you'll systematically introduce heteroscedasticity in your data; this > is against one of the assumptions of parametric testing. > > I agree with Arjen to use random sampling of the trials of condition > A. Depending on what you want to do next, you can even get standard > errors from this randomization, similarly to the bootstrap approach. I > find this a very elegant way to deal with very unequal numbers of > trials. > > Hope this helps, > > Best, > > Gio > > -- > Giovanni Piantoni, MSc > Dept. Sleep & Cognition > Netherlands Institute for Neuroscience > Meibergdreef 47 > 1105 BA Amsterdam (NL) > > +31 20 5665492 > gio at gpiantoni.com > www.gpiantoni.com > > > On Sun, May 20, 2012 at 11:53 AM, Vitória Magalhães Piai > wrote: > > Hi everyone, > > > > I'm working on a dataset (ERPs, but this is not that relevant for the > > question, I believe) for which one condition elicited more errors than > the > > other. > > > > I'd like to have both conditions with the same number of trials in the > > analyses. > > Ideally, I'd throw away the noisiest trials from one condition, instead > of > > just start throwing away trials at random. > > > > I was thinking of using z-scores for that but I was wondering if any of > you > > has already done this before and how. What would be the best way to go? > > Take the mean amplitude across all trials (collapsed over condition or > not?) > > and calculate the z-score for each trial individually? Then take out the > one > > with the largest scores? How does this approach sound? > > Does FT keep information about the variance for each trial somewhere in > the > > output of an artefact rejection function? Or would I have to compute that > > myself? > > > > I'd appreciate any suggestions or feedback. > > > > Cheers, Vitória > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.taubert at uk-koeln.de Wed May 23 15:46:49 2012 From: max.taubert at uk-koeln.de (Taubert, Max) Date: Wed, 23 May 2012 15:46:49 +0200 (CEST) Subject: [FieldTrip] Dipole time course Message-ID: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> Hi, I'd like to use the leadfield from the ft_compute_leadfield function to compute the time course of two dipoles, given their location and orientation. So I searched on the mailing list and found a thread from Apr-1 2011 (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-April/003690.html) with a nice explanation. By using this approach it is not very difficult to obtain the waveform of a single dipole, but in my case there are TWO dipoles. This works when assuming a single dipole: dip.pos = [0 0.5 0]; dip.ori = [1 0 0]; lf = ft_compute_leadfield(dip.pos,elec,vol); li = pinv(lf); ori = dip.mom; ori = repmat(ori,length(li),1)'; w = dot(li,ori); waveform = dot(D.Data,repmat(w,size(D.Data,2),1)'); Is there any way to make this work with a two-dipole-model, so I get the waveforms of both of them? Thanks in advance Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From rapela at ucsd.edu Thu May 24 05:03:52 2012 From: rapela at ucsd.edu (Joaquin Rapela) Date: Wed, 23 May 2012 20:03:52 -0700 Subject: [FieldTrip] Postdoc, motor control, Buenos Aires (Argentina) Message-ID: <20120524030352.GA25028@sccn.ucsd.edu> Prof. Della-Maggiore, in the lively city of Buenos Aires, Argentina, is looking for a postdoctoral scholar. Please contact her directly (vdellamaggiore at fmed.uba.ar) if interested. Cordially, Joaquin The Physiology of Action Lab (www.physiologyofactionlab.info) is looking for a candidate to fill a postdoctoral position in the Department of Physiology of the University of Buenos Aires. The Laboratory focuses on Human Behavioral Neuroscience, particularly in the area of motor control. We use Transcranial Magnetic Stimulation, Magnetic Resonance Imaging, EEG and psychophysics to study the neural mechanisms at the basis of different aspects of control motor. These include motor resonance and action understanding during action observation, online motor control and motor learning. Plastic changes induced by learning and stroke are also main interests of the lab. We are looking for a Ph.D with a background in motor control and, preferably, with experience in Magnetic Resonance imaging. Candidates with knowledge of Matlab would have priority. The postdoc is funded by a fellowship from the National Agency for the Promotion of Science and Technology (Argentina). Interested candidates could contact Dr. Valeria Della Maggiore at vdellamaggiore at fmed.uba.ar with a CV, a letter of interest and one or two references (email). Many thanks -- Valeria Della-Maggiore, Ph. D Department of Physiology, School of Medicine University of Buenos Aires Paraguay 2155, Capital Federal Buenos Aires, C1121ABG Argentina phone 54 11 5 950 9500 (2132) http://www.physiologyofactionlab.info ------------------------------------------------------------ being wild and disciplined at the same time.... From t.marshall at fcdonders.ru.nl Thu May 24 16:18:38 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Thu, 24 May 2012 16:18:38 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... Message-ID: <4FBE433E.8050804@fcdonders.ru.nl> Hi 'trippers... So I'm having some trouble with the following pipeline: Import and filter continuous data using ft_preprocessing Create trial definition using ft_definetrial Apply trial definition to imported, filtered data using ft_redefinetrial (in case it helps, full code is below) When I call ft_redefinetrial, it fails with:- *??? Error using ==> ft_checkdata at 307 This function requires raw data as input. Error in ==> ft_redefinetrial at 103 data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* However, when I check my data myself using ft_checkdata... *ft_checkdata(data,'datatype','raw','feedback','yes')* ...the feedback it gives me is... *the input is raw data with 2 channels and 1 trials* ...which is exactly what I'd expect. (There are only two channels because I am just looking at my heog and veog data). It seems that my zenlike data are both raw and not raw, depending on whether ft_checkdata is called within ft_redefinetrial or by me. Any ideas why it could be failing in the former case? Best, Tom PS - full code here:- * % import eog data veog_chan='UADC001'; heog_chan='UADC002'; cfg = []; cfg.dataset = full_file; cfg.channel = {heog_chan, veog_chan}; cfg.continuous = 'yes'; data = ft_preprocessing(cfg); % define trials cfg = []; cfg.dataset = meg_file; cfg.trialdef.prestim = -0.1; % ie 100ms after stim cfg.trialdef.poststim = 5; % in seconds cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); cfg.trialfun = 'trialfun_find_eog'; cfg = ft_definetrial(cfg); % apply trial def to continuous data data=ft_redefinetrial(data,cfg);* -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Thu May 24 17:07:13 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Thu, 24 May 2012 17:07:13 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... In-Reply-To: <4FBE433E.8050804@fcdonders.ru.nl> References: <4FBE433E.8050804@fcdonders.ru.nl> Message-ID: <4FBE4EA1.3000506@fcdonders.ru.nl> Rats, I've seen it :( Sorry to bother you guys... should have checked more thoroughly before posting to the mailing list! *redface* Best, Tom On 5/24/2012 4:18 PM, Tom Marshall wrote: > Hi 'trippers... > > So I'm having some trouble with the following pipeline: > > Import and filter continuous data using ft_preprocessing > Create trial definition using ft_definetrial > Apply trial definition to imported, filtered data using ft_redefinetrial > (in case it helps, full code is below) > > When I call ft_redefinetrial, it fails with:- > *??? Error using ==> ft_checkdata at 307 > This function requires raw data as input. > > Error in ==> ft_redefinetrial at 103 > data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* > > However, when I check my data myself using ft_checkdata... > *ft_checkdata(data,'datatype','raw','feedback','yes')* > ...the feedback it gives me is... > *the input is raw data with 2 channels and 1 trials* > ...which is exactly what I'd expect. (There are only two channels > because I am just looking at my heog and veog data). > > It seems that my zenlike data are both raw and not raw, depending on > whether ft_checkdata is called within ft_redefinetrial or by me. Any > ideas why it could be failing in the former case? > > Best, > Tom > > PS - full code here:- > * > % import eog data > > veog_chan='UADC001'; > heog_chan='UADC002'; > > cfg = []; > cfg.dataset = full_file; > cfg.channel = {heog_chan, veog_chan}; > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > % define trials > > cfg = []; > cfg.dataset = meg_file; > cfg.trialdef.prestim = -0.1; % ie 100ms after stim > cfg.trialdef.poststim = 5; % in seconds > cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); > > cfg.trialfun = 'trialfun_find_eog'; > > cfg = ft_definetrial(cfg); > > % apply trial def to continuous data > > data=ft_redefinetrial(data,cfg);* > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email:t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Thu May 24 17:14:26 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Thu, 24 May 2012 17:14:26 +0200 Subject: [FieldTrip] Redefining trials, data is both raw and not raw... In-Reply-To: <4FBE433E.8050804@fcdonders.ru.nl> References: <4FBE433E.8050804@fcdonders.ru.nl> Message-ID: Hey Tom, It seems like you accidentally switched input arguments in your call to redefine_trial: * data=ft_redefinetrial(data,cfg);* This should read: *data=ft_redefinetrial(cfg,data);* Cheers, Roemer On Thu, May 24, 2012 at 4:18 PM, Tom Marshall wrote: > Hi 'trippers... > > So I'm having some trouble with the following pipeline: > > Import and filter continuous data using ft_preprocessing > Create trial definition using ft_definetrial > Apply trial definition to imported, filtered data using ft_redefinetrial > (in case it helps, full code is below) > > When I call ft_redefinetrial, it fails with:- > *??? Error using ==> ft_checkdata at 307 > This function requires raw data as input. > > Error in ==> ft_redefinetrial at 103 > data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);* > > However, when I check my data myself using ft_checkdata... > *ft_checkdata(data,'datatype','raw','feedback','yes')* > ...the feedback it gives me is... > *the input is raw data with 2 channels and 1 trials* > ...which is exactly what I'd expect. (There are only two channels because > I am just looking at my heog and veog data). > > It seems that my zenlike data are both raw and not raw, depending on > whether ft_checkdata is called within ft_redefinetrial or by me. Any ideas > why it could be failing in the former case? > > Best, > Tom > > PS - full code here:- > * > % import eog data > > veog_chan='UADC001'; > heog_chan='UADC002'; > > cfg = []; > cfg.dataset = full_file; > cfg.channel = {heog_chan, veog_chan}; > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > % define trials > > cfg = []; > cfg.dataset = meg_file; > cfg.trialdef.prestim = -0.1; % ie 100ms after stim > cfg.trialdef.poststim = 5; % in seconds > cfg.trialdef.behavdata = fullfile(behav_file_dir, behav_file); > > cfg.trialfun = 'trialfun_find_eog'; > > cfg = ft_definetrial(cfg); > > % apply trial def to continuous data > > data=ft_redefinetrial(data,cfg);* > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From fannyquandt at gmail.com Fri May 25 10:12:58 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Fri, 25 May 2012 10:12:58 +0200 Subject: [FieldTrip] topoplot of vector Message-ID: Dear Fieldtrip-User, I am trying to plot some results ( one value per channel) using a topoplot function. Since I am working with ECoG data, I specified my own layout with ft_prepare_layout. Plotting my results obtain from ft_freqanalysis using ft_topoplotER works just fine. Now 2 Questions: 1) Is there a way to plot data, using ft_topoplotER , which is not obtain from freqanalysis or timelocked analysis, but which is only a vector. 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg contained the layout. However I get the following error message. It might be that some points of my mask fall outside the outline, which does not cause a problem using ft_topoplotER. Undefined function 'inside_contour' for input arguments of type 'double'. Error in topoplot (line 488) maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; I would very much appreciate any help. Best, Fanny From a.stolk at fcdonders.ru.nl Fri May 25 11:00:59 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 25 May 2012 11:00:59 +0200 (CEST) Subject: [FieldTrip] topoplot of vector In-Reply-To: Message-ID: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Hi Fanny, If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. For example; data.powspctrm = your_vector_here; % [N x 1] data.freq = 1; data.label = your_label_here; % {1 x N} data.dimord = 'chan_freq'; ft_topoplotER(cfg,data) The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. Hope this helps, Arjen ----- Oorspronkelijk bericht ----- > Van: "Fanny Quandt" > Aan: fieldtrip at donders.ru.nl > Verzonden: Vrijdag 25 mei 2012 10:12:58 > Onderwerp: [FieldTrip] topoplot of vector > Dear Fieldtrip-User, > > I am trying to plot some results ( one value per channel) using a > topoplot function. > Since I am working with ECoG data, I specified my own layout with > ft_prepare_layout. Plotting my results obtain from ft_freqanalysis > using ft_topoplotER works just fine. > > Now 2 Questions: > > 1) Is there a way to plot data, using ft_topoplotER , which is not > obtain from freqanalysis or timelocked analysis, but which is only a > vector. > > 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg > contained the layout. However I get the following error message. It > might be that some points of my mask fall outside the outline, which > does not cause a problem using ft_topoplotER. > > Undefined function 'inside_contour' for input arguments of type > 'double'. > > Error in topoplot (line 488) > maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; > > > I would very much appreciate any help. > Best, > Fanny > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From fannyquandt at gmail.com Fri May 25 11:08:57 2012 From: fannyquandt at gmail.com (Fanny Quandt) Date: Fri, 25 May 2012 11:08:57 +0200 Subject: [FieldTrip] topoplot of vector In-Reply-To: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> References: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Arjen, thank you very much! It works perfectly and seems way easier than to go into ft_plot_topo ( which I also tried earlier :)). I appreciate your help, Fanny Am 25.05.2012 um 11:00 schrieb Stolk, A.: > Hi Fanny, > > If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. > > For example; > data.powspctrm = your_vector_here; % [N x 1] > data.freq = 1; > data.label = your_label_here; % {1 x N} > data.dimord = 'chan_freq'; > ft_topoplotER(cfg,data) > > The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. > > Hope this helps, > Arjen > > > ----- Oorspronkelijk bericht ----- >> Van: "Fanny Quandt" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Vrijdag 25 mei 2012 10:12:58 >> Onderwerp: [FieldTrip] topoplot of vector >> Dear Fieldtrip-User, >> >> I am trying to plot some results ( one value per channel) using a >> topoplot function. >> Since I am working with ECoG data, I specified my own layout with >> ft_prepare_layout. Plotting my results obtain from ft_freqanalysis >> using ft_topoplotER works just fine. >> >> Now 2 Questions: >> >> 1) Is there a way to plot data, using ft_topoplotER , which is not >> obtain from freqanalysis or timelocked analysis, but which is only a >> vector. >> >> 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg >> contained the layout. However I get the following error message. It >> might be that some points of my mask fall outside the outline, which >> does not cause a problem using ft_topoplotER. >> >> Undefined function 'inside_contour' for input arguments of type >> 'double'. >> >> Error in topoplot (line 488) >> maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; >> >> >> I would very much appreciate any help. >> Best, >> Fanny >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Fri May 25 11:16:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 25 May 2012 11:16:34 +0200 Subject: [FieldTrip] topoplot of vector In-Reply-To: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> References: <1599082048.361835.1337936459835.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Fanny, Arjen, I would like to add something to that. Like Arjen said, first make a ft-like structure, but don't 'fake it' by naming your datafield e.g. 'powspctrm', but name it appropriately and use the cfg.parameter field in the plotting functions to specify the field you want to plot. In similar cases what I always do is to add extra field to my main data structure. This could be, e.g. different statistical maps, different ways of normalizing etc: data.dimord = 'chan_freq' data.powspctrm = [N x 1]; data.powspctrmLOG = [N x 1]; data.stat_difference = [N x 1]; data.conditionA_minus_B = [N x 1]; etc. This is memory efficient, makes it easy to keep things together (the repetition/trial dimension with the trialinfo, for instance), don't mix up the field and to them without messing around with temporary data structures. Note that many functions that work on datastructures use the cfg.parameter field. For instance averaging, baselinecorrection, grandaverage etc. all should work in this way. cheers, Stephen On 25 May 2012 11:00, Stolk, A. wrote: > Hi Fanny, > > If you want to plot results that are not the output from a ft function, you could try and place the obtained vector in a ft-alike structure. > > For example; > data.powspctrm = your_vector_here; % [N x 1] > data.freq = 1; > data.label = your_label_here; % {1 x N} > data.dimord = 'chan_freq'; > ft_topoplotER(cfg,data) > > The topoplot function is deprecated and still in the software package for compatibility reasons. Alternatively, have a look how ft_topoplotER/TFR calls the low-level ft_plot_topo function. I recon the above solution is easier. > > Hope this helps, > Arjen > > > ----- Oorspronkelijk bericht ----- >> Van: "Fanny Quandt" >> Aan: fieldtrip at donders.ru.nl >> Verzonden: Vrijdag 25 mei 2012 10:12:58 >> Onderwerp: [FieldTrip] topoplot of vector >> Dear Fieldtrip-User, >> >> I am trying to plot some results ( one value per channel) using a >> topoplot function. >> Since I am working with ECoG data, I specified my own layout with >> ft_prepare_layout. Plotting my results obtain from ft_freqanalysis >> using ft_topoplotER works just fine. >> >> Now 2 Questions: >> >> 1) Is there a way to plot data, using ft_topoplotER , which is not >> obtain from freqanalysis or timelocked analysis, but which is only a >> vector. >> >> 2) I tried using the function topoplot (topoplot(cfg,dat) where cfg >> contained the layout. However I get the following error message. It >> might be that some points of my mask fall outside the outline, which >> does not cause a problem using ft_topoplotER. >> >> Undefined function 'inside_contour' for input arguments of type >> 'double'. >> >> Error in topoplot (line 488) >> maskA(inside_contour([Xi(:) Yi(:)], cfg.layout.mask{i})) = true; >> >> >> I would very much appreciate any help. >> Best, >> Fanny >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From v.poghosyan at humanbraindynamics.com Fri May 25 11:37:08 2012 From: v.poghosyan at humanbraindynamics.com (Vahe Poghosyan) Date: Fri, 25 May 2012 12:37:08 +0300 Subject: [FieldTrip] MEG forward problem Message-ID: <03e001cd3a59$f61cb7f0$e25627d0$@poghosyan@humanbraindynamics.com> Dear fieldtrip developers, In MEG forward problem computations (in ft_compute_leadfield or in its subfunctions), do you numerically integrate the MEG signal over the coil area or a single point is used for each coil? I found some functions in the fieldtrip's SVN (trunc) version (on googlecode), which are not available in the daily releases on the ftp server (e.g. ft_surfacecheck). Is it safe to use those functions (I understand that the toolbox is released under GPL)? Thanks in advance Vahe Poghosyan, Ph.D. Senior Scientist Lab. for Human Brain Dynamics AAI Scientific Cultural Services Ltd. http://aaiscs.com/LHBD/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri May 25 15:40:18 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 25 May 2012 07:40:18 -0600 Subject: [FieldTrip] Dipole time course In-Reply-To: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> References: <889140479.172738.1337780809758.JavaMail.open-xchange@webmail.uk-koeln.de> Message-ID: <8C72D77A-A56F-438C-8077-7EB47EFC2E8A@ucdenver.edu> Max, There is no reason why you can't simply use the same strategy for both dipoles. Each will produce its own leadfields, and then your inner product of the pinv'd leadfields and the waveforms will give you two separate waveforms. Note that by using this pseudoinverse of the leadfield approach, depending on how far apart the sources are, you may have substantial correlation between the two waveforms that is an artifact of their leadfield correlation. This shouldn't be a big problem for things like auditory sources for the left and right hemisphere, or anterior and posterior sources within a hemisphere, but once you start getting sources closer together, you might consider an alternative approach. You can try using a beamformer to suppress correlated source activity, but you could also just adopt a beamformer-like set of weights for your dipole model instead. For that, you would ideally compute a covariance matrix on the epoched data, prior to averaging. Then, you can extend the logic of the pseudoinverse method by multiplication with inverse of the covariance matrix. You can see this in the fieldtrip functions that do beamformers, such as beamformer_lcmv. Around line 255, you can see: filt = pinv(lf' * invCy * lf) * lf' * invCy; where lf = leadfield and invCy = inverse of covariance matrix and filt = the resulting weight vector for your sensors for that particular source location. You can then do: waveform = filt * data to get your timecourse. In the previous example, I used the dot function to remind myself it was an inner product, but it isn't strictly necessary in matlab. Don On May 23, 2012, at 7:46 AM, Taubert, Max wrote: Hi, I'd like to use the leadfield from the ft_compute_leadfield function to compute the time course of two dipoles, given their location and orientation. So I searched on the mailing list and found a thread from Apr-1 2011 (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-April/003690.html) with a nice explanation. By using this approach it is not very difficult to obtain the waveform of a single dipole, but in my case there are TWO dipoles. This works when assuming a single dipole: dip.pos = [0 0.5 0]; dip.ori = [1 0 0]; lf = ft_compute_leadfield(dip.pos,elec,vol); li = pinv(lf); ori = dip.mom; ori = repmat(ori,length(li),1)'; w = dot(li,ori); waveform = dot(D.Data,repmat(w,size(D.Data,2),1)'); Is there any way to make this work with a two-dipole-model, so I get the waveforms of both of them? Thanks in advance Max _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.buiatti at gmail.com Fri May 25 15:58:32 2012 From: marco.buiatti at gmail.com (Marco Buiatti) Date: Fri, 25 May 2012 15:58:32 +0200 Subject: [FieldTrip] interactions between two factors Message-ID: Dear FieldTrippers, I am analysing an EEG study with 2x4 factors: one varies between 4 parametrically varying levels (1 to 4), the second between two levels. I have three questions concerning the use of Fieldtrip cluster-based non parametric statistical analysis in this case: 1) How to compute the interaction between the two factors. Let's start from the simplest case of a 2x2 design, factors varying between values A1 and A2 for the first factor, B1 and B2 for the second. Please tell me if it is correct to compute the interaction by: - computing the difference diffA=ERP(A1)-ERP(A2) separately in condition B1 and B2, for every subject - performing a within-subjects statistical analysis between diffA in condition B1 and diffA in condition B2 (function statfun_depsamplesT.m). 2) Now consider that factor A varies parametrically between values 1 to 4. For the main effect of this factor, I have used the Fieldtrip function statfun_depsamplesregrT.m and I'm satisfied with it. Is it correct to compute the interaction by - computing the regression regrA=regression(ERP(A1),ERP(A2),ERP(A3),ERP(A4)) (computed as inside function statfun_depsamplesregrT.m) separately in condition B1 and B2, for every subject - performing a within-subjects statistical analysis between regrA in condition B1 and regrA in condition B2 (function statfun_depsamplesT.m)? 3) Since BEFORE looking at the data (this is to prevent Eric's contestation...) I expect a dipolar topography for the regression (data are in average reference), I would like to combine into a joint cluster negative and positive clusters. I have tried by changing statfun_depsamplesregrT.m by just taking the absolute value of the regression, but I get weird results (a huge, non significant cluster). Is it possible that since values are now all positive, I should use a different statistical test at the single bin level? Any other suggestions? Thanks in advance for your help, Marco -- Marco Buiatti, PhD CEA/DSV/I2BM / NeuroSpin INSERM U992 - Cognitive Neuroimaging Unit Bât 145 - Point Courrier 156 Gif sur Yvette F-91191  FRANCE Ph:  +33(0)169.08.65.21 Fax: +33(0)169.08.79.73 E-mail: marco.buiatti at gmail.com http://www.unicog.org/pm/pmwiki.php/Main/MarcoBuiatti *********************************************** From arno at cerco.ups-tlse.fr Sat May 26 02:19:55 2012 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Fri, 25 May 2012 17:19:55 -0700 Subject: [FieldTrip] Potential function conflicts in Fieldtrip Message-ID: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Dear all, I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. Thanks, Arno Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m -------------- next part -------------- A non-text attachment was scrubbed... Name: find_function_conflict.m Type: application/octet-stream Size: 1219 bytes Desc: not available URL: -------------- next part -------------- -- Arnaud Delorme, PhD Centre de Recherche Cerveau et Cognition - UMR 5549 Pavillon Baudot, Hopital Purpan, BP 25202 31052 Toulouse Cedex, France From caspervanheck at gmail.com Tue May 29 09:44:24 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Tue, 29 May 2012 09:44:24 +0200 Subject: [FieldTrip] Coherency parameters Message-ID: Dear Fieldtrip users, I'm currently working on coherency between EEG and EMG, so far without any significant problems. However, I'd like to get statistical significancy (in the hope that's possible) tested on my coherency-data. In the Fieldtrip reference there's a mention of something resembling statistics in combination with coherency (in the help of the 'STATISTICS_MONTECARLO' function), but I've not found how to call this function. My question is: is there a standard method to perform statistical analysis on coherency data? Sincerely, Casper van Heck (Intern) Clinical Neurophysiology, UMC St. Radboud, Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 29 10:28:42 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 29 May 2012 10:28:42 +0200 Subject: [FieldTrip] Coherency parameters In-Reply-To: References: Message-ID: Hi Casper, The approach I would take depends on your question. If you want to test for coherence differences within a subject, your unit of observation is a trial, so the permutation test shuffles the trials between the experimental condition. In this instance you can use statfun_indepsamplesZcoh (with fourier-data in the input (i.e. cfg.output = 'fourier' when calling ft_freqanalysis). If you want to test across subjects, your unit of observation is a subject, so there you can compute the coherence per subject and condition and then do the statistical test by shuffling the conditions. This has for example been done in the following paper: J Neuroscience 2011, 31(18): 6750-6758; doi: 10.1523/​JNEUROSCI.4882-10.2011 Best Jan-Mathijs On May 29, 2012, at 9:44 AM, Casper van Heck wrote: > Dear Fieldtrip users, > > I'm currently working on coherency between EEG and EMG, so far without any significant problems. However, I'd like to get statistical significancy (in the hope that's possible) tested on my coherency-data. > In the Fieldtrip reference there's a mention of something resembling statistics in combination with coherency (in the help of the 'STATISTICS_MONTECARLO' function), but I've not found how to call this function. > > My question is: is there a standard method to perform statistical analysis on coherency data? > > Sincerely, > > Casper van Heck (Intern) > Clinical Neurophysiology, UMC St. Radboud, Nijmegen > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue May 29 16:36:49 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:36:49 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: References: Message-ID: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> Dear Jing, The missing ft_write_spike function has been re-added to the release version as of last week, it was also reported missing by someone else in a personal mail by me. The specest_nanfft function should be located in the fieldtrip/private directory, where ft_spiketriggeredspectrum should be able to find it. best regards, Robert On 21 May 2012, at 15:08, Jing Wang wrote: > Hello Eelke, > > Thank you very much for your answers. I will file this bug in Bugzilla tracking system. > > I also found that there are some functions which are used in the ft_spike* function are not in the Fieldtrip. One is specest_nanfft.m which is used in ft_spiketriggeredspectrum.m and another is ft_write_spike which is used in ft_spikedetection. We could not find the two functions in Fieldtrip to run these main functions about spike analysis. > > Whether it has been changed names or put somewhere else? Would you please give me some idea about that? > Thanks again! > > Best Regards > > Jing > > > > 2012/5/21 Eelke Spaak > Dear Jing Wang, > > This is a bug in the functions you mention. ft_checkconfig should be > called like this: > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > so with the forbidden options grouped in a cell array, rather than as > it was done in the code snippet you posted. There also seem to be a > few other minor bugs in the ft_getopt/checkopt calls. > > Could you file a bug on this on our Bugzilla tracking system? > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > Best, > Eelke > > On 21 May 2012 13:44, Jing Wang wrote: > > Dear Fieldtrip developers and users, > > > > I have found same error when I using ft_spiketriggeredaverage and > > ft_spiketriggeredspectrum.m. > > After I run the following script, an error appeared at line 51 > > cfg=ft_checkconfig. This error also is same when I run > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part of > > these functions. it could work well. It is same for both the latese and > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > something wrong with my data? Would anybody who knows can help me? > > That will be really appreciated! Thanks in advance! > > Jing > > > > I have append spike and LFP into data. The folloing is the script and error > > information. > > cfg=[]; > > cfg.timwin = [-0.01 0.01]; > > cfg.spikechannel =data.label{1}; > > cfg.channel = data.label{2}; > > cfg.keeptrials ='yes'; > > cfg.feedback='yes'; > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > Error using ft_getopt > > the first input should contain key-value pairs > > Error in ft_checkconfig (line 83) > > renamed = ft_getopt(varargin, 'renamed'); > > Error in ft_spiketriggeredaverage (line 51) > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > For ft_spikertriggerespectrum, I silent the line like this, the script can > > work well. > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > % 'outputfile'); % see > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > For ft_spiketriggeredaverage, the script can work when I silent these part. > > it can work well. > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'}); > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:52:00 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:52:00 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <4805EB64-6057-43F1-93DE-2E81037CC6E6@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:55:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:55:36 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <872DD16A-9C02-4EA7-B8A3-EAB4B490E6A1@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue May 29 16:58:41 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 29 May 2012 16:58:41 +0200 Subject: [FieldTrip] Potential function conflicts in Fieldtrip In-Reply-To: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> References: <36C24E23-B47A-499A-9ECF-A88D0C3ED4B3@cerco.ups-tlse.fr> Message-ID: <62459FD6-3D40-47F9-A06B-E0F5D290AD2E@donders.ru.nl> Dear Arno Thanks for bringing this to the attention. It is too bad that with MATLAB we do not have an easy way of using namespaces as in C++. That is why in FieldTrip we also make a distinction of functions that are publicly available and private functions that are only to be called by other FT functions. Most publicly available FT functions are prefixed with "ft_" to avoid name clashes (as in spm). Not all functions have been prefixed yet, but the longer-term plan is to make the ft_ prefix mandatory for all fieldtrip functions. The transition however has to be done with care, as to not break the users' analysis scripts. Some of the functions you mention can (and probably should) be moved to a private folder. I have reported your email on http://bugzilla.fcdonders.nl as bug number 1493 where I will also follow it up. best regards, Robert On 26 May 2012, at 2:19, Arnaud Delorme wrote: > Dear all, > > I have used the attached function on the latest Fieldtrip tarball (or should we say zipball these days?) and have found the potential following conflicts. I thought it might be interesting to try solving them to avoid potential issues. > Thanks, > > Arno > > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/GetPath.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpointtool/@fxptds/getpath.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/afni/Norm.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/matfun/norm.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/dipoli/example.m and /Users/arno/Downloads/fieldtrip-20120525/external/neuroshare/Example.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/solid_angle.m and /Users/arno/Downloads/fieldtrip-20120525/src/solid_angle.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/openmeeg/triplot.m and /Applications/MATLAB_R2010b.app/toolbox/matlab/specgraph/triplot.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/external/xml4mat/xml2struct.m and /Applications/MATLAB_R2010b.app/toolbox/bioinfo/biodemos/xml2struct.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/fileio/write_fcdc_spike.m and /Users/arno/Downloads/fieldtrip-20120525/compat/write_fcdc_spike.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/istrue.m and /Applications/MATLAB_R2010b.app/toolbox/rptgen/rptgenv1/@cloif/istrue.m > Potential conflict between /Users/arno/Downloads/fieldtrip-20120525/utilities/nearest.m and /Applications/MATLAB_R2010b.app/toolbox/fixedpoint/fixedpoint/nearest.m > > > -- > Arnaud Delorme, PhD > Centre de Recherche Cerveau et Cognition - UMR 5549 > Pavillon Baudot, Hopital Purpan, BP 25202 > 31052 Toulouse Cedex, France > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From wljj09 at gmail.com Tue May 29 20:09:29 2012 From: wljj09 at gmail.com (Jing Wang) Date: Tue, 29 May 2012 20:09:29 +0200 Subject: [FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data? In-Reply-To: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> References: <488746B4-5714-42A5-B127-BA342F361E68@donders.ru.nl> Message-ID: Dear Robert, Thank you so much for letting me know this. It is really very helpful. Thanks a lot. I will work on that! Best wishes Jing 2012/5/29 Robert Oostenveld > Dear Jing, > > The missing ft_write_spike function has been re-added to the release > version as of last week, it was also reported missing by someone else in a > personal mail by me. > > The specest_nanfft function should be located in the fieldtrip/private > directory, where ft_spiketriggeredspectrum should be able to find it. > > best regards, > Robert > > > > > On 21 May 2012, at 15:08, Jing Wang wrote: > > > Hello Eelke, > > > > Thank you very much for your answers. I will file this bug in Bugzilla > tracking system. > > > > I also found that there are some functions which are used in the > ft_spike* function are not in the Fieldtrip. One is specest_nanfft.m which > is used in ft_spiketriggeredspectrum.m and another is ft_write_spike which > is used in ft_spikedetection. We could not find the two functions in > Fieldtrip to run these main functions about spike analysis. > > > > Whether it has been changed names or put somewhere else? Would you > please give me some idea about that? > > Thanks again! > > > > Best Regards > > > > Jing > > > > > > > > 2012/5/21 Eelke Spaak > > Dear Jing Wang, > > > > This is a bug in the functions you mention. ft_checkconfig should be > > called like this: > > > > cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'}); > > > > so with the forbidden options grouped in a cell array, rather than as > > it was done in the code snippet you posted. There also seem to be a > > few other minor bugs in the ft_getopt/checkopt calls. > > > > Could you file a bug on this on our Bugzilla tracking system? > > http://bugzilla.fcdonders.nl/ Thank you for reporting this! > > > > Best, > > Eelke > > > > On 21 May 2012 13:44, Jing Wang wrote: > > > Dear Fieldtrip developers and users, > > > > > > I have found same error when I using ft_spiketriggeredaverage and > > > ft_spiketriggeredspectrum.m. > > > After I run the following script, an error appeared at line 51 > > > cfg=ft_checkconfig. This error also is same when I run > > > ft_spiketriggeredspectrum.m. But after I use comment to silent a part > of > > > these functions. it could work well. It is same for both the latese and > > > 20120420 version of Fieldtrip. I donnot know whether it is a bug or > > > something wrong with my data? Would anybody who knows can help me? > > > That will be really appreciated! Thanks in advance! > > > Jing > > > > > > I have append spike and LFP into data. The folloing is the script and > error > > > information. > > > cfg=[]; > > > cfg.timwin = [-0.01 0.01]; > > > cfg.spikechannel =data.label{1}; > > > cfg.channel = data.label{2}; > > > cfg.keeptrials ='yes'; > > > cfg.feedback='yes'; > > > [timelock] = ft_spiketriggeredaverage(cfg, data); > > > > > > Error using ft_getopt > > > the first input should contain key-value pairs > > > Error in ft_checkconfig (line 83) > > > renamed = ft_getopt(varargin, 'renamed'); > > > Error in ft_spiketriggeredaverage (line 51) > > > cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > > > > For ft_spikertriggerespectrum, I silent the line like this, the script > can > > > work well. > > > % cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ... > > > % 'outputfile'); % see > > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056 > > > > > > For ft_spiketriggeredaverage, the script can work when I silent these > part. > > > it can work well. > > > % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]); > > > % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []); > > > % cfg.channel = ft_getopt(cfg,'channel', 'all'); > > > % cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', > 'no'}); > > > % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes'); > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From recasensmarc at gmail.com Wed May 30 11:47:51 2012 From: recasensmarc at gmail.com (Marc Recasens) Date: Wed, 30 May 2012 11:47:51 +0200 Subject: [FieldTrip] megrealign across runs/sessions Message-ID: Hi everyone, I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, However, in the literature this is mainly used to average data across subjects rather than across runs. I did a test using the following code: *cfg= [];* *cfg.template{1} = run1.grad;* *cfg.template{2} = run2.grad;* *cfg.template{3} = run3.grad;* * * *cfg.vol = vol; % single shell headmodel computed from individual MRI* *cfg.inwardshift = 3;* *cfg.verify = 'yes';* *cfg.feedback = 'yes';* *[interp1] = ft_megrealign(cfg, run1); % trial-based data* *[interp1] = ft_megrealign(cfg, run1);* [interp1] = ft_megrealign(cfg, run1); acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) *original -> template RV 2.22 %* *original -> original RV 2.11 %* *original -> template -> original RV 2.14 %* I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) Can affect the accuracy of the subsequent source reconstruction? -- Marc Recasens PhD Student Universitat de Barcelona Tel.: +34 639 24 15 98 -------------- next part -------------- An HTML attachment was scrubbed... URL: From maess at cbs.mpg.de Wed May 30 17:54:00 2012 From: maess at cbs.mpg.de (Burkhard Maess) Date: Wed, 30 May 2012 17:54:00 +0200 (CEST) Subject: [FieldTrip] megrealign across runs/sessions In-Reply-To: Message-ID: <305149289.6076.1338393240619.JavaMail.root@zimbra> Hi Marc, this comment is not related to your code example below, because I did not understand it. The Knösche (2002) paper suggests to use a minimum norm solution as a plausible, but temporary model to carry the information from the original sensor position to the new positions. If you use a plausible spatial arrangement of the MEG sensors and the source space together with a low regularization you might easily achieve even smaller RV values than 2% for the transformation original-to-original. For all other transformations, you need to keep in mind, that you always extrapolate the magnetic field distribution from the position & orientation of your measurement towards the position & orientation you finally wish to have. Nevertheless, it works as long as the differences in position & orientation are not too big (see the Knösche paper for some tests). The critical examples are those in which you try to get closer to the sensor via the head position correction. In these cases, you actually ask for an improvement of your signals which were unfortunately measured suboptimally. Due to the larger distance between sensors and brain, your data most likely suffers from a complete loss of impact of some of the more distant sources - it is therefore impossible to get this information back by whatsoever mathematical method. We have used this method on a regular basis from about 2000 on until 2006 to correct for different head positions between measurement blocks whenever the signal-to-noise ratio in single blocks was too low to get stable inverse solutions from the single block data already. In the latter case, there is no need to use this method as the computation of the inverse solution for each single block is an simpler, alternative option. best wishes, Burkhard -- Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- From: "Marc Recasens" To: fieldtrip at science.ru.nl Sent: Wednesday, 30 May, 2012 11:47:51 AM Subject: [FieldTrip] megrealign across runs/sessions Hi everyone, I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, However, in the literature this is mainly used to average data across subjects rather than across runs. I did a test using the following code: cfg= []; cfg.template{1} = run1.grad; cfg.template{2} = run2.grad; cfg.template{3} = run3.grad; cfg.vol = vol; % single shell headmodel computed from individual MRI cfg.inwardshift = 3; cfg.verify = 'yes'; cfg.feedback = 'yes'; [interp1] = ft_megrealign(cfg, run1); % trial-based data [interp1] = ft_megrealign(cfg, run1); [interp1] = ft_megrealign(cfg, run1); acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) original -> template RV 2.22 % original -> original RV 2.11 % original -> template -> original RV 2.14 % I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) Can affect the accuracy of the subsequent source reconstruction? -- Marc Recasens PhD Student Universitat de Barcelona Tel.: +34 639 24 15 98 _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Thu May 31 11:48:41 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 11:48:41 +0200 Subject: [FieldTrip] change radiological to neurological convention Message-ID: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Dear all, Unfortunately, the result of my source analysis seems to be flipped when calling ft_sourceplot. The transformation matrix of the anatomy seems to be in radiological convention (left is right). I have two questions on that: 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? Any help is very much appreciated. Best, Kathrin -------------- next part -------------- -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From jan.schoffelen at donders.ru.nl Thu May 31 12:21:11 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 31 May 2012 12:21:11 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: Hi Kathrin, > 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? Yes. FieldTrip does not have any of the 'conventions'. It just takes the data as it is represented in the mri-file (i.e. the block of voxels is oriented in a certain way, and FT just plots along the 3 cardinal voxel axes). For example, in DICOM images the voxel axes are often left-handed, leading to visualization according the 'radiological' convention. > 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? If the coordinate system in which the data are defined is right-handed, you can use ft_volumereslice to get the anatomical image to be visualized in neurological convention. This function only works on anatomical data, so you should first reslice the anatomical data and only then interpolate the functional data onto the resliced anatomy. Best, Jan-Mathijs > Any help is very much appreciated. > > Best, > Kathrin > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.mohr at psy.gla.ac.uk Thu May 31 12:43:45 2012 From: s.mohr at psy.gla.ac.uk (sibylle) Date: Thu, 31 May 2012 11:43:45 +0100 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> Hey Kathrin, which SPM version are you using? As far as I know spm2 uses neurological convention (right is right), while spm8 uses radiological convention (right is left). So using spm8, the slice and ortho plots will 'seem' flipped, but you can check the Talairach coordinates to be sure. Whereas in the surface plots, the right of the brain will appear on R side of image (maybe you could revert back to spm2 using T1.mnc template mri for sourceinterpolate..?). Hope that helps! Sibylle On 31 May 2012, at 10:48, Kathrin Müsch wrote: > Dear all, > > Unfortunately, the result of my source analysis seems to be flipped > when calling ft_sourceplot. The transformation matrix of the anatomy > seems to be in radiological convention (left is right). I have two > questions on that: > > 1) Is it correct that the functional data is flipped when the > anatomy is in radiological convention (left is right)? > > 2 ) How can I change the transformation matrix of my anatomy so that > my results are plotted in neurological convention (i.e. left is > left) - with ft_volumenormalise or ft_volumerealign? > > Any help is very much appreciated. > > Best, > Kathrin > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des > öffentlichen Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des > Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. > Uwe Koch-Gromus > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From k.muesch at uke.uni-hamburg.de Thu May 31 13:18:18 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 13:18:18 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <6518E3D3-B254-40FE-AB9A-F056C85F3A2B@uke.uni-hamburg.de> Thanks, Jan-Mathijs! Am 31.05.2012 um 12:21 schrieb jan-mathijs schoffelen: > Hi Kathrin, > >> 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? > > Yes. FieldTrip does not have any of the 'conventions'. It just takes the data as it is represented in the mri-file (i.e. the block of voxels is oriented in a certain way, and FT just plots along the 3 cardinal voxel axes). For example, in DICOM images the voxel axes are often left-handed, leading to visualization according the 'radiological' convention. > > >> 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? > > If the coordinate system in which the data are defined is right-handed, you can use ft_volumereslice to get the anatomical image to be visualized in neurological convention. > This function only works on anatomical data, so you should first reslice the anatomical data and only then interpolate the functional data onto the resliced anatomy. > > Best, > > Jan-Mathijs > > >> Any help is very much appreciated. >> >> Best, >> Kathrin >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu May 31 13:56:40 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 31 May 2012 13:56:40 +0200 Subject: [FieldTrip] megrealign across runs/sessions In-Reply-To: References: Message-ID: <121B4C60-2EC8-4ACF-A701-55D460407DCA@donders.ru.nl> Dear Marc, In principle it is not different to realign the MEG data from three sessions if those sessions were recorded on the same subject (as in your case) or in three different subjects (or a larger number of subjest, as the more common usage scenario). The way you use the function is also correct. However, you should not interpret the residual variance as a measure of the quality of teh realignment procedure. The realignment does not know the ground truth, so cannot tell how the attempted realignment matches with the ground truth. It only expresses the difference in the data when the data is compared between original and template position (and when the realignment is repeated but then inversely). An important aspect however is that you should be careful with applying source reconstruction on the realigned data. In general I would recommend against it, especially if you are planning to apply a beamformer afterwards. The realignment works by making a crude source estimation on on a sheet that is just in the outer grey matter. That crude source estimate (which is a minimum norm estimate with a slight bit of regularization) affects the spatial correlations (i.e. between channels) in the data. Consequently, subsequent source reconstruction might not be able to pick up the spatial correlation any more and might mislocalize. Better (although not always possible) is to source reconstruct the three conditions separate and then combine them. best Robert On 30 May 2012, at 11:47, Marc Recasens wrote: > Hi everyone, > > I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. > I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, > However, in the literature this is mainly used to average data across subjects rather than across runs. > > I did a test using the following code: > cfg= []; > cfg.template{1} = run1.grad; > cfg.template{2} = run2.grad; > cfg.template{3} = run3.grad; > > cfg.vol = vol; % single shell headmodel computed from individual MRI > cfg.inwardshift = 3; > cfg.verify = 'yes'; > cfg.feedback = 'yes'; > [interp1] = ft_megrealign(cfg, run1); % trial-based data > [interp1] = ft_megrealign(cfg, run1); > [interp1] = ft_megrealign(cfg, run1); > > acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) > original -> template RV 2.22 % > original -> original RV 2.11 % > original -> template -> original RV 2.14 % > > > I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). > According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) > > Can affect the accuracy of the subsequent source reconstruction? > > > -- > Marc Recasens > PhD Student > Universitat de Barcelona > Tel.: +34 639 24 15 98 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From k.muesch at uke.uni-hamburg.de Thu May 31 14:11:06 2012 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Thu, 31 May 2012 14:11:06 +0200 Subject: [FieldTrip] change radiological to neurological convention In-Reply-To: <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> <94E141B7-C905-4436-B2F7-D5A8DC0020D8@psy.gla.ac.uk> Message-ID: It's working, thank you! Am 31.05.2012 um 12:43 schrieb sibylle: > Hey Kathrin, > > which SPM version are you using? > > As far as I know spm2 uses neurological convention (right is right), while spm8 uses radiological convention (right is left). > So using spm8, the slice and ortho plots will 'seem' flipped, but you can check the Talairach coordinates to be sure. > Whereas in the surface plots, the right of the brain will appear on R side of image (maybe you could revert back to spm2 using T1.mnc template mri for sourceinterpolate..?). > > Hope that helps! > > Sibylle > > > On 31 May 2012, at 10:48, Kathrin Müsch wrote: > >> Dear all, >> >> Unfortunately, the result of my source analysis seems to be flipped when calling ft_sourceplot. The transformation matrix of the anatomy seems to be in radiological convention (left is right). I have two questions on that: >> >> 1) Is it correct that the functional data is flipped when the anatomy is in radiological convention (left is right)? >> >> 2 ) How can I change the transformation matrix of my anatomy so that my results are plotted in neurological convention (i.e. left is left) - with ft_volumenormalise or ft_volumerealign? >> >> Any help is very much appreciated. >> >> Best, >> Kathrin >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at science.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From r.oostenveld at donders.ru.nl Thu May 31 14:30:52 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 31 May 2012 14:30:52 +0200 Subject: [FieldTrip] megrealign across runs/sessions Message-ID: Dear Marc, In principle it is not different to realign the MEG data from three sessions if those sessions were recorded on the same subject (as in your case) or in three different subjects (or a larger number of subjest, as the more common usage scenario). The way you use the function is also correct. However, you should not interpret the residual variance as a measure of the quality of the realignment procedure. The realignment does not know the ground truth, so cannot tell how the attempted realignment matches with the ground truth. It only expresses the difference in the data when the data is compared between original and template position (and when the realignment is repeated but then inversely). An important aspect however is that you should be careful with applying source reconstruction on the realigned data. In general I would recommend against it, especially if you are planning to apply a beamformer afterwards. The realignment works by making a crude source estimation on on a sheet that is just in the outer grey matter. That crude source estimate (which is a minimum norm estimate with a slight bit of regularization) affects the spatial correlations (i.e. between channels) in the data. Consequently, subsequent source reconstruction might not be able to pick up the spatial correlation any more and might mislocalize. Better (although not always possible) is to source reconstruct the three conditions separate and then combine them. best Robert On 30 May 2012, at 11:47, Marc Recasens wrote: > Hi everyone, > > I'm considering the possibility to append the MEG data (CTF-275) from 3 different runs (recorded within the same day but with different headpositions in the dewar) into one single dataset. That is, combine my datasets in the sensor-space. > I've been reading about the possibility to use the ft_megrealign function in order reconstruct the magnetic fields onto a standard gradiometer location, > However, in the literature this is mainly used to average data across subjects rather than across runs. > > I did a test using the following code: > cfg= []; > cfg.template{1} = run1.grad; > cfg.template{2} = run2.grad; > cfg.template{3} = run3.grad; > > cfg.vol = vol; % single shell headmodel computed from individual MRI > cfg.inwardshift = 3; > cfg.verify = 'yes'; > cfg.feedback = 'yes'; > [interp1] = ft_megrealign(cfg, run1); % trial-based data > [interp1] = ft_megrealign(cfg, run1); > [interp1] = ft_megrealign(cfg, run1); > > acording to the results (I show the highest RV), the difference between the original and the realigned data seem really small (which I assume it's good) > original -> template RV 2.22 % > original -> original RV 2.11 % > original -> template -> original RV 2.14 % > > > I'm wondering whether anyone has experience in using ft_megrealign across runs/sessions and can recommend it (any advise is welcomed). > According to Knosche (2002), the method seems good but I'd like to know whether someone has test it in real-life situations (especially taking into account the head position differences in the z axis) > > Can affect the accuracy of the subsequent source reconstruction? > > > -- > Marc Recasens > PhD Student > Universitat de Barcelona > Tel.: +34 639 24 15 98 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gauthierb.ens at gmail.com Thu May 31 15:56:15 2012 From: gauthierb.ens at gmail.com (Baptiste Gauthier) Date: Thu, 31 May 2012 15:56:15 +0200 Subject: [FieldTrip] mismatch between volume conduction model and sourcespace Message-ID: Dear Fieldtrippers, I recently tried to follow the fieldtrip tutorial for source reconstruction of event-related field with MNE method ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate?s[]=grey&s[]=matter). All the steps look ok but when it comes to check the matching between volume conduction model and sourcespace, there's an inconsistency along the x-axis. What I found strange is that all parameters (size, shape, y and z- coordinates) seems ok (cf attached picture), so basically the error looks like a simple translation. Have someone ever experimented this problem or have a idea of where it comes from? Regards, Baptiste -- Baptiste Gauthier PhD student INSERM-CEA Cognitive Neuroimaging unit CEA/SAC/DSV/DRM/Neurospin center Bât 145, Point Courier 156 F-91191 Gif-sur-Yvette Cedex FRANCE -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MISMATCH.png Type: image/png Size: 134747 bytes Desc: not available URL: