From moratti at MED.UCM.ES Thu Jul 1 09:27:43 2010 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Thu, 1 Jul 2010 09:27:43 +0200 Subject: Nested analysis Message-ID: Dear Marco, I am not sure if you can manage this within fieldtrip alone (maybe I am wrong). What I do in more complicated statistical situation, I use R. R is an open source statistical package and is free. If you install the R.matlab library you can read and write matlab workspaces with R. R offers broad statistical modeling possibilities. With R you can model hierarchical models. You could permute your data following your Null hypothesis and create a matrix electrodes by number of permutations that contains your statistical map (let's call this matrix statrand). Then you calculate the electrode vector with the observed statistical map (let's call this vector statobs). Then you feed statobs and statrand into clusterstat.m function. Hope that is useful for you. Best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Matthias.Meyer at DONDERS.RU.NL Thu Jul 1 09:31:04 2010 From: Matthias.Meyer at DONDERS.RU.NL (Matthias C. Meyer) Date: Thu, 1 Jul 2010 09:31:04 +0200 Subject: Export EEG Data In-Reply-To: <79FBE383-A930-4671-88D9-08480A24B22B@donders.ru.nl> Message-ID: Hi Jan-Mathijs, thanks for your answer! At least some one replies :) - I already had the feeling it would come to this, but it was worth a try. Now I know I do not waist time by working on this. Best, Matthias jan-mathijs schoffelen schrieb: > Hi Mattias, > >> I am quite new to Fieldtrip and hope that someone has solved my >> problem before. > > High expectations ;). > >> I recorded EEG data inside an MR Scanner with the BrainVision >> software and now I want to use Fieldtrip to run some error correction >> scripts - so far so god. >> But after that I need to write the corrected data back to the >> original EEG - data format. >> I use the ft_write_data function to do this. After some problems I >> manage to run the function, but the result is a double size datafile, >> a messed up header and a empty marker file. >> Probably the data is written in double precision. Giving the data to >> the function with "single(data_org.trial{1})" in the argument does >> not help. >> The command line I use to call the function is: >> ft_write_data('ScannerCor', data_org.trial{1}, 'dataformat', >> 'brainvision_eeg','header', data_org.hdr); >> >> (I copied the corrected data back to the read in matrix) >> >> I heard already, that I can tell Matlab to use only single precision, >> but it would be nice to tell that the function directly - Is there a >> way to do so? >> What do I need to do, to export the header and marker file correctly? > > I have not encountered this issue before, and I don't know whether > anybody else has. This may mean that you need to do some digging > yourself to get it solved. I never tried to export data to a different > fileformat. The easy way out here would be to also do your subsequent > analysis steps in matlab/fieldtrip. > Did you already have a detailed look at ft_write_data, and in > particular the part which deals with 'brainvision_eeg'. My suspicion > is that there is a discrepancy between the information in > data_org.hdr, and the exact data you try to export > (data_org.trial{1}). Manually converting to single precision may not > work if in data_org.hdr you need to specify the precision. (once again > I don't know about the specifics of this function, or of the functions > it relies on). Using the matlab debugger may help you to access the > variables in the function's workspace and to see what's preventing it > to work properly. > > Good luck, > > Jan-Mathijs > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 1 18:07:07 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 1 Jul 2010 18:07:07 +0200 Subject: Export EEG Data In-Reply-To: <4C2475B4.5030807@donders.ru.nl> Message-ID: Hi Matthias On 25 Jun 2010, at 11:24, Matthias C. Meyer wrote: > I recorded EEG data inside an MR Scanner with the BrainVision > software and now I want to use Fieldtrip to run some error > correction scripts - so far so god. > But after that I need to write the corrected data back to the > original EEG - data format. > I use the ft_write_data function to do this. After some problems I > manage to run the function, but the result is a double size > datafile, a messed up header and a empty marker file. How was the original data written? The brainvision dataformat allopws for many different subformats, i.e. int16, int32, float, but also ascii. Another subformat specification is whether the data is multiplexed or not. The default subformat that fieldtrip writes is multiplexed 32 bit floating point values. If the original data was 16 bit, then you would indeed expect a file that is 2x as large. That in itself is not a problem. > Probably the data is written in double precision. it is not. Have a look in fieldtrip/fileio/private/ write_brainvision_eeg.m, there you see % open the data file and write the binary data fid = fopen(datafile, 'wb', 'ieee-le'); if length(size(dat))>2 warning('writing segmented data as if it were continuous'); for i=1:ntrl fwrite(fid, squeeze(dat(i,:,:)), 'float32'); end else fwrite(fid, dat, 'float32'); end What do you mean with a "messed up header"? Can you look at the header with an ascii editor? Presumably the reason for writing to an output file is that you want to read it in in some other software. What is the software that you are trying to read the fieldtrip-generated BVA file into? M > Giving the data to the function with "single(data_org.trial{1})" in > the argument does not help. > The command line I use to call the function is: > ft_write_data('ScannerCor', data_org.trial{1}, 'dataformat', > 'brainvision_eeg','header', data_org.hdr); > > (I copied the corrected data back to the read in matrix) > > I heard already, that I can tell Matlab to use only single > precision, but it would be nice to tell that the function directly - > Is there a way to do so? > What do I need to do, to export the header and marker file correctly? > > The corrected data are exactly of the same size as the original > data, if possible, I might also use the original marker file to get > the trigger points. correct. You just have to make a copy of the marker file so that it has the same name as the new data. best Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 1 18:17:14 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 1 Jul 2010 18:17:14 +0200 Subject: databrowser: change order in which channels appear? In-Reply-To: Message-ID: Dear Henning On 25 Jun 2010, at 14:19, Henning Holle wrote: > when looking at data with the databrowser (vertical viewmode), the > channels > appear in the order in which they happen to be in the dataset. Is > there a > way to define another order (so that, for instance, more anterior > channels > appear more on top of the screen, and more posterior channels at the > bottom > of the screen). It is currently not possible without changing the code. But if you go into ft_databrowser, line 926, you'll see case 'vertical' tmpcfg = []; tmpcfg.layout = 'vertical'; tmpcfg.channel = opt.cfg.channel; tmpcfg.skipcomnt = 'yes'; tmpcfg.skipscale = 'yes'; laytime = ft_prepare_layout(tmpcfg, opt.orgdata); In that part the layout is created with the vertical arrangement of the channels, you can think of that as a set of boxes that are vertically stacked on top opf each other, where each box contains one timecourse. There you could change the code to create a custom layout. Have a look here http://fieldtrip.fcdonders.nl/tutorial/layout for an explanation of layouts. You could just change that code into case 'vertical' tmpcfg = []; tmpcfg.layout = 'yourlayoutfile.lay'; tmpcfg.channel = opt.cfg.channel; tmpcfg.skipcomnt = 'yes'; tmpcfg.skipscale = 'yes'; laytime = ft_prepare_layout(tmpcfg, opt.orgdata); and have the arrangement of the channels for the databrowser in an "yourlayoutfile.lay" ascii file best Robert PS a clean extension of teh code would be to allow for cfg.viewmode = 'yourlayoutfile.lay'; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aardesta at UCLA.EDU Thu Jul 1 23:04:16 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Thu, 1 Jul 2010 14:04:16 -0700 Subject: Vector-valued ClusterStats Message-ID: Hi, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Map.png Type: image/png Size: 627126 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Thu Jul 1 23:55:17 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 1 Jul 2010 23:55:17 +0200 Subject: Vector-valued ClusterStats In-Reply-To: <008f01cb1960$f7cdb700$e7692500$@edu> Message-ID: Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aardesta at UCLA.EDU Fri Jul 2 01:04:39 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Thu, 1 Jul 2010 16:04:39 -0700 Subject: Vector-valued ClusterStats In-Reply-To: <00ee01cb1968$17dd3fa0$4797bee0$@maris@donders.ru.nl> Message-ID: Hi Eric, Thank you very much for the fast response. So if I understand correctly, for a cluster map with X clusters the largest cluster is compared to a permutation distribution created from the largest ClusterStat of each permutation, the 2nd largest cluster to a distribution constructed from the 2nd ClusterStat of each, etc. If this is correct and the largest cluster is just being tested using Max(ClusterStat), why do you say that this vector-based approach has less power for the largest cluster? Also, the permutation distribution for the smaller clusters may not have all 1000 values if some permutations have fewer clusters, right? I appreciate the advice. Best, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, July 01, 2010 2:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Vector-valued ClusterStats Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at DONDERS.RU.NL Fri Jul 2 07:48:55 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 2 Jul 2010 07:48:55 +0200 Subject: Vector-valued ClusterStats In-Reply-To: <00e201cb1971$c98226e0$5c8674a0$@edu> Message-ID: Hi Allen, Thank you very much for the fast response. So if I understand correctly, for a cluster map with X clusters the largest cluster is compared to a permutation distribution created from the largest ClusterStat of each permutation, the 2nd largest cluster to a distribution constructed from the 2nd ClusterStat of each, etc. If this is correct and the largest cluster is just being tested using Max(ClusterStat), why do you say that this vector-based approach has less power for the largest cluster? You need a vector-valued critical value that controls the false alarm rate for all cluster sizes jointly. The first element of this vector-valued critical value is always larger than the critical value for a scalar test statistic. Also, the permutation distribution for the smaller clusters may not have all 1000 values if some permutations have fewer clusters, right? I appreciate the advice. Right, but that does not create any problems. I'm curious to find out if the cluster-based permutation tests reveal an interesting pattern in your data. Best, Eric Best, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, July 01, 2010 2:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Vector-valued ClusterStats Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.holle at SUSSEX.AC.UK Fri Jul 2 13:58:35 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Fri, 2 Jul 2010 13:58:35 +0200 Subject: ft_channelrepair produces only NaNs Message-ID: Dear list members, we have a data set here with a bad data channel (F8, see attached screenshot from the databrowser). we are able to read in the dataset (which was created in EEGLAB) and the electrode positions using the following code. %% read in data cfg = []; cfg.dataset = 's29dr.set'; D = ft_preprocessing(cfg); D.elec = D.hdr.elec; however, when we want to interpolate the bad channel using the following code %% interpolate bad channel F8 cfg = []; cfg.badchannel = 14; E = ft_channelrepair(cfg,D); we only have NaNs for channel 14 >> E.trial{1,1}(14,1:10) ans = NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN What are we doing wrong? One possibility that we have considered is that the electrode positions (which were obtained in EEGLAB) might be in a slightly different format than fieldtrip would expect them. We can't see anything wrong with, but we have attached a copy of the elec field here, just to be sure. Or is it maybe a problem for the interpolation algorithm that F8 is at the edge of covered electrodes? Any help would be greatly appreciated. Kind regards, Tiina Kalda and Henning Holle ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: bad_channel.png Type: image/png Size: 144603 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec_structure.mat Type: application/x-matlab-workspace Size: 1535 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Fri Jul 2 16:39:31 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 2 Jul 2010 16:39:31 +0200 Subject: ft_channelrepair produces only NaNs In-Reply-To: Message-ID: Dear Henning Your electrodes seem to be expressed in mm, see >> load Desktop/elec_structure.mat >> elec.pnt ans = 80.7840 26.1330 -4.0011 84.9812 0 -1.7860 80.7840 -26.1330 -4.0011 76.1528 31.4828 20.8468 76.1528 -31.4828 20.8468 ... The default cfg.neighbourdist is 4, which is appropriate for 4 cm but not 4 mm. So that means that none of the channels is considered a neighbour. The "repair" is done by computing a weighted average over the neighbours that ly withing the specified cfg.neighbourdist, and where the weight is schaled with the inverse distance. If you specify cfg.neighbourdist correctly (40 would probably work fine), you''ll also see in the feedback on screen which electrodes are used for the repairing. hope this helps. Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 2 Jul 2010, at 13:58, Henning Holle wrote: > Dear list members, > > we have a data set here with a bad data channel (F8, see attached screenshot from the > databrowser). > > > we are able to read in the dataset (which was created in EEGLAB) and the electrode > positions using the following code. > > %% read in data > > cfg = []; > cfg.dataset = 's29dr.set'; > D = ft_preprocessing(cfg); > D.elec = D.hdr.elec; > > however, when we want to interpolate the bad channel using the following code > > %% interpolate bad channel F8 > > cfg = []; > cfg.badchannel = 14; > E = ft_channelrepair(cfg,D); > > we only have NaNs for channel 14 > >>> E.trial{1,1}(14,1:10) > > ans = > > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > > What are we doing wrong? One possibility that we have considered is that the electrode > positions (which were obtained in EEGLAB) might be in a slightly different format than > fieldtrip would expect them. We can't see anything wrong with, but we have attached a > copy of the elec field here, just to be sure. > > Or is it maybe a problem for the interpolation algorithm that F8 is at the edge of covered > electrodes? > > Any help would be greatly appreciated. > > Kind regards, > > Tiina Kalda and Henning Holle > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aardesta at UCLA.EDU Fri Jul 2 21:56:25 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Fri, 2 Jul 2010 12:56:25 -0700 Subject: Plotting Single Trials In-Reply-To: <000901cb19aa$425b5e50$c7121af0$@maris@donders.ru.nl> Message-ID: Hello, I have a simple question about TFR plotting. After using freqanalysis to compute TFRs for a single channel, what is the simplest way to view the plots for individual trials? Also, is it possible to use 'avgoverfreq' to show 2D power trends over time within a given frequency range before using freqstatistics? Thanks! P.S. Eric, I will let you know the vector-based ClusterStat results as soon as they are computed. Thanks, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at GMAIL.COM Sun Jul 4 03:07:15 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Sun, 4 Jul 2010 03:07:15 +0200 Subject: Plotting Single Trials Message-ID: Hi Allen, I did this by switching trials and channels in the data structure from TFR output. That way, I can still using multiplotTFR. The rows (x-axis) of each channel then become the individual trials, rather than frequency (I think that's what I did - it was a few weeks ago). This worked for me because I'm looking at a specific frequency band. You might end up with a lot of these data structures if you have TFRs across a broader range of frequencies. If you email me on Tues, I'd be happy to send you the code (it's on my university computer). Best, karl doron k.doron at psych.ucsb.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From marco.buiatti at GMAIL.COM Sun Jul 4 16:27:36 2010 From: marco.buiatti at GMAIL.COM (Marco Buiatti) Date: Sun, 4 Jul 2010 16:27:36 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) Message-ID: Hi all, I am facing a problem that has been raised before (see the thread below): how to consider the three different sensor types of the 306-channels Neuromag system when performing cluster-based permutation analysis in Fieldtrip. Eric Maris suggested to either simply sum the power at the pairs of orthogonal planar gradiometers, or to invent some more sophisticated way to retain the orientation information. I wonder whether anyone has tried these two solutions (or others). Thanks, Best, Marco ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Mon Jul 5 15:02:15 2010 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Mon, 5 Jul 2010 15:02:15 +0200 Subject: plv analysis In-Reply-To: <000401cb1a20$a830b0b0$f8921210$@edu> Message-ID: Dear ft_list, I am trying to perform plv analysis using Fieldtrip, on EEG data converted from SPM to Fieldtrip using ftraw. Frequanalysis on the imported data works fine, I obtain the powspctrm and crsspctrm, and I can succeed with connectivityanalyis to compute e.g., coherence without problems. However, when I set cfg.method to 'plv', connectivityanalysis throws the following error: ??? Conversion to cell from double is not possible. Error in ==> avgoverdim at 17 reduceddim(avgdimnum) = 1; Error in ==> selectdata at 445 if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end Error in ==> ft_connectivityanalysis at 256 data = selectdata(data, 'avgoverrpt', 'yes'); any suggestions? best & many thanks Bernhard %Here the settings I use for frequanalysis (which seems to work fine) cfg = []; cfg.output ='powandcsd'; cfg.taper = 'dpss'; cfg.channel = unique(S.chancomb(:)); cfg.channelcmb = S.chancomb; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'no'; cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % Frequency axis cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); numfoi = length(cfg.foi); cfg.t_ftimwin = zeros(1,numfoi); cfg.t_ftimwin(:) = timewin; % Time resolution cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to 1/timewin (i.e. 2.5 Hz) for all frequencis cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = 0.1*cfg.foi(cfg.foi>10*(1/timewin)); cfg.tapsmofrq(cfg.foi>50) = 5; cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/data.fsample); % Time axis freq = ft_freqanalysis(cfg, data); %And the part for connectivityanalysis (which works for coherence, but not for plv) cfg=[]; cfg.method = 'plv'; [stat] = ft_connectivityanalysis(cfg, freqs) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Mon Jul 5 15:54:51 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Mon, 5 Jul 2010 15:54:51 +0200 Subject: plv analysis In-Reply-To: <4C31D7D7.2010204@bccn-berlin.de> Message-ID: Hi Bernhard, Could you check whether you are using a very recent version of fieldtrip? If not, please update and check whether the bug persists. It sounds rather like a known bug which has been recently fixed. Best, Jan-Mathijs On Jul 5, 2010, at 3:02 PM, Bernhard Spitzer wrote: > Dear ft_list, > > I am trying to perform plv analysis using Fieldtrip, on EEG data > converted from SPM to Fieldtrip using ftraw. > Frequanalysis on the imported data works fine, I obtain the > powspctrm and crsspctrm, and I can succeed > with connectivityanalyis to compute e.g., coherence without problems. > However, when I set cfg.method to 'plv', connectivityanalysis throws > the following error: > > ??? Conversion to cell from double is not possible. > > Error in ==> avgoverdim at 17 > reduceddim(avgdimnum) = 1; > > Error in ==> selectdata at 445 > if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end > > Error in ==> ft_connectivityanalysis at 256 > data = selectdata(data, 'avgoverrpt', 'yes'); > > any suggestions? > best & many thanks > Bernhard > > > > %Here the settings I use for frequanalysis (which seems to work fine) > cfg = []; > cfg.output ='powandcsd'; > cfg.taper = 'dpss'; > cfg.channel = unique(S.chancomb(:)); > cfg.channelcmb = S.chancomb; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'no'; > cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % > Frequency axis > cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); > numfoi = length(cfg.foi); > cfg.t_ftimwin = zeros(1,numfoi); > cfg.t_ftimwin(:) = timewin; % Time resolution > cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero > cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to 1/ > timewin (i.e. 2.5 Hz) for all frequencis > cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = 0.1*cfg.foi(cfg.foi>10*(1/ > timewin)); > cfg.tapsmofrq(cfg.foi>50) = 5; > cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/ > data.fsample); % Time axis > freq = ft_freqanalysis(cfg, data); > > %And the part for connectivityanalysis (which works for coherence, > but not for plv) > cfg=[]; > cfg.method = 'plv'; > [stat] = ft_connectivityanalysis(cfg, freqs) > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Mon Jul 5 17:38:14 2010 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Mon, 5 Jul 2010 17:38:14 +0200 Subject: plv analysis In-Reply-To: <767966C1-8039-4C3F-9A73-B74F0BE8361B@donders.ru.nl> Message-ID: Dear Jan-Mathijs, thank you - in fact my pathdef was outdated and pointed to an older fieldtrip version. With the current version now the plv works indeed without problems. Thanks again! Bernhard Am 7/5/2010 3:54 PM, schrieb jan-mathijs schoffelen: > Hi Bernhard, > > Could you check whether you are using a very recent version of > fieldtrip? If not, please update and check whether the bug persists. > It sounds rather like a known bug which has been recently fixed. > > Best, > > Jan-Mathijs > > > On Jul 5, 2010, at 3:02 PM, Bernhard Spitzer wrote: > >> Dear ft_list, >> >> I am trying to perform plv analysis using Fieldtrip, on EEG data >> converted from SPM to Fieldtrip using ftraw. >> Frequanalysis on the imported data works fine, I obtain the powspctrm >> and crsspctrm, and I can succeed >> with connectivityanalyis to compute e.g., coherence without problems. >> However, when I set cfg.method to 'plv', connectivityanalysis throws >> the following error: >> >> ??? Conversion to cell from double is not possible. >> >> Error in ==> avgoverdim at 17 >> reduceddim(avgdimnum) = 1; >> >> Error in ==> selectdata at 445 >> if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end >> >> Error in ==> ft_connectivityanalysis at 256 >> data = selectdata(data, 'avgoverrpt', 'yes'); >> >> any suggestions? >> best & many thanks >> Bernhard >> >> >> >> %Here the settings I use for frequanalysis (which seems to work fine) >> cfg = []; >> cfg.output ='powandcsd'; >> cfg.taper = 'dpss'; >> cfg.channel = unique(S.chancomb(:)); >> cfg.channelcmb = S.chancomb; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'no'; >> cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % >> Frequency axis >> cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); >> numfoi = length(cfg.foi); >> cfg.t_ftimwin = zeros(1,numfoi); >> cfg.t_ftimwin(:) = timewin; % Time resolution >> cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero >> cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to >> 1/timewin (i.e. 2.5 Hz) for all frequencis >> cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = >> 0.1*cfg.foi(cfg.foi>10*(1/timewin)); >> cfg.tapsmofrq(cfg.foi>50) = 5; >> cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/data.fsample); >> % Time axis >> freq = ft_freqanalysis(cfg, data); >> >> %And the part for connectivityanalysis (which works for coherence, >> but not for plv) >> cfg=[]; >> cfg.method = 'plv'; >> [stat] = ft_connectivityanalysis(cfg, freqs) >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. -- ----------------------------------------------- Dr. Bernhard Spitzer Bernstein Center for Computational Neuroscience Charité Universitätsmedizin Berlin Philippstr. 13 House 6 10115 Berlin Germany Phone: +49 (0)30 2093-6789 Fax: +49 (0)30 2093-6771 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From matthew at PSYCH.COLUMBIA.EDU Tue Jul 6 03:26:02 2010 From: matthew at PSYCH.COLUMBIA.EDU (Matthew Davidson) Date: Mon, 5 Jul 2010 21:26:02 -0400 Subject: Independent channels stats question Message-ID: Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using Fieldtrip more directly. My question pertains to cluster-based correction when channels are independent. My data is primarily intracranial EEG, and due to the 1/f^2 power drop-off, electrodes directly on the brain reflect local activity much more strongly than sensors further away. As a result, we treat them as independent. Now, I can force the Fieldtrip clustering algorithm to not cluster across channels by setting: cfg.neighbours = []; cfg.minnbchan = 0; but it still computes the maximum cluster size for a particular permutation based on *all* the data. This seems... less sensitive somehow, as if large clusters in one channel negatively impact the significance of clusters in another channel. Is there a better way to do this and still solve the MCP? E.g., compute the maxsum on each channel separately, and then use something like FDR or Bonferroni correction on the maxsums across channels? Thanks for any advice you may have, and thanks for producing fieldtrip! Matthew ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mcregar at UPO.ES Tue Jul 6 12:56:31 2010 From: mcregar at UPO.ES (Maite Crespo) Date: Tue, 6 Jul 2010 12:56:31 +0200 Subject: what is wrong? Message-ID: Hello! I read some previous mails in the discussion list, but I'm still not sure about the procedure I'm following. I'm obtaining too flat images (not spatially located sources). I would like to localize the source activity within a frequency band and a time window. I computed the CSD matrix using ft_freqanalysis. Can I average the resulting matrix in frequency and time before using it with ft_sourceanalysis? I used the following steps to compute the filters in the averaged CSD (across trials) and then apply it to compute the power in single trial data. Is that right? % 1st run cfg=[]; cfg.frequency=5; cfg.latency=.7; cfg.method='dics'; cfg.projectnoise='yes'; cfg.keepfilter='yes'; cfg.grid=grid; cfg.vol=vol; cfg.elecfile=elecfile; cfg.lambda=.05; source=ft_sourceanalysis(cfg,data); % 2nd run cfg=[]; cfg.frequency=5; cfg.latency=.7; cfg.method='dics'; cfg.projectnoise='yes'; cfg.rawtrial='yes'; source.leadfield=grid.leadfield; cfg.grid=source2grid(source); cfg.vol=vol; cfg.elecfile=elecfile; cfg.lambda=.05; source=ft_sourceanalysis(cfg,data); I also tried changing the lambda parameter, but it seems there are not many changes... Many thanks in advance for any help. Best regards, Maité ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jul 6 13:21:58 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 6 Jul 2010 13:21:58 +0200 Subject: Independent channels stats question In-Reply-To: Message-ID: Dear Matthew, Your sensitivity problem is a known issue when using cluster-based test statistics, in which it is difficult to get small clusters significant in the presence of large clusters. This could also occur within a single channel (for example with a time-frequency decomposition, in which the summed spectro-temporal extent of an alpha- band effect could be much bigger than a gamma-band effect). In your case I think it would be statistically valid to do the cluster- based permutation test on each channel separately (which will involve a for loop around ft_freqstatistics, because it is not implemented in the fieldtrip code) and doing a post-hoc Bonferroni correction on the resulting p-values. If the number of channels is not too big, this might work. Good luck, Jan-Mathijs On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG > Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using > Fieldtrip more directly. > > My question pertains to cluster-based correction when channels are > independent. My data is primarily intracranial EEG, and due to the > 1/f^2 power drop-off, electrodes directly on the brain reflect local > activity much more strongly than sensors further away. As a result, we > treat them as independent. Now, I can force the Fieldtrip clustering > algorithm to not cluster across channels by setting: > > cfg.neighbours = []; > cfg.minnbchan = 0; > > but it still computes the maximum cluster size for a particular > permutation based on *all* the data. This seems... less sensitive > somehow, as if large clusters in one channel negatively impact the > significance of clusters in another channel. > > Is there a better way to do this and still solve the MCP? E.g., > compute the maxsum on each channel separately, and then use something > like FDR or Bonferroni correction on the maxsums across channels? > > Thanks for any advice you may have, and thanks for producing > fieldtrip! > Matthew > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jul 6 13:33:19 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 6 Jul 2010 13:33:19 +0200 Subject: what is wrong? In-Reply-To: Message-ID: Dear Maité, What do you mean by spatially not located sources? In general it may be helpful to give more to-the-point information besides the input cfg-structures. The output of your beamformer analysis depends both on the sanity of the data (which I cannot check), and on the sanity of the input configuration. Two remarks w.r.t the cfg: -when cfg.lambda is a scalar, the csd-matrix will be regularized with an identity matrix, scaled with cfg.lambda. From your value of 0.05 however I assume that you want to do a relative scaling. True? In that case you should specify cfg.lambda = '5%'; The consequence of the 0.05 could be that if the scale of your data is Volts-squared or microVolts- squared (boiling down to the csd having a magnitude of 10^-12 or 1, respectively) which at least in the first case leads to inappropriate regularisation. -in the second step I assume you want to re-use the filters computed in step 1. Therefore you need to pass source.avg.filter (computed in the first step) to the cfg. Does this happen in source2grid? I don't know, it could be, but I'd check that if I were you. Some post-processing probably needs to be done in order to see spatially localized sources (even when the whole analysis went fine (=data OK and cfgs OK) until this point), so just looking at the output of sourceanalysis typically is not optimal. For the computation of the CSD-matrix I'd like to refer to the tutorial http://fieldtrip.fcdonders.nl/tutorial/beamformer on the fieldtrip wiki. Best, Jan-Mathijs On Jul 6, 2010, at 12:56 PM, Maite Crespo wrote: > Hello! > > I read some previous mails in the discussion list, but I'm still not > sure about > the procedure I'm following. I'm obtaining too flat images (not > spatially located > sources). I would like to localize the source activity within a > frequency band > and a time window. I computed the CSD matrix using ft_freqanalysis. > Can I > average the resulting matrix in frequency and time before using it > with > ft_sourceanalysis? > > I used the following steps to compute the filters in the averaged > CSD (across > trials) and then apply it to compute the power in single trial data. > Is that > right? > > % 1st run > cfg=[]; > cfg.frequency=5; > cfg.latency=.7; > cfg.method='dics'; > cfg.projectnoise='yes'; > cfg.keepfilter='yes'; > cfg.grid=grid; > cfg.vol=vol; > cfg.elecfile=elecfile; > cfg.lambda=.05; > source=ft_sourceanalysis(cfg,data); > > % 2nd run > cfg=[]; > cfg.frequency=5; > cfg.latency=.7; > cfg.method='dics'; > cfg.projectnoise='yes'; > cfg.rawtrial='yes'; > source.leadfield=grid.leadfield; > cfg.grid=source2grid(source); > cfg.vol=vol; > cfg.elecfile=elecfile; > cfg.lambda=.05; > source=ft_sourceanalysis(cfg,data); > > I also tried changing the lambda parameter, but it seems there are > not many > changes... > > Many thanks in advance for any help. > > Best regards, > Maité > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.bauer at UCL.AC.UK Tue Jul 6 16:58:55 2010 From: m.bauer at UCL.AC.UK (Markus Bauer) Date: Tue, 6 Jul 2010 15:58:55 +0100 Subject: ANT (*.cnt) format MEX files for 64 bit Message-ID: Hi we've been trying to read ANT files with fieldtrip under various operating systems - without success. unfortunately this 'EEProbe' toolbox that is used to read those data only seems to provide mex-files for 32bit machines (LINUX or Windows) and no source code to allow compilation can anybody make such files available or knows who could be contacted? thanks Markus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sunyata at GMAIL.COM Tue Jul 6 18:47:31 2010 From: sunyata at GMAIL.COM (Matthew Davidson) Date: Tue, 6 Jul 2010 12:47:31 -0400 Subject: Independent channels stats question In-Reply-To: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Jan-Mathis, thanks for the response. Unfortunately, we tend to have a lot of channels (~120-200), and once we start using microelectrodes in the patients, it'll only get worse. If we were to divide our alpha by 120-200, wouldn't we have to run 120-200 times as many permutations in order to get p-values low enough to survive Bonferroni correction? That's a large jump; we might have to run 100,000 permutations! What do you think about something like FDR correction instead? Matthew On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen wrote: > Dear Matthew, > > Your sensitivity problem is a known issue when using cluster-based test > statistics, in which it is difficult to get small clusters significant in > the presence of large clusters. This could also occur within a single > channel (for example with a time-frequency decomposition, in which the > summed spectro-temporal extent of an alpha-band effect could be much bigger > than a gamma-band effect). > In your case I think it would be statistically valid to do the cluster-based > permutation test on each channel separately (which will involve a for loop > around ft_freqstatistics, because it is not implemented in the fieldtrip > code) and doing a post-hoc Bonferroni correction on the resulting p-values. > If the number of channels is not too big, this might work. > > Good luck, > > Jan-Mathijs > > > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using >> Fieldtrip more directly. >> >> My question pertains to cluster-based correction when channels are >> independent. My data is primarily intracranial EEG, and due to the >> 1/f^2 power drop-off, electrodes directly on the brain reflect local >> activity much more strongly than sensors further away. As a result, we >> treat them as independent. Now, I can force the Fieldtrip clustering >> algorithm to not cluster across channels by setting: >> >> cfg.neighbours = []; >> cfg.minnbchan = 0; >> >> but it still computes the maximum cluster size for a particular >> permutation based on *all* the data. This seems... less sensitive >> somehow, as if large clusters in one channel negatively impact the >> significance of clusters in another channel. >> >> Is there a better way to do this and still solve the MCP? E.g., >> compute the maxsum on each channel separately, and then use something >> like FDR or Bonferroni correction on the maxsums across channels? >> >> Thanks for any advice you may have, and thanks for producing fieldtrip! >> Matthew >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From georges.otte at TELENET.BE Tue Jul 6 22:22:19 2010 From: georges.otte at TELENET.BE (Dr. Georges Otte) Date: Tue, 6 Jul 2010 22:22:19 +0200 Subject: ANT (*.cnt) format MEX files for 64 bit In-Reply-To: <4C3344AF.2000503@ucl.ac.uk> Message-ID: Dea markus, I will forward your mail to maarten van de Velde at ANT who could help You out. georges -----Oorspronkelijk bericht----- Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Markus Bauer Verzonden: dinsdag 6 juli 2010 16:59 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] ANT (*.cnt) format MEX files for 64 bit Hi we've been trying to read ANT files with fieldtrip under various operating systems - without success. unfortunately this 'EEProbe' toolbox that is used to read those data only seems to provide mex-files for 32bit machines (LINUX or Windows) and no source code to allow compilation can anybody make such files available or knows who could be contacted? thanks Markus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From gflandin at FIL.ION.UCL.AC.UK Wed Jul 7 13:43:39 2010 From: gflandin at FIL.ION.UCL.AC.UK (Guillaume Flandin) Date: Wed, 7 Jul 2010 12:43:39 +0100 Subject: ANT (*.cnt) format MEX files for 64 bit In-Reply-To: <201007062022.o66KMhAq006895@filter1-nij.mf.surf.net> Message-ID: Dear Markus, compiled MEX files on most platforms of the eeprobe importer from ANT are available in the external/eeprobe folder of SPM8, if this can be of any help. Best regards, Guillaume. Dr. Georges Otte wrote: > Dea markus, > > I will forward your mail to maarten van de Velde at ANT who could help You > out. > > georges > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens > Markus Bauer > Verzonden: dinsdag 6 juli 2010 16:59 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] ANT (*.cnt) format MEX files for 64 bit > > Hi > > we've been trying to read ANT files with fieldtrip under various > operating systems - without success. > > unfortunately this 'EEProbe' toolbox that is used to read those data > only seems to provide mex-files for 32bit machines (LINUX or Windows) > and no source code to allow compilation > > can anybody make such files available or knows who could be contacted? > > thanks > Markus -- Guillaume Flandin, PhD Wellcome Trust Centre for Neuroimaging University College London 12 Queen Square London WC1N 3BG ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sangita.dandekar at GMAIL.COM Wed Jul 7 21:37:06 2010 From: sangita.dandekar at GMAIL.COM (Sangita Dandekar) Date: Wed, 7 Jul 2010 15:37:06 -0400 Subject: megplanar on Yokogawa axial gradiometers Message-ID: Hi, I'd like to get an estimate of horizontal and vertical planar gradients at each axial gradiometer in our Yokogawa system. The megplanar function in fieldtrip is setup to check whether input data were collected on CTF or BTI systems and breaks out of the code if that is not the case. I was wondering why (and if) the code in the megplanar function is specific to only CTF and BTI systems? I have not looked at the megplanar code too closely yet, but it seems as though the geometry of the yokogawa system's axial gradiometers should allow application of the 'original', 'sincos' and 'fitplane' estimation methods. It would be great if someone who knows the details of the above three planar gradient estimation methods could let me know if they should work on the Yokogawa's axial gradiometers without modification, or, if modification is necessary, what the nature of the modifications that I need to make are. Thanks in advance for any help! Sangi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 10:41:11 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 03:41:11 -0500 Subject: No subject Message-ID: Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: align1.jpg Type: image/jpeg Size: 272040 bytes Desc: align1.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: align2.jpg Type: image/jpeg Size: 89401 bytes Desc: align2.jpg URL: From a.stolk at FCDONDERS.RU.NL Thu Jul 8 11:17:14 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Thu, 8 Jul 2010 11:17:14 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C29@UTHCMS1.uthouston.edu> Message-ID: Hi Tony, Just to be sure; did you add the .pos and .dim from the template grid to your data before interpolating? In code; data.pos = template_grid.pos; data.dim = template_grid.dim; cfg = []; cfg.parameter = 'all'; data_int = ft_sourceinterpolate(cfg, data, mri); You can then ft_sourceplot the interpolated data. Best, Arjen p.s. if still running into problems, make sure you have followed the steps described here: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ----- Original Message ----- From: "Antony D Passaro" To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From s.mohr at PSY.GLA.AC.UK Thu Jul 8 13:58:42 2010 From: s.mohr at PSY.GLA.AC.UK (sibylle) Date: Thu, 8 Jul 2010 12:58:42 +0100 Subject: Problems with sourceanalysis Message-ID: Hi everyone, I'm trying to localize oscillatory sources on BESA dat-files. I downloaded the standard BEM-Model from the Fieldtrip ftp-server and aligned my electrodes to the BEM using the 'interactive'-method (see attached script 'align_elec.m'). The thing is that I run into problems when I try to do the actual sourceanalysis (see attached script 'sources_testfile.m'): Preprocessing and freqanalysis is fine, but then the sourceanalysis crashes. This is because no filters are created for two voxels, because the leadfield contains NaNs. Temporarily, I replace the two leadfield voxels (2714 and 2735) with their neighbouring leadfield to run the sourceanalysis smoothly. It's a quick fix, but of course not ideal. Does anyone know what goes wrong? Any help is much appreciated! Thanks a lot, Sibylle ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: align_elec.m Type: application/octet-stream Size: 2208 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sources_testfile.m Type: application/octet-stream Size: 4016 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 13:57:01 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 06:57:01 -0500 Subject: No subject In-Reply-To: <12062554.3767811278580634559.JavaMail.root@watertor.uci.ru.nl> Message-ID: Hi Arjen, Thank you very much for your help. I had not added the .pos and .dim to my grid before interpolating, but after adding that information I had the same result as before. I then checked the .pos and .dim of the data before redefining it and noticed that it was already identical to the template grid information. I also referred to the example that you had suggested, however, I am currently looking at a single subject to verify localization before moving on to multiple subject analyses. Additionally, I would like to visualize data projected on to a single subject's MRI prior to normalizing the data. Any other suggestions would be greatly appreciated. Thank you again, -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] Sent: Thursday, July 08, 2010 4:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Hi Tony, Just to be sure; did you add the .pos and .dim from the template grid to your data before interpolating? In code; data.pos = template_grid.pos; data.dim = template_grid.dim; cfg = []; cfg.parameter = 'all'; data_int = ft_sourceinterpolate(cfg, data, mri); You can then ft_sourceplot the interpolated data. Best, Arjen p.s. if still running into problems, make sure you have followed the steps described here: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ----- Original Message ----- From: "Antony D Passaro" To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 14:14:18 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 14:14:18 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2A@UTHCMS1.uthouston.edu> Message-ID: Dear Tony, It looks as if the coordinate system attached to your single subject's mri is not according to 4D's convention (it rather looks as if it is defined an mni space). The reason why I think this is that your x and y axes seem to be swapped, and there is a slight shift in the z- direction, suggesting a difference in origin. You can enforce the correct coordinate system onto the MRI by using ft_volumerealign in the interactive mode (and then specifying lpa, rpa and nasion by hand: this should return an updated mri.transform, which describes the transformation from voxel space to subject's headspace) . This should of course be done before calling ft_sourceinterpolate. Cheers, Jan-Mathijs On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim > to my grid before interpolating, but after adding that information I > had the same result as before. I then checked the .pos and .dim of > the data before redefining it and noticed that it was already > identical to the template grid information. I also referred to the > example that you had suggested, however, I am currently looking at a > single subject to verify localization before moving on to multiple > subject analyses. Additionally, I would like to visualize data > projected on to a single subject's MRI prior to normalizing the > data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template > grid to your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the > steps described here: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / > Berlin / Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not > exist in the same coordinate space. Some were in mm and some in cm. > After I resolved these issues, I was able to use headmodelplot to > verify that everything was correct (see attached screenshot). I then > attempted source localization using lcmv and noticed that that the > projected activation existed in the incorrect orientation (see > second attached screenshot). I'm not sure what I'm doing wrong as > all of my components are in the correct space. I also tried to use > the interactive option of sourceplot to correctly set n,l,r but that > didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 14:50:01 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 07:50:01 -0500 Subject: No subject In-Reply-To: Message-ID: Dear Jan-Mathijs, Thank you again for your help, I appreciate it. I had forgotten to mention that I had used ft_volumerealign to align the mri before creating the volume conduction model using ft_preapre_singleshell. I then used the resulting vol in the ft_sourceanalyses, although I feel as though I am missing a step here which places the data in the same space as the MRI via the volume conduction model. Thanks, -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] Sent: Thursday, July 08, 2010 7:14 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Tony, It looks as if the coordinate system attached to your single subject's mri is not according to 4D's convention (it rather looks as if it is defined an mni space). The reason why I think this is that your x and y axes seem to be swapped, and there is a slight shift in the z- direction, suggesting a difference in origin. You can enforce the correct coordinate system onto the MRI by using ft_volumerealign in the interactive mode (and then specifying lpa, rpa and nasion by hand: this should return an updated mri.transform, which describes the transformation from voxel space to subject's headspace) . This should of course be done before calling ft_sourceinterpolate. Cheers, Jan-Mathijs On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim > to my grid before interpolating, but after adding that information I > had the same result as before. I then checked the .pos and .dim of > the data before redefining it and noticed that it was already > identical to the template grid information. I also referred to the > example that you had suggested, however, I am currently looking at a > single subject to verify localization before moving on to multiple > subject analyses. Additionally, I would like to visualize data > projected on to a single subject's MRI prior to normalizing the > data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template > grid to your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the > steps described here: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / > Berlin / Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not > exist in the same coordinate space. Some were in mm and some in cm. > After I resolved these issues, I was able to use headmodelplot to > verify that everything was correct (see attached screenshot). I then > attempted source localization using lcmv and noticed that that the > projected activation existed in the incorrect orientation (see > second attached screenshot). I'm not sure what I'm doing wrong as > all of my components are in the correct space. I also tried to use > the interactive option of sourceplot to correctly set n,l,r but that > didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From yuvharpaz at GMAIL.COM Thu Jul 8 14:40:34 2010 From: yuvharpaz at GMAIL.COM (Yuval Harpaz) Date: Thu, 8 Jul 2010 15:40:34 +0300 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2A@UTHCMS1.uthouston.edu> Message-ID: we had a similar problem but we only needed to interpolate on template MRI. we copied the pos of the template and it worked fine. by the way, normalization did not work well for us for more than 10 subjects or so, RAM problems. yuval On 8 July 2010 14:57, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim to my > grid before interpolating, but after adding that information I had the same > result as before. I then checked the .pos and .dim of the data before > redefining it and noticed that it was already identical to the template grid > information. I also referred to the example that you had suggested, however, > I am currently looking at a single subject to verify localization before > moving on to multiple subject analyses. Additionally, I would like to > visualize data projected on to a single subject's MRI prior to normalizing > the data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template grid to > your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the steps > described here: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / > Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not exist in > the same coordinate space. Some were in mm and some in cm. After I resolved > these issues, I was able to use headmodelplot to verify that everything was > correct (see attached screenshot). I then attempted source localization > using lcmv and noticed that that the projected activation existed in the > incorrect orientation (see second attached screenshot). I'm not sure what > I'm doing wrong as all of my components are in the correct space. I also > tried to use the interactive option of sourceplot to correctly set n,l,r but > that didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 14:52:54 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 14:52:54 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2C@UTHCMS1.uthouston.edu> Message-ID: Dear Tony, What you did for the creation of the volume conduction model is indeed correct. The question now is whether you also used the updated mri for ft_sourceinterpolate, or whether you went back to loading the mri from file without the correct coordinate frame info... JM On Jul 8, 2010, at 2:50 PM, Passaro, Antony D wrote: > Dear Jan-Mathijs, > > Thank you again for your help, I appreciate it. I had forgotten to > mention that I had used ft_volumerealign to align the mri before > creating the volume conduction model using ft_preapre_singleshell. I > then used the resulting vol in the ft_sourceanalyses, although I > feel as though I am missing a step here which places the data in the > same space as the MRI via the volume conduction model. > > Thanks, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] > Sent: Thursday, July 08, 2010 7:14 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Dear Tony, > > It looks as if the coordinate system attached to your single subject's > mri is not according to 4D's convention (it rather looks as if it is > defined an mni space). The reason why I think this is that your x and > y axes seem to be swapped, and there is a slight shift in the z- > direction, suggesting a difference in origin. You can enforce the > correct coordinate system onto the MRI by using ft_volumerealign in > the interactive mode (and then specifying lpa, rpa and nasion by hand: > this should return an updated mri.transform, which describes the > transformation from voxel space to subject's headspace) . This should > of course be done before calling ft_sourceinterpolate. > > Cheers, > > Jan-Mathijs > > On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > >> Hi Arjen, >> >> Thank you very much for your help. I had not added the .pos and .dim >> to my grid before interpolating, but after adding that information I >> had the same result as before. I then checked the .pos and .dim of >> the data before redefining it and noticed that it was already >> identical to the template grid information. I also referred to the >> example that you had suggested, however, I am currently looking at a >> single subject to verify localization before moving on to multiple >> subject analyses. Additionally, I would like to visualize data >> projected on to a single subject's MRI prior to normalizing the >> data. Any other suggestions would be greatly appreciated. >> >> Thank you again, >> -Tony >> ________________________________________ >> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf >> Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] >> Sent: Thursday, July 08, 2010 4:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] >> >> Hi Tony, >> >> Just to be sure; did you add the .pos and .dim from the template >> grid to your data before interpolating? >> >> In code; >> >> data.pos = template_grid.pos; >> data.dim = template_grid.dim; >> cfg = []; >> cfg.parameter = 'all'; >> data_int = ft_sourceinterpolate(cfg, data, mri); >> >> You can then ft_sourceplot the interpolated data. >> >> Best, >> Arjen >> >> p.s. if still running into problems, make sure you have followed the >> steps described here: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space >> >> ----- Original Message ----- >> From: "Antony D Passaro" >> To: FIELDTRIP at NIC.SURFNET.NL >> Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / >> Berlin / Bern / Rome / Stockholm / Vienna >> Subject: [FIELDTRIP] >> >> Hi, >> >> I've been having issues projecting source estimates onto an MRI. I >> discovered that several of my components (vol, grad, grid) did not >> exist in the same coordinate space. Some were in mm and some in cm. >> After I resolved these issues, I was able to use headmodelplot to >> verify that everything was correct (see attached screenshot). I then >> attempted source localization using lcmv and noticed that that the >> projected activation existed in the incorrect orientation (see >> second attached screenshot). I'm not sure what I'm doing wrong as >> all of my components are in the correct space. I also tried to use >> the interactive option of sourceplot to correctly set n,l,r but that >> didn't seem to change anything. I'm sure it is something very simple >> that I am overlooking but any help would be much appreciated. >> >> Thank you, >> -Tony >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 15:30:41 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 08:30:41 -0500 Subject: No subject In-Reply-To: Message-ID: Dear Jan-Mathijs, Thank you so much for your help, that did the trick (see attached screenshot). I didn't realized that I could use the output from ft_volumerealign as the mri in ft_sourceinterpolate (or just overwrite the .transform of the mri). I will document all of my steps. Thank you! -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] Sent: Thursday, July 08, 2010 7:52 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Tony, What you did for the creation of the volume conduction model is indeed correct. The question now is whether you also used the updated mri for ft_sourceinterpolate, or whether you went back to loading the mri from file without the correct coordinate frame info... JM On Jul 8, 2010, at 2:50 PM, Passaro, Antony D wrote: > Dear Jan-Mathijs, > > Thank you again for your help, I appreciate it. I had forgotten to > mention that I had used ft_volumerealign to align the mri before > creating the volume conduction model using ft_preapre_singleshell. I > then used the resulting vol in the ft_sourceanalyses, although I > feel as though I am missing a step here which places the data in the > same space as the MRI via the volume conduction model. > > Thanks, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] > Sent: Thursday, July 08, 2010 7:14 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Dear Tony, > > It looks as if the coordinate system attached to your single subject's > mri is not according to 4D's convention (it rather looks as if it is > defined an mni space). The reason why I think this is that your x and > y axes seem to be swapped, and there is a slight shift in the z- > direction, suggesting a difference in origin. You can enforce the > correct coordinate system onto the MRI by using ft_volumerealign in > the interactive mode (and then specifying lpa, rpa and nasion by hand: > this should return an updated mri.transform, which describes the > transformation from voxel space to subject's headspace) . This should > of course be done before calling ft_sourceinterpolate. > > Cheers, > > Jan-Mathijs > > On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > >> Hi Arjen, >> >> Thank you very much for your help. I had not added the .pos and .dim >> to my grid before interpolating, but after adding that information I >> had the same result as before. I then checked the .pos and .dim of >> the data before redefining it and noticed that it was already >> identical to the template grid information. I also referred to the >> example that you had suggested, however, I am currently looking at a >> single subject to verify localization before moving on to multiple >> subject analyses. Additionally, I would like to visualize data >> projected on to a single subject's MRI prior to normalizing the >> data. Any other suggestions would be greatly appreciated. >> >> Thank you again, >> -Tony >> ________________________________________ >> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf >> Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] >> Sent: Thursday, July 08, 2010 4:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] >> >> Hi Tony, >> >> Just to be sure; did you add the .pos and .dim from the template >> grid to your data before interpolating? >> >> In code; >> >> data.pos = template_grid.pos; >> data.dim = template_grid.dim; >> cfg = []; >> cfg.parameter = 'all'; >> data_int = ft_sourceinterpolate(cfg, data, mri); >> >> You can then ft_sourceplot the interpolated data. >> >> Best, >> Arjen >> >> p.s. if still running into problems, make sure you have followed the >> steps described here: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space >> >> ----- Original Message ----- >> From: "Antony D Passaro" >> To: FIELDTRIP at NIC.SURFNET.NL >> Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / >> Berlin / Bern / Rome / Stockholm / Vienna >> Subject: [FIELDTRIP] >> >> Hi, >> >> I've been having issues projecting source estimates onto an MRI. I >> discovered that several of my components (vol, grad, grid) did not >> exist in the same coordinate space. Some were in mm and some in cm. >> After I resolved these issues, I was able to use headmodelplot to >> verify that everything was correct (see attached screenshot). I then >> attempted source localization using lcmv and noticed that that the >> projected activation existed in the incorrect orientation (see >> second attached screenshot). I'm not sure what I'm doing wrong as >> all of my components are in the correct space. I also tried to use >> the interactive option of sourceplot to correctly set n,l,r but that >> didn't seem to change anything. I'm sure it is something very simple >> that I am overlooking but any help would be much appreciated. >> >> Thank you, >> -Tony >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: align3.jpg Type: image/jpeg Size: 90514 bytes Desc: align3.jpg URL: From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 16:51:38 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 16:51:38 +0200 Subject: warning for ctf-users Message-ID: Dear all, I came across a bug in the code which may affect people who use FieldTrip to analyze CTF-data. The function ft_denoise_synthetic, which can be used to convert the data to higher (or lower) order gradients did not work as it was supposed to. Rather than applying the balancing matrix to the data it applied the inverse of the balancing matrix to the data. This is wrong, and most likely results in the data becoming more 'noisy', rather than less noisy. It is not exactly clear since when this bug exists and it may be worthwhile to critically re- evaluate data which have been processed with ft_denoise_synthetic. We sincerely apologize for any inconvenience caused. Best wishes, Jan-Mathijs PS: Of course the correct version of the file will be available for download on the ftp-server as of tomorrow. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue Jul 13 09:48:15 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Jul 2010 09:48:15 +0200 Subject: Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG Message-ID: Dear FieldTrip users and other software developers, Let me draw your attention to the following. Please distribute this call for papers to anyone you think may be interested in submitting, and to relevant email discusison lists. best regards, Robert ---------- http://www.hindawi.com/journals/cin/si/ebm.html ---------- Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG Call for Papers The field of Magnetoencephalography (MEG) and Electroencephalography (EEG) source imaging is maturing rapidly. This scientific growth is accompanied by a variety of complementary and/or concurrent software solutions from the academic world. The objective of this CIN Special Issue is to help the neuroimaging obtain an overview of state-of-the-art academic software applications for MEG/EEG data analysis, how they differ and interact, and of upcoming methodological trends and technical developments; the topics to be covered include, but are not limited to, academic software solutions for: MEG and EEG data acquisition Data preprocessing, that is, filtering, artifact detection, rejection or correction, trial sorting, averaging Segmentation and geometrical modeling of head tissues Computational electromagnetics for MEG/EEG forward modeling MEG/EEG source analysis Statistical appraisal and inference: confidence intervals on measures and hypothesis testing Identification and evaluation of evoked, induced event-related brain responses and ongoing brain activity Time-frequency decompositions, advanced spectral analysis, time series modeling Estimation of functional and effective connectivity Authors should provide detailed information regarding their software toolbox or application by addressing the following topics: open source software (yes/no), i/o file formats available, operating system, Matlab required (yes/no), interoperability with other software, and so forth. Further, the software needs to be available for download free of charge at the time of manuscript submission, with sufficient documentation provided online to be able to reproduce the data analysis featured in the manuscript. Before submission authors should carefully read over the journal's Author Guidelines, which are located at http://www.hindawi.com/journals/cin/guidelines.html . Prospective authors should submit an electronic copy of their complete manuscript through the journal Manuscript Tracking System at http://mts.hindawi.com/ according to the following timetable: Manuscript Due September 1, 2010 First Round of Reviews December 1, 2010 Publication Date March 1, 2011 Lead Guest Editor Sylvain Baillet, Department of Neurology & Biophysics, Medical College of Wisconsin, WI, USA Guest Editors Karl Friston, Wellcome Trust Centre for Neuroimaging, London, UK Robert Oostenveld, Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Tue Jul 13 11:15:47 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Tue, 13 Jul 2010 11:15:47 +0200 Subject: time-frequency analysis base line correction Message-ID: Hello all, It's not a question in fieldtrip, yet I'll be happy if you can advise. I'm doing a motor experiment, which is based on responses (one after the other) and not on triggers. For that reason I can't use the usual definition of baseline per trial. I'll take the base line from a segment before the experiment began. Should I take the longest segment I can, as to get a more accurate base line activity, or should I take a segment equal to the trials duration? Many thanks, Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Geoff.Brookshire at MPI.NL Tue Jul 13 12:33:05 2010 From: Geoff.Brookshire at MPI.NL (Geoff Brookshire) Date: Tue, 13 Jul 2010 12:33:05 +0200 Subject: Saving preprocessed data in a raw MEG format Message-ID: Hello, I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. Any ideas anyone has on how to proceed would be greatly appreciated! Thanks, Geoff Brookshire ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Tue Jul 13 13:58:26 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Tue, 13 Jul 2010 13:58:26 +0200 Subject: clarification Message-ID: Hi again, I use the term "base line correction" in a wrong way. I meant to say that I need a reference period (comparable to "baseline type"-absolute/relative). And a few more details. My trials are of different durations, and I thought of calculating the mean of a few trials. Thank you. Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.stolk at FCDONDERS.RU.NL Tue Jul 13 14:04:23 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Tue, 13 Jul 2010 14:04:23 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3C40E1.1050202@mpi.nl> Message-ID: Hi Geoff, Have you tried beamforming with method "Linearly-Constrained Minimum Variance (LCMV)", the ERP equivalent of DICS/PCC in oscillatory sources, already? Link: http://fieldtrip.fcdonders.nl/example/lcmv-beamformer I'm not familiar with MNE, but does it also read other formats than .ds? Best, Arjen ----- Original Message ----- From: "Geoff Brookshire" To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, July 13, 2010 12:33:05 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Saving preprocessed data in a raw MEG format Hello, I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. Any ideas anyone has on how to proceed would be greatly appreciated! Thanks, Geoff Brookshire ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lhunt at FMRIB.OX.AC.UK Tue Jul 13 14:17:46 2010 From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt) Date: Tue, 13 Jul 2010 13:17:46 +0100 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3C40E1.1050202@mpi.nl> Message-ID: Hi Geoff - I've used both MNE and fieldtrip, but I think writing .fif files can be problematic - there isn't an easy way to do it as it requires a lot of headers etc. to be written, and (as far as I know) there's no matlab toolbox to do this at the moment (the best fiff matlab toolbox (primarily for reading, rather than writing, files) is the one bundled with MNE). The thing that might be best would be to compute a file that *looks like* the appropriate .fif file - e.g. a simple ERP, using mne_process_raw - and then *overwrite* the ERP with the stuff you have generated in matlab. The best people to advise you with this part might not be fieldtrip users, but the MNE community (e.g. Matti Hamalainen), mostly based at MGH. But there might be CTF users who could give you advice on writing .ds files - I use a Neuromag scanner myself so don't know anything about the CTF file format. Hope this helps. Laurence =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== On 13 Jul 2010, at 11:33, Geoff Brookshire wrote: > Hello, > > I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. > > I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. > > I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. > > Any ideas anyone has on how to proceed would be greatly appreciated! > > Thanks, > Geoff Brookshire > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.stolk at FCDONDERS.RU.NL Tue Jul 13 14:21:01 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Tue, 13 Jul 2010 14:21:01 +0200 Subject: clarification In-Reply-To: Message-ID: Hi Odelia, As far as I can help, I think it depends on your set-up + hypotheses. Do you have both/multiple conditions in one block? If not, reference periods might be different over blocks biasing your results. Check whether they're comparable. Do you expect major changes over time (e.g. fatigue, habituation)? If so, perhaps take another reference period after or from a pause in the experiment and average. Generally, the longer your reference period, the more robust the activity estimation. However, depending on your set-up, subjects might start doing other things.. Finally, if you don't trust your baseline/reference period, you could choose to look at the relative differences between conditions directly. Check out ft_freqcomparison although I think it does not support TFR data (yet). Best, Arjen ----- Original Message ----- From: "Odelia Goldberg" To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, July 13, 2010 1:58:26 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] clarification Hi again, I use the term "base line correction" in a wrong way. I meant to say that I need a reference period (comparable to "baseline type"-absolute/relative). And a few more details. My trials are of different durations, and I thought of calculating the mean of a few trials. Thank you. Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From marco.rotonda at GMAIL.COM Tue Jul 13 15:54:36 2010 From: marco.rotonda at GMAIL.COM (Marco Rotonda) Date: Tue, 13 Jul 2010 15:54:36 +0200 Subject: cohrefchannel Message-ID: Hi Jan... just to be sure. I'm able to plot something with these commands: cfg = []; cfg.xparam = 'time'; cfg.yparam = 'freq'; cfg.zparam = 'plvspctrm'; % cfg.cohrefchannel = 'Cz'; cfg.layout = 'neuroscan.lay'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; cfg.interactive = 'yes'; figure; ft_multiplotTFR(cfg, plvs001fnb1) as you may see I've commented the cfg.cohrefchannel and I've used cfg.interactive. In this case the plot I have what is it? I have all those combinations. If I select two sites (es: Fz and F3) when it plot there is written mean of the two sites. If I select more sites it's always the mean for those sites. How could I plot the line of combination I need? Regards Marco ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maximilien.chaumon at GMAIL.COM Tue Jul 13 21:28:59 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Tue, 13 Jul 2010 15:28:59 -0400 Subject: Aligning head across runs Message-ID: Hello fieldtripers, I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. I have several runs and want to concatenate my data. I understand that I can do ft_appenddata, but that I then loose the sensor positions of the second and subsequent runs. Is there a way to align the head position across runs? Does it make sense to interpolate the data between sensors to align all to the same position? Thanks, Max ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jedmeltzer at YAHOO.COM Wed Jul 14 03:53:12 2010 From: jedmeltzer at YAHOO.COM (Jed Meltzer) Date: Tue, 13 Jul 2010 18:53:12 -0700 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: Message-ID: Dear Geoff, I haven't tried to do exactly what you're describing, but I have worked a lot with CTF data and can share some thoughts on how I would go about it if I wanted to try it. The .ds data format is quite complex, but there is one thing that works to your favor. The .ds is a directory, not a single file, and the raw data is one particular file that consists pretty much entirely of numbers (the one called .meg4) There are other files that contain the header information necessary to know how to break up those raw numbers into channels, trials, etc. So one promising avenue would be to entirely copy the whole directory, but try to modify the raw data while leaving everything else the same. So if your preprocessing is things that leave the trial structure exactly the same (e.g. filtering, 3-rd order gradient balancing, even ICA component subtraction), then you could just overwrite the values in the raw data and keep all the old remaining files to have a valid and accurate .ds dataset. I would try doing this with a very simple operation on the data at first, such as multiplying it by 2. On the other hand, if your preprocessing includes rejecting trials, truncating them, etc., then you would have a lot more to worry about. Please post to the list again and let us know if you find a way to do it! -Jed Meltzer meltzerj AT nidcd.nih.gov ________________________________ From: FIELDTRIP automatic digest system To: FIELDTRIP at NIC.SURFNET.NL Sent: Tue, July 13, 2010 6:00:14 PM Subject: FIELDTRIP Digest - 8 Jul 2010 to 13 Jul 2010 (#2010-128) Note: Forwarded message is attached. FIELDTRIP Digest - 8 Jul 2010 to 13 Jul 2010 (#2010-128) Table of contents: * Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG * time-frequency analysis base line correction * Saving preprocessed data in a raw MEG format (3) * clarification (2) * cohrefchannel * Aligning head across runs 1. Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG * Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG (07/13) From: Robert Oostenveld 2. time-frequency analysis base line correction * time-frequency analysis base line correction (07/13) From: Odelia Goldberg 3. Saving preprocessed data in a raw MEG format * Saving preprocessed data in a raw MEG format (07/13) From: Geoff Brookshire * Re: Saving preprocessed data in a raw MEG format (07/13) From: "a.stolk at fcdonders.ru.nl" * Re: Saving preprocessed data in a raw MEG format (07/13) From: Laurence Hunt 4. clarification * clarification (07/13) From: Odelia Goldberg * Re: clarification (07/13) From: "a.stolk at fcdonders.ru.nl" 5. cohrefchannel * Re: cohrefchannel (07/13) From: Marco Rotonda 6. Aligning head across runs * Aligning head across runs (07/13) From: Maximilien Chaumon Browse the FIELDTRIP online archives. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Wed Jul 14 08:15:03 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 14 Jul 2010 08:15:03 +0200 Subject: Creating BEM Model with Dipoli Message-ID: Dear all, for my diploma thesis I'm trying to create an extended BEM model with dipoli. I'm trying to model the ventricular system too which requires another than the innermost compartment to be source compartment and I wanted to know, if anybody could say if this is possible with the dipoli executable or if this is - in this way - an useless effort. Thanks in advance, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Wed Jul 14 08:49:24 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Wed, 14 Jul 2010 08:49:24 +0200 Subject: clarification Message-ID: Hello again, Your answer helps a lot! Thank you, Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:13:22 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:13:22 +0200 Subject: Aligning head across runs In-Reply-To: Message-ID: Hi Max, You may want to have a look at the function ft_megrealign. Alternatively, you could construct a gradiometer structure which contains a meaningful average of the coil positions and orientations. Cheers, Jan-Mathijs On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > Hello fieldtripers, > > I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 > which poses the same problem that I'm going to raise now. > > I have several runs and want to concatenate my data. I understand > that I can do ft_appenddata, but that I then loose the sensor > positions of the second and subsequent runs. > Is there a way to align the head position across runs? Does it make > sense to interpolate the data between sensors to align all to the > same position? > > Thanks, > Max > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:21:06 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:21:06 +0200 Subject: Saving preprocessed data in a raw MEG format Message-ID: Dear Geoff, You may want to have a look at: http://fieldtrip.fcdonders.nl/example/writing_simulated_data_to_a_ctf_dataset This seems to be quite old, so I don't know whether it's still up to date. The tricky part probably is to create and write a header .res4-file which correctly describes the data. There are two functions which may be of interest here as well: fieldtrip/external/ctf/writeCTFds.m and fieldtrip/external/ctf/ writeRes4.m Best, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From julian.keil at GMAIL.COM Wed Jul 14 09:45:28 2010 From: julian.keil at GMAIL.COM (Julian Keil) Date: Wed, 14 Jul 2010 09:45:28 +0200 Subject: neighbourdist for megplanar Message-ID: Hi everyone, I was wondering what is a sensible neighbour distance for computing the megplanar from 4D148 data. The default is set to "4", but this this leads to on average 149 neighbours per channel, which does not look right to me. Changing the distance to 0.1 reduces the number of neighbours to 5.5, yet I'm still unsure if this is the best/correct way. Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Wed Jul 14 09:49:19 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 14 Jul 2010 09:49:19 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <22004559.3893751279022663428.JavaMail.root@watertor.uci.ru.nl> Message-ID: hi, > I'm using MNE software to perform the localization, since Fieldtrip is > only able to do this on time-frequency data now. The thing is that I've I do not think that this is correct. you may want to look at Figure 2E in: Grützner et al. (2010). Neuromagnetic correlates of perceptual closure processes. J Neurosci at least the authors state that they used fieldtrip, so i assume they used minumumnormestimate.m. it might be correct that this function is not so intensively developed, as not so many fieldtrippers seem to use it. but before going through all the pain of exporting your data, you may want to quickly check if your results make sense using the FT-version (e.g. sanity checks on some ERP where you know where the main generators should be). in case you are not satisfied with the FT-minimumnorm, an alternative to MNE would be to use brainstorm. i think they use mat-files, so it should be fairly easy to mimick to output of some brainstorm processing stage and continue with source analysis. haven't tried it myself but i have a colleague who does this quite successfully. yet another alternative would be to use nutmeg. it should contain a sLORETA option and a function to directly read FT-preproc-structures. at least the developer wrote such a function to read some of my FT-structures into nutmeg. so if it is not contained in the release you might ask to become a beta-tester :-) good luck, n -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:50:32 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:50:32 +0200 Subject: neighbourdist for megplanar In-Reply-To: <607509F8-B542-4671-A702-1579A3A410A9@gmail.com> Message-ID: Dear Julian, The unit of neighbourdist is according to the units in the gradiometer array. The BTI convention is meters, so I think some value in the order of 0.04 to 0.1 should be OK. (For the 248 channel 4D system I always use a value of 0.037). Typically, I think it is optimal to have just one rim of sensors (so don't take the value too big). Cheers, JM On Jul 14, 2010, at 9:45 AM, Julian Keil wrote: > Hi everyone, > > I was wondering what is a sensible neighbour distance for computing > the megplanar from 4D148 data. > The default is set to "4", but this this leads to on average 149 > neighbours per channel, which does not look right to me. > Changing the distance to 0.1 reduces the number of neighbours to > 5.5, yet I'm still unsure if this is the best/correct way. > > Thanks a lot > > Julian > > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: julian.keil at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Geoff.Brookshire at MPI.NL Wed Jul 14 10:39:14 2010 From: Geoff.Brookshire at MPI.NL (Geoff Brookshire) Date: Wed, 14 Jul 2010 10:39:14 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: Message-ID: Hi, Thanks to everyone for a lot of helpful advice! I'm going to go through and try a lot of this, and I'll report back to the list when I have something that works. I'll briefly address a couple of suggestions. Unfortunately, we've done some pretty heavy-duty preprocessing: rejecting lots of artifacts, truncating trials, looking at stimulus-response combinations, and correcting some errors in the parallel port output channel. I'm afraid I'll be chained to the complicated solutions, then. Second, and in regards to using the source localization algorithms that Freesurfer already has -- I'm a novice in this area, so I'm taking the conclusions of O. Jensen and C. Hesse [Estimating distributed representations of evoked responses and oscillatory brain activity. In MEG An Introduction to Methods" (edited by Salmelin, Kringleback and Hansen). Oxford University Press]. They advise against using beamforming for ERFs: > A further practical requirement [for beamforming] is that the estimate of the data cross-covariance matrix is accurate and that > the cross-covariance matrix is invertible. These are the problems often encountered when applying > beamformingfor source analysis of ERFs. The cross-covariance matrix can become rank-deficient (and > hence invertible) in two circumstances: if the epoch of interest contains fewer time samples than sensors, or > (at least theoretically) if the time-locked averaged MEG signal reflects the activity of only a very small > number of neuronal sources, and any background activity and noise effectively disappears by averaging an > extremely large number of trials. In practice, rank-deficient cross-covariance matrices can be made > invertible by regularization, which effectively involves injecting additional noise into the signal, and this, in > turn, tends to spatially smear the neuronal activity. For this reason, beamforming is not widely used in > MEG/EEG source analysis of evoked activity. Updates to follow! -geoff Nathan Weisz wrote: > hi, > >> I'm using MNE software to perform the localization, since Fieldtrip is >> only able to do this on time-frequency data now. The thing is that I've > > I do not think that this is correct. you may want to look at Figure 2E in: > Grützner et al. (2010). Neuromagnetic correlates of perceptual closure > processes. J Neurosci > > at least the authors state that they used fieldtrip, so i assume they > used minumumnormestimate.m. > > it might be correct that this function is not so intensively developed, > as not so many fieldtrippers seem to use it. > > but before going through all the pain of exporting your data, you may > want to quickly check if your results make sense using the FT-version > (e.g. sanity checks on some ERP where you know where the main generators > should be). > > in case you are not satisfied with the FT-minimumnorm, an alternative to > MNE would be to use brainstorm. i think they use mat-files, so it should > be fairly easy to mimick to output of some brainstorm processing stage > and continue with source analysis. haven't tried it myself but i have a > colleague who does this quite successfully. > > yet another alternative would be to use nutmeg. it should contain a > sLORETA option and a function to directly read FT-preproc-structures. at > least the developer wrote such a function to read some of my > FT-structures into nutmeg. so if it is not contained in the release you > might ask to become a beta-tester :-) > > good luck, > n > > > > > *--------------------------------------------* > Dr. Nathan Weisz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > Email: nathan.weisz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > "Nothing shocks me. I'm a scientist." (Indiana Jones) > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas for > MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Wed Jul 14 12:09:09 2010 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Wed, 14 Jul 2010 11:09:09 +0100 Subject: neighbourdist for megplanar In-Reply-To: <607509F8-B542-4671-A702-1579A3A410A9@gmail.com> Message-ID: Hey Julian, the function FT_NEIGHBOURSELECTION will output a structure of sensor neighbours. The best is to fine tune the threshold distance by checking the output against your sensor map. Best, Guillaume On 14 Jul 2010, at 08:45, Julian Keil wrote: > Hi everyone, > > I was wondering what is a sensible neighbour distance for computing > the megplanar from 4D148 data. > The default is set to "4", but this this leads to on average 149 > neighbours per channel, which does not look right to me. > Changing the distance to 0.1 reduces the number of neighbours to > 5.5, yet I'm still unsure if this is the best/correct way. > > Thanks a lot > > Julian > > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: julian.keil at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ************************************************************************************ Guillaume A. Rousselet, Ph.D., lecturer School of Psychology Institute of Neuroscience & Psychology Centre for Cognitive Neuroimaging (CCNi) The University of Glasgow, charity number SC004401 http://www.psy.gla.ac.uk/staff/index.php?id=GAR01 Email: g.rousselet at psy.gla.ac.uk Fax. +44 (0)141 330 4606 Tel. +44 (0)141 330 6652 Cell +44 (0)791 779 7833 "Corporations have only one duty: to promote their own and their owners' interests. They have no capacity, and their executives no authority, to act out of a genuine sense of responsibility to society, to avoid causing harm to people and the environment, or to work to advance the public good in ways that are unrelated to their own self- interest. Deregulation thus rests upon the suspect premise that corporations will respect social and environmental interests without being compelled by government to do so. No one would seriously suggest that individuals should regulate themselves, that laws against murder, assault, and theft are unnecessary because people are socially responsible. Yet oddly, we are asked to believe that corporate persons - institutional psychopaths who lack any sense of moral conviction and who have the power and motivation to cause harm and devastation in the world - should be left free to govern themselves." Joel Bakan - The Corporation - 2004 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Wed Jul 14 12:05:16 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 14 Jul 2010 11:05:16 +0100 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3D77B2.3010701@mpi.nl> Message-ID: Dear all, Since this thread is turning to be about promoting other software packages, I'd just like to mention that SPM8 has imaging source reconstruction for evoked fields that depending on the settings can behave similarly to minimum norm or to LORETA or to a more focal methods called MSP. Since SPM8 and Fieldtrip are very tightly integrated (see http://fieldtrip.fcdonders.nl/integrating_with_spm8), your Fieldtrip data can be converted to SPM8 format quite easily. In SPM8 you can also do statistics on resulting images. Best, Vladimir On Wed, Jul 14, 2010 at 9:39 AM, Geoff Brookshire wrote: > Hi, > > Thanks to everyone for a lot of helpful advice!  I'm going to go through and > try a lot of this, and I'll report back to the list when I have something > that works. > > I'll briefly address a couple of suggestions. > Unfortunately, we've done some pretty heavy-duty preprocessing: rejecting > lots of artifacts, truncating trials, looking at stimulus-response > combinations, and correcting some errors in the parallel port output > channel.  I'm afraid I'll be chained to the complicated solutions, then. > > Second, and in regards to using the source localization algorithms that > Freesurfer already has -- I'm a novice in this area, so I'm taking the > conclusions of O. Jensen and C. Hesse [Estimating distributed > representations of evoked responses and oscillatory brain activity. In MEG > An Introduction to Methods" (edited by Salmelin, Kringleback and Hansen). > Oxford University Press].  They advise against using beamforming for ERFs: >> >> A further practical requirement [for beamforming] is that the estimate of >> the data cross-covariance matrix is accurate and that >> the cross-covariance matrix is invertible. These are the problems often >> encountered when applying >> beamformingfor source analysis of ERFs. The cross-covariance matrix can >> become rank-deficient (and >> hence invertible) in two circumstances: if the epoch of interest contains >> fewer time samples than sensors, or >> (at least theoretically) if the time-locked averaged MEG signal reflects >> the activity of only a very small >> number of neuronal sources, and any background activity and noise >> effectively disappears by averaging an >> extremely large number of trials. In practice, rank-deficient >> cross-covariance matrices can be made >> invertible by regularization, which effectively involves injecting >> additional noise into the signal, and this, in >> turn, tends to spatially smear the neuronal activity. For this reason, >> beamforming is not widely used in >> MEG/EEG source analysis of evoked activity. > > Updates to follow! > > -geoff > > > Nathan Weisz wrote: >> >> hi, >> >>> I'm using MNE software to perform the localization, since Fieldtrip is >>> only able to do this on time-frequency data now.  The thing is that I've >> >> I do not think that this is correct. you may want to look at Figure 2E in: >> Grützner et al. (2010). Neuromagnetic correlates of perceptual closure >> processes. J Neurosci >> >> at least the authors state that they used fieldtrip, so i assume they used >> minumumnormestimate.m. >> >> it might be correct that this function is not so intensively developed, as >> not so many fieldtrippers seem to use it. >> >> but before going through all the pain of exporting your data, you may want >> to quickly check if your results make sense using the FT-version (e.g. >> sanity checks on some ERP where you know where the main generators should >> be). >> >> in case you are not satisfied with the FT-minimumnorm, an alternative to >> MNE would be to use brainstorm. i think they use mat-files, so it should be >> fairly easy to mimick to output of some brainstorm processing stage and >> continue with source analysis. haven't tried it myself but i have a >> colleague who does this quite successfully. >> >> yet another alternative would be to use nutmeg. it should contain a >> sLORETA option and a function to directly read FT-preproc-structures. at >> least the developer wrote such a function to read some of my FT-structures >> into nutmeg. so if it is not contained in the release you might ask to >> become a beta-tester :-) >> >> good luck, >> n >> >> >> >> *--------------------------------------------* >> Dr. Nathan Weisz >> >> OBOB-Lab >> University of Konstanz >> Department of Psychology >> P.O. Box D23 >> 78457 Konstanz >> Germany >> >> Tel: ++49 - (0)7531 - 88 45 84 >> Email: nathan.weisz at uni-konstanz.de >> Homepage: http://www.uni-konstanz.de/obob >> >> "Nothing shocks me. I'm a scientist." (Indiana Jones) >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bornalikundu at GMAIL.COM Wed Jul 14 16:42:55 2010 From: bornalikundu at GMAIL.COM (Bornali Kundu) Date: Wed, 14 Jul 2010 09:42:55 -0500 Subject: cluster-based analysis question Message-ID: Hello All, This is more of a statistical methods question. I'm interested in doing test-retest evaluation in a data set and, most specifically, formally assessing my intuition that there are stable individual differences in the ERSP associated with performing a certain task, such that the overall "pattern" of one subject's ERSP is highly replicable, and thus reliably different from the ERSPs of other subjects. Is the fieldtrip cluster-based permutation test a suitable procedure for implementing this test? Has anyone done this type of analysis already? Any advice would be appreciated. Thanks so much, Bornali -- Medical Scientist Training Program Neuroscience Training Program University of Wisconsin - Madison Health Emotions Research Institute bkundu at wisc.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor.volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE Thu Jul 15 10:38:15 2010 From: gregor.volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE (Gregor Volberg) Date: Thu, 15 Jul 2010 10:38:15 +0200 Subject: cohrefchannel Message-ID: Hi Marco, to be able to specify a reference channel, it seems to be necessary to have a field named xy.cohspctrm. You might simply copy the plvspctrm into a new field, plv_data.cohsprctm = plv_data.plcspctrm and then multiplot with the option cfg.cohrefchannel = 'Cz'; The plots should then look different for different reference channels. Hope this helps?, Gregor On Tue, 13 Jul 2010 15:54:36 +0200, Marco Rotonda wrote: >Hi Jan... >just to be sure. >I'm able to plot something with these commands: >cfg = []; >cfg.xparam = 'time'; >cfg.yparam = 'freq'; >cfg.zparam = 'plvspctrm'; >% cfg.cohrefchannel = 'Cz'; >cfg.layout = 'neuroscan.lay'; >cfg.showlabels = 'yes'; >cfg.colorbar = 'yes'; >cfg.interactive = 'yes'; >figure; ft_multiplotTFR(cfg, plvs001fnb1) > >as you may see I've commented the cfg.cohrefchannel and I've used >cfg.interactive. >In this case the plot I have what is it? >I have all those combinations. >If I select two sites (es: Fz and F3) when it plot there is written mean of the >two sites. If I select more sites it's always the mean for those sites. >How could I plot the line of combination I need? > >Regards > >Marco > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Thu Jul 15 17:20:20 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 15 Jul 2010 17:20:20 +0200 Subject: Fwd: Fieldtrip - MNE followup Message-ID: Dear Geoff, > - When looking through the ft_write_data file, I don't have 'cft_ds' > as an > option to the dataformat parameter. is this an older option which was > lost? You're absolutely right. The option to write ctf-data is not included anymore in ft_write_data. We should update the documentation accordingly. I just browsed the fieldtrip-wiki and found this link, without properly checking whether it was still up to date. Sorry about that. > - The documentation is a little unclear about what sort of data is > to be > used as input to the function. I've tried using the output of > timelockanalysis, as well as the 'avg' field of the same structure. > For > the former, I get an error that the function is not defined "for input > arguments of type 'struct'", and for the latter that it's not > defined "for > input arguments of type 'char'". I think the latter is getting > confused > about the filename input, then. When I give it a header object > taken from > the original input .ds file with ft_read_header and modified to fit > the > changes in analysis, I again get the 'struct' error. I've been > playing > around with all the options and looking into the script, but I can't > get > anything to work. Do you happen to have a working script handy? No, I don't have a script lying on the shelf, because I don't generally go back to a raw file format after having processed my data in fieldtrip. Since the use of ft_write_data does not seem to support what you want to do anyway, I will not look in detail at the function, but I guess it needs a filename (as a string), a data matrix (as a matrix), and some additional inputs, such as requested fileformat etc. > Also, I noticed your email from a few days back, called "warning for > ctf-users". If I only performed the normal analyses (i.e. > timelockanalysis, megplanar, combineplanar, timelockbaseline, > timelockgrandaverage), do you think I should worry about redoing the > analysis with the new scripts? I think I'm safe, but thought it > might be > a good idea to check with an expert! With respect to my warning issued earlier: you are safe. As long as you did not explicitly use the function ft_denoise_synthetic yourself, there's no reason to worry. Yet, I have another warning for you: given your analysis steps it is not possible to write the data back to CTF-dataformat in a consistent way, since you transformed the data to planar gradient representation (which results in (and requires) a totally different description of the sensor array; so if you plan to use a different package for you minimum norm estimate there will be for sure a mismatch between the channel data and the leadfields), and you have used combineplanar. The latter is a nonlinear operation on your data, which is definitely not allowed if you would like to compute leadfields using the sensor information as it is represented in the original .res4 header file. As a side remark I quickly looked into writeCTFds, and it seems in theory possible to use this function to write the processed data to a CTF-dataset (as long as one stays in the original axial gradient representation). Yet, I wonder whether it will be worth the time investment to get it smoothly implemented (because it is not totally non-trivial). I'd rather opt for looking into the various other suggestions issued in this thread (by Nathan and Vladimir for example), and invest some time there, or just give fieldtrip's minimumnormestimate a try. Keep always in mind that the planar transformation as such requires a change in the description of the sensor array (which is done by fieldtrip), and that combining planar gradient data before going to source space is not good. Cheers, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maximilien.chaumon at GMAIL.COM Thu Jul 15 23:41:44 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Thu, 15 Jul 2010 17:41:44 -0400 Subject: Aligning head across runs In-Reply-To: <4A86E680-55CE-4AF8-B908-5F4FCA144B05@donders.ru.nl> Message-ID: Thank you, The layout of our neuromag306 is not supported in ft_megrealign. What sensors should I write for constructing the average location of the MEG sensors? (line 190 and below) I have triplets of sensors that match this layout. http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png Figured out these guys might work, but that's just a guess. I've done no calculation or anything... labC = 'MEG 2111'; labF = 'MEG 1011'; labL = 'MEG 0141'; labR = 'MEG 1431'; thanks, Max 2010/7/14 jan-mathijs schoffelen > Hi Max, > > You may want to have a look at the function ft_megrealign. Alternatively, > you could construct a gradiometer structure which contains a meaningful > average of the coil positions and orientations. > > Cheers, > > Jan-Mathijs > > On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > > Hello fieldtripers, > > I've read this topic > https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. > > I have several runs and want to concatenate my data. I understand that I > can do ft_appenddata, but that I then loose the sensor positions of the > second and subsequent runs. > Is there a way to align the head position across runs? Does it make sense > to interpolate the data between sensors to align all to the same position? > > Thanks, > Max > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 09:05:39 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 09:05:39 +0200 Subject: Aligning head across runs In-Reply-To: Message-ID: Dear Max, I don't think there is a conceptual objection against building in support for the NM306 system, although it may be less trivial to do a combined simultaneous realignment of planar gradiometers and magnetometers. The choice of the 4 sensors used to compute the transformation matrix between the 'old' and 'new' sensor positions seems reasonable to me. On a side note, doesn't the maxfilter provide you with the possibility to correct for differences in head position? Cheers, Jan-Mathijs On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: > Thank you, > The layout of our neuromag306 is not supported in ft_megrealign. > What sensors should I write for constructing the average location of > the MEG sensors? > (line 190 and below) > I have triplets of sensors that match this layout. > http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png > > Figured out these guys might work, but that's just a guess. I've > done no calculation or anything... > > labC = 'MEG 2111'; > labF = 'MEG 1011'; > labL = 'MEG 0141'; > labR = 'MEG 1431'; > > > thanks, > Max > > > 2010/7/14 jan-mathijs schoffelen > Hi Max, > > You may want to have a look at the function ft_megrealign. > Alternatively, you could construct a gradiometer structure which > contains a meaningful average of the coil positions and orientations. > > Cheers, > > Jan-Mathijs > > On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > >> Hello fieldtripers, >> >> I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 >> which poses the same problem that I'm going to raise now. >> >> I have several runs and want to concatenate my data. I understand >> that I can do ft_appenddata, but that I then loose the sensor >> positions of the second and subsequent runs. >> Is there a way to align the head position across runs? Does it make >> sense to interpolate the data between sensors to align all to the >> same position? >> >> Thanks, >> Max >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maximilien.chaumon at GMAIL.COM Fri Jul 16 14:32:48 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Fri, 16 Jul 2010 08:32:48 -0400 Subject: Aligning head across runs In-Reply-To: <679D3E3D-D068-480A-92DC-521357000160@donders.ru.nl> Message-ID: What is the maxfilter? 2010/7/16 jan-mathijs schoffelen > Dear Max, > > I don't think there is a conceptual objection against building in support > for the NM306 system, although it may be less trivial to do a combined > simultaneous realignment of planar gradiometers and magnetometers. The > choice of the 4 sensors used to compute the transformation matrix between > the 'old' and 'new' sensor positions seems reasonable to me. > On a side note, doesn't the maxfilter provide you with the possibility to > correct for differences in head position? > > Cheers, > > Jan-Mathijs > > On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: > > Thank you, > The layout of our neuromag306 is not supported in ft_megrealign. > What sensors should I write for constructing the average location of the > MEG sensors? > (line 190 and below) > I have triplets of sensors that match this layout. > http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png > > Figured out these guys might work, but that's just a guess. I've done no > calculation or anything... > > labC = 'MEG 2111'; > labF = 'MEG 1011'; > labL = 'MEG 0141'; > labR = 'MEG 1431'; > > > thanks, > Max > > > 2010/7/14 jan-mathijs schoffelen > >> Hi Max, >> >> You may want to have a look at the function ft_megrealign. Alternatively, >> you could construct a gradiometer structure which contains a meaningful >> average of the coil positions and orientations. >> >> Cheers, >> >> Jan-Mathijs >> >> On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: >> >> Hello fieldtripers, >> >> I've read this topic >> https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. >> >> I have several runs and want to concatenate my data. I understand that I >> can do ft_appenddata, but that I then loose the sensor positions of the >> second and subsequent runs. >> Is there a way to align the head position across runs? Does it make sense >> to interpolate the data between sensors to align all to the same position? >> >> Thanks, >> Max >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> >> >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Fri Jul 16 14:47:42 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 16 Jul 2010 13:47:42 +0100 Subject: Aligning head across runs In-Reply-To: Message-ID: maxfilter is part of Neuromag software. See for instance http://imaging.mrc-cbu.cam.ac.uk/meg/Maxfilter http://www.megwiki.org/index.php?title=Using_MaxFilter It is definitely a better choice for Neuromag users. Vladimir On Fri, Jul 16, 2010 at 1:32 PM, Maximilien Chaumon wrote: > What is the maxfilter? > > > 2010/7/16 jan-mathijs schoffelen >> >> Dear Max, >> I don't think there is a conceptual objection against building in support >> for the NM306 system, although it may be less trivial to do a combined >> simultaneous realignment of planar gradiometers and magnetometers. The >> choice of the 4 sensors used to compute the transformation matrix between >> the 'old' and 'new' sensor positions seems reasonable to me. >> On a side note, doesn't the maxfilter provide you with the possibility to >> correct for differences in head position? >> Cheers, >> Jan-Mathijs >> On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: >> >> Thank you, >> The layout of our neuromag306 is not supported in ft_megrealign. >> What sensors should I write for constructing the average location of the >> MEG sensors? >> (line 190 and below) >> I have triplets of sensors that match this layout. >> http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png >> >> Figured out these guys might work, but that's just a guess. I've done no >> calculation or anything... >> >>     labC = 'MEG 2111'; >>     labF = 'MEG 1011'; >>     labL = 'MEG 0141'; >>     labR = 'MEG 1431'; >> >> >> thanks, >> Max >> >> >> 2010/7/14 jan-mathijs schoffelen >>> >>> Hi Max, >>> You may want to have a look at the function ft_megrealign. Alternatively, >>> you could construct a gradiometer structure which contains a meaningful >>> average of the coil positions and orientations. >>> Cheers, >>> Jan-Mathijs >>> On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: >>> >>> Hello fieldtripers, >>> >>> I've read this topic >>> https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 >>> which poses the same problem that I'm going to raise now. >>> >>> I have several runs and want to concatenate my data. I understand that I >>> can do ft_appenddata, but that I then loose the sensor positions of the >>> second and subsequent runs. >>> Is there a way to align the head position across runs? Does it make sense >>> to interpolate the data between sensors to align all to the same position? >>> >>> Thanks, >>> Max >>> >>> ---------------------------------- >>> >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >>> EEG analysis. >>> >>> http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> >>> Dr. J.M. (Jan-Mathijs) Schoffelen >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> J.Schoffelen at donders.ru.nl >>> Telephone: 0031-24-3668063 >>> >>> ---------------------------------- >>> >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >>> EEG analysis. >>> >>> http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>> http://www.ru.nl/fcdonders/fieldtrip/ >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 16:13:16 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 16:13:16 +0200 Subject: [FIELDTRIP-DEV] a problem with ft_prepare_singleshell In-Reply-To: <73d8a6b191056c5d5cc492c715167e5d.squirrel@squirrel.science.ru.nl> Message-ID: Dear Ali, A bit more information may be useful here ;o)... There was a bug fix involving this function recently, so you may want to upgrade to the most recent version of fieldtrip and try again... This could already solve it. Best, Jan-Mathijs On Jul 16, 2010, at 3:29 PM, Ali Bahramisharif wrote: > Dear guys, > > I use the following code, which was working two months ago, but is not > working now and produces the following error: > > cfg=[]; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > ??? Error using ==> ft_prepare_mesh at 153 > unsupported cfg.method and/or input > > Error in ==> ft_prepare_singleshell at 86 > vol.bnd = ft_prepare_mesh(cfg, mri); > > Any suggestion on how to solve it? > > Best regards, > Ali > > -- > Address: > HG02.517 > Intelligent Systems > Radboud University Nijmegen > Heyendaalseweg 135 > 6525 AJ Nijmegen > The Netherlands > > http://www.cs.ru.nl/~ali > Tel.: +31 (0)24 36 52634 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 17:04:23 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 17:04:23 +0200 Subject: [FIELDTRIP-DEV] a problem with ft_prepare_singleshell In-Reply-To: Message-ID: Dear Ali, You may want to set a 'dbstop if error' to see what is missing in the variables causing the error. My hunch is that the function does not manage to accurately detect that you want to create your mesh on the segmented mri. (hint: look for the variable basedonseg and see what is required to put that to a value of 1)... JM On Jul 16, 2010, at 4:20 PM, Ali Bahramisharif wrote: > Dear Jan-Mathijs > > Thanks for your reply. I am at revision 1420, which I think is the > latest. > This is the whole code that I use: > > mri = ft_read_mri('/berends_s/berends_s.mri'); > cfg = []; > cfg.write = 'no'; > cfg.coordinates = 'ctf'; > cfg.template = '/spm8/templates/T1.nii'; > [segmentedmri] = ft_volumesegment(cfg, mri); > > segmentedmriF = segmentedmri; > segmentedmriF.gray = flipdim(flipdim(flipdim(segmentedmriF.gray,3), > 2),1); > segmentedmriF.white = flipdim(flipdim(flipdim(segmentedmriF.white,3), > 2),1); > segmentedmriF.csf = flipdim(flipdim(flipdim(segmentedmriF.csf,3), > 2),1); > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmriF); > > What other information do you need? > > Best regards, > Ali > >> Dear Ali, >> >> A bit more information may be useful here ;o)... >> There was a bug fix involving this function recently, so you may want >> to upgrade to the most recent version of fieldtrip and try again... >> This could already solve it. >> >> Best, >> Jan-Mathijs >> >> On Jul 16, 2010, at 3:29 PM, Ali Bahramisharif wrote: >> >>> Dear guys, >>> >>> I use the following code, which was working two months ago, but is >>> not >>> working now and produces the following error: >>> >>> cfg=[]; >>> vol = ft_prepare_singleshell(cfg, segmentedmri); >>> >>> ??? Error using ==> ft_prepare_mesh at 153 >>> unsupported cfg.method and/or input >>> >>> Error in ==> ft_prepare_singleshell at 86 >>> vol.bnd = ft_prepare_mesh(cfg, mri); >>> >>> Any suggestion on how to solve it? >>> >>> Best regards, >>> Ali >>> >>> -- >>> Address: >>> HG02.517 >>> Intelligent Systems >>> Radboud University Nijmegen >>> Heyendaalseweg 135 >>> 6525 AJ Nijmegen >>> The Netherlands >>> >>> http://www.cs.ru.nl/~ali >>> Tel.: +31 (0)24 36 52634 >>> >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> > > > -- > Address: > HG02.517 > Intelligent Systems > Radboud University Nijmegen > Heyendaalseweg 135 > 6525 AJ Nijmegen > The Netherlands > > http://www.cs.ru.nl/~ali > Tel.: +31 (0)24 36 52634 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From matthew at PSYCH.COLUMBIA.EDU Sat Jul 17 20:55:14 2010 From: matthew at PSYCH.COLUMBIA.EDU (Matthew Davidson) Date: Sat, 17 Jul 2010 14:55:14 -0400 Subject: Possible bug with maskparameter and TFR? Message-ID: Hi, everyone. I'm trying to mask TFR plots in ft_multiplotTFR.m. ft_clusterplot seems inappropriate, because this is for intracranial data and a topoplot isn't a good way to display that. I couldn't find any good examples of using .maskparameter, so I did what I thought was correct: I loaded up the stat and the freq variables, and set: freq.mask = stat.mask; cfg.maskparameter = 'mask'; However, when ft_multiplotTFR gets to reading out the .mask field, it's gone! It seems that because my dimord is 'rpt_chan_freq_time', ft_multiplotTFR calls: data = ft_freqdescriptives(tmpcfg, data), which only returns certain fields, and effectively strips out my .mask field! Am I doing this wrong? if so, what's the correct method? If not, I'll be happy to submit a fix. What's the preferred way to fix it? In ft_multiplotTFR, I could store the maskparameter before the call to freqdescriptives, and readd it afterwards. Alternatively, I could just change the initialization line in ft_freqdescriptives where it sets output = []; to output = freq;. Then, the subsequent lines altering output would still behave as planned, but any extra fields added to freq would not be removed. Matthew ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Sun Jul 18 00:26:34 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 17 Jul 2010 17:26:34 -0500 Subject: Help with dipole fitting Message-ID: Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Mon Jul 19 04:46:52 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sun, 18 Jul 2010 21:46:52 -0500 Subject: FW: [FIELDTRIP] Help with dipole fitting In-Reply-To: Message-ID: Date: Sat, 17 Jul 2010 17:26:34 -0500 From: lumatobu2 at HOTMAIL.COM Subject: [FIELDTRIP] Help with dipole fitting To: FIELDTRIP at NIC.SURFNET.NL Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! Explore the seven wonders of the world Learn more! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Mon Jul 19 04:47:31 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sun, 18 Jul 2010 21:47:31 -0500 Subject: PLEASE HELP !!!!! In-Reply-To: Message-ID: Date: Sat, 17 Jul 2010 17:26:34 -0500 From: lumatobu2 at HOTMAIL.COM Subject: [FIELDTRIP] Help with dipole fitting To: FIELDTRIP at NIC.SURFNET.NL Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! Explore the seven wonders of the world Learn more! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Mon Jul 19 07:59:25 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Mon, 19 Jul 2010 07:59:25 +0200 Subject: Help with dipole fitting In-Reply-To: Message-ID: Hi Ludwing, On 18.07.2010 00:26, Ludwing Torres wrote: > I dont understand why they take the dipole moments like this: > > cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] > 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components > 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components > ]'; % note, it should be transposed > > ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : > I think it depends on how many different Signal-courses you are trying to simulate. If you're trying to simulate two dipoles with the same (sinusoid) time course but with perpendicular moments, it should look something like this cfg.dip.signal = sin(10*time*2*pi); cfg.dip.mom = [ 1 0 0 0 1 0 ]'; In the example every line of the vector stands for the contribution of one signal. Every three rows stand for the direction of the moment of one dipole. Anyone correct me if I'm wrong. > cfg.dip.mom = [ > 1 0 0 0 0 0 0 0 0 > 0 0 0 1 0 0 0 0 0 > 0 0 0 0 0 0 1 0 0 > ]'; > > ¿And to four dipoles, like this? > > cfg.dip.mom = [ > 1 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 1 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 1 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 1 0 0 > ]'; > If you wanted to simulate three respectively four different time courses - yes, I think so. > ¿ And what if I have 128 dipoles? > If you really wanted to simulate 128 dipoles with different time courses you'd have to follow the rule above, but I don't think you really want to simulate 128 dipoles - do you? > PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE > > OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. > > PLEASE HELP ME !!!!! > Hope my answers helped you at least a little. Note that you obviously used Caps Lock above your last paragraphs ;) Writing all in capitals ain't very polite, if you'd like to emphasize something, please use *bold fonts* or *asterisks*. Cheers, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Wed Jul 21 09:28:47 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 21 Jul 2010 09:28:47 +0200 Subject: Dipoli issues Message-ID: Dear all, I hope that somebody is able to help me. I'm trying to generate a BEM model following the example script in http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my diploma thesis, but every time I'm running dipoli with more than 3 compartments, the Program complains about double vertices on the innermost mesh. I first suspected a weird brain geometry to be the culprit, but I now tried to build the model with a simple sphere as the innermost compartment and the error remains, so this shouldn't be due to a weird geometry because there are few geometries as inoffensive as spheres. Has anybody an Idea or - alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could give me some hint how to build and run it? Thanks in advance, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Wed Jul 21 10:22:00 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 21 Jul 2010 10:22:00 +0200 Subject: control variables / cfg.cvar Message-ID: Dear Eric, I have a question with respect to the use of cfg.cvar and permutation testing. In particular, I am thinking about a design where subjects have to perform a task that involves giving two responses, say left and right hand button presses. I want to test two conditions against each other within subjects. If I have counterbalanced response hand assignment over subjects, you suggested to use cfg.cvar: "The theory of permutation tests also applies to statistical testing problems that involve control variables (e.g., response hand). In this case, the mechanics of the permutation test involves randomly permuting the data sets (single trials or subject averages) within each of the levels of the control variable (conditional permutation). To increase statistical sensitivity in the presence of control variable, it also is good to use a special test statistic that partials out the variance explained by the control variable. This is implemented in Fieldtrip for a couple of statfuns, but not for all of them. Conditional permutation is implemented via cfg.cvar." So in my design I have two levels of the control variable: L1 are subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R pairing (?). If I now permute only within the levels (which I would do anyway if I used a dependend samples test?) then still there are perumtations where response hands are sorted on the two sets to be compared, giving rise to large unwanted clusters in this particular permutation and other that are similar to it. Sure, this will not result in false positives, but decrease the sensitivity of my experiment. But maybe I misunderstand the meaning of "permuting the data sets (single trials or subject averages) within each of the levels of the control variable" . Does a permutation within the levels mean, I permute left hand responses only with left hand repsonses and right hand responses only with right hand responses? In this case I would have to give up my dependend samples testing (within subjcets) and use independent samples testing (across) subjects, because I can only exchange left hand responses in condition 1 and left hand responses in condition 2 between subjects, correct? Thanks for your help on this, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Wed Jul 21 13:36:52 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 21 Jul 2010 12:36:52 +0100 Subject: Dipoli issues In-Reply-To: <4C46A1AF.80205@gmx.de> Message-ID: Dear Paul, Note that there is also the bemcp toolbox distributed with Fieldtrip that should be easy to compile on Linux. I compared it with OpenMEEG on SPM canonical mesh and there are only differences for a small number of vertices close to the boundary. According to Christophe Phillips who wrote the toolbox as long as you stay more than one mesh edge length away from the inner skull boundary there should be no problem and it runs much faster than OpenMEEG (don't know about dipoli). Best, Vladimir On Wed, Jul 21, 2010 at 8:28 AM, Paul Czienskowski wrote: > Dear all, > > I hope that somebody  is able to help me. I'm trying to generate a BEM model > following the example script in > http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my > diploma thesis, but every time I'm running dipoli with more than 3 > compartments, the Program complains about double vertices on the innermost > mesh. I first suspected a weird brain geometry to be the culprit, but I now > tried to build the model with a simple sphere as the innermost compartment > and the error remains, so this shouldn't be due to a weird geometry because > there are few geometries as inoffensive as spheres. Has anybody an Idea or - > alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could > give me some hint how to build and run it? > > Thanks in advance, > Paul > > -- > Paul Czienskowski > Björnsonstr. 25 > 12163 Berlin > > Tel.: (+49)(0)30/221609359 > Handy: (+49)(0)1788378772 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From paul_c at GMX.DE Wed Jul 21 19:54:53 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 21 Jul 2010 19:54:53 +0200 Subject: Dipoli issues In-Reply-To: Message-ID: Hi Vladimir, I indeed took notice of the fact of another BEM toolbox being available, but the prepare_bemmodel function states, that bemcp is only capable of compute BEM models with 3 compartments which is of no use to me. Thank you anyway :) Cheers, Paul On 21.07.2010 13:36, Vladimir Litvak wrote: > Dear Paul, > > Note that there is also the bemcp toolbox distributed with Fieldtrip > that should be easy to compile on Linux. I compared it with OpenMEEG > on SPM canonical mesh and there are only differences for a small > number of vertices close to the boundary. According to Christophe > Phillips who wrote the toolbox as long as you stay more than one mesh > edge length away from the inner skull boundary there should be no > problem and it runs much faster than OpenMEEG (don't know about > dipoli). > > Best, > > Vladimir > > On Wed, Jul 21, 2010 at 8:28 AM, Paul Czienskowski wrote: > >> Dear all, >> >> I hope that somebody is able to help me. I'm trying to generate a BEM model >> following the example script in >> http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my >> diploma thesis, but every time I'm running dipoli with more than 3 >> compartments, the Program complains about double vertices on the innermost >> mesh. I first suspected a weird brain geometry to be the culprit, but I now >> tried to build the model with a simple sphere as the innermost compartment >> and the error remains, so this shouldn't be due to a weird geometry because >> there are few geometries as inoffensive as spheres. Has anybody an Idea or - >> alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could >> give me some hint how to build and run it? >> >> Thanks in advance, >> Paul >> >> -- >> Paul Czienskowski >> Björnsonstr. 25 >> 12163 Berlin >> >> Tel.: (+49)(0)30/221609359 >> Handy: (+49)(0)1788378772 >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Wed Jul 21 21:28:09 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Wed, 21 Jul 2010 14:28:09 -0500 Subject: Help with dipole fitting In-Reply-To: <4C43E9BD.1060209@gmx.de> Message-ID: Thanks man, your reply has been very helpful to me _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.b.bakker at STUDENT.UTWENTE.NL Wed Jul 21 23:30:14 2010 From: a.b.bakker at STUDENT.UTWENTE.NL (Albert Bakker) Date: Wed, 21 Jul 2010 23:30:14 +0200 Subject: Cluster analysis EEG data Message-ID: Hello, Does anyone know if it's possible to do a cluster analysis on EEG data for multiple frequencies with for example setting the cfg.foi = [1:1:30]? Or is it only possible for 1 frequency at the time? Best regards, Albert Bakker ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From alexandre.gramfort at INRIA.FR Thu Jul 22 09:04:36 2010 From: alexandre.gramfort at INRIA.FR (Alexandre Gramfort) Date: Thu, 22 Jul 2010 09:04:36 +0200 Subject: building OpenMEEG Message-ID: Dear Paul, OpenMEEG can handle an arbitrary number of compartments. However the fieldtrip plugin as written now can handle only 1, 2 or 3 compartments. This could be changed rapidly. If you want to build OpenMEEG for your linux system you will need cmake, atlas-devel and g++. Otherwise we can provide precompiled binaries for MAC, Windows 32 or 64 and Linux 32 or 64. Hope this helps Alexandre -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From paul_c at GMX.DE Thu Jul 22 10:49:55 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Thu, 22 Jul 2010 10:49:55 +0200 Subject: building OpenMEEG In-Reply-To: Message-ID: Hi Alexandre, thank you very much for your answer. I think bending those Matlab-wrappers won't be a problem for me, but for I haven't got too much experience in compiling under Linux it's giving me a hard time :) I followed the Readme file in the source folder, but ccmake complains about some FORTRAN functions. The actual error messages are CMake Error at macros/FortranCInterface/DetectFromLibrary.cmake:37 (unset): Unknown CMake command "unset". Call Stack (most recent call first): macros/FortranCInterface.cmake:155 (detect_fortran_function) CMakeLists.txt:71 (FortranCInterface_HEADER) I thought that maybe you might know this error and how to solve it (or can make up a solution). Also I'm of course not averse to use the precompiled binaries, but this didn't work for me this far either. When I downloaded the rpm files and tried to open them my Package Manager froze for a long time, is there anything else I shall consider? I'm on i686/Ubuntu 9.04. Tanks in advance, Paul On 22.07.2010 09:04, Alexandre Gramfort wrote: > Dear Paul, > > OpenMEEG can handle an arbitrary number of compartments. > However the fieldtrip plugin as written now can handle only > 1, 2 or 3 compartments. This could be changed rapidly. > > If you want to build OpenMEEG for your linux system you will need > cmake, atlas-devel and g++. Otherwise we can provide > precompiled binaries for MAC, Windows 32 or 64 and Linux 32 or 64. > > Hope this helps > > Alexandre > > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team @ NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From alexandre.gramfort at INRIA.FR Thu Jul 22 11:00:56 2010 From: alexandre.gramfort at INRIA.FR (Alexandre Gramfort) Date: Thu, 22 Jul 2010 11:00:56 +0200 Subject: building OpenMEEG In-Reply-To: <4C480633.3040006@gmx.de> Message-ID: Hi Paul, > thank you very much for your answer. I think bending those Matlab-wrappers > won't be a problem for me, but for I haven't got too much experience in > compiling under Linux it's giving me a hard time :) I followed the Readme > file in the source folder, but ccmake complains about some FORTRAN > functions. The actual error messages are > > CMake Error at macros/FortranCInterface/DetectFromLibrary.cmake:37 (unset): >   Unknown CMake command "unset". >  Call Stack (most recent call first): >   macros/FortranCInterface.cmake:155 (detect_fortran_function) >   CMakeLists.txt:71 (FortranCInterface_HEADER) you have an old version of cmake. I suggest to update your cmake binaries to version 2.8 or at least 2.6. The unset command appeared recently in cmake. > I thought that maybe you might know this error and how to solve it (or can > make up a solution). Also I'm of course not averse to use the precompiled > binaries, but this didn't work for me this far either. When I downloaded the > rpm files and tried to open them my Package Manager froze for a long time, > is there anything else I shall consider? I'm on i686/Ubuntu 9.04. I will send you a precompiled version. Alexandre ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Fri Jul 23 01:28:59 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 23 Jul 2010 01:28:59 +0200 Subject: control variables / cfg.cvar In-Reply-To: <2122874403.253604.1279700520897.JavaMail.fmail@mwmweb056> Message-ID: Dear Michael, > So in my design I have two levels of the control variable: L1 are > subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R > pairing (?). If I now permute only within the levels (which I would do > anyway if I used a dependend samples test?) then still there are > perumtations where response hands are sorted on the two sets to be > compared, giving rise to large unwanted clusters in this particular > permutation and other that are similar to it. Sure, this will not > result in false positives, but decrease the sensitivity of my > experiment. > > But maybe I misunderstand the meaning of "permuting the data sets > (single trials or subject averages) within each of the levels of the > control variable" . Does a permutation within the levels mean, I > permute left hand responses only with left hand repsonses and right > hand responses only with right hand responses? In this case I would > have to give up my dependend samples testing (within subjcets) and use > independent samples testing (across) subjects, because I can only > exchange left hand responses in condition 1 and left hand responses in > condition 2 between subjects, correct? An example should be able to clarify things. Control variables are especially useful in between-subject and (single subject) between-trials studies. Let's consider a between-subjects study in which our interest is in assessing the effect of some individual difference variable, such as two different alleles of some gene. Assume that dependent variable strongly depends on age. In that case, sensitivity wrt identifying the genetic effect could be increased (as compared with an analysis without the age variable) by making a number of fairly homogenous age groups, and to perform a permutation test by randomly permuting the two alleles WITHIN each of these age groups. I found it hard to use your example to illustrate the usefulness of permutation within the levels of a control variable. Probably, I'm missing a point here. Maybe you can help me by pointing out what is the independent variable whose effect you want to assess and which other variable (the control variable) is also responsible for variance in the dependent variable, but in whose effect you are not interested. Best, Eric > > Thanks for your help on this, > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Fri Jul 23 02:56:34 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Thu, 22 Jul 2010 19:56:34 -0500 Subject: Help with dipole fitting In-Reply-To: <4C43E9BD.1060209@gmx.de> Message-ID: Hi, I'm very sorry for using capital letters, please excuse me. I'm new at fieldtrip, I don't know much about this and I'm searching for help desperately. Well, I am trying to compute a fordward model by now, like this: V=A*J where: V= a matrix of potentials measured in the scalp surface by each electrode, for example 32 electrodes or channels and 5 seconds at 256 samples per second, (which is equal to 5*256=1280, which comes to a 32x1280 matrix, one epoch I guess, and one trial, just measure, no events, please correct me if i'm wrong) J= a matrix of the sources in the brain that produce the potentials above, with its time course, which are more than the electrodes placed there. Let me understand this: ¿these sources and its time course, are the same dipole moments? If so, ¿The sources (dipoles) have a time component in the three dimensions in the dipoles? Thus, if we consider 128 sources, ¿ are we considering 128 dipoles, and J matrix would be 128x1280 with the time course? or ¿Are we considering 128 sources of 3 dimensions and J matrix would be of 128x(1280x3)? A= the lead field matrix. I've seen the function compute_leadfield of FieldTrip, This uses the electrodes positions, the dipoles (or sources) positions, and the standard volume of sphere and conductivities to perform the computing of a leadfield matrix that has dimensions numch x (3xnums) where numch=nuber of channels or electrodes (32 in this case) and nums=number of sources (in this case 128) ¿why is the number of sources multiplied by 3? ¿ it is because they compute the leadfield matrix to each of the cartesian coordinates? and if so, ¿How should I take the J matrix to compute the fordward model? ¿ should I take this each row having the time course of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) rows and 1280 columns, and not like above 128x(1280x3)? And, once I have performed the forward model and I compute the V matrix, ¿Which function could I use to perform the inverse problem, i.e. , could I use a function that allows me recovering or regain the J matrix from the A and V matrices, and compare the new J with the old J to see if the inverse problem could be performed well? Please, If you could suggest me some article or book or paragraph that I can read to clear these doubts, or if you could clear these to me yourselves, I would be very much thankful to you, please I'm begging you help please. Sorry for all the possible fouls and lacks of politeness, sincerely.Thanks for your attention. _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Fri Jul 23 08:06:46 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Fri, 23 Jul 2010 08:06:46 +0200 Subject: Help with dipole fitting In-Reply-To: Message-ID: Hi Ludwig, On 23.07.2010 02:56, Ludwing Torres wrote: > Hi, I'm very sorry for using capital letters, please excuse me. Never mind, I was not too offended at this, but wanted you to take note of the fact, that somebody could be :) > I'm new at fieldtrip, I don't know much about this and I'm searching > for help desperately. Then I hope I can help you. > Well, I am trying to compute a fordward model by now, like this: > > V=A*J > > where: > > V= a matrix of potentials measured in the scalp surface by each > electrode, for example 32 electrodes or channels and 5 seconds at 256 > samples per second, (which is equal to 5*256=1280, which comes to a > 32x1280 matrix, one epoch I guess, and one trial, just measure, no > events, *please correct me if i'm wrong*) This sounds quite correct, I think, but AFAIK you won't compute this directly but use some function like the ft_dipolesimulation function we talked about last time. This does exactly what you want to do, compute the electrode scalp potentials due to a given dipole distribution. Spares you all the stuff you are now to consider. > J= a matrix of the sources in the brain that produce the potentials > above, with its time course, which are more than the electrodes placed > there. > Let me understand this: ¿these sources and its time course, are > the same dipole moments? > If so, ¿The sources (dipoles) have a time component in the three > dimensions in the dipoles? > Thus, if we consider 128 sources, ¿ are we considering 128 > dipoles, and J matrix would be 128x1280 with the time course? > or ¿Are we considering 128 sources of 3 dimensions and J matrix > would be of 128x(1280x3)? I think it's rather the latter, but see below. > A= the lead field matrix. I've seen the function compute_leadfield of > FieldTrip, This uses the electrodes positions, the dipoles (or > sources) positions, and the standard volume of sphere and > conductivities to perform the computing of a leadfield matrix that has > dimensions numch x (3xnums) where numch=nuber of channels or > electrodes (32 in this case) and nums=number of sources (in this > case 128) ¿why is the number of sources multiplied by 3? ¿ it is > because they compute the leadfield matrix to each of the cartesian > coordinates? and if so, ¿How should I take the J matrix to compute the > fordward model? ¿ should I take this each row having the time course > of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 > dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole > n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) > rows and 1280 columns, and not like above 128x(1280x3)? Please see the documentation (reference for compute_leadfield ) /The forward solution is expressed as the leadfield matrix (Nchan*3), where each column corresponds with the potential or field distributions on all sensors for one of the x,y,z-orientations of the dipole./ This appears to be the leadfield for a dipole at a certain position. You'd multiply the moment of the dipole you are trying to simulate with the very matrix. At least mathematically I think you'd build the lf-matrix for an number of dipoles as an (NchanX(Ndip*3)) matrix where every three columns represent the contribution of one dipole to the surface potential. The first of the three columns is the contribution of the x-moment of the dipole and same for 2nd and 3rd column representing the y- respectively z-moment. Note that this is - by now - only a consideration of time independent dipoles. What the lf-matrix does is mapping dipoles to electrodes. Nchan is the number of electrodes. For your 128 dipole-example (which could make a problem when fitting) the lf-matrix would be a 32x384-matrix with fixed positions for the dipoles. Where - as I said before - every row stands for an electrode and every triple of three cols for the contribution of one dipole to the electrodes. If you'd want to simulate the dipoles at a single point in time you'd build a vector dip = [d1x d1y d1z d2x d2y d2z ... d128x d128y d128z]' where dnx is the x-moment of the n-th dipole and same for y and z. This would be a column vector or matrix with a single column. If you'd make a (384x1280)-matrix with the rows being the dipoles and the columns the temporal change of the dipoles and multiply the lf matrix with this you'd get a matrix 32x1280 with the rows being the electrodes and the columns the time course. So the source matrix is not a (128x(1280*3))- but rather a ((128*3)x1280)-matrix. > And, once I have performed the forward model and I compute the V > matrix, *¿Which function could I use to perform the inverse problem, > i.e. , could I use a function that allows me recovering or regain the > J matrix from the A and V matrices, and compare the new J with the old > J to see if the inverse problem could be performed well? > * Still I'd recommend the use of the dipolesimulation and dipolefitting functions rather than using the lf directly. I think this is quite more flexible. I don't really know how to perform the inverse solution in this case. > *Please, If you could suggest me some article or book or paragraph > that I can read to clear these doubts, or if you could clear these to > me yourselves, I would be very much thankful to you, please I'm > begging you help please. Sorry for all the possible fouls and lacks of > politeness, sincerely.Thanks for your attention. > * See for example Michel et al.: EEG source imaging . Hope this helps. Cheers, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Fri Jul 23 12:14:32 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 23 Jul 2010 12:14:32 +0200 Subject: control variables / cfg.cvar In-Reply-To: <008001cb29f5$a99769f0$fcc63dd0$@maris@donders.ru.nl> Message-ID: Dear Eric, Thanks for the answer, which I understood. Your design is in both cases a between units of observation design. my exmaple (and actually my data) are a within units of observation design:   The independent variable in my example is condition (1,2). The units of observation are subjects, i.e. it would be a within unit of observation design. However, to exclude motor effects in the analysis, response hand assigments were balanced over subjects, as is done in many studies. Hence, we have a control variable with two levels. These levels could (naively) be the assigment rules (cond1-hand1/cond2-hand2 and vice versa) however then the nuisance effect is not linked to the control variable but to the interaction control-variable*independent variable. Hence, the copntrol variable should be the response hand itself (hand1, hand2). In this case, each of my units of observation has both levels of the control variable. To permute only within levels of the control variable I would then have to permute between units of observation, i.e. permute cond1 with cond2 between two subjects that had both left hand responses in cond1 and both right hand responses in cond 2 for example. This way the control variable should work, but i loose the power related to the within UO design. Michael -----Ursprüngliche Nachricht----- Von: Eric Maris Gesendet: Jul 23, 2010 1:28:59 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] control variables / cfg.cvar >Dear Michael, > > > >> So in my design I have two levels of the control variable: L1 are >> subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R >> pairing (?). If I now permute only within the levels (which I would do >> anyway if I used a dependend samples test?) then still there are >> perumtations where response hands are sorted on the two sets to be >> compared, giving rise to large unwanted clusters in this particular >> permutation and other that are similar to it. Sure, this will not >> result in false positives, but decrease the sensitivity of my >> experiment. >> >> But maybe I misunderstand the meaning of "permuting the data sets >> (single trials or subject averages) within each of the levels of the >> control variable" . Does a permutation within the levels mean, I >> permute left hand responses only with left hand repsonses and right >> hand responses only with right hand responses? In this case I would >> have to give up my dependend samples testing (within subjcets) and use >> independent samples testing (across) subjects, because I can only >> exchange left hand responses in condition 1 and left hand responses in >> condition 2 between subjects, correct? > > >An example should be able to clarify things. Control variables are especially useful in between-subject and (single subject) between-trials studies. Let's consider a between-subjects study in which our interest is in assessing the effect of some individual difference variable, such as two different alleles of some gene. Assume that dependent variable strongly depends on age. In that case, sensitivity wrt identifying the genetic effect could be increased (as compared with an analysis without the age variable) by making a number of fairly homogenous age groups, and to perform a permutation test by randomly permuting the two alleles WITHIN each of these age groups. > >I found it hard to use your example to illustrate the usefulness of permutation within the levels of a control variable. Probably, I'm missing a point here. Maybe you can help me by pointing out what is the independent variable whose effect you want to assess and which other variable (the control variable) is also responsible for variance in the dependent variable, but in whose effect you are not interested. > >Best, > >Eric > > > > > > > >> >> Thanks for your help on this, >> Michael >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Fri Jul 23 13:16:51 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 23 Jul 2010 13:16:51 +0200 Subject: control variables / cfg.cvar In-Reply-To: <339129844.1207346.1279880072314.JavaMail.fmail@mwmweb054> Message-ID: Dear Michael, > Thanks for the answer, which I understood. Your design is in both > cases a between units of observation design. my exmaple (and actually > my data) are a within units of observation design: > > The independent variable in my example is condition (1,2). The units of > observation are subjects, i.e. it would be a within unit of observation > design. However, to exclude motor effects in the analysis, response > hand assigments were balanced over subjects, as is done in many > studies. Hence, we have a control variable with two levels. These > levels could (naively) be the assigment rules (cond1-hand1/cond2-hand2 > and vice versa) however then the nuisance effect is not linked to the > control variable but to the interaction control-variable*independent > variable. Hence, the copntrol variable should be the response hand > itself (hand1, hand2). In this case, each of my units of observation > has both levels of the control variable. To permute only within levels > of the control variable I would then have to permute between units of > observation, i.e. permute cond1 with cond2 between two subjects that > had both left hand responses in cond1 and both right hand responses in > cond 2 for example. > This way the control variable should work, but i loose the power > related to the within UO design. Correct. In your case, use of the control variable to increase sensitivity would only work if the independent and the control variable were fully crossed (four-level within-subjects design; Left-C1, Right-C1, Left-C2, Right-C2). To evaluate the effect of C1-vs-C2, you can then permute within the levels of the control (hand) variable. Best, Eric > > Michael > > > -----Ursprüngliche Nachricht----- > Von: Eric Maris > Gesendet: Jul 23, 2010 1:28:59 AM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] control variables / cfg.cvar > > >Dear Michael, > > > > > > > >> So in my design I have two levels of the control variable: L1 are > >> subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R > >> pairing (?). If I now permute only within the levels (which I would > >> do anyway if I used a dependend samples test?) then still there are > >> perumtations where response hands are sorted on the two sets to be > >> compared, giving rise to large unwanted clusters in this particular > >> permutation and other that are similar to it. Sure, this will not > >> result in false positives, but decrease the sensitivity of my > >> experiment. > >> > >> But maybe I misunderstand the meaning of "permuting the data sets > >> (single trials or subject averages) within each of the levels of > the > >> control variable" . Does a permutation within the levels mean, I > >> permute left hand responses only with left hand repsonses and right > >> hand responses only with right hand responses? In this case I would > >> have to give up my dependend samples testing (within subjcets) and > >> use independent samples testing (across) subjects, because I can > only > >> exchange left hand responses in condition 1 and left hand responses > >> in condition 2 between subjects, correct? > > > > > >An example should be able to clarify things. Control variables are > especially useful in between-subject and (single subject) between- > trials studies. Let's consider a between-subjects study in which our > interest is in assessing the effect of some individual difference > variable, such as two different alleles of some gene. Assume that > dependent variable strongly depends on age. In that case, sensitivity > wrt identifying the genetic effect could be increased (as compared with > an analysis without the age variable) by making a number of fairly > homogenous age groups, and to perform a permutation test by randomly > permuting the two alleles WITHIN each of these age groups. > > > >I found it hard to use your example to illustrate the usefulness of > permutation within the levels of a control variable. Probably, I'm > missing a point here. Maybe you can help me by pointing out what is the > independent variable whose effect you want to assess and which other > variable (the control variable) is also responsible for variance in the > dependent variable, but in whose effect you are not interested. > > > >Best, > > > >Eric > > > > > > > > > > > > > > > >> > >> Thanks for your help on this, > >> Michael > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of > >> the FieldTrip toolbox, to share experiences and to discuss new > ideas > >> for MEG and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Sun Jul 25 01:59:53 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 24 Jul 2010 18:59:53 -0500 Subject: Help with dipole fitting In-Reply-To: <4C493176.9000005@gmx.de> Message-ID: Hi Paul, Thanks for the answer, I'll put in bold the new entries in this message. Well, I am trying to compute a fordward model by now, like this: V=A*J where: V= a matrix of potentials measured in the scalp surface by each electrode, for example 32 electrodes or channels and 5 seconds at 256 samples per second, (which is equal to 5*256=1280, which comes to a 32x1280 matrix, one epoch I guess, and one trial, just measure, no events, please correct me if i'm wrong) This sounds quite correct, I think, but AFAIK you won't compute this directly but use some function like the ft_dipolesimulation function we talked about last time. This does exactly what you want to do, compute the electrode scalp potentials due to a given dipole distribution. Spares you all the stuff you are now to consider.>> I'll do that. Could you explain me also what an epoch stands for, please? J= a matrix of the sources in the brain that produce the potentials above, with its time course, which are more than the electrodes placed there. Let me understand this: ¿these sources and its time course, are the same dipole moments? If so, ¿The sources (dipoles) have a time component in the three dimensions in the dipoles? Thus, if we consider 128 sources, ¿ are we considering 128 dipoles, and J matrix would be 128x1280 with the time course? or ¿Are we considering 128 sources of 3 dimensions and J matrix would be of 128x(1280x3)? I think it's rather the latter, but see below. A= the lead field matrix. I've seen the function compute_leadfield of FieldTrip, This uses the electrodes positions, the dipoles (or sources) positions, and the standard volume of sphere and conductivities to perform the computing of a leadfield matrix that has dimensions numch x (3xnums) where numch=nuber of channels or electrodes (32 in this case) and nums=number of sources (in this case 128) ¿why is the number of sources multiplied by 3? ¿ it is because they compute the leadfield matrix to each of the cartesian coordinates? and if so, ¿How should I take the J matrix to compute the fordward model? ¿ should I take this each row having the time course of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) rows and 1280 columns, and not like above 128x(1280x3)? Please see the documentation (reference for compute_leadfield) The forward solution is expressed as the leadfield matrix (Nchan*3), where each column corresponds with the potential or field distributions on all sensors for one of the x,y,z-orientations of the dipole. This appears to be the leadfield for a dipole at a certain position. You'd multiply the moment of the dipole you are trying to simulate with the very matrix. At least mathematically I think you'd build the lf-matrix for an number of dipoles as an (NchanX(Ndip*3)) matrix where every three columns represent the contribution of one dipole to the surface potential. The first of the three columns is the contribution of the x-moment of the dipole and same for 2nd and 3rd column representing the y- respectively z-moment. Note that this is - by now - only a consideration of time independent dipoles. What the lf-matrix does is mapping dipoles to electrodes. Nchan is the number of electrodes. For your 128 dipole-example (which could make a problem when fitting) the lf-matrix would be a 32x384-matrix with fixed positions for the dipoles. Where - as I said before - every row stands for an electrode and every triple of three cols for the contribution of one dipole to the electrodes. If you'd want to simulate the dipoles at a single point in time you'd build a vector dip = [d1x d1y d1z d2x d2y d2z ... d128x d128y d128z]' where dnx is the x-moment of the n-th dipole and same for y and z. This would be a column vector or matrix with a single column. If you'd make a (384x1280)-matrix with the rows being the dipoles and the columns the temporal change of the dipoles and multiply the lf matrix with this you'd get a matrix 32x1280 with the rows being the electrodes and the columns the time course. So the source matrix is not a (128x(1280*3))- but rather a ((128*3)x1280)-matrix. And, once I have performed the forward model and I compute the V matrix, ¿Which function could I use to perform the inverse problem, i.e. , could I use a function that allows me recovering or regain the J matrix from the A and V matrices, and compare the new J with the old J to see if the inverse problem could be performed well? Still I'd recommend the use of the dipolesimulation and dipolefitting functions rather than using the lf directly. I think this is quite more flexible. I don't really know how to perform the inverse solution in this case. Please, If you could suggest me some article or book or paragraph that I can read to clear these doubts, or if you could clear these to me yourselves, I would be very much thankful to you, please I'm begging you help please. Sorry for all the possible fouls and lacks of politeness, sincerely.Thanks for your attention. See for example Michel et al.: EEG source imaging. Hope this helps. Cheers, Paul Ok this has been very helpful, I think I still dont understand very well the concept of dipole moment, I'll search more information about this and how to manage the dipole moments as vectors; if you could suggest me some other book to learn about what is a dipole moment (also from the point of view of linear algebra) I'll thank you too, and this will help me think about how to use the dipolefitting function. Very Many thanks again. -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Sun Jul 25 03:38:08 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 24 Jul 2010 20:38:08 -0500 Subject: Help with dipole fitting In-Reply-To: <4C493176.9000005@gmx.de> Message-ID: Hi Paul, I don't know if you have heard or worked with eeglab, here they use a dipole fitting without considering the time course in the dipole moments, ¿Can I somehow use the functions of fieldtrip in eeglab to perform dipole fitting and consider the time course in eeglab too? Another question: when I perform the example below: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit And I compute the dipole fit with the first simulated dataset, I get the next structure: dip1 = label: {1x128 cell} dip: [1x1 struct] Vdata: [128x250 double] Vmodel: [128x250 double] time: [1x250 double] dimord: 'chan_time' cfg: [1x1 struct] And, after define the dipole moment as [1 0 0]' , I go to the dip field and in the field mom (i.e. dip1.dip.mom) I get an 3x250 double matrix. So, when I define the dipole position it is [0 0.5 0.3] and in the dipole fit in the field dip1.dip.pos, I get this same position (aproximated) it is [-2.1186e-008 0.5000 0.3000], but in the dipole moment I don't get the same, not even aproximated, instead of [1 0 0]', I get this [3x250 double] matrix. ¿Am I commiting any mistake or is a concept error? and ¿ How we can interpret this when we have more than two dipoles? Thank you for your help. _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 16:48:46 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 16:48:46 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: Message-ID: Hi everybody, I just finished fully implementing the new low-level frequency analysis routines for cfg.method = mtmconvol and mtmfft. They are not yet used by default, and I would appreciate if it can be tested more before optimizing computation speeds (should be relatively equal now, but many optimizations possible). The new routines can be used by adding a third input argument to your ft_freqanalysis calls, as: New implementation: freq = ft_freqanalysis(cfg,data,1) Old implementation (default): freq = ft_freqanalysis(cfg,data,0) *Things that are different:* - all mtmconvol output is now phase-shifted such that an angle of 0 of any fourier-coefficient /always /means a peak of an oscillation in the data, and an angle of pi will /always/ mean the trough of an oscillation (wavelet wise angle = 0 is implemented as cosine at peak, and sine in up-going flank) - all mtmfft output is now phase-shifted such that any angle from any fourier-coefficient is from the perspective of the oscillation in the data being at its peak at time = 0 - mtmconvol now uses an accurate frequency vector for building its wavelets (determined by fsample and nsample, with cfg.foi as starting point), instead of an /uncorrected/ cfg.foi (mtmfft already used an accurate one) (note: this causes slight differences between the old and new implementation) - mtmfft can now take a cfg.foi input-vector as well, instead of the usual cfg.foilim (backwards compatible) - because of the above, nearly /all/ fourier-output is different, but e.g. phase differences between coefficients should be the same - we decided to drop the support for variable number of tapers in mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, and first element of vector is selected) - in the new format, many things can be upgraded/implemented etc. in the future As freqanalysis is a rather fundamental pilar of FieldTrip, I would really appreciate if some of you can do some testing based on the above differences and anything else you can think of. Different types of data, different approaches, etc. to see if both implementations give comparable results and such (do note raw fourier-coefficients will almost always be different). It could be I missed some fields from the old functions that I diligently checked, or made some errors that did not affect my current testing environment. I can be reached at the e-mail address below, via the mailing-list, or via bug-reports. Thanks in advance. All the best! Roemer PS: the changes will be on the ft-server tonight, but are of course already in the svn-version -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Tue Jul 27 16:58:07 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 27 Jul 2010 15:58:07 +0100 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: <4C4EF1CE.5000002@donders.ru.nl> Message-ID: Dear Roemer, Why did you decide to drop the support for variable number of tapers in mtmconvol? That was actually quite a handy feature that I'm using to get TFs with more or less uniform smoothness across frequency. I don't know how many other people are using it but if there are many perhaps we can campaign for retaining it in the new implementation ;-) Best, Vladimir On Tue, Jul 27, 2010 at 3:48 PM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi everybody, > > I just finished fully implementing the new low-level frequency analysis > routines for cfg.method = mtmconvol and mtmfft. They are not yet used by > default, and I would appreciate if it can be tested more before optimizing > computation speeds (should be relatively equal now, but many optimizations > possible). > > The new routines can be used by adding a third input argument to your > ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of 0 of any > fourier-coefficient *always *means a peak of an oscillation in the data, > and an angle of pi will *always* mean the trough of an oscillation > (wavelet wise angle = 0 is implemented as cosine at peak, and sine in > up-going flank) > - all mtmfft output is now phase-shifted such that any angle from any > fourier-coefficient is from the perspective of the oscillation in the data > being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its wavelets > (determined by fsample and nsample, with cfg.foi as starting point), instead > of an *uncorrected* cfg.foi (mtmfft already used an accurate one) (note: > this causes slight differences between the old and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of the usual > cfg.foilim (backwards compatible) > - because of the above, nearly *all* fourier-output is different, but e.g. > phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, and > first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. in the > future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I would really > appreciate if some of you can do some testing based on the above differences > and anything else you can think of. Different types of data, different > approaches, etc. to see if both implementations give comparable results and > such (do note raw fourier-coefficients will almost always be different). It > could be I missed some fields from the old functions that I diligently > checked, or made some errors that did not affect my current testing > environment. > I can be reached at the e-mail address below, via the mailing-list, or via > bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of course already > in the svn-version > > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 17:11:38 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 17:11:38 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: <4C4EF1CE.5000002@donders.ru.nl> Message-ID: Hi everybody, Sorry for this, this was meant to go on the FieldTrip-Dev mailing list! Everything in this mail can be safely ignored. Best, Roemer On 7/27/2010 4:48 PM, Roemer van der Meij wrote: > Hi everybody, > > I just finished fully implementing the new low-level frequency > analysis routines for cfg.method = mtmconvol and mtmfft. They are not > yet used by default, and I would appreciate if it can be tested more > before optimizing computation speeds (should be relatively equal now, > but many optimizations possible). > > The new routines can be used by adding a third input argument to your > ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of 0 of > any fourier-coefficient /always /means a peak of an oscillation in the > data, and an angle of pi will /always/ mean the trough of an > oscillation (wavelet wise angle = 0 is implemented as cosine at peak, > and sine in up-going flank) > - all mtmfft output is now phase-shifted such that any angle from any > fourier-coefficient is from the perspective of the oscillation in the > data being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its > wavelets (determined by fsample and nsample, with cfg.foi as starting > point), instead of an /uncorrected/ cfg.foi (mtmfft already used an > accurate one) (note: this causes slight differences between the old > and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of the > usual cfg.foilim (backwards compatible) > - because of the above, nearly /all/ fourier-output is different, but > e.g. phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, > and first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. in > the future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I would > really appreciate if some of you can do some testing based on the > above differences and anything else you can think of. Different types > of data, different approaches, etc. to see if both implementations > give comparable results and such (do note raw fourier-coefficients > will almost always be different). It could be I missed some fields > from the old functions that I diligently checked, or made some errors > that did not affect my current testing environment. > I can be reached at the e-mail address below, via the mailing-list, or > via bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of course > already in the svn-version > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 17:45:34 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 17:45:34 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: Message-ID: Hi Vladimir, Well, it wasn't that final yet, I actually meant to sent the e-mail to dev-mailing list ;). I had a short discussion with Jan-Mathijs on it, but since it wasn't going live yet it didn't matter that much. The tapsmofrq being variable I realized doesn't necessarily mean different number of tapers, so I will implement that in the new-implementation tomorrow (tiny changes). However, implementing variable number of tapers requires some more thorough design decisions for the new low-level functions (especially in terms of consistent data representation throughout all low-level functions). Perhaps we should discuss this in more detail in the dev-mailing list? I'm sure Jan-Mathijs will join, Robert is on vacation at the moment. But thanks for your reply! Best, Roemer On 7/27/2010 4:58 PM, Vladimir Litvak wrote: > Dear Roemer, > > Why did you decide to drop the support for variable number of tapers > in mtmconvol? That was actually quite a handy feature that I'm using > to get TFs with more or less uniform smoothness across frequency. I > don't know how many other people are using it but if there are many > perhaps we can campaign for retaining it in the new implementation ;-) > > Best, > > Vladimir > > On Tue, Jul 27, 2010 at 3:48 PM, Roemer van der Meij > > wrote: > > Hi everybody, > > I just finished fully implementing the new low-level frequency > analysis routines for cfg.method = mtmconvol and mtmfft. They are > not yet used by default, and I would appreciate if it can be > tested more before optimizing computation speeds (should be > relatively equal now, but many optimizations possible). > > The new routines can be used by adding a third input argument to > your ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of > 0 of any fourier-coefficient /always /means a peak of an > oscillation in the data, and an angle of pi will /always/ mean the > trough of an oscillation (wavelet wise angle = 0 is implemented as > cosine at peak, and sine in up-going flank) > - all mtmfft output is now phase-shifted such that any angle from > any fourier-coefficient is from the perspective of the oscillation > in the data being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its > wavelets (determined by fsample and nsample, with cfg.foi as > starting point), instead of an /uncorrected/ cfg.foi (mtmfft > already used an accurate one) (note: this causes slight > differences between the old and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of > the usual cfg.foilim (backwards compatible) > - because of the above, nearly /all/ fourier-output is different, > but e.g. phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is > given, and first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. > in the future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I > would really appreciate if some of you can do some testing based > on the above differences and anything else you can think of. > Different types of data, different approaches, etc. to see if both > implementations give comparable results and such (do note raw > fourier-coefficients will almost always be different). It could be > I missed some fields from the old functions that I diligently > checked, or made some errors that did not affect my current > testing environment. > I can be reached at the e-mail address below, via the > mailing-list, or via bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of > course already in the svn-version > > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Tue Jul 27 20:34:51 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Tue, 27 Jul 2010 13:34:51 -0500 Subject: How can I fit more than two dipoles? In-Reply-To: Message-ID: If I have a lead field matrix, a matrix of sources and a matrix of scalp signals like in the script below; what functions can I use to perform the inverse problem, i.e. given the leadfield matrix (C) and the scalp simulated data (dat), what function of fieldtrip use to recover the x_orig matrix. The .mat file is included too. Thanks for your help. _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: proof.m URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: electrodes1020.mat Type: application/octet-stream Size: 8496 bytes Desc: not available URL: From lumatobu2 at HOTMAIL.COM Wed Jul 28 03:50:18 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Tue, 27 Jul 2010 20:50:18 -0500 Subject: why ft_sourceplot doesn't work? In-Reply-To: Message-ID: Hello, I tried to make the example to fit dipoles explained in the page of fieldtrip: http://fieldtrip.fcdonders.nl/example/symmetric_dipoles in the part in which one computes the time average, using the function ft_timelockanalysis produces an error that says that the function needs the field cfg.covariancewindow: cfg = []; cfg.covariance = 'yes'; timelock = ft_timelockanalysis(cfg, data); it appears to be solved when I set this to the option 'poststim' and recompute the function. cfg.covariancewindow = 'poststim'; timelock = timelockanalysis(cfg, data); the input is raw data with 91 channels and 1 trials applying preprocessing options averaging trials averaging trial 1 of 1 Warning: Divide by zero. > In timelockanalysis at 606 This produces the division by zero seen above, but any of the options for covariancewindow field result the same for this. Then, after computing the sourceanalysis and sourcedescriptives function, I go to the part of ft_sourceplot with the same configuration as in the page, and the function produces the next error: cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'nai'; cfg.funcolorlim = [1.6 2.2]; >> sourceplot(cfg, source); the input is source data with 3468 positions not plotting anatomy no functional parameter no masking parameter voxel 1590, indices [9 9 6], location [-0.0 -0.0 5.0] ??? Error using ==> sourceplot at 654 no anatomy is present and no functional data is selected, please check your cfg.funparameter please, if anyone know why this is happening and how to fix this, let me know. thank you for your atention. _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Wed Jul 28 09:09:23 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 28 Jul 2010 09:09:23 +0200 Subject: why ft_sourceplot doesn't work? In-Reply-To: Message-ID: hi, > cfg = []; > cfg.covariance = 'yes'; > timelock = ft_timelockanalysis(cfg, data); > > it appears to be solved when I set this to the option 'poststim' and recompute the function. > > cfg.covariancewindow = 'poststim'; here you should define the time used for calculating cov. cfg.covariancewindow = [from to]; > no anatomy is present and no functional data > is selected, please check your > cfg.funparameter this error message is actually quite informative :-) check whether your source structure has an avg.nai field. if not then of course nothing is plotted. in that case check if you defined cfg.projectnoise='yes'; before calling ft_sourceanalysis. good luck. nathan > > please, if anyone know why this is happening and how to fix this, let me know. > thank you for your atention. > > > Discover the new Windows Vista Learn more! > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajay.halai at POSTGRAD.MANCHESTER.AC.UK Wed Jul 28 12:43:30 2010 From: ajay.halai at POSTGRAD.MANCHESTER.AC.UK (Ajay Halai) Date: Wed, 28 Jul 2010 12:43:30 +0200 Subject: EEG source localisation questions Message-ID: Dear FT users, I am a 1st year PhD student and new to FIELDTRIP, and any help will be very welcome. I have managed to run simple ERP analyses on a language experiment. I am now hoping to localise the peaks (P100 and N400) but am coming across some problems. I will try my best to explain briefly my current method of analyses and would greatly appreciate any comments or suggests, as I fear I am making a mistake somewhere. The problem I encounter is that the values returned for the avg.pow are the same for each condition. Naturally, I made sure that I specified different conditions at the ft_sourceanalysis (cfg, data) stage, but I did specify different conditions. I also checked the avg.noise, and was surprised to see these values were the same as the avg.pow, which leads me to think I have done something wrong or am failing to interpret this. Furthermore, I tried to then use loreta, and selected the timelock data, with the same cfg but get an error (Undefined function or method 'loreta' for input arguments of type 'struct') and wonder if I need to specify other cfg. I used the 'lcmv' method. projectnoise 'yes', rawtrial 'no', lambda = 0, and using the vol, grid and elec files from the created leadfield. Any suggestions on what I may be doing wrong would be greatly appreciated. Additionally, I have provided some more details about the stages before this, which may point to the problem. Best wishes Ajay Halai analysis details: I have 7 conditions in all, but take 2 conditions for 1 subject as an example. I have two types of speech, which show significant differences at P100. I used a bandpass filter (1-40hz), padding (0.1), baseline correction (-0.1 0), detrend and average EEG reference at the preprocessing stage. I removed artifacts by first removing components using the 'fastica' method, and then a visual rejection. Following this, I specified the time of interest limit to the P100, and used the timelockanalysis. I have not used keeptrial or keepindividual cfg, although I don't think this is the cause of the problem. I do not have individual MRIs, therefore I have used a template from the MNI. I have applied a segmentation (using volsegment). I specified the elec positions (64 sensors), and prepared leadfields using reducerank 2, threshold 0.1, smooth 5, units 'mm' ___________________________________________________________________ Neuroscience and Aphasia Research Unit (NARU) School of Psychological Sciences (Zochonis Building) University of Manchester Brunswick Street Manchester M13 9PL UK ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ajay.halai at POSTGRAD.MANCHESTER.AC.UK Wed Jul 28 17:06:43 2010 From: ajay.halai at POSTGRAD.MANCHESTER.AC.UK (Ajay Halai) Date: Wed, 28 Jul 2010 17:06:43 +0200 Subject: EEG source localisation questions Message-ID: My apologies, I have searched through the archives, and found a similiar problem by Floris de Lange, to which Robert.O replied. I will try that suggestion. Sorry to fill up your inbox. best Ajay Roberts reply: " Last week I discussed similar issues with Jan-Mathijs. Sofar at the FCDC we have not really optimized the data handling for LCMV beamforming. Markus Bauer is one of the few who had a go at it, and for him it did not really work that well. Jan-Mathijs mentioned that sofar we have been working with the data covariance that was estimated based on the single trialsd, and not with th edata covariance estimated on the average (note that the order matters for the covariance computation and averaging). Right now I don't know the details of your experiment and data any more, but you might want to try data = preprocessing(cfg) avg1 = timelockanalysis(cfg, data) with keeptrials=no, covariance=no avg2 = timelockanalysis(cfg, avg1) with keeptrials=no, covariance=yes and then use avg2 which includes the covariance of the average in the sourceanalysis. best regards, Robert " On Wed, 28 Jul 2010 12:43:30 +0200, Ajay Halai wrote: >Dear FT users, > >I am a 1st year PhD student and new to FIELDTRIP, and any help will be very >welcome. I have managed to run simple ERP analyses on a language experiment. >I am now hoping to localise the peaks (P100 and N400) but am coming across >some problems. > >I will try my best to explain briefly my current method of analyses and >would greatly appreciate any comments or suggests, as I fear I am making a >mistake somewhere. > >The problem I encounter is that the values returned for the avg.pow are the >same for each condition. Naturally, I made sure that I specified different >conditions at the ft_sourceanalysis (cfg, data) stage, but I did specify >different conditions. I also checked the avg.noise, and was surprised to see >these values were the same as the avg.pow, which leads me to think I have >done something wrong or am failing to interpret this. Furthermore, I tried >to then use loreta, and selected the timelock data, with the same cfg but >get an error (Undefined function or method 'loreta' for input arguments of >type 'struct') and wonder if I need to specify other cfg. > >I used the 'lcmv' method. projectnoise 'yes', rawtrial 'no', lambda = 0, and >using the vol, grid and elec files from the created leadfield. > >Any suggestions on what I may be doing wrong would be greatly appreciated. >Additionally, I have provided some more details about the stages before >this, which may point to the problem. > >Best wishes >Ajay Halai > >analysis details: > >I have 7 conditions in all, but take 2 conditions for 1 subject as an >example. I have two types of speech, which show significant differences at >P100. I used a bandpass filter (1-40hz), padding (0.1), baseline correction >(-0.1 0), detrend and average EEG reference at the preprocessing stage. I >removed artifacts by first removing components using the 'fastica' method, >and then a visual rejection. Following this, I specified the time of >interest limit to the P100, and used the timelockanalysis. I have not used >keeptrial or keepindividual cfg, although I don't think this is the cause of >the problem. > >I do not have individual MRIs, therefore I have used a template from the >MNI. I have applied a segmentation (using volsegment). I specified the elec >positions (64 sensors), and prepared leadfields using reducerank 2, >threshold 0.1, smooth 5, units 'mm' > >___________________________________________________________________ >Neuroscience and Aphasia Research Unit (NARU) >School of Psychological Sciences (Zochonis Building) >University of Manchester >Brunswick Street Manchester >M13 9PL >UK > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Jul 28 21:50:21 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 28 Jul 2010 21:50:21 +0200 Subject: cluster-based analysis question In-Reply-To: Message-ID: Dear Bornali, This is more of a statistical methods question. I'm interested in doing test-retest evaluation in a data set and, most specifically, formally assessing my intuition that there are stable individual differences in the ERSP associated with performing a certain task, such that the overall "pattern" of one subject's ERSP is highly replicable, and thus reliably different from the ERSPs of other subjects. Is the fieldtrip cluster-based permutation test a suitable procedure for implementing this test? Has anyone done this type of analysis already? Any advice would be appreciated. Yes, it is straightforward to do this type of analysis in Fieldtrip. This is a so-called between-trials analysis. Your independent variable is SUBJECT, with levels the different subjects in your study. You can do this analysis for every pair of subjects (using statfun=indepsamplesT) or for all subjects jointly (using statfun=indepsamplesF). You will be testing the null hypothesis that there are no differences between subjects (or, in reliability terminology, that there are no reliable individual differences). This is a strict null hypothesis. However, it will definitely be of interest to see where the individual differences are most pronounced; on which regions of the scalp, on which time points relative to some stimulus, and in which frequency bands. Good luck, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thanks so much, Bornali -- Medical Scientist Training Program Neuroscience Training Program University of Wisconsin - Madison Health Emotions Research Institute bkundu at wisc.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at GMAIL.COM Fri Jul 30 21:42:36 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Fri, 30 Jul 2010 21:42:36 +0200 Subject: standard error of complex data Message-ID: Hello, I'd like to plot data from single channels/single subjects with error bars, so as to compare peak amplitudes across different experiment conditions. In brief, I have Hilbert transformed data filtered from 8-12Hz. Then with a function I wrote, I pull all the trials for each condition and put them into a n X m matrix (trials x timepoints) for each channel. The data are still complex because I have separate analyses for phase and amplitude. For amplitudes, I'm taking the evoked response by getting the mean of each timepoint across trials and then taking the magnitude (abs). For the standard error, I am first getting the standard deviation by stdev=sqrt[ (norm(x)-mean(x)) ^2 ] This produces a real number. For the standard error, would I then divide by the square root of N? Thanks for any feedback, Karl Doron PhD. Candidate UCSB ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Thu Jul 1 09:27:43 2010 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Thu, 1 Jul 2010 09:27:43 +0200 Subject: Nested analysis Message-ID: Dear Marco, I am not sure if you can manage this within fieldtrip alone (maybe I am wrong). What I do in more complicated statistical situation, I use R. R is an open source statistical package and is free. If you install the R.matlab library you can read and write matlab workspaces with R. R offers broad statistical modeling possibilities. With R you can model hierarchical models. You could permute your data following your Null hypothesis and create a matrix electrodes by number of permutations that contains your statistical map (let's call this matrix statrand). Then you calculate the electrode vector with the observed statistical map (let's call this vector statobs). Then you feed statobs and statrand into clusterstat.m function. Hope that is useful for you. Best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Matthias.Meyer at DONDERS.RU.NL Thu Jul 1 09:31:04 2010 From: Matthias.Meyer at DONDERS.RU.NL (Matthias C. Meyer) Date: Thu, 1 Jul 2010 09:31:04 +0200 Subject: Export EEG Data In-Reply-To: <79FBE383-A930-4671-88D9-08480A24B22B@donders.ru.nl> Message-ID: Hi Jan-Mathijs, thanks for your answer! At least some one replies :) - I already had the feeling it would come to this, but it was worth a try. Now I know I do not waist time by working on this. Best, Matthias jan-mathijs schoffelen schrieb: > Hi Mattias, > >> I am quite new to Fieldtrip and hope that someone has solved my >> problem before. > > High expectations ;). > >> I recorded EEG data inside an MR Scanner with the BrainVision >> software and now I want to use Fieldtrip to run some error correction >> scripts - so far so god. >> But after that I need to write the corrected data back to the >> original EEG - data format. >> I use the ft_write_data function to do this. After some problems I >> manage to run the function, but the result is a double size datafile, >> a messed up header and a empty marker file. >> Probably the data is written in double precision. Giving the data to >> the function with "single(data_org.trial{1})" in the argument does >> not help. >> The command line I use to call the function is: >> ft_write_data('ScannerCor', data_org.trial{1}, 'dataformat', >> 'brainvision_eeg','header', data_org.hdr); >> >> (I copied the corrected data back to the read in matrix) >> >> I heard already, that I can tell Matlab to use only single precision, >> but it would be nice to tell that the function directly - Is there a >> way to do so? >> What do I need to do, to export the header and marker file correctly? > > I have not encountered this issue before, and I don't know whether > anybody else has. This may mean that you need to do some digging > yourself to get it solved. I never tried to export data to a different > fileformat. The easy way out here would be to also do your subsequent > analysis steps in matlab/fieldtrip. > Did you already have a detailed look at ft_write_data, and in > particular the part which deals with 'brainvision_eeg'. My suspicion > is that there is a discrepancy between the information in > data_org.hdr, and the exact data you try to export > (data_org.trial{1}). Manually converting to single precision may not > work if in data_org.hdr you need to specify the precision. (once again > I don't know about the specifics of this function, or of the functions > it relies on). Using the matlab debugger may help you to access the > variables in the function's workspace and to see what's preventing it > to work properly. > > Good luck, > > Jan-Mathijs > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 1 18:07:07 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 1 Jul 2010 18:07:07 +0200 Subject: Export EEG Data In-Reply-To: <4C2475B4.5030807@donders.ru.nl> Message-ID: Hi Matthias On 25 Jun 2010, at 11:24, Matthias C. Meyer wrote: > I recorded EEG data inside an MR Scanner with the BrainVision > software and now I want to use Fieldtrip to run some error > correction scripts - so far so god. > But after that I need to write the corrected data back to the > original EEG - data format. > I use the ft_write_data function to do this. After some problems I > manage to run the function, but the result is a double size > datafile, a messed up header and a empty marker file. How was the original data written? The brainvision dataformat allopws for many different subformats, i.e. int16, int32, float, but also ascii. Another subformat specification is whether the data is multiplexed or not. The default subformat that fieldtrip writes is multiplexed 32 bit floating point values. If the original data was 16 bit, then you would indeed expect a file that is 2x as large. That in itself is not a problem. > Probably the data is written in double precision. it is not. Have a look in fieldtrip/fileio/private/ write_brainvision_eeg.m, there you see % open the data file and write the binary data fid = fopen(datafile, 'wb', 'ieee-le'); if length(size(dat))>2 warning('writing segmented data as if it were continuous'); for i=1:ntrl fwrite(fid, squeeze(dat(i,:,:)), 'float32'); end else fwrite(fid, dat, 'float32'); end What do you mean with a "messed up header"? Can you look at the header with an ascii editor? Presumably the reason for writing to an output file is that you want to read it in in some other software. What is the software that you are trying to read the fieldtrip-generated BVA file into? M > Giving the data to the function with "single(data_org.trial{1})" in > the argument does not help. > The command line I use to call the function is: > ft_write_data('ScannerCor', data_org.trial{1}, 'dataformat', > 'brainvision_eeg','header', data_org.hdr); > > (I copied the corrected data back to the read in matrix) > > I heard already, that I can tell Matlab to use only single > precision, but it would be nice to tell that the function directly - > Is there a way to do so? > What do I need to do, to export the header and marker file correctly? > > The corrected data are exactly of the same size as the original > data, if possible, I might also use the original marker file to get > the trigger points. correct. You just have to make a copy of the marker file so that it has the same name as the new data. best Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 1 18:17:14 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 1 Jul 2010 18:17:14 +0200 Subject: databrowser: change order in which channels appear? In-Reply-To: Message-ID: Dear Henning On 25 Jun 2010, at 14:19, Henning Holle wrote: > when looking at data with the databrowser (vertical viewmode), the > channels > appear in the order in which they happen to be in the dataset. Is > there a > way to define another order (so that, for instance, more anterior > channels > appear more on top of the screen, and more posterior channels at the > bottom > of the screen). It is currently not possible without changing the code. But if you go into ft_databrowser, line 926, you'll see case 'vertical' tmpcfg = []; tmpcfg.layout = 'vertical'; tmpcfg.channel = opt.cfg.channel; tmpcfg.skipcomnt = 'yes'; tmpcfg.skipscale = 'yes'; laytime = ft_prepare_layout(tmpcfg, opt.orgdata); In that part the layout is created with the vertical arrangement of the channels, you can think of that as a set of boxes that are vertically stacked on top opf each other, where each box contains one timecourse. There you could change the code to create a custom layout. Have a look here http://fieldtrip.fcdonders.nl/tutorial/layout for an explanation of layouts. You could just change that code into case 'vertical' tmpcfg = []; tmpcfg.layout = 'yourlayoutfile.lay'; tmpcfg.channel = opt.cfg.channel; tmpcfg.skipcomnt = 'yes'; tmpcfg.skipscale = 'yes'; laytime = ft_prepare_layout(tmpcfg, opt.orgdata); and have the arrangement of the channels for the databrowser in an "yourlayoutfile.lay" ascii file best Robert PS a clean extension of teh code would be to allow for cfg.viewmode = 'yourlayoutfile.lay'; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aardesta at UCLA.EDU Thu Jul 1 23:04:16 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Thu, 1 Jul 2010 14:04:16 -0700 Subject: Vector-valued ClusterStats Message-ID: Hi, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Map.png Type: image/png Size: 627126 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Thu Jul 1 23:55:17 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 1 Jul 2010 23:55:17 +0200 Subject: Vector-valued ClusterStats In-Reply-To: <008f01cb1960$f7cdb700$e7692500$@edu> Message-ID: Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aardesta at UCLA.EDU Fri Jul 2 01:04:39 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Thu, 1 Jul 2010 16:04:39 -0700 Subject: Vector-valued ClusterStats In-Reply-To: <00ee01cb1968$17dd3fa0$4797bee0$@maris@donders.ru.nl> Message-ID: Hi Eric, Thank you very much for the fast response. So if I understand correctly, for a cluster map with X clusters the largest cluster is compared to a permutation distribution created from the largest ClusterStat of each permutation, the 2nd largest cluster to a distribution constructed from the 2nd ClusterStat of each, etc. If this is correct and the largest cluster is just being tested using Max(ClusterStat), why do you say that this vector-based approach has less power for the largest cluster? Also, the permutation distribution for the smaller clusters may not have all 1000 values if some permutations have fewer clusters, right? I appreciate the advice. Best, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, July 01, 2010 2:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Vector-valued ClusterStats Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at DONDERS.RU.NL Fri Jul 2 07:48:55 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 2 Jul 2010 07:48:55 +0200 Subject: Vector-valued ClusterStats In-Reply-To: <00e201cb1971$c98226e0$5c8674a0$@edu> Message-ID: Hi Allen, Thank you very much for the fast response. So if I understand correctly, for a cluster map with X clusters the largest cluster is compared to a permutation distribution created from the largest ClusterStat of each permutation, the 2nd largest cluster to a distribution constructed from the 2nd ClusterStat of each, etc. If this is correct and the largest cluster is just being tested using Max(ClusterStat), why do you say that this vector-based approach has less power for the largest cluster? You need a vector-valued critical value that controls the false alarm rate for all cluster sizes jointly. The first element of this vector-valued critical value is always larger than the critical value for a scalar test statistic. Also, the permutation distribution for the smaller clusters may not have all 1000 values if some permutations have fewer clusters, right? I appreciate the advice. Right, but that does not create any problems. I'm curious to find out if the cluster-based permutation tests reveal an interesting pattern in your data. Best, Eric Best, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, July 01, 2010 2:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Vector-valued ClusterStats Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.holle at SUSSEX.AC.UK Fri Jul 2 13:58:35 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Fri, 2 Jul 2010 13:58:35 +0200 Subject: ft_channelrepair produces only NaNs Message-ID: Dear list members, we have a data set here with a bad data channel (F8, see attached screenshot from the databrowser). we are able to read in the dataset (which was created in EEGLAB) and the electrode positions using the following code. %% read in data cfg = []; cfg.dataset = 's29dr.set'; D = ft_preprocessing(cfg); D.elec = D.hdr.elec; however, when we want to interpolate the bad channel using the following code %% interpolate bad channel F8 cfg = []; cfg.badchannel = 14; E = ft_channelrepair(cfg,D); we only have NaNs for channel 14 >> E.trial{1,1}(14,1:10) ans = NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN What are we doing wrong? One possibility that we have considered is that the electrode positions (which were obtained in EEGLAB) might be in a slightly different format than fieldtrip would expect them. We can't see anything wrong with, but we have attached a copy of the elec field here, just to be sure. Or is it maybe a problem for the interpolation algorithm that F8 is at the edge of covered electrodes? Any help would be greatly appreciated. Kind regards, Tiina Kalda and Henning Holle ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: bad_channel.png Type: image/png Size: 144603 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec_structure.mat Type: application/x-matlab-workspace Size: 1535 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Fri Jul 2 16:39:31 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 2 Jul 2010 16:39:31 +0200 Subject: ft_channelrepair produces only NaNs In-Reply-To: Message-ID: Dear Henning Your electrodes seem to be expressed in mm, see >> load Desktop/elec_structure.mat >> elec.pnt ans = 80.7840 26.1330 -4.0011 84.9812 0 -1.7860 80.7840 -26.1330 -4.0011 76.1528 31.4828 20.8468 76.1528 -31.4828 20.8468 ... The default cfg.neighbourdist is 4, which is appropriate for 4 cm but not 4 mm. So that means that none of the channels is considered a neighbour. The "repair" is done by computing a weighted average over the neighbours that ly withing the specified cfg.neighbourdist, and where the weight is schaled with the inverse distance. If you specify cfg.neighbourdist correctly (40 would probably work fine), you''ll also see in the feedback on screen which electrodes are used for the repairing. hope this helps. Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 2 Jul 2010, at 13:58, Henning Holle wrote: > Dear list members, > > we have a data set here with a bad data channel (F8, see attached screenshot from the > databrowser). > > > we are able to read in the dataset (which was created in EEGLAB) and the electrode > positions using the following code. > > %% read in data > > cfg = []; > cfg.dataset = 's29dr.set'; > D = ft_preprocessing(cfg); > D.elec = D.hdr.elec; > > however, when we want to interpolate the bad channel using the following code > > %% interpolate bad channel F8 > > cfg = []; > cfg.badchannel = 14; > E = ft_channelrepair(cfg,D); > > we only have NaNs for channel 14 > >>> E.trial{1,1}(14,1:10) > > ans = > > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > > What are we doing wrong? One possibility that we have considered is that the electrode > positions (which were obtained in EEGLAB) might be in a slightly different format than > fieldtrip would expect them. We can't see anything wrong with, but we have attached a > copy of the elec field here, just to be sure. > > Or is it maybe a problem for the interpolation algorithm that F8 is at the edge of covered > electrodes? > > Any help would be greatly appreciated. > > Kind regards, > > Tiina Kalda and Henning Holle > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aardesta at UCLA.EDU Fri Jul 2 21:56:25 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Fri, 2 Jul 2010 12:56:25 -0700 Subject: Plotting Single Trials In-Reply-To: <000901cb19aa$425b5e50$c7121af0$@maris@donders.ru.nl> Message-ID: Hello, I have a simple question about TFR plotting. After using freqanalysis to compute TFRs for a single channel, what is the simplest way to view the plots for individual trials? Also, is it possible to use 'avgoverfreq' to show 2D power trends over time within a given frequency range before using freqstatistics? Thanks! P.S. Eric, I will let you know the vector-based ClusterStat results as soon as they are computed. Thanks, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at GMAIL.COM Sun Jul 4 03:07:15 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Sun, 4 Jul 2010 03:07:15 +0200 Subject: Plotting Single Trials Message-ID: Hi Allen, I did this by switching trials and channels in the data structure from TFR output. That way, I can still using multiplotTFR. The rows (x-axis) of each channel then become the individual trials, rather than frequency (I think that's what I did - it was a few weeks ago). This worked for me because I'm looking at a specific frequency band. You might end up with a lot of these data structures if you have TFRs across a broader range of frequencies. If you email me on Tues, I'd be happy to send you the code (it's on my university computer). Best, karl doron k.doron at psych.ucsb.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From marco.buiatti at GMAIL.COM Sun Jul 4 16:27:36 2010 From: marco.buiatti at GMAIL.COM (Marco Buiatti) Date: Sun, 4 Jul 2010 16:27:36 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) Message-ID: Hi all, I am facing a problem that has been raised before (see the thread below): how to consider the three different sensor types of the 306-channels Neuromag system when performing cluster-based permutation analysis in Fieldtrip. Eric Maris suggested to either simply sum the power at the pairs of orthogonal planar gradiometers, or to invent some more sophisticated way to retain the orientation information. I wonder whether anyone has tried these two solutions (or others). Thanks, Best, Marco ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Mon Jul 5 15:02:15 2010 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Mon, 5 Jul 2010 15:02:15 +0200 Subject: plv analysis In-Reply-To: <000401cb1a20$a830b0b0$f8921210$@edu> Message-ID: Dear ft_list, I am trying to perform plv analysis using Fieldtrip, on EEG data converted from SPM to Fieldtrip using ftraw. Frequanalysis on the imported data works fine, I obtain the powspctrm and crsspctrm, and I can succeed with connectivityanalyis to compute e.g., coherence without problems. However, when I set cfg.method to 'plv', connectivityanalysis throws the following error: ??? Conversion to cell from double is not possible. Error in ==> avgoverdim at 17 reduceddim(avgdimnum) = 1; Error in ==> selectdata at 445 if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end Error in ==> ft_connectivityanalysis at 256 data = selectdata(data, 'avgoverrpt', 'yes'); any suggestions? best & many thanks Bernhard %Here the settings I use for frequanalysis (which seems to work fine) cfg = []; cfg.output ='powandcsd'; cfg.taper = 'dpss'; cfg.channel = unique(S.chancomb(:)); cfg.channelcmb = S.chancomb; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'no'; cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % Frequency axis cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); numfoi = length(cfg.foi); cfg.t_ftimwin = zeros(1,numfoi); cfg.t_ftimwin(:) = timewin; % Time resolution cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to 1/timewin (i.e. 2.5 Hz) for all frequencis cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = 0.1*cfg.foi(cfg.foi>10*(1/timewin)); cfg.tapsmofrq(cfg.foi>50) = 5; cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/data.fsample); % Time axis freq = ft_freqanalysis(cfg, data); %And the part for connectivityanalysis (which works for coherence, but not for plv) cfg=[]; cfg.method = 'plv'; [stat] = ft_connectivityanalysis(cfg, freqs) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Mon Jul 5 15:54:51 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Mon, 5 Jul 2010 15:54:51 +0200 Subject: plv analysis In-Reply-To: <4C31D7D7.2010204@bccn-berlin.de> Message-ID: Hi Bernhard, Could you check whether you are using a very recent version of fieldtrip? If not, please update and check whether the bug persists. It sounds rather like a known bug which has been recently fixed. Best, Jan-Mathijs On Jul 5, 2010, at 3:02 PM, Bernhard Spitzer wrote: > Dear ft_list, > > I am trying to perform plv analysis using Fieldtrip, on EEG data > converted from SPM to Fieldtrip using ftraw. > Frequanalysis on the imported data works fine, I obtain the > powspctrm and crsspctrm, and I can succeed > with connectivityanalyis to compute e.g., coherence without problems. > However, when I set cfg.method to 'plv', connectivityanalysis throws > the following error: > > ??? Conversion to cell from double is not possible. > > Error in ==> avgoverdim at 17 > reduceddim(avgdimnum) = 1; > > Error in ==> selectdata at 445 > if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end > > Error in ==> ft_connectivityanalysis at 256 > data = selectdata(data, 'avgoverrpt', 'yes'); > > any suggestions? > best & many thanks > Bernhard > > > > %Here the settings I use for frequanalysis (which seems to work fine) > cfg = []; > cfg.output ='powandcsd'; > cfg.taper = 'dpss'; > cfg.channel = unique(S.chancomb(:)); > cfg.channelcmb = S.chancomb; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'no'; > cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % > Frequency axis > cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); > numfoi = length(cfg.foi); > cfg.t_ftimwin = zeros(1,numfoi); > cfg.t_ftimwin(:) = timewin; % Time resolution > cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero > cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to 1/ > timewin (i.e. 2.5 Hz) for all frequencis > cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = 0.1*cfg.foi(cfg.foi>10*(1/ > timewin)); > cfg.tapsmofrq(cfg.foi>50) = 5; > cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/ > data.fsample); % Time axis > freq = ft_freqanalysis(cfg, data); > > %And the part for connectivityanalysis (which works for coherence, > but not for plv) > cfg=[]; > cfg.method = 'plv'; > [stat] = ft_connectivityanalysis(cfg, freqs) > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Mon Jul 5 17:38:14 2010 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Mon, 5 Jul 2010 17:38:14 +0200 Subject: plv analysis In-Reply-To: <767966C1-8039-4C3F-9A73-B74F0BE8361B@donders.ru.nl> Message-ID: Dear Jan-Mathijs, thank you - in fact my pathdef was outdated and pointed to an older fieldtrip version. With the current version now the plv works indeed without problems. Thanks again! Bernhard Am 7/5/2010 3:54 PM, schrieb jan-mathijs schoffelen: > Hi Bernhard, > > Could you check whether you are using a very recent version of > fieldtrip? If not, please update and check whether the bug persists. > It sounds rather like a known bug which has been recently fixed. > > Best, > > Jan-Mathijs > > > On Jul 5, 2010, at 3:02 PM, Bernhard Spitzer wrote: > >> Dear ft_list, >> >> I am trying to perform plv analysis using Fieldtrip, on EEG data >> converted from SPM to Fieldtrip using ftraw. >> Frequanalysis on the imported data works fine, I obtain the powspctrm >> and crsspctrm, and I can succeed >> with connectivityanalyis to compute e.g., coherence without problems. >> However, when I set cfg.method to 'plv', connectivityanalysis throws >> the following error: >> >> ??? Conversion to cell from double is not possible. >> >> Error in ==> avgoverdim at 17 >> reduceddim(avgdimnum) = 1; >> >> Error in ==> selectdata at 445 >> if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end >> >> Error in ==> ft_connectivityanalysis at 256 >> data = selectdata(data, 'avgoverrpt', 'yes'); >> >> any suggestions? >> best & many thanks >> Bernhard >> >> >> >> %Here the settings I use for frequanalysis (which seems to work fine) >> cfg = []; >> cfg.output ='powandcsd'; >> cfg.taper = 'dpss'; >> cfg.channel = unique(S.chancomb(:)); >> cfg.channelcmb = S.chancomb; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'no'; >> cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % >> Frequency axis >> cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); >> numfoi = length(cfg.foi); >> cfg.t_ftimwin = zeros(1,numfoi); >> cfg.t_ftimwin(:) = timewin; % Time resolution >> cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero >> cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to >> 1/timewin (i.e. 2.5 Hz) for all frequencis >> cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = >> 0.1*cfg.foi(cfg.foi>10*(1/timewin)); >> cfg.tapsmofrq(cfg.foi>50) = 5; >> cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/data.fsample); >> % Time axis >> freq = ft_freqanalysis(cfg, data); >> >> %And the part for connectivityanalysis (which works for coherence, >> but not for plv) >> cfg=[]; >> cfg.method = 'plv'; >> [stat] = ft_connectivityanalysis(cfg, freqs) >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. -- ----------------------------------------------- Dr. Bernhard Spitzer Bernstein Center for Computational Neuroscience Charité Universitätsmedizin Berlin Philippstr. 13 House 6 10115 Berlin Germany Phone: +49 (0)30 2093-6789 Fax: +49 (0)30 2093-6771 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From matthew at PSYCH.COLUMBIA.EDU Tue Jul 6 03:26:02 2010 From: matthew at PSYCH.COLUMBIA.EDU (Matthew Davidson) Date: Mon, 5 Jul 2010 21:26:02 -0400 Subject: Independent channels stats question Message-ID: Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using Fieldtrip more directly. My question pertains to cluster-based correction when channels are independent. My data is primarily intracranial EEG, and due to the 1/f^2 power drop-off, electrodes directly on the brain reflect local activity much more strongly than sensors further away. As a result, we treat them as independent. Now, I can force the Fieldtrip clustering algorithm to not cluster across channels by setting: cfg.neighbours = []; cfg.minnbchan = 0; but it still computes the maximum cluster size for a particular permutation based on *all* the data. This seems... less sensitive somehow, as if large clusters in one channel negatively impact the significance of clusters in another channel. Is there a better way to do this and still solve the MCP? E.g., compute the maxsum on each channel separately, and then use something like FDR or Bonferroni correction on the maxsums across channels? Thanks for any advice you may have, and thanks for producing fieldtrip! Matthew ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mcregar at UPO.ES Tue Jul 6 12:56:31 2010 From: mcregar at UPO.ES (Maite Crespo) Date: Tue, 6 Jul 2010 12:56:31 +0200 Subject: what is wrong? Message-ID: Hello! I read some previous mails in the discussion list, but I'm still not sure about the procedure I'm following. I'm obtaining too flat images (not spatially located sources). I would like to localize the source activity within a frequency band and a time window. I computed the CSD matrix using ft_freqanalysis. Can I average the resulting matrix in frequency and time before using it with ft_sourceanalysis? I used the following steps to compute the filters in the averaged CSD (across trials) and then apply it to compute the power in single trial data. Is that right? % 1st run cfg=[]; cfg.frequency=5; cfg.latency=.7; cfg.method='dics'; cfg.projectnoise='yes'; cfg.keepfilter='yes'; cfg.grid=grid; cfg.vol=vol; cfg.elecfile=elecfile; cfg.lambda=.05; source=ft_sourceanalysis(cfg,data); % 2nd run cfg=[]; cfg.frequency=5; cfg.latency=.7; cfg.method='dics'; cfg.projectnoise='yes'; cfg.rawtrial='yes'; source.leadfield=grid.leadfield; cfg.grid=source2grid(source); cfg.vol=vol; cfg.elecfile=elecfile; cfg.lambda=.05; source=ft_sourceanalysis(cfg,data); I also tried changing the lambda parameter, but it seems there are not many changes... Many thanks in advance for any help. Best regards, Maité ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jul 6 13:21:58 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 6 Jul 2010 13:21:58 +0200 Subject: Independent channels stats question In-Reply-To: Message-ID: Dear Matthew, Your sensitivity problem is a known issue when using cluster-based test statistics, in which it is difficult to get small clusters significant in the presence of large clusters. This could also occur within a single channel (for example with a time-frequency decomposition, in which the summed spectro-temporal extent of an alpha- band effect could be much bigger than a gamma-band effect). In your case I think it would be statistically valid to do the cluster- based permutation test on each channel separately (which will involve a for loop around ft_freqstatistics, because it is not implemented in the fieldtrip code) and doing a post-hoc Bonferroni correction on the resulting p-values. If the number of channels is not too big, this might work. Good luck, Jan-Mathijs On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG > Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using > Fieldtrip more directly. > > My question pertains to cluster-based correction when channels are > independent. My data is primarily intracranial EEG, and due to the > 1/f^2 power drop-off, electrodes directly on the brain reflect local > activity much more strongly than sensors further away. As a result, we > treat them as independent. Now, I can force the Fieldtrip clustering > algorithm to not cluster across channels by setting: > > cfg.neighbours = []; > cfg.minnbchan = 0; > > but it still computes the maximum cluster size for a particular > permutation based on *all* the data. This seems... less sensitive > somehow, as if large clusters in one channel negatively impact the > significance of clusters in another channel. > > Is there a better way to do this and still solve the MCP? E.g., > compute the maxsum on each channel separately, and then use something > like FDR or Bonferroni correction on the maxsums across channels? > > Thanks for any advice you may have, and thanks for producing > fieldtrip! > Matthew > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jul 6 13:33:19 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 6 Jul 2010 13:33:19 +0200 Subject: what is wrong? In-Reply-To: Message-ID: Dear Maité, What do you mean by spatially not located sources? In general it may be helpful to give more to-the-point information besides the input cfg-structures. The output of your beamformer analysis depends both on the sanity of the data (which I cannot check), and on the sanity of the input configuration. Two remarks w.r.t the cfg: -when cfg.lambda is a scalar, the csd-matrix will be regularized with an identity matrix, scaled with cfg.lambda. From your value of 0.05 however I assume that you want to do a relative scaling. True? In that case you should specify cfg.lambda = '5%'; The consequence of the 0.05 could be that if the scale of your data is Volts-squared or microVolts- squared (boiling down to the csd having a magnitude of 10^-12 or 1, respectively) which at least in the first case leads to inappropriate regularisation. -in the second step I assume you want to re-use the filters computed in step 1. Therefore you need to pass source.avg.filter (computed in the first step) to the cfg. Does this happen in source2grid? I don't know, it could be, but I'd check that if I were you. Some post-processing probably needs to be done in order to see spatially localized sources (even when the whole analysis went fine (=data OK and cfgs OK) until this point), so just looking at the output of sourceanalysis typically is not optimal. For the computation of the CSD-matrix I'd like to refer to the tutorial http://fieldtrip.fcdonders.nl/tutorial/beamformer on the fieldtrip wiki. Best, Jan-Mathijs On Jul 6, 2010, at 12:56 PM, Maite Crespo wrote: > Hello! > > I read some previous mails in the discussion list, but I'm still not > sure about > the procedure I'm following. I'm obtaining too flat images (not > spatially located > sources). I would like to localize the source activity within a > frequency band > and a time window. I computed the CSD matrix using ft_freqanalysis. > Can I > average the resulting matrix in frequency and time before using it > with > ft_sourceanalysis? > > I used the following steps to compute the filters in the averaged > CSD (across > trials) and then apply it to compute the power in single trial data. > Is that > right? > > % 1st run > cfg=[]; > cfg.frequency=5; > cfg.latency=.7; > cfg.method='dics'; > cfg.projectnoise='yes'; > cfg.keepfilter='yes'; > cfg.grid=grid; > cfg.vol=vol; > cfg.elecfile=elecfile; > cfg.lambda=.05; > source=ft_sourceanalysis(cfg,data); > > % 2nd run > cfg=[]; > cfg.frequency=5; > cfg.latency=.7; > cfg.method='dics'; > cfg.projectnoise='yes'; > cfg.rawtrial='yes'; > source.leadfield=grid.leadfield; > cfg.grid=source2grid(source); > cfg.vol=vol; > cfg.elecfile=elecfile; > cfg.lambda=.05; > source=ft_sourceanalysis(cfg,data); > > I also tried changing the lambda parameter, but it seems there are > not many > changes... > > Many thanks in advance for any help. > > Best regards, > Maité > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.bauer at UCL.AC.UK Tue Jul 6 16:58:55 2010 From: m.bauer at UCL.AC.UK (Markus Bauer) Date: Tue, 6 Jul 2010 15:58:55 +0100 Subject: ANT (*.cnt) format MEX files for 64 bit Message-ID: Hi we've been trying to read ANT files with fieldtrip under various operating systems - without success. unfortunately this 'EEProbe' toolbox that is used to read those data only seems to provide mex-files for 32bit machines (LINUX or Windows) and no source code to allow compilation can anybody make such files available or knows who could be contacted? thanks Markus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sunyata at GMAIL.COM Tue Jul 6 18:47:31 2010 From: sunyata at GMAIL.COM (Matthew Davidson) Date: Tue, 6 Jul 2010 12:47:31 -0400 Subject: Independent channels stats question In-Reply-To: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Jan-Mathis, thanks for the response. Unfortunately, we tend to have a lot of channels (~120-200), and once we start using microelectrodes in the patients, it'll only get worse. If we were to divide our alpha by 120-200, wouldn't we have to run 120-200 times as many permutations in order to get p-values low enough to survive Bonferroni correction? That's a large jump; we might have to run 100,000 permutations! What do you think about something like FDR correction instead? Matthew On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen wrote: > Dear Matthew, > > Your sensitivity problem is a known issue when using cluster-based test > statistics, in which it is difficult to get small clusters significant in > the presence of large clusters. This could also occur within a single > channel (for example with a time-frequency decomposition, in which the > summed spectro-temporal extent of an alpha-band effect could be much bigger > than a gamma-band effect). > In your case I think it would be statistically valid to do the cluster-based > permutation test on each channel separately (which will involve a for loop > around ft_freqstatistics, because it is not implemented in the fieldtrip > code) and doing a post-hoc Bonferroni correction on the resulting p-values. > If the number of channels is not too big, this might work. > > Good luck, > > Jan-Mathijs > > > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using >> Fieldtrip more directly. >> >> My question pertains to cluster-based correction when channels are >> independent. My data is primarily intracranial EEG, and due to the >> 1/f^2 power drop-off, electrodes directly on the brain reflect local >> activity much more strongly than sensors further away. As a result, we >> treat them as independent. Now, I can force the Fieldtrip clustering >> algorithm to not cluster across channels by setting: >> >> cfg.neighbours = []; >> cfg.minnbchan = 0; >> >> but it still computes the maximum cluster size for a particular >> permutation based on *all* the data. This seems... less sensitive >> somehow, as if large clusters in one channel negatively impact the >> significance of clusters in another channel. >> >> Is there a better way to do this and still solve the MCP? E.g., >> compute the maxsum on each channel separately, and then use something >> like FDR or Bonferroni correction on the maxsums across channels? >> >> Thanks for any advice you may have, and thanks for producing fieldtrip! >> Matthew >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From georges.otte at TELENET.BE Tue Jul 6 22:22:19 2010 From: georges.otte at TELENET.BE (Dr. Georges Otte) Date: Tue, 6 Jul 2010 22:22:19 +0200 Subject: ANT (*.cnt) format MEX files for 64 bit In-Reply-To: <4C3344AF.2000503@ucl.ac.uk> Message-ID: Dea markus, I will forward your mail to maarten van de Velde at ANT who could help You out. georges -----Oorspronkelijk bericht----- Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Markus Bauer Verzonden: dinsdag 6 juli 2010 16:59 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] ANT (*.cnt) format MEX files for 64 bit Hi we've been trying to read ANT files with fieldtrip under various operating systems - without success. unfortunately this 'EEProbe' toolbox that is used to read those data only seems to provide mex-files for 32bit machines (LINUX or Windows) and no source code to allow compilation can anybody make such files available or knows who could be contacted? thanks Markus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From gflandin at FIL.ION.UCL.AC.UK Wed Jul 7 13:43:39 2010 From: gflandin at FIL.ION.UCL.AC.UK (Guillaume Flandin) Date: Wed, 7 Jul 2010 12:43:39 +0100 Subject: ANT (*.cnt) format MEX files for 64 bit In-Reply-To: <201007062022.o66KMhAq006895@filter1-nij.mf.surf.net> Message-ID: Dear Markus, compiled MEX files on most platforms of the eeprobe importer from ANT are available in the external/eeprobe folder of SPM8, if this can be of any help. Best regards, Guillaume. Dr. Georges Otte wrote: > Dea markus, > > I will forward your mail to maarten van de Velde at ANT who could help You > out. > > georges > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens > Markus Bauer > Verzonden: dinsdag 6 juli 2010 16:59 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] ANT (*.cnt) format MEX files for 64 bit > > Hi > > we've been trying to read ANT files with fieldtrip under various > operating systems - without success. > > unfortunately this 'EEProbe' toolbox that is used to read those data > only seems to provide mex-files for 32bit machines (LINUX or Windows) > and no source code to allow compilation > > can anybody make such files available or knows who could be contacted? > > thanks > Markus -- Guillaume Flandin, PhD Wellcome Trust Centre for Neuroimaging University College London 12 Queen Square London WC1N 3BG ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sangita.dandekar at GMAIL.COM Wed Jul 7 21:37:06 2010 From: sangita.dandekar at GMAIL.COM (Sangita Dandekar) Date: Wed, 7 Jul 2010 15:37:06 -0400 Subject: megplanar on Yokogawa axial gradiometers Message-ID: Hi, I'd like to get an estimate of horizontal and vertical planar gradients at each axial gradiometer in our Yokogawa system. The megplanar function in fieldtrip is setup to check whether input data were collected on CTF or BTI systems and breaks out of the code if that is not the case. I was wondering why (and if) the code in the megplanar function is specific to only CTF and BTI systems? I have not looked at the megplanar code too closely yet, but it seems as though the geometry of the yokogawa system's axial gradiometers should allow application of the 'original', 'sincos' and 'fitplane' estimation methods. It would be great if someone who knows the details of the above three planar gradient estimation methods could let me know if they should work on the Yokogawa's axial gradiometers without modification, or, if modification is necessary, what the nature of the modifications that I need to make are. Thanks in advance for any help! Sangi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 10:41:11 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 03:41:11 -0500 Subject: No subject Message-ID: Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: align1.jpg Type: image/jpeg Size: 272040 bytes Desc: align1.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: align2.jpg Type: image/jpeg Size: 89401 bytes Desc: align2.jpg URL: From a.stolk at FCDONDERS.RU.NL Thu Jul 8 11:17:14 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Thu, 8 Jul 2010 11:17:14 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C29@UTHCMS1.uthouston.edu> Message-ID: Hi Tony, Just to be sure; did you add the .pos and .dim from the template grid to your data before interpolating? In code; data.pos = template_grid.pos; data.dim = template_grid.dim; cfg = []; cfg.parameter = 'all'; data_int = ft_sourceinterpolate(cfg, data, mri); You can then ft_sourceplot the interpolated data. Best, Arjen p.s. if still running into problems, make sure you have followed the steps described here: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ----- Original Message ----- From: "Antony D Passaro" To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From s.mohr at PSY.GLA.AC.UK Thu Jul 8 13:58:42 2010 From: s.mohr at PSY.GLA.AC.UK (sibylle) Date: Thu, 8 Jul 2010 12:58:42 +0100 Subject: Problems with sourceanalysis Message-ID: Hi everyone, I'm trying to localize oscillatory sources on BESA dat-files. I downloaded the standard BEM-Model from the Fieldtrip ftp-server and aligned my electrodes to the BEM using the 'interactive'-method (see attached script 'align_elec.m'). The thing is that I run into problems when I try to do the actual sourceanalysis (see attached script 'sources_testfile.m'): Preprocessing and freqanalysis is fine, but then the sourceanalysis crashes. This is because no filters are created for two voxels, because the leadfield contains NaNs. Temporarily, I replace the two leadfield voxels (2714 and 2735) with their neighbouring leadfield to run the sourceanalysis smoothly. It's a quick fix, but of course not ideal. Does anyone know what goes wrong? Any help is much appreciated! Thanks a lot, Sibylle ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: align_elec.m Type: application/octet-stream Size: 2208 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sources_testfile.m Type: application/octet-stream Size: 4016 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 13:57:01 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 06:57:01 -0500 Subject: No subject In-Reply-To: <12062554.3767811278580634559.JavaMail.root@watertor.uci.ru.nl> Message-ID: Hi Arjen, Thank you very much for your help. I had not added the .pos and .dim to my grid before interpolating, but after adding that information I had the same result as before. I then checked the .pos and .dim of the data before redefining it and noticed that it was already identical to the template grid information. I also referred to the example that you had suggested, however, I am currently looking at a single subject to verify localization before moving on to multiple subject analyses. Additionally, I would like to visualize data projected on to a single subject's MRI prior to normalizing the data. Any other suggestions would be greatly appreciated. Thank you again, -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] Sent: Thursday, July 08, 2010 4:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Hi Tony, Just to be sure; did you add the .pos and .dim from the template grid to your data before interpolating? In code; data.pos = template_grid.pos; data.dim = template_grid.dim; cfg = []; cfg.parameter = 'all'; data_int = ft_sourceinterpolate(cfg, data, mri); You can then ft_sourceplot the interpolated data. Best, Arjen p.s. if still running into problems, make sure you have followed the steps described here: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ----- Original Message ----- From: "Antony D Passaro" To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 14:14:18 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 14:14:18 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2A@UTHCMS1.uthouston.edu> Message-ID: Dear Tony, It looks as if the coordinate system attached to your single subject's mri is not according to 4D's convention (it rather looks as if it is defined an mni space). The reason why I think this is that your x and y axes seem to be swapped, and there is a slight shift in the z- direction, suggesting a difference in origin. You can enforce the correct coordinate system onto the MRI by using ft_volumerealign in the interactive mode (and then specifying lpa, rpa and nasion by hand: this should return an updated mri.transform, which describes the transformation from voxel space to subject's headspace) . This should of course be done before calling ft_sourceinterpolate. Cheers, Jan-Mathijs On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim > to my grid before interpolating, but after adding that information I > had the same result as before. I then checked the .pos and .dim of > the data before redefining it and noticed that it was already > identical to the template grid information. I also referred to the > example that you had suggested, however, I am currently looking at a > single subject to verify localization before moving on to multiple > subject analyses. Additionally, I would like to visualize data > projected on to a single subject's MRI prior to normalizing the > data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template > grid to your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the > steps described here: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / > Berlin / Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not > exist in the same coordinate space. Some were in mm and some in cm. > After I resolved these issues, I was able to use headmodelplot to > verify that everything was correct (see attached screenshot). I then > attempted source localization using lcmv and noticed that that the > projected activation existed in the incorrect orientation (see > second attached screenshot). I'm not sure what I'm doing wrong as > all of my components are in the correct space. I also tried to use > the interactive option of sourceplot to correctly set n,l,r but that > didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 14:50:01 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 07:50:01 -0500 Subject: No subject In-Reply-To: Message-ID: Dear Jan-Mathijs, Thank you again for your help, I appreciate it. I had forgotten to mention that I had used ft_volumerealign to align the mri before creating the volume conduction model using ft_preapre_singleshell. I then used the resulting vol in the ft_sourceanalyses, although I feel as though I am missing a step here which places the data in the same space as the MRI via the volume conduction model. Thanks, -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] Sent: Thursday, July 08, 2010 7:14 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Tony, It looks as if the coordinate system attached to your single subject's mri is not according to 4D's convention (it rather looks as if it is defined an mni space). The reason why I think this is that your x and y axes seem to be swapped, and there is a slight shift in the z- direction, suggesting a difference in origin. You can enforce the correct coordinate system onto the MRI by using ft_volumerealign in the interactive mode (and then specifying lpa, rpa and nasion by hand: this should return an updated mri.transform, which describes the transformation from voxel space to subject's headspace) . This should of course be done before calling ft_sourceinterpolate. Cheers, Jan-Mathijs On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim > to my grid before interpolating, but after adding that information I > had the same result as before. I then checked the .pos and .dim of > the data before redefining it and noticed that it was already > identical to the template grid information. I also referred to the > example that you had suggested, however, I am currently looking at a > single subject to verify localization before moving on to multiple > subject analyses. Additionally, I would like to visualize data > projected on to a single subject's MRI prior to normalizing the > data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template > grid to your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the > steps described here: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / > Berlin / Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not > exist in the same coordinate space. Some were in mm and some in cm. > After I resolved these issues, I was able to use headmodelplot to > verify that everything was correct (see attached screenshot). I then > attempted source localization using lcmv and noticed that that the > projected activation existed in the incorrect orientation (see > second attached screenshot). I'm not sure what I'm doing wrong as > all of my components are in the correct space. I also tried to use > the interactive option of sourceplot to correctly set n,l,r but that > didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From yuvharpaz at GMAIL.COM Thu Jul 8 14:40:34 2010 From: yuvharpaz at GMAIL.COM (Yuval Harpaz) Date: Thu, 8 Jul 2010 15:40:34 +0300 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2A@UTHCMS1.uthouston.edu> Message-ID: we had a similar problem but we only needed to interpolate on template MRI. we copied the pos of the template and it worked fine. by the way, normalization did not work well for us for more than 10 subjects or so, RAM problems. yuval On 8 July 2010 14:57, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim to my > grid before interpolating, but after adding that information I had the same > result as before. I then checked the .pos and .dim of the data before > redefining it and noticed that it was already identical to the template grid > information. I also referred to the example that you had suggested, however, > I am currently looking at a single subject to verify localization before > moving on to multiple subject analyses. Additionally, I would like to > visualize data projected on to a single subject's MRI prior to normalizing > the data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template grid to > your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the steps > described here: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / > Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not exist in > the same coordinate space. Some were in mm and some in cm. After I resolved > these issues, I was able to use headmodelplot to verify that everything was > correct (see attached screenshot). I then attempted source localization > using lcmv and noticed that that the projected activation existed in the > incorrect orientation (see second attached screenshot). I'm not sure what > I'm doing wrong as all of my components are in the correct space. I also > tried to use the interactive option of sourceplot to correctly set n,l,r but > that didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 14:52:54 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 14:52:54 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2C@UTHCMS1.uthouston.edu> Message-ID: Dear Tony, What you did for the creation of the volume conduction model is indeed correct. The question now is whether you also used the updated mri for ft_sourceinterpolate, or whether you went back to loading the mri from file without the correct coordinate frame info... JM On Jul 8, 2010, at 2:50 PM, Passaro, Antony D wrote: > Dear Jan-Mathijs, > > Thank you again for your help, I appreciate it. I had forgotten to > mention that I had used ft_volumerealign to align the mri before > creating the volume conduction model using ft_preapre_singleshell. I > then used the resulting vol in the ft_sourceanalyses, although I > feel as though I am missing a step here which places the data in the > same space as the MRI via the volume conduction model. > > Thanks, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] > Sent: Thursday, July 08, 2010 7:14 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Dear Tony, > > It looks as if the coordinate system attached to your single subject's > mri is not according to 4D's convention (it rather looks as if it is > defined an mni space). The reason why I think this is that your x and > y axes seem to be swapped, and there is a slight shift in the z- > direction, suggesting a difference in origin. You can enforce the > correct coordinate system onto the MRI by using ft_volumerealign in > the interactive mode (and then specifying lpa, rpa and nasion by hand: > this should return an updated mri.transform, which describes the > transformation from voxel space to subject's headspace) . This should > of course be done before calling ft_sourceinterpolate. > > Cheers, > > Jan-Mathijs > > On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > >> Hi Arjen, >> >> Thank you very much for your help. I had not added the .pos and .dim >> to my grid before interpolating, but after adding that information I >> had the same result as before. I then checked the .pos and .dim of >> the data before redefining it and noticed that it was already >> identical to the template grid information. I also referred to the >> example that you had suggested, however, I am currently looking at a >> single subject to verify localization before moving on to multiple >> subject analyses. Additionally, I would like to visualize data >> projected on to a single subject's MRI prior to normalizing the >> data. Any other suggestions would be greatly appreciated. >> >> Thank you again, >> -Tony >> ________________________________________ >> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf >> Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] >> Sent: Thursday, July 08, 2010 4:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] >> >> Hi Tony, >> >> Just to be sure; did you add the .pos and .dim from the template >> grid to your data before interpolating? >> >> In code; >> >> data.pos = template_grid.pos; >> data.dim = template_grid.dim; >> cfg = []; >> cfg.parameter = 'all'; >> data_int = ft_sourceinterpolate(cfg, data, mri); >> >> You can then ft_sourceplot the interpolated data. >> >> Best, >> Arjen >> >> p.s. if still running into problems, make sure you have followed the >> steps described here: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space >> >> ----- Original Message ----- >> From: "Antony D Passaro" >> To: FIELDTRIP at NIC.SURFNET.NL >> Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / >> Berlin / Bern / Rome / Stockholm / Vienna >> Subject: [FIELDTRIP] >> >> Hi, >> >> I've been having issues projecting source estimates onto an MRI. I >> discovered that several of my components (vol, grad, grid) did not >> exist in the same coordinate space. Some were in mm and some in cm. >> After I resolved these issues, I was able to use headmodelplot to >> verify that everything was correct (see attached screenshot). I then >> attempted source localization using lcmv and noticed that that the >> projected activation existed in the incorrect orientation (see >> second attached screenshot). I'm not sure what I'm doing wrong as >> all of my components are in the correct space. I also tried to use >> the interactive option of sourceplot to correctly set n,l,r but that >> didn't seem to change anything. I'm sure it is something very simple >> that I am overlooking but any help would be much appreciated. >> >> Thank you, >> -Tony >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 15:30:41 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 08:30:41 -0500 Subject: No subject In-Reply-To: Message-ID: Dear Jan-Mathijs, Thank you so much for your help, that did the trick (see attached screenshot). I didn't realized that I could use the output from ft_volumerealign as the mri in ft_sourceinterpolate (or just overwrite the .transform of the mri). I will document all of my steps. Thank you! -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] Sent: Thursday, July 08, 2010 7:52 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Tony, What you did for the creation of the volume conduction model is indeed correct. The question now is whether you also used the updated mri for ft_sourceinterpolate, or whether you went back to loading the mri from file without the correct coordinate frame info... JM On Jul 8, 2010, at 2:50 PM, Passaro, Antony D wrote: > Dear Jan-Mathijs, > > Thank you again for your help, I appreciate it. I had forgotten to > mention that I had used ft_volumerealign to align the mri before > creating the volume conduction model using ft_preapre_singleshell. I > then used the resulting vol in the ft_sourceanalyses, although I > feel as though I am missing a step here which places the data in the > same space as the MRI via the volume conduction model. > > Thanks, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] > Sent: Thursday, July 08, 2010 7:14 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Dear Tony, > > It looks as if the coordinate system attached to your single subject's > mri is not according to 4D's convention (it rather looks as if it is > defined an mni space). The reason why I think this is that your x and > y axes seem to be swapped, and there is a slight shift in the z- > direction, suggesting a difference in origin. You can enforce the > correct coordinate system onto the MRI by using ft_volumerealign in > the interactive mode (and then specifying lpa, rpa and nasion by hand: > this should return an updated mri.transform, which describes the > transformation from voxel space to subject's headspace) . This should > of course be done before calling ft_sourceinterpolate. > > Cheers, > > Jan-Mathijs > > On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > >> Hi Arjen, >> >> Thank you very much for your help. I had not added the .pos and .dim >> to my grid before interpolating, but after adding that information I >> had the same result as before. I then checked the .pos and .dim of >> the data before redefining it and noticed that it was already >> identical to the template grid information. I also referred to the >> example that you had suggested, however, I am currently looking at a >> single subject to verify localization before moving on to multiple >> subject analyses. Additionally, I would like to visualize data >> projected on to a single subject's MRI prior to normalizing the >> data. Any other suggestions would be greatly appreciated. >> >> Thank you again, >> -Tony >> ________________________________________ >> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf >> Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] >> Sent: Thursday, July 08, 2010 4:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] >> >> Hi Tony, >> >> Just to be sure; did you add the .pos and .dim from the template >> grid to your data before interpolating? >> >> In code; >> >> data.pos = template_grid.pos; >> data.dim = template_grid.dim; >> cfg = []; >> cfg.parameter = 'all'; >> data_int = ft_sourceinterpolate(cfg, data, mri); >> >> You can then ft_sourceplot the interpolated data. >> >> Best, >> Arjen >> >> p.s. if still running into problems, make sure you have followed the >> steps described here: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space >> >> ----- Original Message ----- >> From: "Antony D Passaro" >> To: FIELDTRIP at NIC.SURFNET.NL >> Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / >> Berlin / Bern / Rome / Stockholm / Vienna >> Subject: [FIELDTRIP] >> >> Hi, >> >> I've been having issues projecting source estimates onto an MRI. I >> discovered that several of my components (vol, grad, grid) did not >> exist in the same coordinate space. Some were in mm and some in cm. >> After I resolved these issues, I was able to use headmodelplot to >> verify that everything was correct (see attached screenshot). I then >> attempted source localization using lcmv and noticed that that the >> projected activation existed in the incorrect orientation (see >> second attached screenshot). I'm not sure what I'm doing wrong as >> all of my components are in the correct space. I also tried to use >> the interactive option of sourceplot to correctly set n,l,r but that >> didn't seem to change anything. I'm sure it is something very simple >> that I am overlooking but any help would be much appreciated. >> >> Thank you, >> -Tony >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: align3.jpg Type: image/jpeg Size: 90514 bytes Desc: align3.jpg URL: From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 16:51:38 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 16:51:38 +0200 Subject: warning for ctf-users Message-ID: Dear all, I came across a bug in the code which may affect people who use FieldTrip to analyze CTF-data. The function ft_denoise_synthetic, which can be used to convert the data to higher (or lower) order gradients did not work as it was supposed to. Rather than applying the balancing matrix to the data it applied the inverse of the balancing matrix to the data. This is wrong, and most likely results in the data becoming more 'noisy', rather than less noisy. It is not exactly clear since when this bug exists and it may be worthwhile to critically re- evaluate data which have been processed with ft_denoise_synthetic. We sincerely apologize for any inconvenience caused. Best wishes, Jan-Mathijs PS: Of course the correct version of the file will be available for download on the ftp-server as of tomorrow. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue Jul 13 09:48:15 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Jul 2010 09:48:15 +0200 Subject: Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG Message-ID: Dear FieldTrip users and other software developers, Let me draw your attention to the following. Please distribute this call for papers to anyone you think may be interested in submitting, and to relevant email discusison lists. best regards, Robert ---------- http://www.hindawi.com/journals/cin/si/ebm.html ---------- Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG Call for Papers The field of Magnetoencephalography (MEG) and Electroencephalography (EEG) source imaging is maturing rapidly. This scientific growth is accompanied by a variety of complementary and/or concurrent software solutions from the academic world. The objective of this CIN Special Issue is to help the neuroimaging obtain an overview of state-of-the-art academic software applications for MEG/EEG data analysis, how they differ and interact, and of upcoming methodological trends and technical developments; the topics to be covered include, but are not limited to, academic software solutions for: MEG and EEG data acquisition Data preprocessing, that is, filtering, artifact detection, rejection or correction, trial sorting, averaging Segmentation and geometrical modeling of head tissues Computational electromagnetics for MEG/EEG forward modeling MEG/EEG source analysis Statistical appraisal and inference: confidence intervals on measures and hypothesis testing Identification and evaluation of evoked, induced event-related brain responses and ongoing brain activity Time-frequency decompositions, advanced spectral analysis, time series modeling Estimation of functional and effective connectivity Authors should provide detailed information regarding their software toolbox or application by addressing the following topics: open source software (yes/no), i/o file formats available, operating system, Matlab required (yes/no), interoperability with other software, and so forth. Further, the software needs to be available for download free of charge at the time of manuscript submission, with sufficient documentation provided online to be able to reproduce the data analysis featured in the manuscript. Before submission authors should carefully read over the journal's Author Guidelines, which are located at http://www.hindawi.com/journals/cin/guidelines.html . Prospective authors should submit an electronic copy of their complete manuscript through the journal Manuscript Tracking System at http://mts.hindawi.com/ according to the following timetable: Manuscript Due September 1, 2010 First Round of Reviews December 1, 2010 Publication Date March 1, 2011 Lead Guest Editor Sylvain Baillet, Department of Neurology & Biophysics, Medical College of Wisconsin, WI, USA Guest Editors Karl Friston, Wellcome Trust Centre for Neuroimaging, London, UK Robert Oostenveld, Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Tue Jul 13 11:15:47 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Tue, 13 Jul 2010 11:15:47 +0200 Subject: time-frequency analysis base line correction Message-ID: Hello all, It's not a question in fieldtrip, yet I'll be happy if you can advise. I'm doing a motor experiment, which is based on responses (one after the other) and not on triggers. For that reason I can't use the usual definition of baseline per trial. I'll take the base line from a segment before the experiment began. Should I take the longest segment I can, as to get a more accurate base line activity, or should I take a segment equal to the trials duration? Many thanks, Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Geoff.Brookshire at MPI.NL Tue Jul 13 12:33:05 2010 From: Geoff.Brookshire at MPI.NL (Geoff Brookshire) Date: Tue, 13 Jul 2010 12:33:05 +0200 Subject: Saving preprocessed data in a raw MEG format Message-ID: Hello, I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. Any ideas anyone has on how to proceed would be greatly appreciated! Thanks, Geoff Brookshire ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Tue Jul 13 13:58:26 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Tue, 13 Jul 2010 13:58:26 +0200 Subject: clarification Message-ID: Hi again, I use the term "base line correction" in a wrong way. I meant to say that I need a reference period (comparable to "baseline type"-absolute/relative). And a few more details. My trials are of different durations, and I thought of calculating the mean of a few trials. Thank you. Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.stolk at FCDONDERS.RU.NL Tue Jul 13 14:04:23 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Tue, 13 Jul 2010 14:04:23 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3C40E1.1050202@mpi.nl> Message-ID: Hi Geoff, Have you tried beamforming with method "Linearly-Constrained Minimum Variance (LCMV)", the ERP equivalent of DICS/PCC in oscillatory sources, already? Link: http://fieldtrip.fcdonders.nl/example/lcmv-beamformer I'm not familiar with MNE, but does it also read other formats than .ds? Best, Arjen ----- Original Message ----- From: "Geoff Brookshire" To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, July 13, 2010 12:33:05 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Saving preprocessed data in a raw MEG format Hello, I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. Any ideas anyone has on how to proceed would be greatly appreciated! Thanks, Geoff Brookshire ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lhunt at FMRIB.OX.AC.UK Tue Jul 13 14:17:46 2010 From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt) Date: Tue, 13 Jul 2010 13:17:46 +0100 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3C40E1.1050202@mpi.nl> Message-ID: Hi Geoff - I've used both MNE and fieldtrip, but I think writing .fif files can be problematic - there isn't an easy way to do it as it requires a lot of headers etc. to be written, and (as far as I know) there's no matlab toolbox to do this at the moment (the best fiff matlab toolbox (primarily for reading, rather than writing, files) is the one bundled with MNE). The thing that might be best would be to compute a file that *looks like* the appropriate .fif file - e.g. a simple ERP, using mne_process_raw - and then *overwrite* the ERP with the stuff you have generated in matlab. The best people to advise you with this part might not be fieldtrip users, but the MNE community (e.g. Matti Hamalainen), mostly based at MGH. But there might be CTF users who could give you advice on writing .ds files - I use a Neuromag scanner myself so don't know anything about the CTF file format. Hope this helps. Laurence =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== On 13 Jul 2010, at 11:33, Geoff Brookshire wrote: > Hello, > > I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. > > I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. > > I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. > > Any ideas anyone has on how to proceed would be greatly appreciated! > > Thanks, > Geoff Brookshire > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.stolk at FCDONDERS.RU.NL Tue Jul 13 14:21:01 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Tue, 13 Jul 2010 14:21:01 +0200 Subject: clarification In-Reply-To: Message-ID: Hi Odelia, As far as I can help, I think it depends on your set-up + hypotheses. Do you have both/multiple conditions in one block? If not, reference periods might be different over blocks biasing your results. Check whether they're comparable. Do you expect major changes over time (e.g. fatigue, habituation)? If so, perhaps take another reference period after or from a pause in the experiment and average. Generally, the longer your reference period, the more robust the activity estimation. However, depending on your set-up, subjects might start doing other things.. Finally, if you don't trust your baseline/reference period, you could choose to look at the relative differences between conditions directly. Check out ft_freqcomparison although I think it does not support TFR data (yet). Best, Arjen ----- Original Message ----- From: "Odelia Goldberg" To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, July 13, 2010 1:58:26 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] clarification Hi again, I use the term "base line correction" in a wrong way. I meant to say that I need a reference period (comparable to "baseline type"-absolute/relative). And a few more details. My trials are of different durations, and I thought of calculating the mean of a few trials. Thank you. Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From marco.rotonda at GMAIL.COM Tue Jul 13 15:54:36 2010 From: marco.rotonda at GMAIL.COM (Marco Rotonda) Date: Tue, 13 Jul 2010 15:54:36 +0200 Subject: cohrefchannel Message-ID: Hi Jan... just to be sure. I'm able to plot something with these commands: cfg = []; cfg.xparam = 'time'; cfg.yparam = 'freq'; cfg.zparam = 'plvspctrm'; % cfg.cohrefchannel = 'Cz'; cfg.layout = 'neuroscan.lay'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; cfg.interactive = 'yes'; figure; ft_multiplotTFR(cfg, plvs001fnb1) as you may see I've commented the cfg.cohrefchannel and I've used cfg.interactive. In this case the plot I have what is it? I have all those combinations. If I select two sites (es: Fz and F3) when it plot there is written mean of the two sites. If I select more sites it's always the mean for those sites. How could I plot the line of combination I need? Regards Marco ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maximilien.chaumon at GMAIL.COM Tue Jul 13 21:28:59 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Tue, 13 Jul 2010 15:28:59 -0400 Subject: Aligning head across runs Message-ID: Hello fieldtripers, I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. I have several runs and want to concatenate my data. I understand that I can do ft_appenddata, but that I then loose the sensor positions of the second and subsequent runs. Is there a way to align the head position across runs? Does it make sense to interpolate the data between sensors to align all to the same position? Thanks, Max ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jedmeltzer at YAHOO.COM Wed Jul 14 03:53:12 2010 From: jedmeltzer at YAHOO.COM (Jed Meltzer) Date: Tue, 13 Jul 2010 18:53:12 -0700 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: Message-ID: Dear Geoff, I haven't tried to do exactly what you're describing, but I have worked a lot with CTF data and can share some thoughts on how I would go about it if I wanted to try it. The .ds data format is quite complex, but there is one thing that works to your favor. The .ds is a directory, not a single file, and the raw data is one particular file that consists pretty much entirely of numbers (the one called .meg4) There are other files that contain the header information necessary to know how to break up those raw numbers into channels, trials, etc. So one promising avenue would be to entirely copy the whole directory, but try to modify the raw data while leaving everything else the same. So if your preprocessing is things that leave the trial structure exactly the same (e.g. filtering, 3-rd order gradient balancing, even ICA component subtraction), then you could just overwrite the values in the raw data and keep all the old remaining files to have a valid and accurate .ds dataset. I would try doing this with a very simple operation on the data at first, such as multiplying it by 2. On the other hand, if your preprocessing includes rejecting trials, truncating them, etc., then you would have a lot more to worry about. Please post to the list again and let us know if you find a way to do it! -Jed Meltzer meltzerj AT nidcd.nih.gov ________________________________ From: FIELDTRIP automatic digest system To: FIELDTRIP at NIC.SURFNET.NL Sent: Tue, July 13, 2010 6:00:14 PM Subject: FIELDTRIP Digest - 8 Jul 2010 to 13 Jul 2010 (#2010-128) Note: Forwarded message is attached. FIELDTRIP Digest - 8 Jul 2010 to 13 Jul 2010 (#2010-128) Table of contents: * Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG * time-frequency analysis base line correction * Saving preprocessed data in a raw MEG format (3) * clarification (2) * cohrefchannel * Aligning head across runs 1. Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG * Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG (07/13) From: Robert Oostenveld 2. time-frequency analysis base line correction * time-frequency analysis base line correction (07/13) From: Odelia Goldberg 3. Saving preprocessed data in a raw MEG format * Saving preprocessed data in a raw MEG format (07/13) From: Geoff Brookshire * Re: Saving preprocessed data in a raw MEG format (07/13) From: "a.stolk at fcdonders.ru.nl" * Re: Saving preprocessed data in a raw MEG format (07/13) From: Laurence Hunt 4. clarification * clarification (07/13) From: Odelia Goldberg * Re: clarification (07/13) From: "a.stolk at fcdonders.ru.nl" 5. cohrefchannel * Re: cohrefchannel (07/13) From: Marco Rotonda 6. Aligning head across runs * Aligning head across runs (07/13) From: Maximilien Chaumon Browse the FIELDTRIP online archives. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Wed Jul 14 08:15:03 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 14 Jul 2010 08:15:03 +0200 Subject: Creating BEM Model with Dipoli Message-ID: Dear all, for my diploma thesis I'm trying to create an extended BEM model with dipoli. I'm trying to model the ventricular system too which requires another than the innermost compartment to be source compartment and I wanted to know, if anybody could say if this is possible with the dipoli executable or if this is - in this way - an useless effort. Thanks in advance, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Wed Jul 14 08:49:24 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Wed, 14 Jul 2010 08:49:24 +0200 Subject: clarification Message-ID: Hello again, Your answer helps a lot! Thank you, Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:13:22 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:13:22 +0200 Subject: Aligning head across runs In-Reply-To: Message-ID: Hi Max, You may want to have a look at the function ft_megrealign. Alternatively, you could construct a gradiometer structure which contains a meaningful average of the coil positions and orientations. Cheers, Jan-Mathijs On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > Hello fieldtripers, > > I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 > which poses the same problem that I'm going to raise now. > > I have several runs and want to concatenate my data. I understand > that I can do ft_appenddata, but that I then loose the sensor > positions of the second and subsequent runs. > Is there a way to align the head position across runs? Does it make > sense to interpolate the data between sensors to align all to the > same position? > > Thanks, > Max > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:21:06 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:21:06 +0200 Subject: Saving preprocessed data in a raw MEG format Message-ID: Dear Geoff, You may want to have a look at: http://fieldtrip.fcdonders.nl/example/writing_simulated_data_to_a_ctf_dataset This seems to be quite old, so I don't know whether it's still up to date. The tricky part probably is to create and write a header .res4-file which correctly describes the data. There are two functions which may be of interest here as well: fieldtrip/external/ctf/writeCTFds.m and fieldtrip/external/ctf/ writeRes4.m Best, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From julian.keil at GMAIL.COM Wed Jul 14 09:45:28 2010 From: julian.keil at GMAIL.COM (Julian Keil) Date: Wed, 14 Jul 2010 09:45:28 +0200 Subject: neighbourdist for megplanar Message-ID: Hi everyone, I was wondering what is a sensible neighbour distance for computing the megplanar from 4D148 data. The default is set to "4", but this this leads to on average 149 neighbours per channel, which does not look right to me. Changing the distance to 0.1 reduces the number of neighbours to 5.5, yet I'm still unsure if this is the best/correct way. Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Wed Jul 14 09:49:19 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 14 Jul 2010 09:49:19 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <22004559.3893751279022663428.JavaMail.root@watertor.uci.ru.nl> Message-ID: hi, > I'm using MNE software to perform the localization, since Fieldtrip is > only able to do this on time-frequency data now. The thing is that I've I do not think that this is correct. you may want to look at Figure 2E in: Grützner et al. (2010). Neuromagnetic correlates of perceptual closure processes. J Neurosci at least the authors state that they used fieldtrip, so i assume they used minumumnormestimate.m. it might be correct that this function is not so intensively developed, as not so many fieldtrippers seem to use it. but before going through all the pain of exporting your data, you may want to quickly check if your results make sense using the FT-version (e.g. sanity checks on some ERP where you know where the main generators should be). in case you are not satisfied with the FT-minimumnorm, an alternative to MNE would be to use brainstorm. i think they use mat-files, so it should be fairly easy to mimick to output of some brainstorm processing stage and continue with source analysis. haven't tried it myself but i have a colleague who does this quite successfully. yet another alternative would be to use nutmeg. it should contain a sLORETA option and a function to directly read FT-preproc-structures. at least the developer wrote such a function to read some of my FT-structures into nutmeg. so if it is not contained in the release you might ask to become a beta-tester :-) good luck, n -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:50:32 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:50:32 +0200 Subject: neighbourdist for megplanar In-Reply-To: <607509F8-B542-4671-A702-1579A3A410A9@gmail.com> Message-ID: Dear Julian, The unit of neighbourdist is according to the units in the gradiometer array. The BTI convention is meters, so I think some value in the order of 0.04 to 0.1 should be OK. (For the 248 channel 4D system I always use a value of 0.037). Typically, I think it is optimal to have just one rim of sensors (so don't take the value too big). Cheers, JM On Jul 14, 2010, at 9:45 AM, Julian Keil wrote: > Hi everyone, > > I was wondering what is a sensible neighbour distance for computing > the megplanar from 4D148 data. > The default is set to "4", but this this leads to on average 149 > neighbours per channel, which does not look right to me. > Changing the distance to 0.1 reduces the number of neighbours to > 5.5, yet I'm still unsure if this is the best/correct way. > > Thanks a lot > > Julian > > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: julian.keil at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Geoff.Brookshire at MPI.NL Wed Jul 14 10:39:14 2010 From: Geoff.Brookshire at MPI.NL (Geoff Brookshire) Date: Wed, 14 Jul 2010 10:39:14 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: Message-ID: Hi, Thanks to everyone for a lot of helpful advice! I'm going to go through and try a lot of this, and I'll report back to the list when I have something that works. I'll briefly address a couple of suggestions. Unfortunately, we've done some pretty heavy-duty preprocessing: rejecting lots of artifacts, truncating trials, looking at stimulus-response combinations, and correcting some errors in the parallel port output channel. I'm afraid I'll be chained to the complicated solutions, then. Second, and in regards to using the source localization algorithms that Freesurfer already has -- I'm a novice in this area, so I'm taking the conclusions of O. Jensen and C. Hesse [Estimating distributed representations of evoked responses and oscillatory brain activity. In MEG An Introduction to Methods" (edited by Salmelin, Kringleback and Hansen). Oxford University Press]. They advise against using beamforming for ERFs: > A further practical requirement [for beamforming] is that the estimate of the data cross-covariance matrix is accurate and that > the cross-covariance matrix is invertible. These are the problems often encountered when applying > beamformingfor source analysis of ERFs. The cross-covariance matrix can become rank-deficient (and > hence invertible) in two circumstances: if the epoch of interest contains fewer time samples than sensors, or > (at least theoretically) if the time-locked averaged MEG signal reflects the activity of only a very small > number of neuronal sources, and any background activity and noise effectively disappears by averaging an > extremely large number of trials. In practice, rank-deficient cross-covariance matrices can be made > invertible by regularization, which effectively involves injecting additional noise into the signal, and this, in > turn, tends to spatially smear the neuronal activity. For this reason, beamforming is not widely used in > MEG/EEG source analysis of evoked activity. Updates to follow! -geoff Nathan Weisz wrote: > hi, > >> I'm using MNE software to perform the localization, since Fieldtrip is >> only able to do this on time-frequency data now. The thing is that I've > > I do not think that this is correct. you may want to look at Figure 2E in: > Grützner et al. (2010). Neuromagnetic correlates of perceptual closure > processes. J Neurosci > > at least the authors state that they used fieldtrip, so i assume they > used minumumnormestimate.m. > > it might be correct that this function is not so intensively developed, > as not so many fieldtrippers seem to use it. > > but before going through all the pain of exporting your data, you may > want to quickly check if your results make sense using the FT-version > (e.g. sanity checks on some ERP where you know where the main generators > should be). > > in case you are not satisfied with the FT-minimumnorm, an alternative to > MNE would be to use brainstorm. i think they use mat-files, so it should > be fairly easy to mimick to output of some brainstorm processing stage > and continue with source analysis. haven't tried it myself but i have a > colleague who does this quite successfully. > > yet another alternative would be to use nutmeg. it should contain a > sLORETA option and a function to directly read FT-preproc-structures. at > least the developer wrote such a function to read some of my > FT-structures into nutmeg. so if it is not contained in the release you > might ask to become a beta-tester :-) > > good luck, > n > > > > > *--------------------------------------------* > Dr. Nathan Weisz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > Email: nathan.weisz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > "Nothing shocks me. I'm a scientist." (Indiana Jones) > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas for > MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Wed Jul 14 12:09:09 2010 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Wed, 14 Jul 2010 11:09:09 +0100 Subject: neighbourdist for megplanar In-Reply-To: <607509F8-B542-4671-A702-1579A3A410A9@gmail.com> Message-ID: Hey Julian, the function FT_NEIGHBOURSELECTION will output a structure of sensor neighbours. The best is to fine tune the threshold distance by checking the output against your sensor map. Best, Guillaume On 14 Jul 2010, at 08:45, Julian Keil wrote: > Hi everyone, > > I was wondering what is a sensible neighbour distance for computing > the megplanar from 4D148 data. > The default is set to "4", but this this leads to on average 149 > neighbours per channel, which does not look right to me. > Changing the distance to 0.1 reduces the number of neighbours to > 5.5, yet I'm still unsure if this is the best/correct way. > > Thanks a lot > > Julian > > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: julian.keil at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ************************************************************************************ Guillaume A. Rousselet, Ph.D., lecturer School of Psychology Institute of Neuroscience & Psychology Centre for Cognitive Neuroimaging (CCNi) The University of Glasgow, charity number SC004401 http://www.psy.gla.ac.uk/staff/index.php?id=GAR01 Email: g.rousselet at psy.gla.ac.uk Fax. +44 (0)141 330 4606 Tel. +44 (0)141 330 6652 Cell +44 (0)791 779 7833 "Corporations have only one duty: to promote their own and their owners' interests. They have no capacity, and their executives no authority, to act out of a genuine sense of responsibility to society, to avoid causing harm to people and the environment, or to work to advance the public good in ways that are unrelated to their own self- interest. Deregulation thus rests upon the suspect premise that corporations will respect social and environmental interests without being compelled by government to do so. No one would seriously suggest that individuals should regulate themselves, that laws against murder, assault, and theft are unnecessary because people are socially responsible. Yet oddly, we are asked to believe that corporate persons - institutional psychopaths who lack any sense of moral conviction and who have the power and motivation to cause harm and devastation in the world - should be left free to govern themselves." Joel Bakan - The Corporation - 2004 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Wed Jul 14 12:05:16 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 14 Jul 2010 11:05:16 +0100 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3D77B2.3010701@mpi.nl> Message-ID: Dear all, Since this thread is turning to be about promoting other software packages, I'd just like to mention that SPM8 has imaging source reconstruction for evoked fields that depending on the settings can behave similarly to minimum norm or to LORETA or to a more focal methods called MSP. Since SPM8 and Fieldtrip are very tightly integrated (see http://fieldtrip.fcdonders.nl/integrating_with_spm8), your Fieldtrip data can be converted to SPM8 format quite easily. In SPM8 you can also do statistics on resulting images. Best, Vladimir On Wed, Jul 14, 2010 at 9:39 AM, Geoff Brookshire wrote: > Hi, > > Thanks to everyone for a lot of helpful advice!  I'm going to go through and > try a lot of this, and I'll report back to the list when I have something > that works. > > I'll briefly address a couple of suggestions. > Unfortunately, we've done some pretty heavy-duty preprocessing: rejecting > lots of artifacts, truncating trials, looking at stimulus-response > combinations, and correcting some errors in the parallel port output > channel.  I'm afraid I'll be chained to the complicated solutions, then. > > Second, and in regards to using the source localization algorithms that > Freesurfer already has -- I'm a novice in this area, so I'm taking the > conclusions of O. Jensen and C. Hesse [Estimating distributed > representations of evoked responses and oscillatory brain activity. In MEG > An Introduction to Methods" (edited by Salmelin, Kringleback and Hansen). > Oxford University Press].  They advise against using beamforming for ERFs: >> >> A further practical requirement [for beamforming] is that the estimate of >> the data cross-covariance matrix is accurate and that >> the cross-covariance matrix is invertible. These are the problems often >> encountered when applying >> beamformingfor source analysis of ERFs. The cross-covariance matrix can >> become rank-deficient (and >> hence invertible) in two circumstances: if the epoch of interest contains >> fewer time samples than sensors, or >> (at least theoretically) if the time-locked averaged MEG signal reflects >> the activity of only a very small >> number of neuronal sources, and any background activity and noise >> effectively disappears by averaging an >> extremely large number of trials. In practice, rank-deficient >> cross-covariance matrices can be made >> invertible by regularization, which effectively involves injecting >> additional noise into the signal, and this, in >> turn, tends to spatially smear the neuronal activity. For this reason, >> beamforming is not widely used in >> MEG/EEG source analysis of evoked activity. > > Updates to follow! > > -geoff > > > Nathan Weisz wrote: >> >> hi, >> >>> I'm using MNE software to perform the localization, since Fieldtrip is >>> only able to do this on time-frequency data now.  The thing is that I've >> >> I do not think that this is correct. you may want to look at Figure 2E in: >> Grützner et al. (2010). Neuromagnetic correlates of perceptual closure >> processes. J Neurosci >> >> at least the authors state that they used fieldtrip, so i assume they used >> minumumnormestimate.m. >> >> it might be correct that this function is not so intensively developed, as >> not so many fieldtrippers seem to use it. >> >> but before going through all the pain of exporting your data, you may want >> to quickly check if your results make sense using the FT-version (e.g. >> sanity checks on some ERP where you know where the main generators should >> be). >> >> in case you are not satisfied with the FT-minimumnorm, an alternative to >> MNE would be to use brainstorm. i think they use mat-files, so it should be >> fairly easy to mimick to output of some brainstorm processing stage and >> continue with source analysis. haven't tried it myself but i have a >> colleague who does this quite successfully. >> >> yet another alternative would be to use nutmeg. it should contain a >> sLORETA option and a function to directly read FT-preproc-structures. at >> least the developer wrote such a function to read some of my FT-structures >> into nutmeg. so if it is not contained in the release you might ask to >> become a beta-tester :-) >> >> good luck, >> n >> >> >> >> *--------------------------------------------* >> Dr. Nathan Weisz >> >> OBOB-Lab >> University of Konstanz >> Department of Psychology >> P.O. Box D23 >> 78457 Konstanz >> Germany >> >> Tel: ++49 - (0)7531 - 88 45 84 >> Email: nathan.weisz at uni-konstanz.de >> Homepage: http://www.uni-konstanz.de/obob >> >> "Nothing shocks me. I'm a scientist." (Indiana Jones) >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bornalikundu at GMAIL.COM Wed Jul 14 16:42:55 2010 From: bornalikundu at GMAIL.COM (Bornali Kundu) Date: Wed, 14 Jul 2010 09:42:55 -0500 Subject: cluster-based analysis question Message-ID: Hello All, This is more of a statistical methods question. I'm interested in doing test-retest evaluation in a data set and, most specifically, formally assessing my intuition that there are stable individual differences in the ERSP associated with performing a certain task, such that the overall "pattern" of one subject's ERSP is highly replicable, and thus reliably different from the ERSPs of other subjects. Is the fieldtrip cluster-based permutation test a suitable procedure for implementing this test? Has anyone done this type of analysis already? Any advice would be appreciated. Thanks so much, Bornali -- Medical Scientist Training Program Neuroscience Training Program University of Wisconsin - Madison Health Emotions Research Institute bkundu at wisc.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor.volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE Thu Jul 15 10:38:15 2010 From: gregor.volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE (Gregor Volberg) Date: Thu, 15 Jul 2010 10:38:15 +0200 Subject: cohrefchannel Message-ID: Hi Marco, to be able to specify a reference channel, it seems to be necessary to have a field named xy.cohspctrm. You might simply copy the plvspctrm into a new field, plv_data.cohsprctm = plv_data.plcspctrm and then multiplot with the option cfg.cohrefchannel = 'Cz'; The plots should then look different for different reference channels. Hope this helps?, Gregor On Tue, 13 Jul 2010 15:54:36 +0200, Marco Rotonda wrote: >Hi Jan... >just to be sure. >I'm able to plot something with these commands: >cfg = []; >cfg.xparam = 'time'; >cfg.yparam = 'freq'; >cfg.zparam = 'plvspctrm'; >% cfg.cohrefchannel = 'Cz'; >cfg.layout = 'neuroscan.lay'; >cfg.showlabels = 'yes'; >cfg.colorbar = 'yes'; >cfg.interactive = 'yes'; >figure; ft_multiplotTFR(cfg, plvs001fnb1) > >as you may see I've commented the cfg.cohrefchannel and I've used >cfg.interactive. >In this case the plot I have what is it? >I have all those combinations. >If I select two sites (es: Fz and F3) when it plot there is written mean of the >two sites. If I select more sites it's always the mean for those sites. >How could I plot the line of combination I need? > >Regards > >Marco > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Thu Jul 15 17:20:20 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 15 Jul 2010 17:20:20 +0200 Subject: Fwd: Fieldtrip - MNE followup Message-ID: Dear Geoff, > - When looking through the ft_write_data file, I don't have 'cft_ds' > as an > option to the dataformat parameter. is this an older option which was > lost? You're absolutely right. The option to write ctf-data is not included anymore in ft_write_data. We should update the documentation accordingly. I just browsed the fieldtrip-wiki and found this link, without properly checking whether it was still up to date. Sorry about that. > - The documentation is a little unclear about what sort of data is > to be > used as input to the function. I've tried using the output of > timelockanalysis, as well as the 'avg' field of the same structure. > For > the former, I get an error that the function is not defined "for input > arguments of type 'struct'", and for the latter that it's not > defined "for > input arguments of type 'char'". I think the latter is getting > confused > about the filename input, then. When I give it a header object > taken from > the original input .ds file with ft_read_header and modified to fit > the > changes in analysis, I again get the 'struct' error. I've been > playing > around with all the options and looking into the script, but I can't > get > anything to work. Do you happen to have a working script handy? No, I don't have a script lying on the shelf, because I don't generally go back to a raw file format after having processed my data in fieldtrip. Since the use of ft_write_data does not seem to support what you want to do anyway, I will not look in detail at the function, but I guess it needs a filename (as a string), a data matrix (as a matrix), and some additional inputs, such as requested fileformat etc. > Also, I noticed your email from a few days back, called "warning for > ctf-users". If I only performed the normal analyses (i.e. > timelockanalysis, megplanar, combineplanar, timelockbaseline, > timelockgrandaverage), do you think I should worry about redoing the > analysis with the new scripts? I think I'm safe, but thought it > might be > a good idea to check with an expert! With respect to my warning issued earlier: you are safe. As long as you did not explicitly use the function ft_denoise_synthetic yourself, there's no reason to worry. Yet, I have another warning for you: given your analysis steps it is not possible to write the data back to CTF-dataformat in a consistent way, since you transformed the data to planar gradient representation (which results in (and requires) a totally different description of the sensor array; so if you plan to use a different package for you minimum norm estimate there will be for sure a mismatch between the channel data and the leadfields), and you have used combineplanar. The latter is a nonlinear operation on your data, which is definitely not allowed if you would like to compute leadfields using the sensor information as it is represented in the original .res4 header file. As a side remark I quickly looked into writeCTFds, and it seems in theory possible to use this function to write the processed data to a CTF-dataset (as long as one stays in the original axial gradient representation). Yet, I wonder whether it will be worth the time investment to get it smoothly implemented (because it is not totally non-trivial). I'd rather opt for looking into the various other suggestions issued in this thread (by Nathan and Vladimir for example), and invest some time there, or just give fieldtrip's minimumnormestimate a try. Keep always in mind that the planar transformation as such requires a change in the description of the sensor array (which is done by fieldtrip), and that combining planar gradient data before going to source space is not good. Cheers, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maximilien.chaumon at GMAIL.COM Thu Jul 15 23:41:44 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Thu, 15 Jul 2010 17:41:44 -0400 Subject: Aligning head across runs In-Reply-To: <4A86E680-55CE-4AF8-B908-5F4FCA144B05@donders.ru.nl> Message-ID: Thank you, The layout of our neuromag306 is not supported in ft_megrealign. What sensors should I write for constructing the average location of the MEG sensors? (line 190 and below) I have triplets of sensors that match this layout. http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png Figured out these guys might work, but that's just a guess. I've done no calculation or anything... labC = 'MEG 2111'; labF = 'MEG 1011'; labL = 'MEG 0141'; labR = 'MEG 1431'; thanks, Max 2010/7/14 jan-mathijs schoffelen > Hi Max, > > You may want to have a look at the function ft_megrealign. Alternatively, > you could construct a gradiometer structure which contains a meaningful > average of the coil positions and orientations. > > Cheers, > > Jan-Mathijs > > On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > > Hello fieldtripers, > > I've read this topic > https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. > > I have several runs and want to concatenate my data. I understand that I > can do ft_appenddata, but that I then loose the sensor positions of the > second and subsequent runs. > Is there a way to align the head position across runs? Does it make sense > to interpolate the data between sensors to align all to the same position? > > Thanks, > Max > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 09:05:39 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 09:05:39 +0200 Subject: Aligning head across runs In-Reply-To: Message-ID: Dear Max, I don't think there is a conceptual objection against building in support for the NM306 system, although it may be less trivial to do a combined simultaneous realignment of planar gradiometers and magnetometers. The choice of the 4 sensors used to compute the transformation matrix between the 'old' and 'new' sensor positions seems reasonable to me. On a side note, doesn't the maxfilter provide you with the possibility to correct for differences in head position? Cheers, Jan-Mathijs On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: > Thank you, > The layout of our neuromag306 is not supported in ft_megrealign. > What sensors should I write for constructing the average location of > the MEG sensors? > (line 190 and below) > I have triplets of sensors that match this layout. > http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png > > Figured out these guys might work, but that's just a guess. I've > done no calculation or anything... > > labC = 'MEG 2111'; > labF = 'MEG 1011'; > labL = 'MEG 0141'; > labR = 'MEG 1431'; > > > thanks, > Max > > > 2010/7/14 jan-mathijs schoffelen > Hi Max, > > You may want to have a look at the function ft_megrealign. > Alternatively, you could construct a gradiometer structure which > contains a meaningful average of the coil positions and orientations. > > Cheers, > > Jan-Mathijs > > On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > >> Hello fieldtripers, >> >> I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 >> which poses the same problem that I'm going to raise now. >> >> I have several runs and want to concatenate my data. I understand >> that I can do ft_appenddata, but that I then loose the sensor >> positions of the second and subsequent runs. >> Is there a way to align the head position across runs? Does it make >> sense to interpolate the data between sensors to align all to the >> same position? >> >> Thanks, >> Max >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maximilien.chaumon at GMAIL.COM Fri Jul 16 14:32:48 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Fri, 16 Jul 2010 08:32:48 -0400 Subject: Aligning head across runs In-Reply-To: <679D3E3D-D068-480A-92DC-521357000160@donders.ru.nl> Message-ID: What is the maxfilter? 2010/7/16 jan-mathijs schoffelen > Dear Max, > > I don't think there is a conceptual objection against building in support > for the NM306 system, although it may be less trivial to do a combined > simultaneous realignment of planar gradiometers and magnetometers. The > choice of the 4 sensors used to compute the transformation matrix between > the 'old' and 'new' sensor positions seems reasonable to me. > On a side note, doesn't the maxfilter provide you with the possibility to > correct for differences in head position? > > Cheers, > > Jan-Mathijs > > On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: > > Thank you, > The layout of our neuromag306 is not supported in ft_megrealign. > What sensors should I write for constructing the average location of the > MEG sensors? > (line 190 and below) > I have triplets of sensors that match this layout. > http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png > > Figured out these guys might work, but that's just a guess. I've done no > calculation or anything... > > labC = 'MEG 2111'; > labF = 'MEG 1011'; > labL = 'MEG 0141'; > labR = 'MEG 1431'; > > > thanks, > Max > > > 2010/7/14 jan-mathijs schoffelen > >> Hi Max, >> >> You may want to have a look at the function ft_megrealign. Alternatively, >> you could construct a gradiometer structure which contains a meaningful >> average of the coil positions and orientations. >> >> Cheers, >> >> Jan-Mathijs >> >> On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: >> >> Hello fieldtripers, >> >> I've read this topic >> https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. >> >> I have several runs and want to concatenate my data. I understand that I >> can do ft_appenddata, but that I then loose the sensor positions of the >> second and subsequent runs. >> Is there a way to align the head position across runs? Does it make sense >> to interpolate the data between sensors to align all to the same position? >> >> Thanks, >> Max >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> >> >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Fri Jul 16 14:47:42 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 16 Jul 2010 13:47:42 +0100 Subject: Aligning head across runs In-Reply-To: Message-ID: maxfilter is part of Neuromag software. See for instance http://imaging.mrc-cbu.cam.ac.uk/meg/Maxfilter http://www.megwiki.org/index.php?title=Using_MaxFilter It is definitely a better choice for Neuromag users. Vladimir On Fri, Jul 16, 2010 at 1:32 PM, Maximilien Chaumon wrote: > What is the maxfilter? > > > 2010/7/16 jan-mathijs schoffelen >> >> Dear Max, >> I don't think there is a conceptual objection against building in support >> for the NM306 system, although it may be less trivial to do a combined >> simultaneous realignment of planar gradiometers and magnetometers. The >> choice of the 4 sensors used to compute the transformation matrix between >> the 'old' and 'new' sensor positions seems reasonable to me. >> On a side note, doesn't the maxfilter provide you with the possibility to >> correct for differences in head position? >> Cheers, >> Jan-Mathijs >> On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: >> >> Thank you, >> The layout of our neuromag306 is not supported in ft_megrealign. >> What sensors should I write for constructing the average location of the >> MEG sensors? >> (line 190 and below) >> I have triplets of sensors that match this layout. >> http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png >> >> Figured out these guys might work, but that's just a guess. I've done no >> calculation or anything... >> >>     labC = 'MEG 2111'; >>     labF = 'MEG 1011'; >>     labL = 'MEG 0141'; >>     labR = 'MEG 1431'; >> >> >> thanks, >> Max >> >> >> 2010/7/14 jan-mathijs schoffelen >>> >>> Hi Max, >>> You may want to have a look at the function ft_megrealign. Alternatively, >>> you could construct a gradiometer structure which contains a meaningful >>> average of the coil positions and orientations. >>> Cheers, >>> Jan-Mathijs >>> On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: >>> >>> Hello fieldtripers, >>> >>> I've read this topic >>> https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 >>> which poses the same problem that I'm going to raise now. >>> >>> I have several runs and want to concatenate my data. I understand that I >>> can do ft_appenddata, but that I then loose the sensor positions of the >>> second and subsequent runs. >>> Is there a way to align the head position across runs? Does it make sense >>> to interpolate the data between sensors to align all to the same position? >>> >>> Thanks, >>> Max >>> >>> ---------------------------------- >>> >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >>> EEG analysis. >>> >>> http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> >>> Dr. J.M. (Jan-Mathijs) Schoffelen >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> J.Schoffelen at donders.ru.nl >>> Telephone: 0031-24-3668063 >>> >>> ---------------------------------- >>> >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >>> EEG analysis. >>> >>> http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>> http://www.ru.nl/fcdonders/fieldtrip/ >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 16:13:16 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 16:13:16 +0200 Subject: [FIELDTRIP-DEV] a problem with ft_prepare_singleshell In-Reply-To: <73d8a6b191056c5d5cc492c715167e5d.squirrel@squirrel.science.ru.nl> Message-ID: Dear Ali, A bit more information may be useful here ;o)... There was a bug fix involving this function recently, so you may want to upgrade to the most recent version of fieldtrip and try again... This could already solve it. Best, Jan-Mathijs On Jul 16, 2010, at 3:29 PM, Ali Bahramisharif wrote: > Dear guys, > > I use the following code, which was working two months ago, but is not > working now and produces the following error: > > cfg=[]; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > ??? Error using ==> ft_prepare_mesh at 153 > unsupported cfg.method and/or input > > Error in ==> ft_prepare_singleshell at 86 > vol.bnd = ft_prepare_mesh(cfg, mri); > > Any suggestion on how to solve it? > > Best regards, > Ali > > -- > Address: > HG02.517 > Intelligent Systems > Radboud University Nijmegen > Heyendaalseweg 135 > 6525 AJ Nijmegen > The Netherlands > > http://www.cs.ru.nl/~ali > Tel.: +31 (0)24 36 52634 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 17:04:23 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 17:04:23 +0200 Subject: [FIELDTRIP-DEV] a problem with ft_prepare_singleshell In-Reply-To: Message-ID: Dear Ali, You may want to set a 'dbstop if error' to see what is missing in the variables causing the error. My hunch is that the function does not manage to accurately detect that you want to create your mesh on the segmented mri. (hint: look for the variable basedonseg and see what is required to put that to a value of 1)... JM On Jul 16, 2010, at 4:20 PM, Ali Bahramisharif wrote: > Dear Jan-Mathijs > > Thanks for your reply. I am at revision 1420, which I think is the > latest. > This is the whole code that I use: > > mri = ft_read_mri('/berends_s/berends_s.mri'); > cfg = []; > cfg.write = 'no'; > cfg.coordinates = 'ctf'; > cfg.template = '/spm8/templates/T1.nii'; > [segmentedmri] = ft_volumesegment(cfg, mri); > > segmentedmriF = segmentedmri; > segmentedmriF.gray = flipdim(flipdim(flipdim(segmentedmriF.gray,3), > 2),1); > segmentedmriF.white = flipdim(flipdim(flipdim(segmentedmriF.white,3), > 2),1); > segmentedmriF.csf = flipdim(flipdim(flipdim(segmentedmriF.csf,3), > 2),1); > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmriF); > > What other information do you need? > > Best regards, > Ali > >> Dear Ali, >> >> A bit more information may be useful here ;o)... >> There was a bug fix involving this function recently, so you may want >> to upgrade to the most recent version of fieldtrip and try again... >> This could already solve it. >> >> Best, >> Jan-Mathijs >> >> On Jul 16, 2010, at 3:29 PM, Ali Bahramisharif wrote: >> >>> Dear guys, >>> >>> I use the following code, which was working two months ago, but is >>> not >>> working now and produces the following error: >>> >>> cfg=[]; >>> vol = ft_prepare_singleshell(cfg, segmentedmri); >>> >>> ??? Error using ==> ft_prepare_mesh at 153 >>> unsupported cfg.method and/or input >>> >>> Error in ==> ft_prepare_singleshell at 86 >>> vol.bnd = ft_prepare_mesh(cfg, mri); >>> >>> Any suggestion on how to solve it? >>> >>> Best regards, >>> Ali >>> >>> -- >>> Address: >>> HG02.517 >>> Intelligent Systems >>> Radboud University Nijmegen >>> Heyendaalseweg 135 >>> 6525 AJ Nijmegen >>> The Netherlands >>> >>> http://www.cs.ru.nl/~ali >>> Tel.: +31 (0)24 36 52634 >>> >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> > > > -- > Address: > HG02.517 > Intelligent Systems > Radboud University Nijmegen > Heyendaalseweg 135 > 6525 AJ Nijmegen > The Netherlands > > http://www.cs.ru.nl/~ali > Tel.: +31 (0)24 36 52634 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From matthew at PSYCH.COLUMBIA.EDU Sat Jul 17 20:55:14 2010 From: matthew at PSYCH.COLUMBIA.EDU (Matthew Davidson) Date: Sat, 17 Jul 2010 14:55:14 -0400 Subject: Possible bug with maskparameter and TFR? Message-ID: Hi, everyone. I'm trying to mask TFR plots in ft_multiplotTFR.m. ft_clusterplot seems inappropriate, because this is for intracranial data and a topoplot isn't a good way to display that. I couldn't find any good examples of using .maskparameter, so I did what I thought was correct: I loaded up the stat and the freq variables, and set: freq.mask = stat.mask; cfg.maskparameter = 'mask'; However, when ft_multiplotTFR gets to reading out the .mask field, it's gone! It seems that because my dimord is 'rpt_chan_freq_time', ft_multiplotTFR calls: data = ft_freqdescriptives(tmpcfg, data), which only returns certain fields, and effectively strips out my .mask field! Am I doing this wrong? if so, what's the correct method? If not, I'll be happy to submit a fix. What's the preferred way to fix it? In ft_multiplotTFR, I could store the maskparameter before the call to freqdescriptives, and readd it afterwards. Alternatively, I could just change the initialization line in ft_freqdescriptives where it sets output = []; to output = freq;. Then, the subsequent lines altering output would still behave as planned, but any extra fields added to freq would not be removed. Matthew ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Sun Jul 18 00:26:34 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 17 Jul 2010 17:26:34 -0500 Subject: Help with dipole fitting Message-ID: Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Mon Jul 19 04:46:52 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sun, 18 Jul 2010 21:46:52 -0500 Subject: FW: [FIELDTRIP] Help with dipole fitting In-Reply-To: Message-ID: Date: Sat, 17 Jul 2010 17:26:34 -0500 From: lumatobu2 at HOTMAIL.COM Subject: [FIELDTRIP] Help with dipole fitting To: FIELDTRIP at NIC.SURFNET.NL Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! Explore the seven wonders of the world Learn more! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Mon Jul 19 04:47:31 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sun, 18 Jul 2010 21:47:31 -0500 Subject: PLEASE HELP !!!!! In-Reply-To: Message-ID: Date: Sat, 17 Jul 2010 17:26:34 -0500 From: lumatobu2 at HOTMAIL.COM Subject: [FIELDTRIP] Help with dipole fitting To: FIELDTRIP at NIC.SURFNET.NL Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! Explore the seven wonders of the world Learn more! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Mon Jul 19 07:59:25 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Mon, 19 Jul 2010 07:59:25 +0200 Subject: Help with dipole fitting In-Reply-To: Message-ID: Hi Ludwing, On 18.07.2010 00:26, Ludwing Torres wrote: > I dont understand why they take the dipole moments like this: > > cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] > 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components > 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components > ]'; % note, it should be transposed > > ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : > I think it depends on how many different Signal-courses you are trying to simulate. If you're trying to simulate two dipoles with the same (sinusoid) time course but with perpendicular moments, it should look something like this cfg.dip.signal = sin(10*time*2*pi); cfg.dip.mom = [ 1 0 0 0 1 0 ]'; In the example every line of the vector stands for the contribution of one signal. Every three rows stand for the direction of the moment of one dipole. Anyone correct me if I'm wrong. > cfg.dip.mom = [ > 1 0 0 0 0 0 0 0 0 > 0 0 0 1 0 0 0 0 0 > 0 0 0 0 0 0 1 0 0 > ]'; > > ¿And to four dipoles, like this? > > cfg.dip.mom = [ > 1 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 1 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 1 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 1 0 0 > ]'; > If you wanted to simulate three respectively four different time courses - yes, I think so. > ¿ And what if I have 128 dipoles? > If you really wanted to simulate 128 dipoles with different time courses you'd have to follow the rule above, but I don't think you really want to simulate 128 dipoles - do you? > PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE > > OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. > > PLEASE HELP ME !!!!! > Hope my answers helped you at least a little. Note that you obviously used Caps Lock above your last paragraphs ;) Writing all in capitals ain't very polite, if you'd like to emphasize something, please use *bold fonts* or *asterisks*. Cheers, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Wed Jul 21 09:28:47 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 21 Jul 2010 09:28:47 +0200 Subject: Dipoli issues Message-ID: Dear all, I hope that somebody is able to help me. I'm trying to generate a BEM model following the example script in http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my diploma thesis, but every time I'm running dipoli with more than 3 compartments, the Program complains about double vertices on the innermost mesh. I first suspected a weird brain geometry to be the culprit, but I now tried to build the model with a simple sphere as the innermost compartment and the error remains, so this shouldn't be due to a weird geometry because there are few geometries as inoffensive as spheres. Has anybody an Idea or - alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could give me some hint how to build and run it? Thanks in advance, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Wed Jul 21 10:22:00 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 21 Jul 2010 10:22:00 +0200 Subject: control variables / cfg.cvar Message-ID: Dear Eric, I have a question with respect to the use of cfg.cvar and permutation testing. In particular, I am thinking about a design where subjects have to perform a task that involves giving two responses, say left and right hand button presses. I want to test two conditions against each other within subjects. If I have counterbalanced response hand assignment over subjects, you suggested to use cfg.cvar: "The theory of permutation tests also applies to statistical testing problems that involve control variables (e.g., response hand). In this case, the mechanics of the permutation test involves randomly permuting the data sets (single trials or subject averages) within each of the levels of the control variable (conditional permutation). To increase statistical sensitivity in the presence of control variable, it also is good to use a special test statistic that partials out the variance explained by the control variable. This is implemented in Fieldtrip for a couple of statfuns, but not for all of them. Conditional permutation is implemented via cfg.cvar." So in my design I have two levels of the control variable: L1 are subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R pairing (?). If I now permute only within the levels (which I would do anyway if I used a dependend samples test?) then still there are perumtations where response hands are sorted on the two sets to be compared, giving rise to large unwanted clusters in this particular permutation and other that are similar to it. Sure, this will not result in false positives, but decrease the sensitivity of my experiment. But maybe I misunderstand the meaning of "permuting the data sets (single trials or subject averages) within each of the levels of the control variable" . Does a permutation within the levels mean, I permute left hand responses only with left hand repsonses and right hand responses only with right hand responses? In this case I would have to give up my dependend samples testing (within subjcets) and use independent samples testing (across) subjects, because I can only exchange left hand responses in condition 1 and left hand responses in condition 2 between subjects, correct? Thanks for your help on this, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Wed Jul 21 13:36:52 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 21 Jul 2010 12:36:52 +0100 Subject: Dipoli issues In-Reply-To: <4C46A1AF.80205@gmx.de> Message-ID: Dear Paul, Note that there is also the bemcp toolbox distributed with Fieldtrip that should be easy to compile on Linux. I compared it with OpenMEEG on SPM canonical mesh and there are only differences for a small number of vertices close to the boundary. According to Christophe Phillips who wrote the toolbox as long as you stay more than one mesh edge length away from the inner skull boundary there should be no problem and it runs much faster than OpenMEEG (don't know about dipoli). Best, Vladimir On Wed, Jul 21, 2010 at 8:28 AM, Paul Czienskowski wrote: > Dear all, > > I hope that somebody  is able to help me. I'm trying to generate a BEM model > following the example script in > http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my > diploma thesis, but every time I'm running dipoli with more than 3 > compartments, the Program complains about double vertices on the innermost > mesh. I first suspected a weird brain geometry to be the culprit, but I now > tried to build the model with a simple sphere as the innermost compartment > and the error remains, so this shouldn't be due to a weird geometry because > there are few geometries as inoffensive as spheres. Has anybody an Idea or - > alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could > give me some hint how to build and run it? > > Thanks in advance, > Paul > > -- > Paul Czienskowski > Björnsonstr. 25 > 12163 Berlin > > Tel.: (+49)(0)30/221609359 > Handy: (+49)(0)1788378772 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From paul_c at GMX.DE Wed Jul 21 19:54:53 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 21 Jul 2010 19:54:53 +0200 Subject: Dipoli issues In-Reply-To: Message-ID: Hi Vladimir, I indeed took notice of the fact of another BEM toolbox being available, but the prepare_bemmodel function states, that bemcp is only capable of compute BEM models with 3 compartments which is of no use to me. Thank you anyway :) Cheers, Paul On 21.07.2010 13:36, Vladimir Litvak wrote: > Dear Paul, > > Note that there is also the bemcp toolbox distributed with Fieldtrip > that should be easy to compile on Linux. I compared it with OpenMEEG > on SPM canonical mesh and there are only differences for a small > number of vertices close to the boundary. According to Christophe > Phillips who wrote the toolbox as long as you stay more than one mesh > edge length away from the inner skull boundary there should be no > problem and it runs much faster than OpenMEEG (don't know about > dipoli). > > Best, > > Vladimir > > On Wed, Jul 21, 2010 at 8:28 AM, Paul Czienskowski wrote: > >> Dear all, >> >> I hope that somebody is able to help me. I'm trying to generate a BEM model >> following the example script in >> http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my >> diploma thesis, but every time I'm running dipoli with more than 3 >> compartments, the Program complains about double vertices on the innermost >> mesh. I first suspected a weird brain geometry to be the culprit, but I now >> tried to build the model with a simple sphere as the innermost compartment >> and the error remains, so this shouldn't be due to a weird geometry because >> there are few geometries as inoffensive as spheres. Has anybody an Idea or - >> alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could >> give me some hint how to build and run it? >> >> Thanks in advance, >> Paul >> >> -- >> Paul Czienskowski >> Björnsonstr. 25 >> 12163 Berlin >> >> Tel.: (+49)(0)30/221609359 >> Handy: (+49)(0)1788378772 >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Wed Jul 21 21:28:09 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Wed, 21 Jul 2010 14:28:09 -0500 Subject: Help with dipole fitting In-Reply-To: <4C43E9BD.1060209@gmx.de> Message-ID: Thanks man, your reply has been very helpful to me _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.b.bakker at STUDENT.UTWENTE.NL Wed Jul 21 23:30:14 2010 From: a.b.bakker at STUDENT.UTWENTE.NL (Albert Bakker) Date: Wed, 21 Jul 2010 23:30:14 +0200 Subject: Cluster analysis EEG data Message-ID: Hello, Does anyone know if it's possible to do a cluster analysis on EEG data for multiple frequencies with for example setting the cfg.foi = [1:1:30]? Or is it only possible for 1 frequency at the time? Best regards, Albert Bakker ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From alexandre.gramfort at INRIA.FR Thu Jul 22 09:04:36 2010 From: alexandre.gramfort at INRIA.FR (Alexandre Gramfort) Date: Thu, 22 Jul 2010 09:04:36 +0200 Subject: building OpenMEEG Message-ID: Dear Paul, OpenMEEG can handle an arbitrary number of compartments. However the fieldtrip plugin as written now can handle only 1, 2 or 3 compartments. This could be changed rapidly. If you want to build OpenMEEG for your linux system you will need cmake, atlas-devel and g++. Otherwise we can provide precompiled binaries for MAC, Windows 32 or 64 and Linux 32 or 64. Hope this helps Alexandre -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From paul_c at GMX.DE Thu Jul 22 10:49:55 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Thu, 22 Jul 2010 10:49:55 +0200 Subject: building OpenMEEG In-Reply-To: Message-ID: Hi Alexandre, thank you very much for your answer. I think bending those Matlab-wrappers won't be a problem for me, but for I haven't got too much experience in compiling under Linux it's giving me a hard time :) I followed the Readme file in the source folder, but ccmake complains about some FORTRAN functions. The actual error messages are CMake Error at macros/FortranCInterface/DetectFromLibrary.cmake:37 (unset): Unknown CMake command "unset". Call Stack (most recent call first): macros/FortranCInterface.cmake:155 (detect_fortran_function) CMakeLists.txt:71 (FortranCInterface_HEADER) I thought that maybe you might know this error and how to solve it (or can make up a solution). Also I'm of course not averse to use the precompiled binaries, but this didn't work for me this far either. When I downloaded the rpm files and tried to open them my Package Manager froze for a long time, is there anything else I shall consider? I'm on i686/Ubuntu 9.04. Tanks in advance, Paul On 22.07.2010 09:04, Alexandre Gramfort wrote: > Dear Paul, > > OpenMEEG can handle an arbitrary number of compartments. > However the fieldtrip plugin as written now can handle only > 1, 2 or 3 compartments. This could be changed rapidly. > > If you want to build OpenMEEG for your linux system you will need > cmake, atlas-devel and g++. Otherwise we can provide > precompiled binaries for MAC, Windows 32 or 64 and Linux 32 or 64. > > Hope this helps > > Alexandre > > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team @ NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From alexandre.gramfort at INRIA.FR Thu Jul 22 11:00:56 2010 From: alexandre.gramfort at INRIA.FR (Alexandre Gramfort) Date: Thu, 22 Jul 2010 11:00:56 +0200 Subject: building OpenMEEG In-Reply-To: <4C480633.3040006@gmx.de> Message-ID: Hi Paul, > thank you very much for your answer. I think bending those Matlab-wrappers > won't be a problem for me, but for I haven't got too much experience in > compiling under Linux it's giving me a hard time :) I followed the Readme > file in the source folder, but ccmake complains about some FORTRAN > functions. The actual error messages are > > CMake Error at macros/FortranCInterface/DetectFromLibrary.cmake:37 (unset): >   Unknown CMake command "unset". >  Call Stack (most recent call first): >   macros/FortranCInterface.cmake:155 (detect_fortran_function) >   CMakeLists.txt:71 (FortranCInterface_HEADER) you have an old version of cmake. I suggest to update your cmake binaries to version 2.8 or at least 2.6. The unset command appeared recently in cmake. > I thought that maybe you might know this error and how to solve it (or can > make up a solution). Also I'm of course not averse to use the precompiled > binaries, but this didn't work for me this far either. When I downloaded the > rpm files and tried to open them my Package Manager froze for a long time, > is there anything else I shall consider? I'm on i686/Ubuntu 9.04. I will send you a precompiled version. Alexandre ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Fri Jul 23 01:28:59 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 23 Jul 2010 01:28:59 +0200 Subject: control variables / cfg.cvar In-Reply-To: <2122874403.253604.1279700520897.JavaMail.fmail@mwmweb056> Message-ID: Dear Michael, > So in my design I have two levels of the control variable: L1 are > subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R > pairing (?). If I now permute only within the levels (which I would do > anyway if I used a dependend samples test?) then still there are > perumtations where response hands are sorted on the two sets to be > compared, giving rise to large unwanted clusters in this particular > permutation and other that are similar to it. Sure, this will not > result in false positives, but decrease the sensitivity of my > experiment. > > But maybe I misunderstand the meaning of "permuting the data sets > (single trials or subject averages) within each of the levels of the > control variable" . Does a permutation within the levels mean, I > permute left hand responses only with left hand repsonses and right > hand responses only with right hand responses? In this case I would > have to give up my dependend samples testing (within subjcets) and use > independent samples testing (across) subjects, because I can only > exchange left hand responses in condition 1 and left hand responses in > condition 2 between subjects, correct? An example should be able to clarify things. Control variables are especially useful in between-subject and (single subject) between-trials studies. Let's consider a between-subjects study in which our interest is in assessing the effect of some individual difference variable, such as two different alleles of some gene. Assume that dependent variable strongly depends on age. In that case, sensitivity wrt identifying the genetic effect could be increased (as compared with an analysis without the age variable) by making a number of fairly homogenous age groups, and to perform a permutation test by randomly permuting the two alleles WITHIN each of these age groups. I found it hard to use your example to illustrate the usefulness of permutation within the levels of a control variable. Probably, I'm missing a point here. Maybe you can help me by pointing out what is the independent variable whose effect you want to assess and which other variable (the control variable) is also responsible for variance in the dependent variable, but in whose effect you are not interested. Best, Eric > > Thanks for your help on this, > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Fri Jul 23 02:56:34 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Thu, 22 Jul 2010 19:56:34 -0500 Subject: Help with dipole fitting In-Reply-To: <4C43E9BD.1060209@gmx.de> Message-ID: Hi, I'm very sorry for using capital letters, please excuse me. I'm new at fieldtrip, I don't know much about this and I'm searching for help desperately. Well, I am trying to compute a fordward model by now, like this: V=A*J where: V= a matrix of potentials measured in the scalp surface by each electrode, for example 32 electrodes or channels and 5 seconds at 256 samples per second, (which is equal to 5*256=1280, which comes to a 32x1280 matrix, one epoch I guess, and one trial, just measure, no events, please correct me if i'm wrong) J= a matrix of the sources in the brain that produce the potentials above, with its time course, which are more than the electrodes placed there. Let me understand this: ¿these sources and its time course, are the same dipole moments? If so, ¿The sources (dipoles) have a time component in the three dimensions in the dipoles? Thus, if we consider 128 sources, ¿ are we considering 128 dipoles, and J matrix would be 128x1280 with the time course? or ¿Are we considering 128 sources of 3 dimensions and J matrix would be of 128x(1280x3)? A= the lead field matrix. I've seen the function compute_leadfield of FieldTrip, This uses the electrodes positions, the dipoles (or sources) positions, and the standard volume of sphere and conductivities to perform the computing of a leadfield matrix that has dimensions numch x (3xnums) where numch=nuber of channels or electrodes (32 in this case) and nums=number of sources (in this case 128) ¿why is the number of sources multiplied by 3? ¿ it is because they compute the leadfield matrix to each of the cartesian coordinates? and if so, ¿How should I take the J matrix to compute the fordward model? ¿ should I take this each row having the time course of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) rows and 1280 columns, and not like above 128x(1280x3)? And, once I have performed the forward model and I compute the V matrix, ¿Which function could I use to perform the inverse problem, i.e. , could I use a function that allows me recovering or regain the J matrix from the A and V matrices, and compare the new J with the old J to see if the inverse problem could be performed well? Please, If you could suggest me some article or book or paragraph that I can read to clear these doubts, or if you could clear these to me yourselves, I would be very much thankful to you, please I'm begging you help please. Sorry for all the possible fouls and lacks of politeness, sincerely.Thanks for your attention. _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Fri Jul 23 08:06:46 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Fri, 23 Jul 2010 08:06:46 +0200 Subject: Help with dipole fitting In-Reply-To: Message-ID: Hi Ludwig, On 23.07.2010 02:56, Ludwing Torres wrote: > Hi, I'm very sorry for using capital letters, please excuse me. Never mind, I was not too offended at this, but wanted you to take note of the fact, that somebody could be :) > I'm new at fieldtrip, I don't know much about this and I'm searching > for help desperately. Then I hope I can help you. > Well, I am trying to compute a fordward model by now, like this: > > V=A*J > > where: > > V= a matrix of potentials measured in the scalp surface by each > electrode, for example 32 electrodes or channels and 5 seconds at 256 > samples per second, (which is equal to 5*256=1280, which comes to a > 32x1280 matrix, one epoch I guess, and one trial, just measure, no > events, *please correct me if i'm wrong*) This sounds quite correct, I think, but AFAIK you won't compute this directly but use some function like the ft_dipolesimulation function we talked about last time. This does exactly what you want to do, compute the electrode scalp potentials due to a given dipole distribution. Spares you all the stuff you are now to consider. > J= a matrix of the sources in the brain that produce the potentials > above, with its time course, which are more than the electrodes placed > there. > Let me understand this: ¿these sources and its time course, are > the same dipole moments? > If so, ¿The sources (dipoles) have a time component in the three > dimensions in the dipoles? > Thus, if we consider 128 sources, ¿ are we considering 128 > dipoles, and J matrix would be 128x1280 with the time course? > or ¿Are we considering 128 sources of 3 dimensions and J matrix > would be of 128x(1280x3)? I think it's rather the latter, but see below. > A= the lead field matrix. I've seen the function compute_leadfield of > FieldTrip, This uses the electrodes positions, the dipoles (or > sources) positions, and the standard volume of sphere and > conductivities to perform the computing of a leadfield matrix that has > dimensions numch x (3xnums) where numch=nuber of channels or > electrodes (32 in this case) and nums=number of sources (in this > case 128) ¿why is the number of sources multiplied by 3? ¿ it is > because they compute the leadfield matrix to each of the cartesian > coordinates? and if so, ¿How should I take the J matrix to compute the > fordward model? ¿ should I take this each row having the time course > of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 > dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole > n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) > rows and 1280 columns, and not like above 128x(1280x3)? Please see the documentation (reference for compute_leadfield ) /The forward solution is expressed as the leadfield matrix (Nchan*3), where each column corresponds with the potential or field distributions on all sensors for one of the x,y,z-orientations of the dipole./ This appears to be the leadfield for a dipole at a certain position. You'd multiply the moment of the dipole you are trying to simulate with the very matrix. At least mathematically I think you'd build the lf-matrix for an number of dipoles as an (NchanX(Ndip*3)) matrix where every three columns represent the contribution of one dipole to the surface potential. The first of the three columns is the contribution of the x-moment of the dipole and same for 2nd and 3rd column representing the y- respectively z-moment. Note that this is - by now - only a consideration of time independent dipoles. What the lf-matrix does is mapping dipoles to electrodes. Nchan is the number of electrodes. For your 128 dipole-example (which could make a problem when fitting) the lf-matrix would be a 32x384-matrix with fixed positions for the dipoles. Where - as I said before - every row stands for an electrode and every triple of three cols for the contribution of one dipole to the electrodes. If you'd want to simulate the dipoles at a single point in time you'd build a vector dip = [d1x d1y d1z d2x d2y d2z ... d128x d128y d128z]' where dnx is the x-moment of the n-th dipole and same for y and z. This would be a column vector or matrix with a single column. If you'd make a (384x1280)-matrix with the rows being the dipoles and the columns the temporal change of the dipoles and multiply the lf matrix with this you'd get a matrix 32x1280 with the rows being the electrodes and the columns the time course. So the source matrix is not a (128x(1280*3))- but rather a ((128*3)x1280)-matrix. > And, once I have performed the forward model and I compute the V > matrix, *¿Which function could I use to perform the inverse problem, > i.e. , could I use a function that allows me recovering or regain the > J matrix from the A and V matrices, and compare the new J with the old > J to see if the inverse problem could be performed well? > * Still I'd recommend the use of the dipolesimulation and dipolefitting functions rather than using the lf directly. I think this is quite more flexible. I don't really know how to perform the inverse solution in this case. > *Please, If you could suggest me some article or book or paragraph > that I can read to clear these doubts, or if you could clear these to > me yourselves, I would be very much thankful to you, please I'm > begging you help please. Sorry for all the possible fouls and lacks of > politeness, sincerely.Thanks for your attention. > * See for example Michel et al.: EEG source imaging . Hope this helps. Cheers, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Fri Jul 23 12:14:32 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 23 Jul 2010 12:14:32 +0200 Subject: control variables / cfg.cvar In-Reply-To: <008001cb29f5$a99769f0$fcc63dd0$@maris@donders.ru.nl> Message-ID: Dear Eric, Thanks for the answer, which I understood. Your design is in both cases a between units of observation design. my exmaple (and actually my data) are a within units of observation design:   The independent variable in my example is condition (1,2). The units of observation are subjects, i.e. it would be a within unit of observation design. However, to exclude motor effects in the analysis, response hand assigments were balanced over subjects, as is done in many studies. Hence, we have a control variable with two levels. These levels could (naively) be the assigment rules (cond1-hand1/cond2-hand2 and vice versa) however then the nuisance effect is not linked to the control variable but to the interaction control-variable*independent variable. Hence, the copntrol variable should be the response hand itself (hand1, hand2). In this case, each of my units of observation has both levels of the control variable. To permute only within levels of the control variable I would then have to permute between units of observation, i.e. permute cond1 with cond2 between two subjects that had both left hand responses in cond1 and both right hand responses in cond 2 for example. This way the control variable should work, but i loose the power related to the within UO design. Michael -----Ursprüngliche Nachricht----- Von: Eric Maris Gesendet: Jul 23, 2010 1:28:59 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] control variables / cfg.cvar >Dear Michael, > > > >> So in my design I have two levels of the control variable: L1 are >> subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R >> pairing (?). If I now permute only within the levels (which I would do >> anyway if I used a dependend samples test?) then still there are >> perumtations where response hands are sorted on the two sets to be >> compared, giving rise to large unwanted clusters in this particular >> permutation and other that are similar to it. Sure, this will not >> result in false positives, but decrease the sensitivity of my >> experiment. >> >> But maybe I misunderstand the meaning of "permuting the data sets >> (single trials or subject averages) within each of the levels of the >> control variable" . Does a permutation within the levels mean, I >> permute left hand responses only with left hand repsonses and right >> hand responses only with right hand responses? In this case I would >> have to give up my dependend samples testing (within subjcets) and use >> independent samples testing (across) subjects, because I can only >> exchange left hand responses in condition 1 and left hand responses in >> condition 2 between subjects, correct? > > >An example should be able to clarify things. Control variables are especially useful in between-subject and (single subject) between-trials studies. Let's consider a between-subjects study in which our interest is in assessing the effect of some individual difference variable, such as two different alleles of some gene. Assume that dependent variable strongly depends on age. In that case, sensitivity wrt identifying the genetic effect could be increased (as compared with an analysis without the age variable) by making a number of fairly homogenous age groups, and to perform a permutation test by randomly permuting the two alleles WITHIN each of these age groups. > >I found it hard to use your example to illustrate the usefulness of permutation within the levels of a control variable. Probably, I'm missing a point here. Maybe you can help me by pointing out what is the independent variable whose effect you want to assess and which other variable (the control variable) is also responsible for variance in the dependent variable, but in whose effect you are not interested. > >Best, > >Eric > > > > > > > >> >> Thanks for your help on this, >> Michael >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Fri Jul 23 13:16:51 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 23 Jul 2010 13:16:51 +0200 Subject: control variables / cfg.cvar In-Reply-To: <339129844.1207346.1279880072314.JavaMail.fmail@mwmweb054> Message-ID: Dear Michael, > Thanks for the answer, which I understood. Your design is in both > cases a between units of observation design. my exmaple (and actually > my data) are a within units of observation design: > > The independent variable in my example is condition (1,2). The units of > observation are subjects, i.e. it would be a within unit of observation > design. However, to exclude motor effects in the analysis, response > hand assigments were balanced over subjects, as is done in many > studies. Hence, we have a control variable with two levels. These > levels could (naively) be the assigment rules (cond1-hand1/cond2-hand2 > and vice versa) however then the nuisance effect is not linked to the > control variable but to the interaction control-variable*independent > variable. Hence, the copntrol variable should be the response hand > itself (hand1, hand2). In this case, each of my units of observation > has both levels of the control variable. To permute only within levels > of the control variable I would then have to permute between units of > observation, i.e. permute cond1 with cond2 between two subjects that > had both left hand responses in cond1 and both right hand responses in > cond 2 for example. > This way the control variable should work, but i loose the power > related to the within UO design. Correct. In your case, use of the control variable to increase sensitivity would only work if the independent and the control variable were fully crossed (four-level within-subjects design; Left-C1, Right-C1, Left-C2, Right-C2). To evaluate the effect of C1-vs-C2, you can then permute within the levels of the control (hand) variable. Best, Eric > > Michael > > > -----Ursprüngliche Nachricht----- > Von: Eric Maris > Gesendet: Jul 23, 2010 1:28:59 AM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] control variables / cfg.cvar > > >Dear Michael, > > > > > > > >> So in my design I have two levels of the control variable: L1 are > >> subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R > >> pairing (?). If I now permute only within the levels (which I would > >> do anyway if I used a dependend samples test?) then still there are > >> perumtations where response hands are sorted on the two sets to be > >> compared, giving rise to large unwanted clusters in this particular > >> permutation and other that are similar to it. Sure, this will not > >> result in false positives, but decrease the sensitivity of my > >> experiment. > >> > >> But maybe I misunderstand the meaning of "permuting the data sets > >> (single trials or subject averages) within each of the levels of > the > >> control variable" . Does a permutation within the levels mean, I > >> permute left hand responses only with left hand repsonses and right > >> hand responses only with right hand responses? In this case I would > >> have to give up my dependend samples testing (within subjcets) and > >> use independent samples testing (across) subjects, because I can > only > >> exchange left hand responses in condition 1 and left hand responses > >> in condition 2 between subjects, correct? > > > > > >An example should be able to clarify things. Control variables are > especially useful in between-subject and (single subject) between- > trials studies. Let's consider a between-subjects study in which our > interest is in assessing the effect of some individual difference > variable, such as two different alleles of some gene. Assume that > dependent variable strongly depends on age. In that case, sensitivity > wrt identifying the genetic effect could be increased (as compared with > an analysis without the age variable) by making a number of fairly > homogenous age groups, and to perform a permutation test by randomly > permuting the two alleles WITHIN each of these age groups. > > > >I found it hard to use your example to illustrate the usefulness of > permutation within the levels of a control variable. Probably, I'm > missing a point here. Maybe you can help me by pointing out what is the > independent variable whose effect you want to assess and which other > variable (the control variable) is also responsible for variance in the > dependent variable, but in whose effect you are not interested. > > > >Best, > > > >Eric > > > > > > > > > > > > > > > >> > >> Thanks for your help on this, > >> Michael > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of > >> the FieldTrip toolbox, to share experiences and to discuss new > ideas > >> for MEG and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Sun Jul 25 01:59:53 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 24 Jul 2010 18:59:53 -0500 Subject: Help with dipole fitting In-Reply-To: <4C493176.9000005@gmx.de> Message-ID: Hi Paul, Thanks for the answer, I'll put in bold the new entries in this message. Well, I am trying to compute a fordward model by now, like this: V=A*J where: V= a matrix of potentials measured in the scalp surface by each electrode, for example 32 electrodes or channels and 5 seconds at 256 samples per second, (which is equal to 5*256=1280, which comes to a 32x1280 matrix, one epoch I guess, and one trial, just measure, no events, please correct me if i'm wrong) This sounds quite correct, I think, but AFAIK you won't compute this directly but use some function like the ft_dipolesimulation function we talked about last time. This does exactly what you want to do, compute the electrode scalp potentials due to a given dipole distribution. Spares you all the stuff you are now to consider.>> I'll do that. Could you explain me also what an epoch stands for, please? J= a matrix of the sources in the brain that produce the potentials above, with its time course, which are more than the electrodes placed there. Let me understand this: ¿these sources and its time course, are the same dipole moments? If so, ¿The sources (dipoles) have a time component in the three dimensions in the dipoles? Thus, if we consider 128 sources, ¿ are we considering 128 dipoles, and J matrix would be 128x1280 with the time course? or ¿Are we considering 128 sources of 3 dimensions and J matrix would be of 128x(1280x3)? I think it's rather the latter, but see below. A= the lead field matrix. I've seen the function compute_leadfield of FieldTrip, This uses the electrodes positions, the dipoles (or sources) positions, and the standard volume of sphere and conductivities to perform the computing of a leadfield matrix that has dimensions numch x (3xnums) where numch=nuber of channels or electrodes (32 in this case) and nums=number of sources (in this case 128) ¿why is the number of sources multiplied by 3? ¿ it is because they compute the leadfield matrix to each of the cartesian coordinates? and if so, ¿How should I take the J matrix to compute the fordward model? ¿ should I take this each row having the time course of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) rows and 1280 columns, and not like above 128x(1280x3)? Please see the documentation (reference for compute_leadfield) The forward solution is expressed as the leadfield matrix (Nchan*3), where each column corresponds with the potential or field distributions on all sensors for one of the x,y,z-orientations of the dipole. This appears to be the leadfield for a dipole at a certain position. You'd multiply the moment of the dipole you are trying to simulate with the very matrix. At least mathematically I think you'd build the lf-matrix for an number of dipoles as an (NchanX(Ndip*3)) matrix where every three columns represent the contribution of one dipole to the surface potential. The first of the three columns is the contribution of the x-moment of the dipole and same for 2nd and 3rd column representing the y- respectively z-moment. Note that this is - by now - only a consideration of time independent dipoles. What the lf-matrix does is mapping dipoles to electrodes. Nchan is the number of electrodes. For your 128 dipole-example (which could make a problem when fitting) the lf-matrix would be a 32x384-matrix with fixed positions for the dipoles. Where - as I said before - every row stands for an electrode and every triple of three cols for the contribution of one dipole to the electrodes. If you'd want to simulate the dipoles at a single point in time you'd build a vector dip = [d1x d1y d1z d2x d2y d2z ... d128x d128y d128z]' where dnx is the x-moment of the n-th dipole and same for y and z. This would be a column vector or matrix with a single column. If you'd make a (384x1280)-matrix with the rows being the dipoles and the columns the temporal change of the dipoles and multiply the lf matrix with this you'd get a matrix 32x1280 with the rows being the electrodes and the columns the time course. So the source matrix is not a (128x(1280*3))- but rather a ((128*3)x1280)-matrix. And, once I have performed the forward model and I compute the V matrix, ¿Which function could I use to perform the inverse problem, i.e. , could I use a function that allows me recovering or regain the J matrix from the A and V matrices, and compare the new J with the old J to see if the inverse problem could be performed well? Still I'd recommend the use of the dipolesimulation and dipolefitting functions rather than using the lf directly. I think this is quite more flexible. I don't really know how to perform the inverse solution in this case. Please, If you could suggest me some article or book or paragraph that I can read to clear these doubts, or if you could clear these to me yourselves, I would be very much thankful to you, please I'm begging you help please. Sorry for all the possible fouls and lacks of politeness, sincerely.Thanks for your attention. See for example Michel et al.: EEG source imaging. Hope this helps. Cheers, Paul Ok this has been very helpful, I think I still dont understand very well the concept of dipole moment, I'll search more information about this and how to manage the dipole moments as vectors; if you could suggest me some other book to learn about what is a dipole moment (also from the point of view of linear algebra) I'll thank you too, and this will help me think about how to use the dipolefitting function. Very Many thanks again. -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Sun Jul 25 03:38:08 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 24 Jul 2010 20:38:08 -0500 Subject: Help with dipole fitting In-Reply-To: <4C493176.9000005@gmx.de> Message-ID: Hi Paul, I don't know if you have heard or worked with eeglab, here they use a dipole fitting without considering the time course in the dipole moments, ¿Can I somehow use the functions of fieldtrip in eeglab to perform dipole fitting and consider the time course in eeglab too? Another question: when I perform the example below: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit And I compute the dipole fit with the first simulated dataset, I get the next structure: dip1 = label: {1x128 cell} dip: [1x1 struct] Vdata: [128x250 double] Vmodel: [128x250 double] time: [1x250 double] dimord: 'chan_time' cfg: [1x1 struct] And, after define the dipole moment as [1 0 0]' , I go to the dip field and in the field mom (i.e. dip1.dip.mom) I get an 3x250 double matrix. So, when I define the dipole position it is [0 0.5 0.3] and in the dipole fit in the field dip1.dip.pos, I get this same position (aproximated) it is [-2.1186e-008 0.5000 0.3000], but in the dipole moment I don't get the same, not even aproximated, instead of [1 0 0]', I get this [3x250 double] matrix. ¿Am I commiting any mistake or is a concept error? and ¿ How we can interpret this when we have more than two dipoles? Thank you for your help. _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 16:48:46 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 16:48:46 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: Message-ID: Hi everybody, I just finished fully implementing the new low-level frequency analysis routines for cfg.method = mtmconvol and mtmfft. They are not yet used by default, and I would appreciate if it can be tested more before optimizing computation speeds (should be relatively equal now, but many optimizations possible). The new routines can be used by adding a third input argument to your ft_freqanalysis calls, as: New implementation: freq = ft_freqanalysis(cfg,data,1) Old implementation (default): freq = ft_freqanalysis(cfg,data,0) *Things that are different:* - all mtmconvol output is now phase-shifted such that an angle of 0 of any fourier-coefficient /always /means a peak of an oscillation in the data, and an angle of pi will /always/ mean the trough of an oscillation (wavelet wise angle = 0 is implemented as cosine at peak, and sine in up-going flank) - all mtmfft output is now phase-shifted such that any angle from any fourier-coefficient is from the perspective of the oscillation in the data being at its peak at time = 0 - mtmconvol now uses an accurate frequency vector for building its wavelets (determined by fsample and nsample, with cfg.foi as starting point), instead of an /uncorrected/ cfg.foi (mtmfft already used an accurate one) (note: this causes slight differences between the old and new implementation) - mtmfft can now take a cfg.foi input-vector as well, instead of the usual cfg.foilim (backwards compatible) - because of the above, nearly /all/ fourier-output is different, but e.g. phase differences between coefficients should be the same - we decided to drop the support for variable number of tapers in mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, and first element of vector is selected) - in the new format, many things can be upgraded/implemented etc. in the future As freqanalysis is a rather fundamental pilar of FieldTrip, I would really appreciate if some of you can do some testing based on the above differences and anything else you can think of. Different types of data, different approaches, etc. to see if both implementations give comparable results and such (do note raw fourier-coefficients will almost always be different). It could be I missed some fields from the old functions that I diligently checked, or made some errors that did not affect my current testing environment. I can be reached at the e-mail address below, via the mailing-list, or via bug-reports. Thanks in advance. All the best! Roemer PS: the changes will be on the ft-server tonight, but are of course already in the svn-version -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Tue Jul 27 16:58:07 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 27 Jul 2010 15:58:07 +0100 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: <4C4EF1CE.5000002@donders.ru.nl> Message-ID: Dear Roemer, Why did you decide to drop the support for variable number of tapers in mtmconvol? That was actually quite a handy feature that I'm using to get TFs with more or less uniform smoothness across frequency. I don't know how many other people are using it but if there are many perhaps we can campaign for retaining it in the new implementation ;-) Best, Vladimir On Tue, Jul 27, 2010 at 3:48 PM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi everybody, > > I just finished fully implementing the new low-level frequency analysis > routines for cfg.method = mtmconvol and mtmfft. They are not yet used by > default, and I would appreciate if it can be tested more before optimizing > computation speeds (should be relatively equal now, but many optimizations > possible). > > The new routines can be used by adding a third input argument to your > ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of 0 of any > fourier-coefficient *always *means a peak of an oscillation in the data, > and an angle of pi will *always* mean the trough of an oscillation > (wavelet wise angle = 0 is implemented as cosine at peak, and sine in > up-going flank) > - all mtmfft output is now phase-shifted such that any angle from any > fourier-coefficient is from the perspective of the oscillation in the data > being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its wavelets > (determined by fsample and nsample, with cfg.foi as starting point), instead > of an *uncorrected* cfg.foi (mtmfft already used an accurate one) (note: > this causes slight differences between the old and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of the usual > cfg.foilim (backwards compatible) > - because of the above, nearly *all* fourier-output is different, but e.g. > phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, and > first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. in the > future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I would really > appreciate if some of you can do some testing based on the above differences > and anything else you can think of. Different types of data, different > approaches, etc. to see if both implementations give comparable results and > such (do note raw fourier-coefficients will almost always be different). It > could be I missed some fields from the old functions that I diligently > checked, or made some errors that did not affect my current testing > environment. > I can be reached at the e-mail address below, via the mailing-list, or via > bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of course already > in the svn-version > > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 17:11:38 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 17:11:38 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: <4C4EF1CE.5000002@donders.ru.nl> Message-ID: Hi everybody, Sorry for this, this was meant to go on the FieldTrip-Dev mailing list! Everything in this mail can be safely ignored. Best, Roemer On 7/27/2010 4:48 PM, Roemer van der Meij wrote: > Hi everybody, > > I just finished fully implementing the new low-level frequency > analysis routines for cfg.method = mtmconvol and mtmfft. They are not > yet used by default, and I would appreciate if it can be tested more > before optimizing computation speeds (should be relatively equal now, > but many optimizations possible). > > The new routines can be used by adding a third input argument to your > ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of 0 of > any fourier-coefficient /always /means a peak of an oscillation in the > data, and an angle of pi will /always/ mean the trough of an > oscillation (wavelet wise angle = 0 is implemented as cosine at peak, > and sine in up-going flank) > - all mtmfft output is now phase-shifted such that any angle from any > fourier-coefficient is from the perspective of the oscillation in the > data being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its > wavelets (determined by fsample and nsample, with cfg.foi as starting > point), instead of an /uncorrected/ cfg.foi (mtmfft already used an > accurate one) (note: this causes slight differences between the old > and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of the > usual cfg.foilim (backwards compatible) > - because of the above, nearly /all/ fourier-output is different, but > e.g. phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, > and first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. in > the future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I would > really appreciate if some of you can do some testing based on the > above differences and anything else you can think of. Different types > of data, different approaches, etc. to see if both implementations > give comparable results and such (do note raw fourier-coefficients > will almost always be different). It could be I missed some fields > from the old functions that I diligently checked, or made some errors > that did not affect my current testing environment. > I can be reached at the e-mail address below, via the mailing-list, or > via bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of course > already in the svn-version > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 17:45:34 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 17:45:34 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: Message-ID: Hi Vladimir, Well, it wasn't that final yet, I actually meant to sent the e-mail to dev-mailing list ;). I had a short discussion with Jan-Mathijs on it, but since it wasn't going live yet it didn't matter that much. The tapsmofrq being variable I realized doesn't necessarily mean different number of tapers, so I will implement that in the new-implementation tomorrow (tiny changes). However, implementing variable number of tapers requires some more thorough design decisions for the new low-level functions (especially in terms of consistent data representation throughout all low-level functions). Perhaps we should discuss this in more detail in the dev-mailing list? I'm sure Jan-Mathijs will join, Robert is on vacation at the moment. But thanks for your reply! Best, Roemer On 7/27/2010 4:58 PM, Vladimir Litvak wrote: > Dear Roemer, > > Why did you decide to drop the support for variable number of tapers > in mtmconvol? That was actually quite a handy feature that I'm using > to get TFs with more or less uniform smoothness across frequency. I > don't know how many other people are using it but if there are many > perhaps we can campaign for retaining it in the new implementation ;-) > > Best, > > Vladimir > > On Tue, Jul 27, 2010 at 3:48 PM, Roemer van der Meij > > wrote: > > Hi everybody, > > I just finished fully implementing the new low-level frequency > analysis routines for cfg.method = mtmconvol and mtmfft. They are > not yet used by default, and I would appreciate if it can be > tested more before optimizing computation speeds (should be > relatively equal now, but many optimizations possible). > > The new routines can be used by adding a third input argument to > your ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of > 0 of any fourier-coefficient /always /means a peak of an > oscillation in the data, and an angle of pi will /always/ mean the > trough of an oscillation (wavelet wise angle = 0 is implemented as > cosine at peak, and sine in up-going flank) > - all mtmfft output is now phase-shifted such that any angle from > any fourier-coefficient is from the perspective of the oscillation > in the data being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its > wavelets (determined by fsample and nsample, with cfg.foi as > starting point), instead of an /uncorrected/ cfg.foi (mtmfft > already used an accurate one) (note: this causes slight > differences between the old and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of > the usual cfg.foilim (backwards compatible) > - because of the above, nearly /all/ fourier-output is different, > but e.g. phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is > given, and first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. > in the future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I > would really appreciate if some of you can do some testing based > on the above differences and anything else you can think of. > Different types of data, different approaches, etc. to see if both > implementations give comparable results and such (do note raw > fourier-coefficients will almost always be different). It could be > I missed some fields from the old functions that I diligently > checked, or made some errors that did not affect my current > testing environment. > I can be reached at the e-mail address below, via the > mailing-list, or via bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of > course already in the svn-version > > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Tue Jul 27 20:34:51 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Tue, 27 Jul 2010 13:34:51 -0500 Subject: How can I fit more than two dipoles? In-Reply-To: Message-ID: If I have a lead field matrix, a matrix of sources and a matrix of scalp signals like in the script below; what functions can I use to perform the inverse problem, i.e. given the leadfield matrix (C) and the scalp simulated data (dat), what function of fieldtrip use to recover the x_orig matrix. The .mat file is included too. Thanks for your help. _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: proof.m URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: electrodes1020.mat Type: application/octet-stream Size: 8496 bytes Desc: not available URL: From lumatobu2 at HOTMAIL.COM Wed Jul 28 03:50:18 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Tue, 27 Jul 2010 20:50:18 -0500 Subject: why ft_sourceplot doesn't work? In-Reply-To: Message-ID: Hello, I tried to make the example to fit dipoles explained in the page of fieldtrip: http://fieldtrip.fcdonders.nl/example/symmetric_dipoles in the part in which one computes the time average, using the function ft_timelockanalysis produces an error that says that the function needs the field cfg.covariancewindow: cfg = []; cfg.covariance = 'yes'; timelock = ft_timelockanalysis(cfg, data); it appears to be solved when I set this to the option 'poststim' and recompute the function. cfg.covariancewindow = 'poststim'; timelock = timelockanalysis(cfg, data); the input is raw data with 91 channels and 1 trials applying preprocessing options averaging trials averaging trial 1 of 1 Warning: Divide by zero. > In timelockanalysis at 606 This produces the division by zero seen above, but any of the options for covariancewindow field result the same for this. Then, after computing the sourceanalysis and sourcedescriptives function, I go to the part of ft_sourceplot with the same configuration as in the page, and the function produces the next error: cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'nai'; cfg.funcolorlim = [1.6 2.2]; >> sourceplot(cfg, source); the input is source data with 3468 positions not plotting anatomy no functional parameter no masking parameter voxel 1590, indices [9 9 6], location [-0.0 -0.0 5.0] ??? Error using ==> sourceplot at 654 no anatomy is present and no functional data is selected, please check your cfg.funparameter please, if anyone know why this is happening and how to fix this, let me know. thank you for your atention. _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Wed Jul 28 09:09:23 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 28 Jul 2010 09:09:23 +0200 Subject: why ft_sourceplot doesn't work? In-Reply-To: Message-ID: hi, > cfg = []; > cfg.covariance = 'yes'; > timelock = ft_timelockanalysis(cfg, data); > > it appears to be solved when I set this to the option 'poststim' and recompute the function. > > cfg.covariancewindow = 'poststim'; here you should define the time used for calculating cov. cfg.covariancewindow = [from to]; > no anatomy is present and no functional data > is selected, please check your > cfg.funparameter this error message is actually quite informative :-) check whether your source structure has an avg.nai field. if not then of course nothing is plotted. in that case check if you defined cfg.projectnoise='yes'; before calling ft_sourceanalysis. good luck. nathan > > please, if anyone know why this is happening and how to fix this, let me know. > thank you for your atention. > > > Discover the new Windows Vista Learn more! > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajay.halai at POSTGRAD.MANCHESTER.AC.UK Wed Jul 28 12:43:30 2010 From: ajay.halai at POSTGRAD.MANCHESTER.AC.UK (Ajay Halai) Date: Wed, 28 Jul 2010 12:43:30 +0200 Subject: EEG source localisation questions Message-ID: Dear FT users, I am a 1st year PhD student and new to FIELDTRIP, and any help will be very welcome. I have managed to run simple ERP analyses on a language experiment. I am now hoping to localise the peaks (P100 and N400) but am coming across some problems. I will try my best to explain briefly my current method of analyses and would greatly appreciate any comments or suggests, as I fear I am making a mistake somewhere. The problem I encounter is that the values returned for the avg.pow are the same for each condition. Naturally, I made sure that I specified different conditions at the ft_sourceanalysis (cfg, data) stage, but I did specify different conditions. I also checked the avg.noise, and was surprised to see these values were the same as the avg.pow, which leads me to think I have done something wrong or am failing to interpret this. Furthermore, I tried to then use loreta, and selected the timelock data, with the same cfg but get an error (Undefined function or method 'loreta' for input arguments of type 'struct') and wonder if I need to specify other cfg. I used the 'lcmv' method. projectnoise 'yes', rawtrial 'no', lambda = 0, and using the vol, grid and elec files from the created leadfield. Any suggestions on what I may be doing wrong would be greatly appreciated. Additionally, I have provided some more details about the stages before this, which may point to the problem. Best wishes Ajay Halai analysis details: I have 7 conditions in all, but take 2 conditions for 1 subject as an example. I have two types of speech, which show significant differences at P100. I used a bandpass filter (1-40hz), padding (0.1), baseline correction (-0.1 0), detrend and average EEG reference at the preprocessing stage. I removed artifacts by first removing components using the 'fastica' method, and then a visual rejection. Following this, I specified the time of interest limit to the P100, and used the timelockanalysis. I have not used keeptrial or keepindividual cfg, although I don't think this is the cause of the problem. I do not have individual MRIs, therefore I have used a template from the MNI. I have applied a segmentation (using volsegment). I specified the elec positions (64 sensors), and prepared leadfields using reducerank 2, threshold 0.1, smooth 5, units 'mm' ___________________________________________________________________ Neuroscience and Aphasia Research Unit (NARU) School of Psychological Sciences (Zochonis Building) University of Manchester Brunswick Street Manchester M13 9PL UK ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ajay.halai at POSTGRAD.MANCHESTER.AC.UK Wed Jul 28 17:06:43 2010 From: ajay.halai at POSTGRAD.MANCHESTER.AC.UK (Ajay Halai) Date: Wed, 28 Jul 2010 17:06:43 +0200 Subject: EEG source localisation questions Message-ID: My apologies, I have searched through the archives, and found a similiar problem by Floris de Lange, to which Robert.O replied. I will try that suggestion. Sorry to fill up your inbox. best Ajay Roberts reply: " Last week I discussed similar issues with Jan-Mathijs. Sofar at the FCDC we have not really optimized the data handling for LCMV beamforming. Markus Bauer is one of the few who had a go at it, and for him it did not really work that well. Jan-Mathijs mentioned that sofar we have been working with the data covariance that was estimated based on the single trialsd, and not with th edata covariance estimated on the average (note that the order matters for the covariance computation and averaging). Right now I don't know the details of your experiment and data any more, but you might want to try data = preprocessing(cfg) avg1 = timelockanalysis(cfg, data) with keeptrials=no, covariance=no avg2 = timelockanalysis(cfg, avg1) with keeptrials=no, covariance=yes and then use avg2 which includes the covariance of the average in the sourceanalysis. best regards, Robert " On Wed, 28 Jul 2010 12:43:30 +0200, Ajay Halai wrote: >Dear FT users, > >I am a 1st year PhD student and new to FIELDTRIP, and any help will be very >welcome. I have managed to run simple ERP analyses on a language experiment. >I am now hoping to localise the peaks (P100 and N400) but am coming across >some problems. > >I will try my best to explain briefly my current method of analyses and >would greatly appreciate any comments or suggests, as I fear I am making a >mistake somewhere. > >The problem I encounter is that the values returned for the avg.pow are the >same for each condition. Naturally, I made sure that I specified different >conditions at the ft_sourceanalysis (cfg, data) stage, but I did specify >different conditions. I also checked the avg.noise, and was surprised to see >these values were the same as the avg.pow, which leads me to think I have >done something wrong or am failing to interpret this. Furthermore, I tried >to then use loreta, and selected the timelock data, with the same cfg but >get an error (Undefined function or method 'loreta' for input arguments of >type 'struct') and wonder if I need to specify other cfg. > >I used the 'lcmv' method. projectnoise 'yes', rawtrial 'no', lambda = 0, and >using the vol, grid and elec files from the created leadfield. > >Any suggestions on what I may be doing wrong would be greatly appreciated. >Additionally, I have provided some more details about the stages before >this, which may point to the problem. > >Best wishes >Ajay Halai > >analysis details: > >I have 7 conditions in all, but take 2 conditions for 1 subject as an >example. I have two types of speech, which show significant differences at >P100. I used a bandpass filter (1-40hz), padding (0.1), baseline correction >(-0.1 0), detrend and average EEG reference at the preprocessing stage. I >removed artifacts by first removing components using the 'fastica' method, >and then a visual rejection. Following this, I specified the time of >interest limit to the P100, and used the timelockanalysis. I have not used >keeptrial or keepindividual cfg, although I don't think this is the cause of >the problem. > >I do not have individual MRIs, therefore I have used a template from the >MNI. I have applied a segmentation (using volsegment). I specified the elec >positions (64 sensors), and prepared leadfields using reducerank 2, >threshold 0.1, smooth 5, units 'mm' > >___________________________________________________________________ >Neuroscience and Aphasia Research Unit (NARU) >School of Psychological Sciences (Zochonis Building) >University of Manchester >Brunswick Street Manchester >M13 9PL >UK > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Jul 28 21:50:21 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 28 Jul 2010 21:50:21 +0200 Subject: cluster-based analysis question In-Reply-To: Message-ID: Dear Bornali, This is more of a statistical methods question. I'm interested in doing test-retest evaluation in a data set and, most specifically, formally assessing my intuition that there are stable individual differences in the ERSP associated with performing a certain task, such that the overall "pattern" of one subject's ERSP is highly replicable, and thus reliably different from the ERSPs of other subjects. Is the fieldtrip cluster-based permutation test a suitable procedure for implementing this test? Has anyone done this type of analysis already? Any advice would be appreciated. Yes, it is straightforward to do this type of analysis in Fieldtrip. This is a so-called between-trials analysis. Your independent variable is SUBJECT, with levels the different subjects in your study. You can do this analysis for every pair of subjects (using statfun=indepsamplesT) or for all subjects jointly (using statfun=indepsamplesF). You will be testing the null hypothesis that there are no differences between subjects (or, in reliability terminology, that there are no reliable individual differences). This is a strict null hypothesis. However, it will definitely be of interest to see where the individual differences are most pronounced; on which regions of the scalp, on which time points relative to some stimulus, and in which frequency bands. Good luck, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thanks so much, Bornali -- Medical Scientist Training Program Neuroscience Training Program University of Wisconsin - Madison Health Emotions Research Institute bkundu at wisc.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at GMAIL.COM Fri Jul 30 21:42:36 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Fri, 30 Jul 2010 21:42:36 +0200 Subject: standard error of complex data Message-ID: Hello, I'd like to plot data from single channels/single subjects with error bars, so as to compare peak amplitudes across different experiment conditions. In brief, I have Hilbert transformed data filtered from 8-12Hz. Then with a function I wrote, I pull all the trials for each condition and put them into a n X m matrix (trials x timepoints) for each channel. The data are still complex because I have separate analyses for phase and amplitude. For amplitudes, I'm taking the evoked response by getting the mean of each timepoint across trials and then taking the magnitude (abs). For the standard error, I am first getting the standard deviation by stdev=sqrt[ (norm(x)-mean(x)) ^2 ] This produces a real number. For the standard error, would I then divide by the square root of N? Thanks for any feedback, Karl Doron PhD. Candidate UCSB ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Thu Jul 1 09:27:43 2010 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Thu, 1 Jul 2010 09:27:43 +0200 Subject: Nested analysis Message-ID: Dear Marco, I am not sure if you can manage this within fieldtrip alone (maybe I am wrong). What I do in more complicated statistical situation, I use R. R is an open source statistical package and is free. If you install the R.matlab library you can read and write matlab workspaces with R. R offers broad statistical modeling possibilities. With R you can model hierarchical models. You could permute your data following your Null hypothesis and create a matrix electrodes by number of permutations that contains your statistical map (let's call this matrix statrand). Then you calculate the electrode vector with the observed statistical map (let's call this vector statobs). Then you feed statobs and statrand into clusterstat.m function. Hope that is useful for you. Best, Stephan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Matthias.Meyer at DONDERS.RU.NL Thu Jul 1 09:31:04 2010 From: Matthias.Meyer at DONDERS.RU.NL (Matthias C. Meyer) Date: Thu, 1 Jul 2010 09:31:04 +0200 Subject: Export EEG Data In-Reply-To: <79FBE383-A930-4671-88D9-08480A24B22B@donders.ru.nl> Message-ID: Hi Jan-Mathijs, thanks for your answer! At least some one replies :) - I already had the feeling it would come to this, but it was worth a try. Now I know I do not waist time by working on this. Best, Matthias jan-mathijs schoffelen schrieb: > Hi Mattias, > >> I am quite new to Fieldtrip and hope that someone has solved my >> problem before. > > High expectations ;). > >> I recorded EEG data inside an MR Scanner with the BrainVision >> software and now I want to use Fieldtrip to run some error correction >> scripts - so far so god. >> But after that I need to write the corrected data back to the >> original EEG - data format. >> I use the ft_write_data function to do this. After some problems I >> manage to run the function, but the result is a double size datafile, >> a messed up header and a empty marker file. >> Probably the data is written in double precision. Giving the data to >> the function with "single(data_org.trial{1})" in the argument does >> not help. >> The command line I use to call the function is: >> ft_write_data('ScannerCor', data_org.trial{1}, 'dataformat', >> 'brainvision_eeg','header', data_org.hdr); >> >> (I copied the corrected data back to the read in matrix) >> >> I heard already, that I can tell Matlab to use only single precision, >> but it would be nice to tell that the function directly - Is there a >> way to do so? >> What do I need to do, to export the header and marker file correctly? > > I have not encountered this issue before, and I don't know whether > anybody else has. This may mean that you need to do some digging > yourself to get it solved. I never tried to export data to a different > fileformat. The easy way out here would be to also do your subsequent > analysis steps in matlab/fieldtrip. > Did you already have a detailed look at ft_write_data, and in > particular the part which deals with 'brainvision_eeg'. My suspicion > is that there is a discrepancy between the information in > data_org.hdr, and the exact data you try to export > (data_org.trial{1}). Manually converting to single precision may not > work if in data_org.hdr you need to specify the precision. (once again > I don't know about the specifics of this function, or of the functions > it relies on). Using the matlab debugger may help you to access the > variables in the function's workspace and to see what's preventing it > to work properly. > > Good luck, > > Jan-Mathijs > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 1 18:07:07 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 1 Jul 2010 18:07:07 +0200 Subject: Export EEG Data In-Reply-To: <4C2475B4.5030807@donders.ru.nl> Message-ID: Hi Matthias On 25 Jun 2010, at 11:24, Matthias C. Meyer wrote: > I recorded EEG data inside an MR Scanner with the BrainVision > software and now I want to use Fieldtrip to run some error > correction scripts - so far so god. > But after that I need to write the corrected data back to the > original EEG - data format. > I use the ft_write_data function to do this. After some problems I > manage to run the function, but the result is a double size > datafile, a messed up header and a empty marker file. How was the original data written? The brainvision dataformat allopws for many different subformats, i.e. int16, int32, float, but also ascii. Another subformat specification is whether the data is multiplexed or not. The default subformat that fieldtrip writes is multiplexed 32 bit floating point values. If the original data was 16 bit, then you would indeed expect a file that is 2x as large. That in itself is not a problem. > Probably the data is written in double precision. it is not. Have a look in fieldtrip/fileio/private/ write_brainvision_eeg.m, there you see % open the data file and write the binary data fid = fopen(datafile, 'wb', 'ieee-le'); if length(size(dat))>2 warning('writing segmented data as if it were continuous'); for i=1:ntrl fwrite(fid, squeeze(dat(i,:,:)), 'float32'); end else fwrite(fid, dat, 'float32'); end What do you mean with a "messed up header"? Can you look at the header with an ascii editor? Presumably the reason for writing to an output file is that you want to read it in in some other software. What is the software that you are trying to read the fieldtrip-generated BVA file into? M > Giving the data to the function with "single(data_org.trial{1})" in > the argument does not help. > The command line I use to call the function is: > ft_write_data('ScannerCor', data_org.trial{1}, 'dataformat', > 'brainvision_eeg','header', data_org.hdr); > > (I copied the corrected data back to the read in matrix) > > I heard already, that I can tell Matlab to use only single > precision, but it would be nice to tell that the function directly - > Is there a way to do so? > What do I need to do, to export the header and marker file correctly? > > The corrected data are exactly of the same size as the original > data, if possible, I might also use the original marker file to get > the trigger points. correct. You just have to make a copy of the marker file so that it has the same name as the new data. best Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 1 18:17:14 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 1 Jul 2010 18:17:14 +0200 Subject: databrowser: change order in which channels appear? In-Reply-To: Message-ID: Dear Henning On 25 Jun 2010, at 14:19, Henning Holle wrote: > when looking at data with the databrowser (vertical viewmode), the > channels > appear in the order in which they happen to be in the dataset. Is > there a > way to define another order (so that, for instance, more anterior > channels > appear more on top of the screen, and more posterior channels at the > bottom > of the screen). It is currently not possible without changing the code. But if you go into ft_databrowser, line 926, you'll see case 'vertical' tmpcfg = []; tmpcfg.layout = 'vertical'; tmpcfg.channel = opt.cfg.channel; tmpcfg.skipcomnt = 'yes'; tmpcfg.skipscale = 'yes'; laytime = ft_prepare_layout(tmpcfg, opt.orgdata); In that part the layout is created with the vertical arrangement of the channels, you can think of that as a set of boxes that are vertically stacked on top opf each other, where each box contains one timecourse. There you could change the code to create a custom layout. Have a look here http://fieldtrip.fcdonders.nl/tutorial/layout for an explanation of layouts. You could just change that code into case 'vertical' tmpcfg = []; tmpcfg.layout = 'yourlayoutfile.lay'; tmpcfg.channel = opt.cfg.channel; tmpcfg.skipcomnt = 'yes'; tmpcfg.skipscale = 'yes'; laytime = ft_prepare_layout(tmpcfg, opt.orgdata); and have the arrangement of the channels for the databrowser in an "yourlayoutfile.lay" ascii file best Robert PS a clean extension of teh code would be to allow for cfg.viewmode = 'yourlayoutfile.lay'; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aardesta at UCLA.EDU Thu Jul 1 23:04:16 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Thu, 1 Jul 2010 14:04:16 -0700 Subject: Vector-valued ClusterStats Message-ID: Hi, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Map.png Type: image/png Size: 627126 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Thu Jul 1 23:55:17 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 1 Jul 2010 23:55:17 +0200 Subject: Vector-valued ClusterStats In-Reply-To: <008f01cb1960$f7cdb700$e7692500$@edu> Message-ID: Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aardesta at UCLA.EDU Fri Jul 2 01:04:39 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Thu, 1 Jul 2010 16:04:39 -0700 Subject: Vector-valued ClusterStats In-Reply-To: <00ee01cb1968$17dd3fa0$4797bee0$@maris@donders.ru.nl> Message-ID: Hi Eric, Thank you very much for the fast response. So if I understand correctly, for a cluster map with X clusters the largest cluster is compared to a permutation distribution created from the largest ClusterStat of each permutation, the 2nd largest cluster to a distribution constructed from the 2nd ClusterStat of each, etc. If this is correct and the largest cluster is just being tested using Max(ClusterStat), why do you say that this vector-based approach has less power for the largest cluster? Also, the permutation distribution for the smaller clusters may not have all 1000 values if some permutations have fewer clusters, right? I appreciate the advice. Best, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, July 01, 2010 2:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Vector-valued ClusterStats Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at DONDERS.RU.NL Fri Jul 2 07:48:55 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 2 Jul 2010 07:48:55 +0200 Subject: Vector-valued ClusterStats In-Reply-To: <00e201cb1971$c98226e0$5c8674a0$@edu> Message-ID: Hi Allen, Thank you very much for the fast response. So if I understand correctly, for a cluster map with X clusters the largest cluster is compared to a permutation distribution created from the largest ClusterStat of each permutation, the 2nd largest cluster to a distribution constructed from the 2nd ClusterStat of each, etc. If this is correct and the largest cluster is just being tested using Max(ClusterStat), why do you say that this vector-based approach has less power for the largest cluster? You need a vector-valued critical value that controls the false alarm rate for all cluster sizes jointly. The first element of this vector-valued critical value is always larger than the critical value for a scalar test statistic. Also, the permutation distribution for the smaller clusters may not have all 1000 values if some permutations have fewer clusters, right? I appreciate the advice. Right, but that does not create any problems. I'm curious to find out if the cluster-based permutation tests reveal an interesting pattern in your data. Best, Eric Best, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, July 01, 2010 2:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Vector-valued ClusterStats Hi Allen, I've already looked at the 2007 JMN paper by Maris and Oostenveld, but still have some remaining questions about using a vector-valued test statistic to assess differences between 2 conditions (correct vs incorrect memory task performance). I've attached a cluster map showing the many different sizes and shapes that make it necessary to use a vector-valued test statistic. The different sizes and shapes of the clusters does not force one to use a vector-valued test statistic. 1) Do the existing FT functions handle vector-valued stats? Vector-valued stats are not supported by the ft_timelockstatistics and ft_freqstatistics functions (which call statistics_montecarlo). They are supported by the older function clusterrandanalysis, but I'm not sure how this function will behave give that Fieldtrip has gone through several changes. Don't expect too much of a vector-valued test statistic. For detecting the largest cluster, the vector-valued test statistic has LESS power than the scalar test statistic (Max(clusterstat)). I have played around with the vector-valued test statistic but there were few cases where it made a difference. 2) Are all ClusterStats from each permutation (bigger than a minimum size) included when constructing a multivariate permutation distribution? Yes. 3) Are clusters of all sizes compared to the same permutation distribution? I.e., would the 3rd largest cluster be compared to a permutation distribution obtained from just the 3rd largest stat from each permutation? The answer to your specific question is "yes". 4) Our trials each have a baseline period - in order to assess the differences between the two conditions, should we limit the permutation distribution to stats selected just from the active periods of each permutation? You can compare to a baseline that has the same number of samples as a data segment obtained in some experimental condition. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thank you very much in advance! ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.holle at SUSSEX.AC.UK Fri Jul 2 13:58:35 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Fri, 2 Jul 2010 13:58:35 +0200 Subject: ft_channelrepair produces only NaNs Message-ID: Dear list members, we have a data set here with a bad data channel (F8, see attached screenshot from the databrowser). we are able to read in the dataset (which was created in EEGLAB) and the electrode positions using the following code. %% read in data cfg = []; cfg.dataset = 's29dr.set'; D = ft_preprocessing(cfg); D.elec = D.hdr.elec; however, when we want to interpolate the bad channel using the following code %% interpolate bad channel F8 cfg = []; cfg.badchannel = 14; E = ft_channelrepair(cfg,D); we only have NaNs for channel 14 >> E.trial{1,1}(14,1:10) ans = NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN What are we doing wrong? One possibility that we have considered is that the electrode positions (which were obtained in EEGLAB) might be in a slightly different format than fieldtrip would expect them. We can't see anything wrong with, but we have attached a copy of the elec field here, just to be sure. Or is it maybe a problem for the interpolation algorithm that F8 is at the edge of covered electrodes? Any help would be greatly appreciated. Kind regards, Tiina Kalda and Henning Holle ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: bad_channel.png Type: image/png Size: 144603 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elec_structure.mat Type: application/x-matlab-workspace Size: 1535 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Fri Jul 2 16:39:31 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 2 Jul 2010 16:39:31 +0200 Subject: ft_channelrepair produces only NaNs In-Reply-To: Message-ID: Dear Henning Your electrodes seem to be expressed in mm, see >> load Desktop/elec_structure.mat >> elec.pnt ans = 80.7840 26.1330 -4.0011 84.9812 0 -1.7860 80.7840 -26.1330 -4.0011 76.1528 31.4828 20.8468 76.1528 -31.4828 20.8468 ... The default cfg.neighbourdist is 4, which is appropriate for 4 cm but not 4 mm. So that means that none of the channels is considered a neighbour. The "repair" is done by computing a weighted average over the neighbours that ly withing the specified cfg.neighbourdist, and where the weight is schaled with the inverse distance. If you specify cfg.neighbourdist correctly (40 would probably work fine), you''ll also see in the feedback on screen which electrodes are used for the repairing. hope this helps. Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- On 2 Jul 2010, at 13:58, Henning Holle wrote: > Dear list members, > > we have a data set here with a bad data channel (F8, see attached screenshot from the > databrowser). > > > we are able to read in the dataset (which was created in EEGLAB) and the electrode > positions using the following code. > > %% read in data > > cfg = []; > cfg.dataset = 's29dr.set'; > D = ft_preprocessing(cfg); > D.elec = D.hdr.elec; > > however, when we want to interpolate the bad channel using the following code > > %% interpolate bad channel F8 > > cfg = []; > cfg.badchannel = 14; > E = ft_channelrepair(cfg,D); > > we only have NaNs for channel 14 > >>> E.trial{1,1}(14,1:10) > > ans = > > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > > What are we doing wrong? One possibility that we have considered is that the electrode > positions (which were obtained in EEGLAB) might be in a slightly different format than > fieldtrip would expect them. We can't see anything wrong with, but we have attached a > copy of the elec field here, just to be sure. > > Or is it maybe a problem for the interpolation algorithm that F8 is at the edge of covered > electrodes? > > Any help would be greatly appreciated. > > Kind regards, > > Tiina Kalda and Henning Holle > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aardesta at UCLA.EDU Fri Jul 2 21:56:25 2010 From: aardesta at UCLA.EDU (Allen Ardestani) Date: Fri, 2 Jul 2010 12:56:25 -0700 Subject: Plotting Single Trials In-Reply-To: <000901cb19aa$425b5e50$c7121af0$@maris@donders.ru.nl> Message-ID: Hello, I have a simple question about TFR plotting. After using freqanalysis to compute TFRs for a single channel, what is the simplest way to view the plots for individual trials? Also, is it possible to use 'avgoverfreq' to show 2D power trends over time within a given frequency range before using freqstatistics? Thanks! P.S. Eric, I will let you know the vector-based ClusterStat results as soon as they are computed. Thanks, Allen ____________________________________________________________________________ ______ Allen Ardestani Email: aardesta at ucla.edu Phone: (310) 825-5528 Medical Scientist Training Program David Geffen School of Medicine at UCLA Semel Institute for Neuroscience and Human Behavior 760 Westwood Plaza Los Angeles, CA 90095-1759 USA ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at GMAIL.COM Sun Jul 4 03:07:15 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Sun, 4 Jul 2010 03:07:15 +0200 Subject: Plotting Single Trials Message-ID: Hi Allen, I did this by switching trials and channels in the data structure from TFR output. That way, I can still using multiplotTFR. The rows (x-axis) of each channel then become the individual trials, rather than frequency (I think that's what I did - it was a few weeks ago). This worked for me because I'm looking at a specific frequency band. You might end up with a lot of these data structures if you have TFRs across a broader range of frequencies. If you email me on Tues, I'd be happy to send you the code (it's on my university computer). Best, karl doron k.doron at psych.ucsb.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From marco.buiatti at GMAIL.COM Sun Jul 4 16:27:36 2010 From: marco.buiatti at GMAIL.COM (Marco Buiatti) Date: Sun, 4 Jul 2010 16:27:36 +0200 Subject: freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag) Message-ID: Hi all, I am facing a problem that has been raised before (see the thread below): how to consider the three different sensor types of the 306-channels Neuromag system when performing cluster-based permutation analysis in Fieldtrip. Eric Maris suggested to either simply sum the power at the pairs of orthogonal planar gradiometers, or to invent some more sophisticated way to retain the orientation information. I wonder whether anyone has tried these two solutions (or others). Thanks, Best, Marco ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Mon Jul 5 15:02:15 2010 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Mon, 5 Jul 2010 15:02:15 +0200 Subject: plv analysis In-Reply-To: <000401cb1a20$a830b0b0$f8921210$@edu> Message-ID: Dear ft_list, I am trying to perform plv analysis using Fieldtrip, on EEG data converted from SPM to Fieldtrip using ftraw. Frequanalysis on the imported data works fine, I obtain the powspctrm and crsspctrm, and I can succeed with connectivityanalyis to compute e.g., coherence without problems. However, when I set cfg.method to 'plv', connectivityanalysis throws the following error: ??? Conversion to cell from double is not possible. Error in ==> avgoverdim at 17 reduceddim(avgdimnum) = 1; Error in ==> selectdata at 445 if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end Error in ==> ft_connectivityanalysis at 256 data = selectdata(data, 'avgoverrpt', 'yes'); any suggestions? best & many thanks Bernhard %Here the settings I use for frequanalysis (which seems to work fine) cfg = []; cfg.output ='powandcsd'; cfg.taper = 'dpss'; cfg.channel = unique(S.chancomb(:)); cfg.channelcmb = S.chancomb; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'no'; cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % Frequency axis cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); numfoi = length(cfg.foi); cfg.t_ftimwin = zeros(1,numfoi); cfg.t_ftimwin(:) = timewin; % Time resolution cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to 1/timewin (i.e. 2.5 Hz) for all frequencis cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = 0.1*cfg.foi(cfg.foi>10*(1/timewin)); cfg.tapsmofrq(cfg.foi>50) = 5; cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/data.fsample); % Time axis freq = ft_freqanalysis(cfg, data); %And the part for connectivityanalysis (which works for coherence, but not for plv) cfg=[]; cfg.method = 'plv'; [stat] = ft_connectivityanalysis(cfg, freqs) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Mon Jul 5 15:54:51 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Mon, 5 Jul 2010 15:54:51 +0200 Subject: plv analysis In-Reply-To: <4C31D7D7.2010204@bccn-berlin.de> Message-ID: Hi Bernhard, Could you check whether you are using a very recent version of fieldtrip? If not, please update and check whether the bug persists. It sounds rather like a known bug which has been recently fixed. Best, Jan-Mathijs On Jul 5, 2010, at 3:02 PM, Bernhard Spitzer wrote: > Dear ft_list, > > I am trying to perform plv analysis using Fieldtrip, on EEG data > converted from SPM to Fieldtrip using ftraw. > Frequanalysis on the imported data works fine, I obtain the > powspctrm and crsspctrm, and I can succeed > with connectivityanalyis to compute e.g., coherence without problems. > However, when I set cfg.method to 'plv', connectivityanalysis throws > the following error: > > ??? Conversion to cell from double is not possible. > > Error in ==> avgoverdim at 17 > reduceddim(avgdimnum) = 1; > > Error in ==> selectdata at 445 > if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end > > Error in ==> ft_connectivityanalysis at 256 > data = selectdata(data, 'avgoverrpt', 'yes'); > > any suggestions? > best & many thanks > Bernhard > > > > %Here the settings I use for frequanalysis (which seems to work fine) > cfg = []; > cfg.output ='powandcsd'; > cfg.taper = 'dpss'; > cfg.channel = unique(S.chancomb(:)); > cfg.channelcmb = S.chancomb; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'no'; > cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % > Frequency axis > cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); > numfoi = length(cfg.foi); > cfg.t_ftimwin = zeros(1,numfoi); > cfg.t_ftimwin(:) = timewin; % Time resolution > cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero > cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to 1/ > timewin (i.e. 2.5 Hz) for all frequencis > cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = 0.1*cfg.foi(cfg.foi>10*(1/ > timewin)); > cfg.tapsmofrq(cfg.foi>50) = 5; > cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/ > data.fsample); % Time axis > freq = ft_freqanalysis(cfg, data); > > %And the part for connectivityanalysis (which works for coherence, > but not for plv) > cfg=[]; > cfg.method = 'plv'; > [stat] = ft_connectivityanalysis(cfg, freqs) > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bernhard.spitzer at BCCN-BERLIN.DE Mon Jul 5 17:38:14 2010 From: bernhard.spitzer at BCCN-BERLIN.DE (Bernhard Spitzer) Date: Mon, 5 Jul 2010 17:38:14 +0200 Subject: plv analysis In-Reply-To: <767966C1-8039-4C3F-9A73-B74F0BE8361B@donders.ru.nl> Message-ID: Dear Jan-Mathijs, thank you - in fact my pathdef was outdated and pointed to an older fieldtrip version. With the current version now the plv works indeed without problems. Thanks again! Bernhard Am 7/5/2010 3:54 PM, schrieb jan-mathijs schoffelen: > Hi Bernhard, > > Could you check whether you are using a very recent version of > fieldtrip? If not, please update and check whether the bug persists. > It sounds rather like a known bug which has been recently fixed. > > Best, > > Jan-Mathijs > > > On Jul 5, 2010, at 3:02 PM, Bernhard Spitzer wrote: > >> Dear ft_list, >> >> I am trying to perform plv analysis using Fieldtrip, on EEG data >> converted from SPM to Fieldtrip using ftraw. >> Frequanalysis on the imported data works fine, I obtain the powspctrm >> and crsspctrm, and I can succeed >> with connectivityanalyis to compute e.g., coherence without problems. >> However, when I set cfg.method to 'plv', connectivityanalysis throws >> the following error: >> >> ??? Conversion to cell from double is not possible. >> >> Error in ==> avgoverdim at 17 >> reduceddim(avgdimnum) = 1; >> >> Error in ==> selectdata at 445 >> if avgoverrpt, tmpdata = avgoverdim(tmpdata, 'rpt'); end >> >> Error in ==> ft_connectivityanalysis at 256 >> data = selectdata(data, 'avgoverrpt', 'yes'); >> >> any suggestions? >> best & many thanks >> Bernhard >> >> >> >> %Here the settings I use for frequanalysis (which seems to work fine) >> cfg = []; >> cfg.output ='powandcsd'; >> cfg.taper = 'dpss'; >> cfg.channel = unique(S.chancomb(:)); >> cfg.channelcmb = S.chancomb; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'no'; >> cfg.foi = (1/timewin):(1/timewin):S.freqwin(2); % >> Frequency axis >> cfg.foi = cfg.foi(cfg.foi>=S.freqwin(1)); >> numfoi = length(cfg.foi); >> cfg.t_ftimwin = zeros(1,numfoi); >> cfg.t_ftimwin(:) = timewin; % Time resolution >> cfg.tapsmofrq = zeros(1,numfoi); % Initialize to zero >> cfg.tapsmofrq(:) = 1/timewin; % Set initial resolution to >> 1/timewin (i.e. 2.5 Hz) for all frequencis >> cfg.tapsmofrq(cfg.foi>10*(1/timewin)) = >> 0.1*cfg.foi(cfg.foi>10*(1/timewin)); >> cfg.tapsmofrq(cfg.foi>50) = 5; >> cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/data.fsample); >> % Time axis >> freq = ft_freqanalysis(cfg, data); >> >> %And the part for connectivityanalysis (which works for coherence, >> but not for plv) >> cfg=[]; >> cfg.method = 'plv'; >> [stat] = ft_connectivityanalysis(cfg, freqs) >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. -- ----------------------------------------------- Dr. Bernhard Spitzer Bernstein Center for Computational Neuroscience Charité Universitätsmedizin Berlin Philippstr. 13 House 6 10115 Berlin Germany Phone: +49 (0)30 2093-6789 Fax: +49 (0)30 2093-6771 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From matthew at PSYCH.COLUMBIA.EDU Tue Jul 6 03:26:02 2010 From: matthew at PSYCH.COLUMBIA.EDU (Matthew Davidson) Date: Mon, 5 Jul 2010 21:26:02 -0400 Subject: Independent channels stats question Message-ID: Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using Fieldtrip more directly. My question pertains to cluster-based correction when channels are independent. My data is primarily intracranial EEG, and due to the 1/f^2 power drop-off, electrodes directly on the brain reflect local activity much more strongly than sensors further away. As a result, we treat them as independent. Now, I can force the Fieldtrip clustering algorithm to not cluster across channels by setting: cfg.neighbours = []; cfg.minnbchan = 0; but it still computes the maximum cluster size for a particular permutation based on *all* the data. This seems... less sensitive somehow, as if large clusters in one channel negatively impact the significance of clusters in another channel. Is there a better way to do this and still solve the MCP? E.g., compute the maxsum on each channel separately, and then use something like FDR or Bonferroni correction on the maxsums across channels? Thanks for any advice you may have, and thanks for producing fieldtrip! Matthew ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mcregar at UPO.ES Tue Jul 6 12:56:31 2010 From: mcregar at UPO.ES (Maite Crespo) Date: Tue, 6 Jul 2010 12:56:31 +0200 Subject: what is wrong? Message-ID: Hello! I read some previous mails in the discussion list, but I'm still not sure about the procedure I'm following. I'm obtaining too flat images (not spatially located sources). I would like to localize the source activity within a frequency band and a time window. I computed the CSD matrix using ft_freqanalysis. Can I average the resulting matrix in frequency and time before using it with ft_sourceanalysis? I used the following steps to compute the filters in the averaged CSD (across trials) and then apply it to compute the power in single trial data. Is that right? % 1st run cfg=[]; cfg.frequency=5; cfg.latency=.7; cfg.method='dics'; cfg.projectnoise='yes'; cfg.keepfilter='yes'; cfg.grid=grid; cfg.vol=vol; cfg.elecfile=elecfile; cfg.lambda=.05; source=ft_sourceanalysis(cfg,data); % 2nd run cfg=[]; cfg.frequency=5; cfg.latency=.7; cfg.method='dics'; cfg.projectnoise='yes'; cfg.rawtrial='yes'; source.leadfield=grid.leadfield; cfg.grid=source2grid(source); cfg.vol=vol; cfg.elecfile=elecfile; cfg.lambda=.05; source=ft_sourceanalysis(cfg,data); I also tried changing the lambda parameter, but it seems there are not many changes... Many thanks in advance for any help. Best regards, Maité ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jul 6 13:21:58 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 6 Jul 2010 13:21:58 +0200 Subject: Independent channels stats question In-Reply-To: Message-ID: Dear Matthew, Your sensitivity problem is a known issue when using cluster-based test statistics, in which it is difficult to get small clusters significant in the presence of large clusters. This could also occur within a single channel (for example with a time-frequency decomposition, in which the summed spectro-temporal extent of an alpha- band effect could be much bigger than a gamma-band effect). In your case I think it would be statistically valid to do the cluster- based permutation test on each channel separately (which will involve a for loop around ft_freqstatistics, because it is not implemented in the fieldtrip code) and doing a post-hoc Bonferroni correction on the resulting p-values. If the number of channels is not too big, this might work. Good luck, Jan-Mathijs On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG > Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using > Fieldtrip more directly. > > My question pertains to cluster-based correction when channels are > independent. My data is primarily intracranial EEG, and due to the > 1/f^2 power drop-off, electrodes directly on the brain reflect local > activity much more strongly than sensors further away. As a result, we > treat them as independent. Now, I can force the Fieldtrip clustering > algorithm to not cluster across channels by setting: > > cfg.neighbours = []; > cfg.minnbchan = 0; > > but it still computes the maximum cluster size for a particular > permutation based on *all* the data. This seems... less sensitive > somehow, as if large clusters in one channel negatively impact the > significance of clusters in another channel. > > Is there a better way to do this and still solve the MCP? E.g., > compute the maxsum on each channel separately, and then use something > like FDR or Bonferroni correction on the maxsums across channels? > > Thanks for any advice you may have, and thanks for producing > fieldtrip! > Matthew > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Jul 6 13:33:19 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 6 Jul 2010 13:33:19 +0200 Subject: what is wrong? In-Reply-To: Message-ID: Dear Maité, What do you mean by spatially not located sources? In general it may be helpful to give more to-the-point information besides the input cfg-structures. The output of your beamformer analysis depends both on the sanity of the data (which I cannot check), and on the sanity of the input configuration. Two remarks w.r.t the cfg: -when cfg.lambda is a scalar, the csd-matrix will be regularized with an identity matrix, scaled with cfg.lambda. From your value of 0.05 however I assume that you want to do a relative scaling. True? In that case you should specify cfg.lambda = '5%'; The consequence of the 0.05 could be that if the scale of your data is Volts-squared or microVolts- squared (boiling down to the csd having a magnitude of 10^-12 or 1, respectively) which at least in the first case leads to inappropriate regularisation. -in the second step I assume you want to re-use the filters computed in step 1. Therefore you need to pass source.avg.filter (computed in the first step) to the cfg. Does this happen in source2grid? I don't know, it could be, but I'd check that if I were you. Some post-processing probably needs to be done in order to see spatially localized sources (even when the whole analysis went fine (=data OK and cfgs OK) until this point), so just looking at the output of sourceanalysis typically is not optimal. For the computation of the CSD-matrix I'd like to refer to the tutorial http://fieldtrip.fcdonders.nl/tutorial/beamformer on the fieldtrip wiki. Best, Jan-Mathijs On Jul 6, 2010, at 12:56 PM, Maite Crespo wrote: > Hello! > > I read some previous mails in the discussion list, but I'm still not > sure about > the procedure I'm following. I'm obtaining too flat images (not > spatially located > sources). I would like to localize the source activity within a > frequency band > and a time window. I computed the CSD matrix using ft_freqanalysis. > Can I > average the resulting matrix in frequency and time before using it > with > ft_sourceanalysis? > > I used the following steps to compute the filters in the averaged > CSD (across > trials) and then apply it to compute the power in single trial data. > Is that > right? > > % 1st run > cfg=[]; > cfg.frequency=5; > cfg.latency=.7; > cfg.method='dics'; > cfg.projectnoise='yes'; > cfg.keepfilter='yes'; > cfg.grid=grid; > cfg.vol=vol; > cfg.elecfile=elecfile; > cfg.lambda=.05; > source=ft_sourceanalysis(cfg,data); > > % 2nd run > cfg=[]; > cfg.frequency=5; > cfg.latency=.7; > cfg.method='dics'; > cfg.projectnoise='yes'; > cfg.rawtrial='yes'; > source.leadfield=grid.leadfield; > cfg.grid=source2grid(source); > cfg.vol=vol; > cfg.elecfile=elecfile; > cfg.lambda=.05; > source=ft_sourceanalysis(cfg,data); > > I also tried changing the lambda parameter, but it seems there are > not many > changes... > > Many thanks in advance for any help. > > Best regards, > Maité > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.bauer at UCL.AC.UK Tue Jul 6 16:58:55 2010 From: m.bauer at UCL.AC.UK (Markus Bauer) Date: Tue, 6 Jul 2010 15:58:55 +0100 Subject: ANT (*.cnt) format MEX files for 64 bit Message-ID: Hi we've been trying to read ANT files with fieldtrip under various operating systems - without success. unfortunately this 'EEProbe' toolbox that is used to read those data only seems to provide mex-files for 32bit machines (LINUX or Windows) and no source code to allow compilation can anybody make such files available or knows who could be contacted? thanks Markus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sunyata at GMAIL.COM Tue Jul 6 18:47:31 2010 From: sunyata at GMAIL.COM (Matthew Davidson) Date: Tue, 6 Jul 2010 12:47:31 -0400 Subject: Independent channels stats question In-Reply-To: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Jan-Mathis, thanks for the response. Unfortunately, we tend to have a lot of channels (~120-200), and once we start using microelectrodes in the patients, it'll only get worse. If we were to divide our alpha by 120-200, wouldn't we have to run 120-200 times as many permutations in order to get p-values low enough to survive Bonferroni correction? That's a large jump; we might have to run 100,000 permutations! What do you think about something like FDR correction instead? Matthew On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen wrote: > Dear Matthew, > > Your sensitivity problem is a known issue when using cluster-based test > statistics, in which it is difficult to get small clusters significant in > the presence of large clusters. This could also occur within a single > channel (for example with a time-frequency decomposition, in which the > summed spectro-temporal extent of an alpha-band effect could be much bigger > than a gamma-band effect). > In your case I think it would be statistically valid to do the cluster-based > permutation test on each channel separately (which will involve a for loop > around ft_freqstatistics, because it is not implemented in the fieldtrip > code) and doing a post-hoc Bonferroni correction on the resulting p-values. > If the number of channels is not too big, this might work. > > Good luck, > > Jan-Mathijs > > > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using >> Fieldtrip more directly. >> >> My question pertains to cluster-based correction when channels are >> independent. My data is primarily intracranial EEG, and due to the >> 1/f^2 power drop-off, electrodes directly on the brain reflect local >> activity much more strongly than sensors further away. As a result, we >> treat them as independent. Now, I can force the Fieldtrip clustering >> algorithm to not cluster across channels by setting: >> >> cfg.neighbours = []; >> cfg.minnbchan = 0; >> >> but it still computes the maximum cluster size for a particular >> permutation based on *all* the data. This seems... less sensitive >> somehow, as if large clusters in one channel negatively impact the >> significance of clusters in another channel. >> >> Is there a better way to do this and still solve the MCP? E.g., >> compute the maxsum on each channel separately, and then use something >> like FDR or Bonferroni correction on the maxsums across channels? >> >> Thanks for any advice you may have, and thanks for producing fieldtrip! >> Matthew >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From georges.otte at TELENET.BE Tue Jul 6 22:22:19 2010 From: georges.otte at TELENET.BE (Dr. Georges Otte) Date: Tue, 6 Jul 2010 22:22:19 +0200 Subject: ANT (*.cnt) format MEX files for 64 bit In-Reply-To: <4C3344AF.2000503@ucl.ac.uk> Message-ID: Dea markus, I will forward your mail to maarten van de Velde at ANT who could help You out. georges -----Oorspronkelijk bericht----- Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Markus Bauer Verzonden: dinsdag 6 juli 2010 16:59 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] ANT (*.cnt) format MEX files for 64 bit Hi we've been trying to read ANT files with fieldtrip under various operating systems - without success. unfortunately this 'EEProbe' toolbox that is used to read those data only seems to provide mex-files for 32bit machines (LINUX or Windows) and no source code to allow compilation can anybody make such files available or knows who could be contacted? thanks Markus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From gflandin at FIL.ION.UCL.AC.UK Wed Jul 7 13:43:39 2010 From: gflandin at FIL.ION.UCL.AC.UK (Guillaume Flandin) Date: Wed, 7 Jul 2010 12:43:39 +0100 Subject: ANT (*.cnt) format MEX files for 64 bit In-Reply-To: <201007062022.o66KMhAq006895@filter1-nij.mf.surf.net> Message-ID: Dear Markus, compiled MEX files on most platforms of the eeprobe importer from ANT are available in the external/eeprobe folder of SPM8, if this can be of any help. Best regards, Guillaume. Dr. Georges Otte wrote: > Dea markus, > > I will forward your mail to maarten van de Velde at ANT who could help You > out. > > georges > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens > Markus Bauer > Verzonden: dinsdag 6 juli 2010 16:59 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] ANT (*.cnt) format MEX files for 64 bit > > Hi > > we've been trying to read ANT files with fieldtrip under various > operating systems - without success. > > unfortunately this 'EEProbe' toolbox that is used to read those data > only seems to provide mex-files for 32bit machines (LINUX or Windows) > and no source code to allow compilation > > can anybody make such files available or knows who could be contacted? > > thanks > Markus -- Guillaume Flandin, PhD Wellcome Trust Centre for Neuroimaging University College London 12 Queen Square London WC1N 3BG ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sangita.dandekar at GMAIL.COM Wed Jul 7 21:37:06 2010 From: sangita.dandekar at GMAIL.COM (Sangita Dandekar) Date: Wed, 7 Jul 2010 15:37:06 -0400 Subject: megplanar on Yokogawa axial gradiometers Message-ID: Hi, I'd like to get an estimate of horizontal and vertical planar gradients at each axial gradiometer in our Yokogawa system. The megplanar function in fieldtrip is setup to check whether input data were collected on CTF or BTI systems and breaks out of the code if that is not the case. I was wondering why (and if) the code in the megplanar function is specific to only CTF and BTI systems? I have not looked at the megplanar code too closely yet, but it seems as though the geometry of the yokogawa system's axial gradiometers should allow application of the 'original', 'sincos' and 'fitplane' estimation methods. It would be great if someone who knows the details of the above three planar gradient estimation methods could let me know if they should work on the Yokogawa's axial gradiometers without modification, or, if modification is necessary, what the nature of the modifications that I need to make are. Thanks in advance for any help! Sangi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 10:41:11 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 03:41:11 -0500 Subject: No subject Message-ID: Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: align1.jpg Type: image/jpeg Size: 272040 bytes Desc: align1.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: align2.jpg Type: image/jpeg Size: 89401 bytes Desc: align2.jpg URL: From a.stolk at FCDONDERS.RU.NL Thu Jul 8 11:17:14 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Thu, 8 Jul 2010 11:17:14 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C29@UTHCMS1.uthouston.edu> Message-ID: Hi Tony, Just to be sure; did you add the .pos and .dim from the template grid to your data before interpolating? In code; data.pos = template_grid.pos; data.dim = template_grid.dim; cfg = []; cfg.parameter = 'all'; data_int = ft_sourceinterpolate(cfg, data, mri); You can then ft_sourceplot the interpolated data. Best, Arjen p.s. if still running into problems, make sure you have followed the steps described here: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ----- Original Message ----- From: "Antony D Passaro" To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From s.mohr at PSY.GLA.AC.UK Thu Jul 8 13:58:42 2010 From: s.mohr at PSY.GLA.AC.UK (sibylle) Date: Thu, 8 Jul 2010 12:58:42 +0100 Subject: Problems with sourceanalysis Message-ID: Hi everyone, I'm trying to localize oscillatory sources on BESA dat-files. I downloaded the standard BEM-Model from the Fieldtrip ftp-server and aligned my electrodes to the BEM using the 'interactive'-method (see attached script 'align_elec.m'). The thing is that I run into problems when I try to do the actual sourceanalysis (see attached script 'sources_testfile.m'): Preprocessing and freqanalysis is fine, but then the sourceanalysis crashes. This is because no filters are created for two voxels, because the leadfield contains NaNs. Temporarily, I replace the two leadfield voxels (2714 and 2735) with their neighbouring leadfield to run the sourceanalysis smoothly. It's a quick fix, but of course not ideal. Does anyone know what goes wrong? Any help is much appreciated! Thanks a lot, Sibylle ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: align_elec.m Type: application/octet-stream Size: 2208 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sources_testfile.m Type: application/octet-stream Size: 4016 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 13:57:01 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 06:57:01 -0500 Subject: No subject In-Reply-To: <12062554.3767811278580634559.JavaMail.root@watertor.uci.ru.nl> Message-ID: Hi Arjen, Thank you very much for your help. I had not added the .pos and .dim to my grid before interpolating, but after adding that information I had the same result as before. I then checked the .pos and .dim of the data before redefining it and noticed that it was already identical to the template grid information. I also referred to the example that you had suggested, however, I am currently looking at a single subject to verify localization before moving on to multiple subject analyses. Additionally, I would like to visualize data projected on to a single subject's MRI prior to normalizing the data. Any other suggestions would be greatly appreciated. Thank you again, -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] Sent: Thursday, July 08, 2010 4:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Hi Tony, Just to be sure; did you add the .pos and .dim from the template grid to your data before interpolating? In code; data.pos = template_grid.pos; data.dim = template_grid.dim; cfg = []; cfg.parameter = 'all'; data_int = ft_sourceinterpolate(cfg, data, mri); You can then ft_sourceplot the interpolated data. Best, Arjen p.s. if still running into problems, make sure you have followed the steps described here: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ----- Original Message ----- From: "Antony D Passaro" To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Hi, I've been having issues projecting source estimates onto an MRI. I discovered that several of my components (vol, grad, grid) did not exist in the same coordinate space. Some were in mm and some in cm. After I resolved these issues, I was able to use headmodelplot to verify that everything was correct (see attached screenshot). I then attempted source localization using lcmv and noticed that that the projected activation existed in the incorrect orientation (see second attached screenshot). I'm not sure what I'm doing wrong as all of my components are in the correct space. I also tried to use the interactive option of sourceplot to correctly set n,l,r but that didn't seem to change anything. I'm sure it is something very simple that I am overlooking but any help would be much appreciated. Thank you, -Tony ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 14:14:18 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 14:14:18 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2A@UTHCMS1.uthouston.edu> Message-ID: Dear Tony, It looks as if the coordinate system attached to your single subject's mri is not according to 4D's convention (it rather looks as if it is defined an mni space). The reason why I think this is that your x and y axes seem to be swapped, and there is a slight shift in the z- direction, suggesting a difference in origin. You can enforce the correct coordinate system onto the MRI by using ft_volumerealign in the interactive mode (and then specifying lpa, rpa and nasion by hand: this should return an updated mri.transform, which describes the transformation from voxel space to subject's headspace) . This should of course be done before calling ft_sourceinterpolate. Cheers, Jan-Mathijs On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim > to my grid before interpolating, but after adding that information I > had the same result as before. I then checked the .pos and .dim of > the data before redefining it and noticed that it was already > identical to the template grid information. I also referred to the > example that you had suggested, however, I am currently looking at a > single subject to verify localization before moving on to multiple > subject analyses. Additionally, I would like to visualize data > projected on to a single subject's MRI prior to normalizing the > data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template > grid to your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the > steps described here: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / > Berlin / Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not > exist in the same coordinate space. Some were in mm and some in cm. > After I resolved these issues, I was able to use headmodelplot to > verify that everything was correct (see attached screenshot). I then > attempted source localization using lcmv and noticed that that the > projected activation existed in the incorrect orientation (see > second attached screenshot). I'm not sure what I'm doing wrong as > all of my components are in the correct space. I also tried to use > the interactive option of sourceplot to correctly set n,l,r but that > didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 14:50:01 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 07:50:01 -0500 Subject: No subject In-Reply-To: Message-ID: Dear Jan-Mathijs, Thank you again for your help, I appreciate it. I had forgotten to mention that I had used ft_volumerealign to align the mri before creating the volume conduction model using ft_preapre_singleshell. I then used the resulting vol in the ft_sourceanalyses, although I feel as though I am missing a step here which places the data in the same space as the MRI via the volume conduction model. Thanks, -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] Sent: Thursday, July 08, 2010 7:14 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Tony, It looks as if the coordinate system attached to your single subject's mri is not according to 4D's convention (it rather looks as if it is defined an mni space). The reason why I think this is that your x and y axes seem to be swapped, and there is a slight shift in the z- direction, suggesting a difference in origin. You can enforce the correct coordinate system onto the MRI by using ft_volumerealign in the interactive mode (and then specifying lpa, rpa and nasion by hand: this should return an updated mri.transform, which describes the transformation from voxel space to subject's headspace) . This should of course be done before calling ft_sourceinterpolate. Cheers, Jan-Mathijs On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim > to my grid before interpolating, but after adding that information I > had the same result as before. I then checked the .pos and .dim of > the data before redefining it and noticed that it was already > identical to the template grid information. I also referred to the > example that you had suggested, however, I am currently looking at a > single subject to verify localization before moving on to multiple > subject analyses. Additionally, I would like to visualize data > projected on to a single subject's MRI prior to normalizing the > data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template > grid to your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the > steps described here: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / > Berlin / Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not > exist in the same coordinate space. Some were in mm and some in cm. > After I resolved these issues, I was able to use headmodelplot to > verify that everything was correct (see attached screenshot). I then > attempted source localization using lcmv and noticed that that the > projected activation existed in the incorrect orientation (see > second attached screenshot). I'm not sure what I'm doing wrong as > all of my components are in the correct space. I also tried to use > the interactive option of sourceplot to correctly set n,l,r but that > didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From yuvharpaz at GMAIL.COM Thu Jul 8 14:40:34 2010 From: yuvharpaz at GMAIL.COM (Yuval Harpaz) Date: Thu, 8 Jul 2010 15:40:34 +0300 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2A@UTHCMS1.uthouston.edu> Message-ID: we had a similar problem but we only needed to interpolate on template MRI. we copied the pos of the template and it worked fine. by the way, normalization did not work well for us for more than 10 subjects or so, RAM problems. yuval On 8 July 2010 14:57, Passaro, Antony D wrote: > Hi Arjen, > > Thank you very much for your help. I had not added the .pos and .dim to my > grid before interpolating, but after adding that information I had the same > result as before. I then checked the .pos and .dim of the data before > redefining it and noticed that it was already identical to the template grid > information. I also referred to the example that you had suggested, however, > I am currently looking at a single subject to verify localization before > moving on to multiple subject analyses. Additionally, I would like to > visualize data projected on to a single subject's MRI prior to normalizing > the data. Any other suggestions would be greatly appreciated. > > Thank you again, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] > Sent: Thursday, July 08, 2010 4:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Hi Tony, > > Just to be sure; did you add the .pos and .dim from the template grid to > your data before interpolating? > > In code; > > data.pos = template_grid.pos; > data.dim = template_grid.dim; > cfg = []; > cfg.parameter = 'all'; > data_int = ft_sourceinterpolate(cfg, data, mri); > > You can then ft_sourceplot the interpolated data. > > Best, > Arjen > > p.s. if still running into problems, make sure you have followed the steps > described here: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > ----- Original Message ----- > From: "Antony D Passaro" > To: FIELDTRIP at NIC.SURFNET.NL > Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / Berlin / > Bern / Rome / Stockholm / Vienna > Subject: [FIELDTRIP] > > Hi, > > I've been having issues projecting source estimates onto an MRI. I > discovered that several of my components (vol, grad, grid) did not exist in > the same coordinate space. Some were in mm and some in cm. After I resolved > these issues, I was able to use headmodelplot to verify that everything was > correct (see attached screenshot). I then attempted source localization > using lcmv and noticed that that the projected activation existed in the > incorrect orientation (see second attached screenshot). I'm not sure what > I'm doing wrong as all of my components are in the correct space. I also > tried to use the interactive option of sourceplot to correctly set n,l,r but > that didn't seem to change anything. I'm sure it is something very simple > that I am overlooking but any help would be much appreciated. > > Thank you, > -Tony > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > -- Y.Harpaz a link to the BIU MEG lab: http://faculty.biu.ac.il/~goldsa/index.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 14:52:54 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 14:52:54 +0200 Subject: No subject In-Reply-To: <28A0B4FADA19A14E9607D69ABD1E01932748085C2C@UTHCMS1.uthouston.edu> Message-ID: Dear Tony, What you did for the creation of the volume conduction model is indeed correct. The question now is whether you also used the updated mri for ft_sourceinterpolate, or whether you went back to loading the mri from file without the correct coordinate frame info... JM On Jul 8, 2010, at 2:50 PM, Passaro, Antony D wrote: > Dear Jan-Mathijs, > > Thank you again for your help, I appreciate it. I had forgotten to > mention that I had used ft_volumerealign to align the mri before > creating the volume conduction model using ft_preapre_singleshell. I > then used the resulting vol in the ft_sourceanalyses, although I > feel as though I am missing a step here which places the data in the > same space as the MRI via the volume conduction model. > > Thanks, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] > Sent: Thursday, July 08, 2010 7:14 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Dear Tony, > > It looks as if the coordinate system attached to your single subject's > mri is not according to 4D's convention (it rather looks as if it is > defined an mni space). The reason why I think this is that your x and > y axes seem to be swapped, and there is a slight shift in the z- > direction, suggesting a difference in origin. You can enforce the > correct coordinate system onto the MRI by using ft_volumerealign in > the interactive mode (and then specifying lpa, rpa and nasion by hand: > this should return an updated mri.transform, which describes the > transformation from voxel space to subject's headspace) . This should > of course be done before calling ft_sourceinterpolate. > > Cheers, > > Jan-Mathijs > > On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > >> Hi Arjen, >> >> Thank you very much for your help. I had not added the .pos and .dim >> to my grid before interpolating, but after adding that information I >> had the same result as before. I then checked the .pos and .dim of >> the data before redefining it and noticed that it was already >> identical to the template grid information. I also referred to the >> example that you had suggested, however, I am currently looking at a >> single subject to verify localization before moving on to multiple >> subject analyses. Additionally, I would like to visualize data >> projected on to a single subject's MRI prior to normalizing the >> data. Any other suggestions would be greatly appreciated. >> >> Thank you again, >> -Tony >> ________________________________________ >> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf >> Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] >> Sent: Thursday, July 08, 2010 4:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] >> >> Hi Tony, >> >> Just to be sure; did you add the .pos and .dim from the template >> grid to your data before interpolating? >> >> In code; >> >> data.pos = template_grid.pos; >> data.dim = template_grid.dim; >> cfg = []; >> cfg.parameter = 'all'; >> data_int = ft_sourceinterpolate(cfg, data, mri); >> >> You can then ft_sourceplot the interpolated data. >> >> Best, >> Arjen >> >> p.s. if still running into problems, make sure you have followed the >> steps described here: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space >> >> ----- Original Message ----- >> From: "Antony D Passaro" >> To: FIELDTRIP at NIC.SURFNET.NL >> Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / >> Berlin / Bern / Rome / Stockholm / Vienna >> Subject: [FIELDTRIP] >> >> Hi, >> >> I've been having issues projecting source estimates onto an MRI. I >> discovered that several of my components (vol, grad, grid) did not >> exist in the same coordinate space. Some were in mm and some in cm. >> After I resolved these issues, I was able to use headmodelplot to >> verify that everything was correct (see attached screenshot). I then >> attempted source localization using lcmv and noticed that that the >> projected activation existed in the incorrect orientation (see >> second attached screenshot). I'm not sure what I'm doing wrong as >> all of my components are in the correct space. I also tried to use >> the interactive option of sourceplot to correctly set n,l,r but that >> didn't seem to change anything. I'm sure it is something very simple >> that I am overlooking but any help would be much appreciated. >> >> Thank you, >> -Tony >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Thu Jul 8 15:30:41 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Thu, 8 Jul 2010 08:30:41 -0500 Subject: No subject In-Reply-To: Message-ID: Dear Jan-Mathijs, Thank you so much for your help, that did the trick (see attached screenshot). I didn't realized that I could use the output from ft_volumerealign as the mri in ft_sourceinterpolate (or just overwrite the .transform of the mri). I will document all of my steps. Thank you! -Tony ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] Sent: Thursday, July 08, 2010 7:52 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Tony, What you did for the creation of the volume conduction model is indeed correct. The question now is whether you also used the updated mri for ft_sourceinterpolate, or whether you went back to loading the mri from file without the correct coordinate frame info... JM On Jul 8, 2010, at 2:50 PM, Passaro, Antony D wrote: > Dear Jan-Mathijs, > > Thank you again for your help, I appreciate it. I had forgotten to > mention that I had used ft_volumerealign to align the mri before > creating the volume conduction model using ft_preapre_singleshell. I > then used the resulting vol in the ft_sourceanalyses, although I > feel as though I am missing a step here which places the data in the > same space as the MRI via the volume conduction model. > > Thanks, > -Tony > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen [jan.schoffelen at DONDERS.RU.NL] > Sent: Thursday, July 08, 2010 7:14 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] > > Dear Tony, > > It looks as if the coordinate system attached to your single subject's > mri is not according to 4D's convention (it rather looks as if it is > defined an mni space). The reason why I think this is that your x and > y axes seem to be swapped, and there is a slight shift in the z- > direction, suggesting a difference in origin. You can enforce the > correct coordinate system onto the MRI by using ft_volumerealign in > the interactive mode (and then specifying lpa, rpa and nasion by hand: > this should return an updated mri.transform, which describes the > transformation from voxel space to subject's headspace) . This should > of course be done before calling ft_sourceinterpolate. > > Cheers, > > Jan-Mathijs > > On Jul 8, 2010, at 1:57 PM, Passaro, Antony D wrote: > >> Hi Arjen, >> >> Thank you very much for your help. I had not added the .pos and .dim >> to my grid before interpolating, but after adding that information I >> had the same result as before. I then checked the .pos and .dim of >> the data before redefining it and noticed that it was already >> identical to the template grid information. I also referred to the >> example that you had suggested, however, I am currently looking at a >> single subject to verify localization before moving on to multiple >> subject analyses. Additionally, I would like to visualize data >> projected on to a single subject's MRI prior to normalizing the >> data. Any other suggestions would be greatly appreciated. >> >> Thank you again, >> -Tony >> ________________________________________ >> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf >> Of a.stolk at fcdonders.ru.nl [a.stolk at FCDONDERS.RU.NL] >> Sent: Thursday, July 08, 2010 4:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] >> >> Hi Tony, >> >> Just to be sure; did you add the .pos and .dim from the template >> grid to your data before interpolating? >> >> In code; >> >> data.pos = template_grid.pos; >> data.dim = template_grid.dim; >> cfg = []; >> cfg.parameter = 'all'; >> data_int = ft_sourceinterpolate(cfg, data, mri); >> >> You can then ft_sourceplot the interpolated data. >> >> Best, >> Arjen >> >> p.s. if still running into problems, make sure you have followed the >> steps described here: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space >> >> ----- Original Message ----- >> From: "Antony D Passaro" >> To: FIELDTRIP at NIC.SURFNET.NL >> Sent: Thursday, July 8, 2010 10:41:11 AM GMT +01:00 Amsterdam / >> Berlin / Bern / Rome / Stockholm / Vienna >> Subject: [FIELDTRIP] >> >> Hi, >> >> I've been having issues projecting source estimates onto an MRI. I >> discovered that several of my components (vol, grad, grid) did not >> exist in the same coordinate space. Some were in mm and some in cm. >> After I resolved these issues, I was able to use headmodelplot to >> verify that everything was correct (see attached screenshot). I then >> attempted source localization using lcmv and noticed that that the >> projected activation existed in the incorrect orientation (see >> second attached screenshot). I'm not sure what I'm doing wrong as >> all of my components are in the correct space. I also tried to use >> the interactive option of sourceplot to correctly set n,l,r but that >> didn't seem to change anything. I'm sure it is something very simple >> that I am overlooking but any help would be much appreciated. >> >> Thank you, >> -Tony >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: align3.jpg Type: image/jpeg Size: 90514 bytes Desc: align3.jpg URL: From jan.schoffelen at DONDERS.RU.NL Thu Jul 8 16:51:38 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 8 Jul 2010 16:51:38 +0200 Subject: warning for ctf-users Message-ID: Dear all, I came across a bug in the code which may affect people who use FieldTrip to analyze CTF-data. The function ft_denoise_synthetic, which can be used to convert the data to higher (or lower) order gradients did not work as it was supposed to. Rather than applying the balancing matrix to the data it applied the inverse of the balancing matrix to the data. This is wrong, and most likely results in the data becoming more 'noisy', rather than less noisy. It is not exactly clear since when this bug exists and it may be worthwhile to critically re- evaluate data which have been processed with ft_denoise_synthetic. We sincerely apologize for any inconvenience caused. Best wishes, Jan-Mathijs PS: Of course the correct version of the file will be available for download on the ftp-server as of tomorrow. Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue Jul 13 09:48:15 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Jul 2010 09:48:15 +0200 Subject: Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG Message-ID: Dear FieldTrip users and other software developers, Let me draw your attention to the following. Please distribute this call for papers to anyone you think may be interested in submitting, and to relevant email discusison lists. best regards, Robert ---------- http://www.hindawi.com/journals/cin/si/ebm.html ---------- Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG Call for Papers The field of Magnetoencephalography (MEG) and Electroencephalography (EEG) source imaging is maturing rapidly. This scientific growth is accompanied by a variety of complementary and/or concurrent software solutions from the academic world. The objective of this CIN Special Issue is to help the neuroimaging obtain an overview of state-of-the-art academic software applications for MEG/EEG data analysis, how they differ and interact, and of upcoming methodological trends and technical developments; the topics to be covered include, but are not limited to, academic software solutions for: MEG and EEG data acquisition Data preprocessing, that is, filtering, artifact detection, rejection or correction, trial sorting, averaging Segmentation and geometrical modeling of head tissues Computational electromagnetics for MEG/EEG forward modeling MEG/EEG source analysis Statistical appraisal and inference: confidence intervals on measures and hypothesis testing Identification and evaluation of evoked, induced event-related brain responses and ongoing brain activity Time-frequency decompositions, advanced spectral analysis, time series modeling Estimation of functional and effective connectivity Authors should provide detailed information regarding their software toolbox or application by addressing the following topics: open source software (yes/no), i/o file formats available, operating system, Matlab required (yes/no), interoperability with other software, and so forth. Further, the software needs to be available for download free of charge at the time of manuscript submission, with sufficient documentation provided online to be able to reproduce the data analysis featured in the manuscript. Before submission authors should carefully read over the journal's Author Guidelines, which are located at http://www.hindawi.com/journals/cin/guidelines.html . Prospective authors should submit an electronic copy of their complete manuscript through the journal Manuscript Tracking System at http://mts.hindawi.com/ according to the following timetable: Manuscript Due September 1, 2010 First Round of Reviews December 1, 2010 Publication Date March 1, 2011 Lead Guest Editor Sylvain Baillet, Department of Neurology & Biophysics, Medical College of Wisconsin, WI, USA Guest Editors Karl Friston, Wellcome Trust Centre for Neuroimaging, London, UK Robert Oostenveld, Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Tue Jul 13 11:15:47 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Tue, 13 Jul 2010 11:15:47 +0200 Subject: time-frequency analysis base line correction Message-ID: Hello all, It's not a question in fieldtrip, yet I'll be happy if you can advise. I'm doing a motor experiment, which is based on responses (one after the other) and not on triggers. For that reason I can't use the usual definition of baseline per trial. I'll take the base line from a segment before the experiment began. Should I take the longest segment I can, as to get a more accurate base line activity, or should I take a segment equal to the trials duration? Many thanks, Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Geoff.Brookshire at MPI.NL Tue Jul 13 12:33:05 2010 From: Geoff.Brookshire at MPI.NL (Geoff Brookshire) Date: Tue, 13 Jul 2010 12:33:05 +0200 Subject: Saving preprocessed data in a raw MEG format Message-ID: Hello, I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. Any ideas anyone has on how to proceed would be greatly appreciated! Thanks, Geoff Brookshire ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Tue Jul 13 13:58:26 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Tue, 13 Jul 2010 13:58:26 +0200 Subject: clarification Message-ID: Hi again, I use the term "base line correction" in a wrong way. I meant to say that I need a reference period (comparable to "baseline type"-absolute/relative). And a few more details. My trials are of different durations, and I thought of calculating the mean of a few trials. Thank you. Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.stolk at FCDONDERS.RU.NL Tue Jul 13 14:04:23 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Tue, 13 Jul 2010 14:04:23 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3C40E1.1050202@mpi.nl> Message-ID: Hi Geoff, Have you tried beamforming with method "Linearly-Constrained Minimum Variance (LCMV)", the ERP equivalent of DICS/PCC in oscillatory sources, already? Link: http://fieldtrip.fcdonders.nl/example/lcmv-beamformer I'm not familiar with MNE, but does it also read other formats than .ds? Best, Arjen ----- Original Message ----- From: "Geoff Brookshire" To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, July 13, 2010 12:33:05 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] Saving preprocessed data in a raw MEG format Hello, I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. Any ideas anyone has on how to proceed would be greatly appreciated! Thanks, Geoff Brookshire ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lhunt at FMRIB.OX.AC.UK Tue Jul 13 14:17:46 2010 From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt) Date: Tue, 13 Jul 2010 13:17:46 +0100 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3C40E1.1050202@mpi.nl> Message-ID: Hi Geoff - I've used both MNE and fieldtrip, but I think writing .fif files can be problematic - there isn't an easy way to do it as it requires a lot of headers etc. to be written, and (as far as I know) there's no matlab toolbox to do this at the moment (the best fiff matlab toolbox (primarily for reading, rather than writing, files) is the one bundled with MNE). The thing that might be best would be to compute a file that *looks like* the appropriate .fif file - e.g. a simple ERP, using mne_process_raw - and then *overwrite* the ERP with the stuff you have generated in matlab. The best people to advise you with this part might not be fieldtrip users, but the MNE community (e.g. Matti Hamalainen), mostly based at MGH. But there might be CTF users who could give you advice on writing .ds files - I use a Neuromag scanner myself so don't know anything about the CTF file format. Hope this helps. Laurence =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== On 13 Jul 2010, at 11:33, Geoff Brookshire wrote: > Hello, > > I'm working on source localization of MEG ERPs, and have run into a couple issues that I'm hoping someone will have some experience with. I'm using MNE software to perform the localization, since Fieldtrip is only able to do this on time-frequency data now. The thing is that I've already done pretty extensive preprocessing in Fieldtrip and so can't afford to ditch that. My hope is that I'll be able to output this preprocessed data from Fieldtrip in a format that MNE can read. > > I've seen people talking here recently about a similar issue, but that thread ("Export EEG Data") seemed to deal very specifically with the brainvision_eeg format. > > I've been hoping to export the data as a .ds directory, as it was originally saved. MNE can convert CTF .ds directories to .fif (the format it normally uses), but I don't think this is a possible output format for ft_write_data. > > Any ideas anyone has on how to proceed would be greatly appreciated! > > Thanks, > Geoff Brookshire > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.stolk at FCDONDERS.RU.NL Tue Jul 13 14:21:01 2010 From: a.stolk at FCDONDERS.RU.NL (a.stolk@fcdonders.ru.nl) Date: Tue, 13 Jul 2010 14:21:01 +0200 Subject: clarification In-Reply-To: Message-ID: Hi Odelia, As far as I can help, I think it depends on your set-up + hypotheses. Do you have both/multiple conditions in one block? If not, reference periods might be different over blocks biasing your results. Check whether they're comparable. Do you expect major changes over time (e.g. fatigue, habituation)? If so, perhaps take another reference period after or from a pause in the experiment and average. Generally, the longer your reference period, the more robust the activity estimation. However, depending on your set-up, subjects might start doing other things.. Finally, if you don't trust your baseline/reference period, you could choose to look at the relative differences between conditions directly. Check out ft_freqcomparison although I think it does not support TFR data (yet). Best, Arjen ----- Original Message ----- From: "Odelia Goldberg" To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, July 13, 2010 1:58:26 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [FIELDTRIP] clarification Hi again, I use the term "base line correction" in a wrong way. I meant to say that I need a reference period (comparable to "baseline type"-absolute/relative). And a few more details. My trials are of different durations, and I thought of calculating the mean of a few trials. Thank you. Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From marco.rotonda at GMAIL.COM Tue Jul 13 15:54:36 2010 From: marco.rotonda at GMAIL.COM (Marco Rotonda) Date: Tue, 13 Jul 2010 15:54:36 +0200 Subject: cohrefchannel Message-ID: Hi Jan... just to be sure. I'm able to plot something with these commands: cfg = []; cfg.xparam = 'time'; cfg.yparam = 'freq'; cfg.zparam = 'plvspctrm'; % cfg.cohrefchannel = 'Cz'; cfg.layout = 'neuroscan.lay'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; cfg.interactive = 'yes'; figure; ft_multiplotTFR(cfg, plvs001fnb1) as you may see I've commented the cfg.cohrefchannel and I've used cfg.interactive. In this case the plot I have what is it? I have all those combinations. If I select two sites (es: Fz and F3) when it plot there is written mean of the two sites. If I select more sites it's always the mean for those sites. How could I plot the line of combination I need? Regards Marco ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maximilien.chaumon at GMAIL.COM Tue Jul 13 21:28:59 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Tue, 13 Jul 2010 15:28:59 -0400 Subject: Aligning head across runs Message-ID: Hello fieldtripers, I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. I have several runs and want to concatenate my data. I understand that I can do ft_appenddata, but that I then loose the sensor positions of the second and subsequent runs. Is there a way to align the head position across runs? Does it make sense to interpolate the data between sensors to align all to the same position? Thanks, Max ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jedmeltzer at YAHOO.COM Wed Jul 14 03:53:12 2010 From: jedmeltzer at YAHOO.COM (Jed Meltzer) Date: Tue, 13 Jul 2010 18:53:12 -0700 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: Message-ID: Dear Geoff, I haven't tried to do exactly what you're describing, but I have worked a lot with CTF data and can share some thoughts on how I would go about it if I wanted to try it. The .ds data format is quite complex, but there is one thing that works to your favor. The .ds is a directory, not a single file, and the raw data is one particular file that consists pretty much entirely of numbers (the one called .meg4) There are other files that contain the header information necessary to know how to break up those raw numbers into channels, trials, etc. So one promising avenue would be to entirely copy the whole directory, but try to modify the raw data while leaving everything else the same. So if your preprocessing is things that leave the trial structure exactly the same (e.g. filtering, 3-rd order gradient balancing, even ICA component subtraction), then you could just overwrite the values in the raw data and keep all the old remaining files to have a valid and accurate .ds dataset. I would try doing this with a very simple operation on the data at first, such as multiplying it by 2. On the other hand, if your preprocessing includes rejecting trials, truncating them, etc., then you would have a lot more to worry about. Please post to the list again and let us know if you find a way to do it! -Jed Meltzer meltzerj AT nidcd.nih.gov ________________________________ From: FIELDTRIP automatic digest system To: FIELDTRIP at NIC.SURFNET.NL Sent: Tue, July 13, 2010 6:00:14 PM Subject: FIELDTRIP Digest - 8 Jul 2010 to 13 Jul 2010 (#2010-128) Note: Forwarded message is attached. FIELDTRIP Digest - 8 Jul 2010 to 13 Jul 2010 (#2010-128) Table of contents: * Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG * time-frequency analysis base line correction * Saving preprocessed data in a raw MEG format (3) * clarification (2) * cohrefchannel * Aligning head across runs 1. Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG * Call for Papers - special issue - Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG (07/13) From: Robert Oostenveld 2. time-frequency analysis base line correction * time-frequency analysis base line correction (07/13) From: Odelia Goldberg 3. Saving preprocessed data in a raw MEG format * Saving preprocessed data in a raw MEG format (07/13) From: Geoff Brookshire * Re: Saving preprocessed data in a raw MEG format (07/13) From: "a.stolk at fcdonders.ru.nl" * Re: Saving preprocessed data in a raw MEG format (07/13) From: Laurence Hunt 4. clarification * clarification (07/13) From: Odelia Goldberg * Re: clarification (07/13) From: "a.stolk at fcdonders.ru.nl" 5. cohrefchannel * Re: cohrefchannel (07/13) From: Marco Rotonda 6. Aligning head across runs * Aligning head across runs (07/13) From: Maximilien Chaumon Browse the FIELDTRIP online archives. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Wed Jul 14 08:15:03 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 14 Jul 2010 08:15:03 +0200 Subject: Creating BEM Model with Dipoli Message-ID: Dear all, for my diploma thesis I'm trying to create an extended BEM model with dipoli. I'm trying to model the ventricular system too which requires another than the innermost compartment to be source compartment and I wanted to know, if anybody could say if this is possible with the dipoli executable or if this is - in this way - an useless effort. Thanks in advance, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From odidodi at HOTMAIL.COM Wed Jul 14 08:49:24 2010 From: odidodi at HOTMAIL.COM (Odelia Goldberg) Date: Wed, 14 Jul 2010 08:49:24 +0200 Subject: clarification Message-ID: Hello again, Your answer helps a lot! Thank you, Odelia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:13:22 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:13:22 +0200 Subject: Aligning head across runs In-Reply-To: Message-ID: Hi Max, You may want to have a look at the function ft_megrealign. Alternatively, you could construct a gradiometer structure which contains a meaningful average of the coil positions and orientations. Cheers, Jan-Mathijs On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > Hello fieldtripers, > > I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 > which poses the same problem that I'm going to raise now. > > I have several runs and want to concatenate my data. I understand > that I can do ft_appenddata, but that I then loose the sensor > positions of the second and subsequent runs. > Is there a way to align the head position across runs? Does it make > sense to interpolate the data between sensors to align all to the > same position? > > Thanks, > Max > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:21:06 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:21:06 +0200 Subject: Saving preprocessed data in a raw MEG format Message-ID: Dear Geoff, You may want to have a look at: http://fieldtrip.fcdonders.nl/example/writing_simulated_data_to_a_ctf_dataset This seems to be quite old, so I don't know whether it's still up to date. The tricky part probably is to create and write a header .res4-file which correctly describes the data. There are two functions which may be of interest here as well: fieldtrip/external/ctf/writeCTFds.m and fieldtrip/external/ctf/ writeRes4.m Best, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From julian.keil at GMAIL.COM Wed Jul 14 09:45:28 2010 From: julian.keil at GMAIL.COM (Julian Keil) Date: Wed, 14 Jul 2010 09:45:28 +0200 Subject: neighbourdist for megplanar Message-ID: Hi everyone, I was wondering what is a sensible neighbour distance for computing the megplanar from 4D148 data. The default is set to "4", but this this leads to on average 149 neighbours per channel, which does not look right to me. Changing the distance to 0.1 reduces the number of neighbours to 5.5, yet I'm still unsure if this is the best/correct way. Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Wed Jul 14 09:49:19 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 14 Jul 2010 09:49:19 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <22004559.3893751279022663428.JavaMail.root@watertor.uci.ru.nl> Message-ID: hi, > I'm using MNE software to perform the localization, since Fieldtrip is > only able to do this on time-frequency data now. The thing is that I've I do not think that this is correct. you may want to look at Figure 2E in: Grützner et al. (2010). Neuromagnetic correlates of perceptual closure processes. J Neurosci at least the authors state that they used fieldtrip, so i assume they used minumumnormestimate.m. it might be correct that this function is not so intensively developed, as not so many fieldtrippers seem to use it. but before going through all the pain of exporting your data, you may want to quickly check if your results make sense using the FT-version (e.g. sanity checks on some ERP where you know where the main generators should be). in case you are not satisfied with the FT-minimumnorm, an alternative to MNE would be to use brainstorm. i think they use mat-files, so it should be fairly easy to mimick to output of some brainstorm processing stage and continue with source analysis. haven't tried it myself but i have a colleague who does this quite successfully. yet another alternative would be to use nutmeg. it should contain a sLORETA option and a function to directly read FT-preproc-structures. at least the developer wrote such a function to read some of my FT-structures into nutmeg. so if it is not contained in the release you might ask to become a beta-tester :-) good luck, n -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Wed Jul 14 09:50:32 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 14 Jul 2010 09:50:32 +0200 Subject: neighbourdist for megplanar In-Reply-To: <607509F8-B542-4671-A702-1579A3A410A9@gmail.com> Message-ID: Dear Julian, The unit of neighbourdist is according to the units in the gradiometer array. The BTI convention is meters, so I think some value in the order of 0.04 to 0.1 should be OK. (For the 248 channel 4D system I always use a value of 0.037). Typically, I think it is optimal to have just one rim of sensors (so don't take the value too big). Cheers, JM On Jul 14, 2010, at 9:45 AM, Julian Keil wrote: > Hi everyone, > > I was wondering what is a sensible neighbour distance for computing > the megplanar from 4D148 data. > The default is set to "4", but this this leads to on average 149 > neighbours per channel, which does not look right to me. > Changing the distance to 0.1 reduces the number of neighbours to > 5.5, yet I'm still unsure if this is the best/correct way. > > Thanks a lot > > Julian > > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: julian.keil at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Geoff.Brookshire at MPI.NL Wed Jul 14 10:39:14 2010 From: Geoff.Brookshire at MPI.NL (Geoff Brookshire) Date: Wed, 14 Jul 2010 10:39:14 +0200 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: Message-ID: Hi, Thanks to everyone for a lot of helpful advice! I'm going to go through and try a lot of this, and I'll report back to the list when I have something that works. I'll briefly address a couple of suggestions. Unfortunately, we've done some pretty heavy-duty preprocessing: rejecting lots of artifacts, truncating trials, looking at stimulus-response combinations, and correcting some errors in the parallel port output channel. I'm afraid I'll be chained to the complicated solutions, then. Second, and in regards to using the source localization algorithms that Freesurfer already has -- I'm a novice in this area, so I'm taking the conclusions of O. Jensen and C. Hesse [Estimating distributed representations of evoked responses and oscillatory brain activity. In MEG An Introduction to Methods" (edited by Salmelin, Kringleback and Hansen). Oxford University Press]. They advise against using beamforming for ERFs: > A further practical requirement [for beamforming] is that the estimate of the data cross-covariance matrix is accurate and that > the cross-covariance matrix is invertible. These are the problems often encountered when applying > beamformingfor source analysis of ERFs. The cross-covariance matrix can become rank-deficient (and > hence invertible) in two circumstances: if the epoch of interest contains fewer time samples than sensors, or > (at least theoretically) if the time-locked averaged MEG signal reflects the activity of only a very small > number of neuronal sources, and any background activity and noise effectively disappears by averaging an > extremely large number of trials. In practice, rank-deficient cross-covariance matrices can be made > invertible by regularization, which effectively involves injecting additional noise into the signal, and this, in > turn, tends to spatially smear the neuronal activity. For this reason, beamforming is not widely used in > MEG/EEG source analysis of evoked activity. Updates to follow! -geoff Nathan Weisz wrote: > hi, > >> I'm using MNE software to perform the localization, since Fieldtrip is >> only able to do this on time-frequency data now. The thing is that I've > > I do not think that this is correct. you may want to look at Figure 2E in: > Grützner et al. (2010). Neuromagnetic correlates of perceptual closure > processes. J Neurosci > > at least the authors state that they used fieldtrip, so i assume they > used minumumnormestimate.m. > > it might be correct that this function is not so intensively developed, > as not so many fieldtrippers seem to use it. > > but before going through all the pain of exporting your data, you may > want to quickly check if your results make sense using the FT-version > (e.g. sanity checks on some ERP where you know where the main generators > should be). > > in case you are not satisfied with the FT-minimumnorm, an alternative to > MNE would be to use brainstorm. i think they use mat-files, so it should > be fairly easy to mimick to output of some brainstorm processing stage > and continue with source analysis. haven't tried it myself but i have a > colleague who does this quite successfully. > > yet another alternative would be to use nutmeg. it should contain a > sLORETA option and a function to directly read FT-preproc-structures. at > least the developer wrote such a function to read some of my > FT-structures into nutmeg. so if it is not contained in the release you > might ask to become a beta-tester :-) > > good luck, > n > > > > > *--------------------------------------------* > Dr. Nathan Weisz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > Email: nathan.weisz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > "Nothing shocks me. I'm a scientist." (Indiana Jones) > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas for > MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Wed Jul 14 12:09:09 2010 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Wed, 14 Jul 2010 11:09:09 +0100 Subject: neighbourdist for megplanar In-Reply-To: <607509F8-B542-4671-A702-1579A3A410A9@gmail.com> Message-ID: Hey Julian, the function FT_NEIGHBOURSELECTION will output a structure of sensor neighbours. The best is to fine tune the threshold distance by checking the output against your sensor map. Best, Guillaume On 14 Jul 2010, at 08:45, Julian Keil wrote: > Hi everyone, > > I was wondering what is a sensible neighbour distance for computing > the megplanar from 4D148 data. > The default is set to "4", but this this leads to on average 149 > neighbours per channel, which does not look right to me. > Changing the distance to 0.1 reduces the number of neighbours to > 5.5, yet I'm still unsure if this is the best/correct way. > > Thanks a lot > > Julian > > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: julian.keil at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ************************************************************************************ Guillaume A. Rousselet, Ph.D., lecturer School of Psychology Institute of Neuroscience & Psychology Centre for Cognitive Neuroimaging (CCNi) The University of Glasgow, charity number SC004401 http://www.psy.gla.ac.uk/staff/index.php?id=GAR01 Email: g.rousselet at psy.gla.ac.uk Fax. +44 (0)141 330 4606 Tel. +44 (0)141 330 6652 Cell +44 (0)791 779 7833 "Corporations have only one duty: to promote their own and their owners' interests. They have no capacity, and their executives no authority, to act out of a genuine sense of responsibility to society, to avoid causing harm to people and the environment, or to work to advance the public good in ways that are unrelated to their own self- interest. Deregulation thus rests upon the suspect premise that corporations will respect social and environmental interests without being compelled by government to do so. No one would seriously suggest that individuals should regulate themselves, that laws against murder, assault, and theft are unnecessary because people are socially responsible. Yet oddly, we are asked to believe that corporate persons - institutional psychopaths who lack any sense of moral conviction and who have the power and motivation to cause harm and devastation in the world - should be left free to govern themselves." Joel Bakan - The Corporation - 2004 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Wed Jul 14 12:05:16 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 14 Jul 2010 11:05:16 +0100 Subject: Saving preprocessed data in a raw MEG format In-Reply-To: <4C3D77B2.3010701@mpi.nl> Message-ID: Dear all, Since this thread is turning to be about promoting other software packages, I'd just like to mention that SPM8 has imaging source reconstruction for evoked fields that depending on the settings can behave similarly to minimum norm or to LORETA or to a more focal methods called MSP. Since SPM8 and Fieldtrip are very tightly integrated (see http://fieldtrip.fcdonders.nl/integrating_with_spm8), your Fieldtrip data can be converted to SPM8 format quite easily. In SPM8 you can also do statistics on resulting images. Best, Vladimir On Wed, Jul 14, 2010 at 9:39 AM, Geoff Brookshire wrote: > Hi, > > Thanks to everyone for a lot of helpful advice!  I'm going to go through and > try a lot of this, and I'll report back to the list when I have something > that works. > > I'll briefly address a couple of suggestions. > Unfortunately, we've done some pretty heavy-duty preprocessing: rejecting > lots of artifacts, truncating trials, looking at stimulus-response > combinations, and correcting some errors in the parallel port output > channel.  I'm afraid I'll be chained to the complicated solutions, then. > > Second, and in regards to using the source localization algorithms that > Freesurfer already has -- I'm a novice in this area, so I'm taking the > conclusions of O. Jensen and C. Hesse [Estimating distributed > representations of evoked responses and oscillatory brain activity. In MEG > An Introduction to Methods" (edited by Salmelin, Kringleback and Hansen). > Oxford University Press].  They advise against using beamforming for ERFs: >> >> A further practical requirement [for beamforming] is that the estimate of >> the data cross-covariance matrix is accurate and that >> the cross-covariance matrix is invertible. These are the problems often >> encountered when applying >> beamformingfor source analysis of ERFs. The cross-covariance matrix can >> become rank-deficient (and >> hence invertible) in two circumstances: if the epoch of interest contains >> fewer time samples than sensors, or >> (at least theoretically) if the time-locked averaged MEG signal reflects >> the activity of only a very small >> number of neuronal sources, and any background activity and noise >> effectively disappears by averaging an >> extremely large number of trials. In practice, rank-deficient >> cross-covariance matrices can be made >> invertible by regularization, which effectively involves injecting >> additional noise into the signal, and this, in >> turn, tends to spatially smear the neuronal activity. For this reason, >> beamforming is not widely used in >> MEG/EEG source analysis of evoked activity. > > Updates to follow! > > -geoff > > > Nathan Weisz wrote: >> >> hi, >> >>> I'm using MNE software to perform the localization, since Fieldtrip is >>> only able to do this on time-frequency data now.  The thing is that I've >> >> I do not think that this is correct. you may want to look at Figure 2E in: >> Grützner et al. (2010). Neuromagnetic correlates of perceptual closure >> processes. J Neurosci >> >> at least the authors state that they used fieldtrip, so i assume they used >> minumumnormestimate.m. >> >> it might be correct that this function is not so intensively developed, as >> not so many fieldtrippers seem to use it. >> >> but before going through all the pain of exporting your data, you may want >> to quickly check if your results make sense using the FT-version (e.g. >> sanity checks on some ERP where you know where the main generators should >> be). >> >> in case you are not satisfied with the FT-minimumnorm, an alternative to >> MNE would be to use brainstorm. i think they use mat-files, so it should be >> fairly easy to mimick to output of some brainstorm processing stage and >> continue with source analysis. haven't tried it myself but i have a >> colleague who does this quite successfully. >> >> yet another alternative would be to use nutmeg. it should contain a >> sLORETA option and a function to directly read FT-preproc-structures. at >> least the developer wrote such a function to read some of my FT-structures >> into nutmeg. so if it is not contained in the release you might ask to >> become a beta-tester :-) >> >> good luck, >> n >> >> >> >> *--------------------------------------------* >> Dr. Nathan Weisz >> >> OBOB-Lab >> University of Konstanz >> Department of Psychology >> P.O. Box D23 >> 78457 Konstanz >> Germany >> >> Tel: ++49 - (0)7531 - 88 45 84 >> Email: nathan.weisz at uni-konstanz.de >> Homepage: http://www.uni-konstanz.de/obob >> >> "Nothing shocks me. I'm a scientist." (Indiana Jones) >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From bornalikundu at GMAIL.COM Wed Jul 14 16:42:55 2010 From: bornalikundu at GMAIL.COM (Bornali Kundu) Date: Wed, 14 Jul 2010 09:42:55 -0500 Subject: cluster-based analysis question Message-ID: Hello All, This is more of a statistical methods question. I'm interested in doing test-retest evaluation in a data set and, most specifically, formally assessing my intuition that there are stable individual differences in the ERSP associated with performing a certain task, such that the overall "pattern" of one subject's ERSP is highly replicable, and thus reliably different from the ERSPs of other subjects. Is the fieldtrip cluster-based permutation test a suitable procedure for implementing this test? Has anyone done this type of analysis already? Any advice would be appreciated. Thanks so much, Bornali -- Medical Scientist Training Program Neuroscience Training Program University of Wisconsin - Madison Health Emotions Research Institute bkundu at wisc.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor.volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE Thu Jul 15 10:38:15 2010 From: gregor.volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE (Gregor Volberg) Date: Thu, 15 Jul 2010 10:38:15 +0200 Subject: cohrefchannel Message-ID: Hi Marco, to be able to specify a reference channel, it seems to be necessary to have a field named xy.cohspctrm. You might simply copy the plvspctrm into a new field, plv_data.cohsprctm = plv_data.plcspctrm and then multiplot with the option cfg.cohrefchannel = 'Cz'; The plots should then look different for different reference channels. Hope this helps?, Gregor On Tue, 13 Jul 2010 15:54:36 +0200, Marco Rotonda wrote: >Hi Jan... >just to be sure. >I'm able to plot something with these commands: >cfg = []; >cfg.xparam = 'time'; >cfg.yparam = 'freq'; >cfg.zparam = 'plvspctrm'; >% cfg.cohrefchannel = 'Cz'; >cfg.layout = 'neuroscan.lay'; >cfg.showlabels = 'yes'; >cfg.colorbar = 'yes'; >cfg.interactive = 'yes'; >figure; ft_multiplotTFR(cfg, plvs001fnb1) > >as you may see I've commented the cfg.cohrefchannel and I've used >cfg.interactive. >In this case the plot I have what is it? >I have all those combinations. >If I select two sites (es: Fz and F3) when it plot there is written mean of the >two sites. If I select more sites it's always the mean for those sites. >How could I plot the line of combination I need? > >Regards > >Marco > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Thu Jul 15 17:20:20 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Thu, 15 Jul 2010 17:20:20 +0200 Subject: Fwd: Fieldtrip - MNE followup Message-ID: Dear Geoff, > - When looking through the ft_write_data file, I don't have 'cft_ds' > as an > option to the dataformat parameter. is this an older option which was > lost? You're absolutely right. The option to write ctf-data is not included anymore in ft_write_data. We should update the documentation accordingly. I just browsed the fieldtrip-wiki and found this link, without properly checking whether it was still up to date. Sorry about that. > - The documentation is a little unclear about what sort of data is > to be > used as input to the function. I've tried using the output of > timelockanalysis, as well as the 'avg' field of the same structure. > For > the former, I get an error that the function is not defined "for input > arguments of type 'struct'", and for the latter that it's not > defined "for > input arguments of type 'char'". I think the latter is getting > confused > about the filename input, then. When I give it a header object > taken from > the original input .ds file with ft_read_header and modified to fit > the > changes in analysis, I again get the 'struct' error. I've been > playing > around with all the options and looking into the script, but I can't > get > anything to work. Do you happen to have a working script handy? No, I don't have a script lying on the shelf, because I don't generally go back to a raw file format after having processed my data in fieldtrip. Since the use of ft_write_data does not seem to support what you want to do anyway, I will not look in detail at the function, but I guess it needs a filename (as a string), a data matrix (as a matrix), and some additional inputs, such as requested fileformat etc. > Also, I noticed your email from a few days back, called "warning for > ctf-users". If I only performed the normal analyses (i.e. > timelockanalysis, megplanar, combineplanar, timelockbaseline, > timelockgrandaverage), do you think I should worry about redoing the > analysis with the new scripts? I think I'm safe, but thought it > might be > a good idea to check with an expert! With respect to my warning issued earlier: you are safe. As long as you did not explicitly use the function ft_denoise_synthetic yourself, there's no reason to worry. Yet, I have another warning for you: given your analysis steps it is not possible to write the data back to CTF-dataformat in a consistent way, since you transformed the data to planar gradient representation (which results in (and requires) a totally different description of the sensor array; so if you plan to use a different package for you minimum norm estimate there will be for sure a mismatch between the channel data and the leadfields), and you have used combineplanar. The latter is a nonlinear operation on your data, which is definitely not allowed if you would like to compute leadfields using the sensor information as it is represented in the original .res4 header file. As a side remark I quickly looked into writeCTFds, and it seems in theory possible to use this function to write the processed data to a CTF-dataset (as long as one stays in the original axial gradient representation). Yet, I wonder whether it will be worth the time investment to get it smoothly implemented (because it is not totally non-trivial). I'd rather opt for looking into the various other suggestions issued in this thread (by Nathan and Vladimir for example), and invest some time there, or just give fieldtrip's minimumnormestimate a try. Keep always in mind that the planar transformation as such requires a change in the description of the sensor array (which is done by fieldtrip), and that combining planar gradient data before going to source space is not good. Cheers, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maximilien.chaumon at GMAIL.COM Thu Jul 15 23:41:44 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Thu, 15 Jul 2010 17:41:44 -0400 Subject: Aligning head across runs In-Reply-To: <4A86E680-55CE-4AF8-B908-5F4FCA144B05@donders.ru.nl> Message-ID: Thank you, The layout of our neuromag306 is not supported in ft_megrealign. What sensors should I write for constructing the average location of the MEG sensors? (line 190 and below) I have triplets of sensors that match this layout. http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png Figured out these guys might work, but that's just a guess. I've done no calculation or anything... labC = 'MEG 2111'; labF = 'MEG 1011'; labL = 'MEG 0141'; labR = 'MEG 1431'; thanks, Max 2010/7/14 jan-mathijs schoffelen > Hi Max, > > You may want to have a look at the function ft_megrealign. Alternatively, > you could construct a gradiometer structure which contains a meaningful > average of the coil positions and orientations. > > Cheers, > > Jan-Mathijs > > On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > > Hello fieldtripers, > > I've read this topic > https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. > > I have several runs and want to concatenate my data. I understand that I > can do ft_appenddata, but that I then loose the sensor positions of the > second and subsequent runs. > Is there a way to align the head position across runs? Does it make sense > to interpolate the data between sensors to align all to the same position? > > Thanks, > Max > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 09:05:39 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 09:05:39 +0200 Subject: Aligning head across runs In-Reply-To: Message-ID: Dear Max, I don't think there is a conceptual objection against building in support for the NM306 system, although it may be less trivial to do a combined simultaneous realignment of planar gradiometers and magnetometers. The choice of the 4 sensors used to compute the transformation matrix between the 'old' and 'new' sensor positions seems reasonable to me. On a side note, doesn't the maxfilter provide you with the possibility to correct for differences in head position? Cheers, Jan-Mathijs On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: > Thank you, > The layout of our neuromag306 is not supported in ft_megrealign. > What sensors should I write for constructing the average location of > the MEG sensors? > (line 190 and below) > I have triplets of sensors that match this layout. > http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png > > Figured out these guys might work, but that's just a guess. I've > done no calculation or anything... > > labC = 'MEG 2111'; > labF = 'MEG 1011'; > labL = 'MEG 0141'; > labR = 'MEG 1431'; > > > thanks, > Max > > > 2010/7/14 jan-mathijs schoffelen > Hi Max, > > You may want to have a look at the function ft_megrealign. > Alternatively, you could construct a gradiometer structure which > contains a meaningful average of the coil positions and orientations. > > Cheers, > > Jan-Mathijs > > On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: > >> Hello fieldtripers, >> >> I've read this topic https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 >> which poses the same problem that I'm going to raise now. >> >> I have several runs and want to concatenate my data. I understand >> that I can do ft_appenddata, but that I then loose the sensor >> positions of the second and subsequent runs. >> Is there a way to align the head position across runs? Does it make >> sense to interpolate the data between sensors to align all to the >> same position? >> >> Thanks, >> Max >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maximilien.chaumon at GMAIL.COM Fri Jul 16 14:32:48 2010 From: maximilien.chaumon at GMAIL.COM (Maximilien Chaumon) Date: Fri, 16 Jul 2010 08:32:48 -0400 Subject: Aligning head across runs In-Reply-To: <679D3E3D-D068-480A-92DC-521357000160@donders.ru.nl> Message-ID: What is the maxfilter? 2010/7/16 jan-mathijs schoffelen > Dear Max, > > I don't think there is a conceptual objection against building in support > for the NM306 system, although it may be less trivial to do a combined > simultaneous realignment of planar gradiometers and magnetometers. The > choice of the 4 sensors used to compute the transformation matrix between > the 'old' and 'new' sensor positions seems reasonable to me. > On a side note, doesn't the maxfilter provide you with the possibility to > correct for differences in head position? > > Cheers, > > Jan-Mathijs > > On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: > > Thank you, > The layout of our neuromag306 is not supported in ft_megrealign. > What sensors should I write for constructing the average location of the > MEG sensors? > (line 190 and below) > I have triplets of sensors that match this layout. > http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png > > Figured out these guys might work, but that's just a guess. I've done no > calculation or anything... > > labC = 'MEG 2111'; > labF = 'MEG 1011'; > labL = 'MEG 0141'; > labR = 'MEG 1431'; > > > thanks, > Max > > > 2010/7/14 jan-mathijs schoffelen > >> Hi Max, >> >> You may want to have a look at the function ft_megrealign. Alternatively, >> you could construct a gradiometer structure which contains a meaningful >> average of the coil positions and orientations. >> >> Cheers, >> >> Jan-Mathijs >> >> On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: >> >> Hello fieldtripers, >> >> I've read this topic >> https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576which poses the same problem that I'm going to raise now. >> >> I have several runs and want to concatenate my data. I understand that I >> can do ft_appenddata, but that I then loose the sensor positions of the >> second and subsequent runs. >> Is there a way to align the head position across runs? Does it make sense >> to interpolate the data between sensors to align all to the same position? >> >> Thanks, >> Max >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> >> >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Fri Jul 16 14:47:42 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 16 Jul 2010 13:47:42 +0100 Subject: Aligning head across runs In-Reply-To: Message-ID: maxfilter is part of Neuromag software. See for instance http://imaging.mrc-cbu.cam.ac.uk/meg/Maxfilter http://www.megwiki.org/index.php?title=Using_MaxFilter It is definitely a better choice for Neuromag users. Vladimir On Fri, Jul 16, 2010 at 1:32 PM, Maximilien Chaumon wrote: > What is the maxfilter? > > > 2010/7/16 jan-mathijs schoffelen >> >> Dear Max, >> I don't think there is a conceptual objection against building in support >> for the NM306 system, although it may be less trivial to do a combined >> simultaneous realignment of planar gradiometers and magnetometers. The >> choice of the 4 sensors used to compute the transformation matrix between >> the 'old' and 'new' sensor positions seems reasonable to me. >> On a side note, doesn't the maxfilter provide you with the possibility to >> correct for differences in head position? >> Cheers, >> Jan-Mathijs >> On Jul 15, 2010, at 11:41 PM, Maximilien Chaumon wrote: >> >> Thank you, >> The layout of our neuromag306 is not supported in ft_megrealign. >> What sensors should I write for constructing the average location of the >> MEG sensors? >> (line 190 and below) >> I have triplets of sensors that match this layout. >> http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/nm306all.png >> >> Figured out these guys might work, but that's just a guess. I've done no >> calculation or anything... >> >>     labC = 'MEG 2111'; >>     labF = 'MEG 1011'; >>     labL = 'MEG 0141'; >>     labR = 'MEG 1431'; >> >> >> thanks, >> Max >> >> >> 2010/7/14 jan-mathijs schoffelen >>> >>> Hi Max, >>> You may want to have a look at the function ft_megrealign. Alternatively, >>> you could construct a gradiometer structure which contains a meaningful >>> average of the coil positions and orientations. >>> Cheers, >>> Jan-Mathijs >>> On Jul 13, 2010, at 9:28 PM, Maximilien Chaumon wrote: >>> >>> Hello fieldtripers, >>> >>> I've read this topic >>> https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind1004&L=FIELDTRIP&D=0&P=4576 >>> which poses the same problem that I'm going to raise now. >>> >>> I have several runs and want to concatenate my data. I understand that I >>> can do ft_appenddata, but that I then loose the sensor positions of the >>> second and subsequent runs. >>> Is there a way to align the head position across runs? Does it make sense >>> to interpolate the data between sensors to align all to the same position? >>> >>> Thanks, >>> Max >>> >>> ---------------------------------- >>> >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >>> EEG analysis. >>> >>> http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> >>> Dr. J.M. (Jan-Mathijs) Schoffelen >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> J.Schoffelen at donders.ru.nl >>> Telephone: 0031-24-3668063 >>> >>> ---------------------------------- >>> >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >>> EEG analysis. >>> >>> http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>> http://www.ru.nl/fcdonders/fieldtrip/ >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and >> EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 16:13:16 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 16:13:16 +0200 Subject: [FIELDTRIP-DEV] a problem with ft_prepare_singleshell In-Reply-To: <73d8a6b191056c5d5cc492c715167e5d.squirrel@squirrel.science.ru.nl> Message-ID: Dear Ali, A bit more information may be useful here ;o)... There was a bug fix involving this function recently, so you may want to upgrade to the most recent version of fieldtrip and try again... This could already solve it. Best, Jan-Mathijs On Jul 16, 2010, at 3:29 PM, Ali Bahramisharif wrote: > Dear guys, > > I use the following code, which was working two months ago, but is not > working now and produces the following error: > > cfg=[]; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > ??? Error using ==> ft_prepare_mesh at 153 > unsupported cfg.method and/or input > > Error in ==> ft_prepare_singleshell at 86 > vol.bnd = ft_prepare_mesh(cfg, mri); > > Any suggestion on how to solve it? > > Best regards, > Ali > > -- > Address: > HG02.517 > Intelligent Systems > Radboud University Nijmegen > Heyendaalseweg 135 > 6525 AJ Nijmegen > The Netherlands > > http://www.cs.ru.nl/~ali > Tel.: +31 (0)24 36 52634 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Jul 16 17:04:23 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 16 Jul 2010 17:04:23 +0200 Subject: [FIELDTRIP-DEV] a problem with ft_prepare_singleshell In-Reply-To: Message-ID: Dear Ali, You may want to set a 'dbstop if error' to see what is missing in the variables causing the error. My hunch is that the function does not manage to accurately detect that you want to create your mesh on the segmented mri. (hint: look for the variable basedonseg and see what is required to put that to a value of 1)... JM On Jul 16, 2010, at 4:20 PM, Ali Bahramisharif wrote: > Dear Jan-Mathijs > > Thanks for your reply. I am at revision 1420, which I think is the > latest. > This is the whole code that I use: > > mri = ft_read_mri('/berends_s/berends_s.mri'); > cfg = []; > cfg.write = 'no'; > cfg.coordinates = 'ctf'; > cfg.template = '/spm8/templates/T1.nii'; > [segmentedmri] = ft_volumesegment(cfg, mri); > > segmentedmriF = segmentedmri; > segmentedmriF.gray = flipdim(flipdim(flipdim(segmentedmriF.gray,3), > 2),1); > segmentedmriF.white = flipdim(flipdim(flipdim(segmentedmriF.white,3), > 2),1); > segmentedmriF.csf = flipdim(flipdim(flipdim(segmentedmriF.csf,3), > 2),1); > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmriF); > > What other information do you need? > > Best regards, > Ali > >> Dear Ali, >> >> A bit more information may be useful here ;o)... >> There was a bug fix involving this function recently, so you may want >> to upgrade to the most recent version of fieldtrip and try again... >> This could already solve it. >> >> Best, >> Jan-Mathijs >> >> On Jul 16, 2010, at 3:29 PM, Ali Bahramisharif wrote: >> >>> Dear guys, >>> >>> I use the following code, which was working two months ago, but is >>> not >>> working now and produces the following error: >>> >>> cfg=[]; >>> vol = ft_prepare_singleshell(cfg, segmentedmri); >>> >>> ??? Error using ==> ft_prepare_mesh at 153 >>> unsupported cfg.method and/or input >>> >>> Error in ==> ft_prepare_singleshell at 86 >>> vol.bnd = ft_prepare_mesh(cfg, mri); >>> >>> Any suggestion on how to solve it? >>> >>> Best regards, >>> Ali >>> >>> -- >>> Address: >>> HG02.517 >>> Intelligent Systems >>> Radboud University Nijmegen >>> Heyendaalseweg 135 >>> 6525 AJ Nijmegen >>> The Netherlands >>> >>> http://www.cs.ru.nl/~ali >>> Tel.: +31 (0)24 36 52634 >>> >> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> > > > -- > Address: > HG02.517 > Intelligent Systems > Radboud University Nijmegen > Heyendaalseweg 135 > 6525 AJ Nijmegen > The Netherlands > > http://www.cs.ru.nl/~ali > Tel.: +31 (0)24 36 52634 > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From matthew at PSYCH.COLUMBIA.EDU Sat Jul 17 20:55:14 2010 From: matthew at PSYCH.COLUMBIA.EDU (Matthew Davidson) Date: Sat, 17 Jul 2010 14:55:14 -0400 Subject: Possible bug with maskparameter and TFR? Message-ID: Hi, everyone. I'm trying to mask TFR plots in ft_multiplotTFR.m. ft_clusterplot seems inappropriate, because this is for intracranial data and a topoplot isn't a good way to display that. I couldn't find any good examples of using .maskparameter, so I did what I thought was correct: I loaded up the stat and the freq variables, and set: freq.mask = stat.mask; cfg.maskparameter = 'mask'; However, when ft_multiplotTFR gets to reading out the .mask field, it's gone! It seems that because my dimord is 'rpt_chan_freq_time', ft_multiplotTFR calls: data = ft_freqdescriptives(tmpcfg, data), which only returns certain fields, and effectively strips out my .mask field! Am I doing this wrong? if so, what's the correct method? If not, I'll be happy to submit a fix. What's the preferred way to fix it? In ft_multiplotTFR, I could store the maskparameter before the call to freqdescriptives, and readd it afterwards. Alternatively, I could just change the initialization line in ft_freqdescriptives where it sets output = []; to output = freq;. Then, the subsequent lines altering output would still behave as planned, but any extra fields added to freq would not be removed. Matthew ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Sun Jul 18 00:26:34 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 17 Jul 2010 17:26:34 -0500 Subject: Help with dipole fitting Message-ID: Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Mon Jul 19 04:46:52 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sun, 18 Jul 2010 21:46:52 -0500 Subject: FW: [FIELDTRIP] Help with dipole fitting In-Reply-To: Message-ID: Date: Sat, 17 Jul 2010 17:26:34 -0500 From: lumatobu2 at HOTMAIL.COM Subject: [FIELDTRIP] Help with dipole fitting To: FIELDTRIP at NIC.SURFNET.NL Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! Explore the seven wonders of the world Learn more! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Mon Jul 19 04:47:31 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sun, 18 Jul 2010 21:47:31 -0500 Subject: PLEASE HELP !!!!! In-Reply-To: Message-ID: Date: Sat, 17 Jul 2010 17:26:34 -0500 From: lumatobu2 at HOTMAIL.COM Subject: [FIELDTRIP] Help with dipole fitting To: FIELDTRIP at NIC.SURFNET.NL Hi everyone. Im trying to make a forward computation of the dipole potentials measured in the scalp. I'm following this example: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit but in the part that they describe the two dipole computations: % create a dipole simulation with two dipoles and a custom timecourse I dont understand why they take the dipole moments like this: cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components ]'; % note, it should be transposed ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿And to four dipoles, like this? cfg.dip.mom = [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ]'; ¿ And what if I have 128 dipoles? PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. PLEASE HELP ME !!!!! Explore the seven wonders of the world Learn more! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Mon Jul 19 07:59:25 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Mon, 19 Jul 2010 07:59:25 +0200 Subject: Help with dipole fitting In-Reply-To: Message-ID: Hi Ludwing, On 18.07.2010 00:26, Ludwing Torres wrote: > I dont understand why they take the dipole moments like this: > > cfg.dip.mom = [ % each row represents [qx1 qy1 qz1 qx2 qy2 qz2] > 1 0 0 0 0 0 % this is how signal1 contributes to the 6 dipole components > 0 0 0 1 0 0 % this is how signal2 contributes to the 6 dipole components > ]'; % note, it should be transposed > > ¿Does it mean that if I have three dipoles, the dipole moment should be like this? : > I think it depends on how many different Signal-courses you are trying to simulate. If you're trying to simulate two dipoles with the same (sinusoid) time course but with perpendicular moments, it should look something like this cfg.dip.signal = sin(10*time*2*pi); cfg.dip.mom = [ 1 0 0 0 1 0 ]'; In the example every line of the vector stands for the contribution of one signal. Every three rows stand for the direction of the moment of one dipole. Anyone correct me if I'm wrong. > cfg.dip.mom = [ > 1 0 0 0 0 0 0 0 0 > 0 0 0 1 0 0 0 0 0 > 0 0 0 0 0 0 1 0 0 > ]'; > > ¿And to four dipoles, like this? > > cfg.dip.mom = [ > 1 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 1 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 1 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 1 0 0 > ]'; > If you wanted to simulate three respectively four different time courses - yes, I think so. > ¿ And what if I have 128 dipoles? > If you really wanted to simulate 128 dipoles with different time courses you'd have to follow the rule above, but I don't think you really want to simulate 128 dipoles - do you? > PLEASE HELP ME UNDERSTAND THIS, BECAUSE IM GETTING AN ERROR IF I FOLLOW THIS RULE TO 128 DIPOLES AND I THINK THIS IS A MISTAKE > > OTHER THING IS HOW CAN I COMPUTE THE FORDWARD ELECTRODE POTENTIALS, NOT JUST THE POSITIONS. > > PLEASE HELP ME !!!!! > Hope my answers helped you at least a little. Note that you obviously used Caps Lock above your last paragraphs ;) Writing all in capitals ain't very polite, if you'd like to emphasize something, please use *bold fonts* or *asterisks*. Cheers, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Wed Jul 21 09:28:47 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 21 Jul 2010 09:28:47 +0200 Subject: Dipoli issues Message-ID: Dear all, I hope that somebody is able to help me. I'm trying to generate a BEM model following the example script in http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my diploma thesis, but every time I'm running dipoli with more than 3 compartments, the Program complains about double vertices on the innermost mesh. I first suspected a weird brain geometry to be the culprit, but I now tried to build the model with a simple sphere as the innermost compartment and the error remains, so this shouldn't be due to a weird geometry because there are few geometries as inoffensive as spheres. Has anybody an Idea or - alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could give me some hint how to build and run it? Thanks in advance, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Wed Jul 21 10:22:00 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 21 Jul 2010 10:22:00 +0200 Subject: control variables / cfg.cvar Message-ID: Dear Eric, I have a question with respect to the use of cfg.cvar and permutation testing. In particular, I am thinking about a design where subjects have to perform a task that involves giving two responses, say left and right hand button presses. I want to test two conditions against each other within subjects. If I have counterbalanced response hand assignment over subjects, you suggested to use cfg.cvar: "The theory of permutation tests also applies to statistical testing problems that involve control variables (e.g., response hand). In this case, the mechanics of the permutation test involves randomly permuting the data sets (single trials or subject averages) within each of the levels of the control variable (conditional permutation). To increase statistical sensitivity in the presence of control variable, it also is good to use a special test statistic that partials out the variance explained by the control variable. This is implemented in Fieldtrip for a couple of statfuns, but not for all of them. Conditional permutation is implemented via cfg.cvar." So in my design I have two levels of the control variable: L1 are subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R pairing (?). If I now permute only within the levels (which I would do anyway if I used a dependend samples test?) then still there are perumtations where response hands are sorted on the two sets to be compared, giving rise to large unwanted clusters in this particular permutation and other that are similar to it. Sure, this will not result in false positives, but decrease the sensitivity of my experiment. But maybe I misunderstand the meaning of "permuting the data sets (single trials or subject averages) within each of the levels of the control variable" . Does a permutation within the levels mean, I permute left hand responses only with left hand repsonses and right hand responses only with right hand responses? In this case I would have to give up my dependend samples testing (within subjcets) and use independent samples testing (across) subjects, because I can only exchange left hand responses in condition 1 and left hand responses in condition 2 between subjects, correct? Thanks for your help on this, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Wed Jul 21 13:36:52 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 21 Jul 2010 12:36:52 +0100 Subject: Dipoli issues In-Reply-To: <4C46A1AF.80205@gmx.de> Message-ID: Dear Paul, Note that there is also the bemcp toolbox distributed with Fieldtrip that should be easy to compile on Linux. I compared it with OpenMEEG on SPM canonical mesh and there are only differences for a small number of vertices close to the boundary. According to Christophe Phillips who wrote the toolbox as long as you stay more than one mesh edge length away from the inner skull boundary there should be no problem and it runs much faster than OpenMEEG (don't know about dipoli). Best, Vladimir On Wed, Jul 21, 2010 at 8:28 AM, Paul Czienskowski wrote: > Dear all, > > I hope that somebody  is able to help me. I'm trying to generate a BEM model > following the example script in > http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my > diploma thesis, but every time I'm running dipoli with more than 3 > compartments, the Program complains about double vertices on the innermost > mesh. I first suspected a weird brain geometry to be the culprit, but I now > tried to build the model with a simple sphere as the innermost compartment > and the error remains, so this shouldn't be due to a weird geometry because > there are few geometries as inoffensive as spheres. Has anybody an Idea or - > alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could > give me some hint how to build and run it? > > Thanks in advance, > Paul > > -- > Paul Czienskowski > Björnsonstr. 25 > 12163 Berlin > > Tel.: (+49)(0)30/221609359 > Handy: (+49)(0)1788378772 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From paul_c at GMX.DE Wed Jul 21 19:54:53 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Wed, 21 Jul 2010 19:54:53 +0200 Subject: Dipoli issues In-Reply-To: Message-ID: Hi Vladimir, I indeed took notice of the fact of another BEM toolbox being available, but the prepare_bemmodel function states, that bemcp is only capable of compute BEM models with 3 compartments which is of no use to me. Thank you anyway :) Cheers, Paul On 21.07.2010 13:36, Vladimir Litvak wrote: > Dear Paul, > > Note that there is also the bemcp toolbox distributed with Fieldtrip > that should be easy to compile on Linux. I compared it with OpenMEEG > on SPM canonical mesh and there are only differences for a small > number of vertices close to the boundary. According to Christophe > Phillips who wrote the toolbox as long as you stay more than one mesh > edge length away from the inner skull boundary there should be no > problem and it runs much faster than OpenMEEG (don't know about > dipoli). > > Best, > > Vladimir > > On Wed, Jul 21, 2010 at 8:28 AM, Paul Czienskowski wrote: > >> Dear all, >> >> I hope that somebody is able to help me. I'm trying to generate a BEM model >> following the example script in >> http://fieldtrip.fcdonders.nl/example/create_bem_headmodel_for_eeg for my >> diploma thesis, but every time I'm running dipoli with more than 3 >> compartments, the Program complains about double vertices on the innermost >> mesh. I first suspected a weird brain geometry to be the culprit, but I now >> tried to build the model with a simple sphere as the innermost compartment >> and the error remains, so this shouldn't be due to a weird geometry because >> there are few geometries as inoffensive as spheres. Has anybody an Idea or - >> alternatively - run OpenMEEG on an Ubuntu 9.04/64 Bit Intel system and could >> give me some hint how to build and run it? >> >> Thanks in advance, >> Paul >> >> -- >> Paul Czienskowski >> Björnsonstr. 25 >> 12163 Berlin >> >> Tel.: (+49)(0)30/221609359 >> Handy: (+49)(0)1788378772 >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Wed Jul 21 21:28:09 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Wed, 21 Jul 2010 14:28:09 -0500 Subject: Help with dipole fitting In-Reply-To: <4C43E9BD.1060209@gmx.de> Message-ID: Thanks man, your reply has been very helpful to me _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.b.bakker at STUDENT.UTWENTE.NL Wed Jul 21 23:30:14 2010 From: a.b.bakker at STUDENT.UTWENTE.NL (Albert Bakker) Date: Wed, 21 Jul 2010 23:30:14 +0200 Subject: Cluster analysis EEG data Message-ID: Hello, Does anyone know if it's possible to do a cluster analysis on EEG data for multiple frequencies with for example setting the cfg.foi = [1:1:30]? Or is it only possible for 1 frequency at the time? Best regards, Albert Bakker ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From alexandre.gramfort at INRIA.FR Thu Jul 22 09:04:36 2010 From: alexandre.gramfort at INRIA.FR (Alexandre Gramfort) Date: Thu, 22 Jul 2010 09:04:36 +0200 Subject: building OpenMEEG Message-ID: Dear Paul, OpenMEEG can handle an arbitrary number of compartments. However the fieldtrip plugin as written now can handle only 1, 2 or 3 compartments. This could be changed rapidly. If you want to build OpenMEEG for your linux system you will need cmake, atlas-devel and g++. Otherwise we can provide precompiled binaries for MAC, Windows 32 or 64 and Linux 32 or 64. Hope this helps Alexandre -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From paul_c at GMX.DE Thu Jul 22 10:49:55 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Thu, 22 Jul 2010 10:49:55 +0200 Subject: building OpenMEEG In-Reply-To: Message-ID: Hi Alexandre, thank you very much for your answer. I think bending those Matlab-wrappers won't be a problem for me, but for I haven't got too much experience in compiling under Linux it's giving me a hard time :) I followed the Readme file in the source folder, but ccmake complains about some FORTRAN functions. The actual error messages are CMake Error at macros/FortranCInterface/DetectFromLibrary.cmake:37 (unset): Unknown CMake command "unset". Call Stack (most recent call first): macros/FortranCInterface.cmake:155 (detect_fortran_function) CMakeLists.txt:71 (FortranCInterface_HEADER) I thought that maybe you might know this error and how to solve it (or can make up a solution). Also I'm of course not averse to use the precompiled binaries, but this didn't work for me this far either. When I downloaded the rpm files and tried to open them my Package Manager froze for a long time, is there anything else I shall consider? I'm on i686/Ubuntu 9.04. Tanks in advance, Paul On 22.07.2010 09:04, Alexandre Gramfort wrote: > Dear Paul, > > OpenMEEG can handle an arbitrary number of compartments. > However the fieldtrip plugin as written now can handle only > 1, 2 or 3 compartments. This could be changed rapidly. > > If you want to build OpenMEEG for your linux system you will need > cmake, atlas-devel and g++. Otherwise we can provide > precompiled binaries for MAC, Windows 32 or 64 and Linux 32 or 64. > > Hope this helps > > Alexandre > > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team @ NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From alexandre.gramfort at INRIA.FR Thu Jul 22 11:00:56 2010 From: alexandre.gramfort at INRIA.FR (Alexandre Gramfort) Date: Thu, 22 Jul 2010 11:00:56 +0200 Subject: building OpenMEEG In-Reply-To: <4C480633.3040006@gmx.de> Message-ID: Hi Paul, > thank you very much for your answer. I think bending those Matlab-wrappers > won't be a problem for me, but for I haven't got too much experience in > compiling under Linux it's giving me a hard time :) I followed the Readme > file in the source folder, but ccmake complains about some FORTRAN > functions. The actual error messages are > > CMake Error at macros/FortranCInterface/DetectFromLibrary.cmake:37 (unset): >   Unknown CMake command "unset". >  Call Stack (most recent call first): >   macros/FortranCInterface.cmake:155 (detect_fortran_function) >   CMakeLists.txt:71 (FortranCInterface_HEADER) you have an old version of cmake. I suggest to update your cmake binaries to version 2.8 or at least 2.6. The unset command appeared recently in cmake. > I thought that maybe you might know this error and how to solve it (or can > make up a solution). Also I'm of course not averse to use the precompiled > binaries, but this didn't work for me this far either. When I downloaded the > rpm files and tried to open them my Package Manager froze for a long time, > is there anything else I shall consider? I'm on i686/Ubuntu 9.04. I will send you a precompiled version. Alexandre ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Fri Jul 23 01:28:59 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 23 Jul 2010 01:28:59 +0200 Subject: control variables / cfg.cvar In-Reply-To: <2122874403.253604.1279700520897.JavaMail.fmail@mwmweb056> Message-ID: Dear Michael, > So in my design I have two levels of the control variable: L1 are > subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R > pairing (?). If I now permute only within the levels (which I would do > anyway if I used a dependend samples test?) then still there are > perumtations where response hands are sorted on the two sets to be > compared, giving rise to large unwanted clusters in this particular > permutation and other that are similar to it. Sure, this will not > result in false positives, but decrease the sensitivity of my > experiment. > > But maybe I misunderstand the meaning of "permuting the data sets > (single trials or subject averages) within each of the levels of the > control variable" . Does a permutation within the levels mean, I > permute left hand responses only with left hand repsonses and right > hand responses only with right hand responses? In this case I would > have to give up my dependend samples testing (within subjcets) and use > independent samples testing (across) subjects, because I can only > exchange left hand responses in condition 1 and left hand responses in > condition 2 between subjects, correct? An example should be able to clarify things. Control variables are especially useful in between-subject and (single subject) between-trials studies. Let's consider a between-subjects study in which our interest is in assessing the effect of some individual difference variable, such as two different alleles of some gene. Assume that dependent variable strongly depends on age. In that case, sensitivity wrt identifying the genetic effect could be increased (as compared with an analysis without the age variable) by making a number of fairly homogenous age groups, and to perform a permutation test by randomly permuting the two alleles WITHIN each of these age groups. I found it hard to use your example to illustrate the usefulness of permutation within the levels of a control variable. Probably, I'm missing a point here. Maybe you can help me by pointing out what is the independent variable whose effect you want to assess and which other variable (the control variable) is also responsible for variance in the dependent variable, but in whose effect you are not interested. Best, Eric > > Thanks for your help on this, > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Fri Jul 23 02:56:34 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Thu, 22 Jul 2010 19:56:34 -0500 Subject: Help with dipole fitting In-Reply-To: <4C43E9BD.1060209@gmx.de> Message-ID: Hi, I'm very sorry for using capital letters, please excuse me. I'm new at fieldtrip, I don't know much about this and I'm searching for help desperately. Well, I am trying to compute a fordward model by now, like this: V=A*J where: V= a matrix of potentials measured in the scalp surface by each electrode, for example 32 electrodes or channels and 5 seconds at 256 samples per second, (which is equal to 5*256=1280, which comes to a 32x1280 matrix, one epoch I guess, and one trial, just measure, no events, please correct me if i'm wrong) J= a matrix of the sources in the brain that produce the potentials above, with its time course, which are more than the electrodes placed there. Let me understand this: ¿these sources and its time course, are the same dipole moments? If so, ¿The sources (dipoles) have a time component in the three dimensions in the dipoles? Thus, if we consider 128 sources, ¿ are we considering 128 dipoles, and J matrix would be 128x1280 with the time course? or ¿Are we considering 128 sources of 3 dimensions and J matrix would be of 128x(1280x3)? A= the lead field matrix. I've seen the function compute_leadfield of FieldTrip, This uses the electrodes positions, the dipoles (or sources) positions, and the standard volume of sphere and conductivities to perform the computing of a leadfield matrix that has dimensions numch x (3xnums) where numch=nuber of channels or electrodes (32 in this case) and nums=number of sources (in this case 128) ¿why is the number of sources multiplied by 3? ¿ it is because they compute the leadfield matrix to each of the cartesian coordinates? and if so, ¿How should I take the J matrix to compute the fordward model? ¿ should I take this each row having the time course of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) rows and 1280 columns, and not like above 128x(1280x3)? And, once I have performed the forward model and I compute the V matrix, ¿Which function could I use to perform the inverse problem, i.e. , could I use a function that allows me recovering or regain the J matrix from the A and V matrices, and compare the new J with the old J to see if the inverse problem could be performed well? Please, If you could suggest me some article or book or paragraph that I can read to clear these doubts, or if you could clear these to me yourselves, I would be very much thankful to you, please I'm begging you help please. Sorry for all the possible fouls and lacks of politeness, sincerely.Thanks for your attention. _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_c at GMX.DE Fri Jul 23 08:06:46 2010 From: paul_c at GMX.DE (Paul Czienskowski) Date: Fri, 23 Jul 2010 08:06:46 +0200 Subject: Help with dipole fitting In-Reply-To: Message-ID: Hi Ludwig, On 23.07.2010 02:56, Ludwing Torres wrote: > Hi, I'm very sorry for using capital letters, please excuse me. Never mind, I was not too offended at this, but wanted you to take note of the fact, that somebody could be :) > I'm new at fieldtrip, I don't know much about this and I'm searching > for help desperately. Then I hope I can help you. > Well, I am trying to compute a fordward model by now, like this: > > V=A*J > > where: > > V= a matrix of potentials measured in the scalp surface by each > electrode, for example 32 electrodes or channels and 5 seconds at 256 > samples per second, (which is equal to 5*256=1280, which comes to a > 32x1280 matrix, one epoch I guess, and one trial, just measure, no > events, *please correct me if i'm wrong*) This sounds quite correct, I think, but AFAIK you won't compute this directly but use some function like the ft_dipolesimulation function we talked about last time. This does exactly what you want to do, compute the electrode scalp potentials due to a given dipole distribution. Spares you all the stuff you are now to consider. > J= a matrix of the sources in the brain that produce the potentials > above, with its time course, which are more than the electrodes placed > there. > Let me understand this: ¿these sources and its time course, are > the same dipole moments? > If so, ¿The sources (dipoles) have a time component in the three > dimensions in the dipoles? > Thus, if we consider 128 sources, ¿ are we considering 128 > dipoles, and J matrix would be 128x1280 with the time course? > or ¿Are we considering 128 sources of 3 dimensions and J matrix > would be of 128x(1280x3)? I think it's rather the latter, but see below. > A= the lead field matrix. I've seen the function compute_leadfield of > FieldTrip, This uses the electrodes positions, the dipoles (or > sources) positions, and the standard volume of sphere and > conductivities to perform the computing of a leadfield matrix that has > dimensions numch x (3xnums) where numch=nuber of channels or > electrodes (32 in this case) and nums=number of sources (in this > case 128) ¿why is the number of sources multiplied by 3? ¿ it is > because they compute the leadfield matrix to each of the cartesian > coordinates? and if so, ¿How should I take the J matrix to compute the > fordward model? ¿ should I take this each row having the time course > of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 > dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole > n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) > rows and 1280 columns, and not like above 128x(1280x3)? Please see the documentation (reference for compute_leadfield ) /The forward solution is expressed as the leadfield matrix (Nchan*3), where each column corresponds with the potential or field distributions on all sensors for one of the x,y,z-orientations of the dipole./ This appears to be the leadfield for a dipole at a certain position. You'd multiply the moment of the dipole you are trying to simulate with the very matrix. At least mathematically I think you'd build the lf-matrix for an number of dipoles as an (NchanX(Ndip*3)) matrix where every three columns represent the contribution of one dipole to the surface potential. The first of the three columns is the contribution of the x-moment of the dipole and same for 2nd and 3rd column representing the y- respectively z-moment. Note that this is - by now - only a consideration of time independent dipoles. What the lf-matrix does is mapping dipoles to electrodes. Nchan is the number of electrodes. For your 128 dipole-example (which could make a problem when fitting) the lf-matrix would be a 32x384-matrix with fixed positions for the dipoles. Where - as I said before - every row stands for an electrode and every triple of three cols for the contribution of one dipole to the electrodes. If you'd want to simulate the dipoles at a single point in time you'd build a vector dip = [d1x d1y d1z d2x d2y d2z ... d128x d128y d128z]' where dnx is the x-moment of the n-th dipole and same for y and z. This would be a column vector or matrix with a single column. If you'd make a (384x1280)-matrix with the rows being the dipoles and the columns the temporal change of the dipoles and multiply the lf matrix with this you'd get a matrix 32x1280 with the rows being the electrodes and the columns the time course. So the source matrix is not a (128x(1280*3))- but rather a ((128*3)x1280)-matrix. > And, once I have performed the forward model and I compute the V > matrix, *¿Which function could I use to perform the inverse problem, > i.e. , could I use a function that allows me recovering or regain the > J matrix from the A and V matrices, and compare the new J with the old > J to see if the inverse problem could be performed well? > * Still I'd recommend the use of the dipolesimulation and dipolefitting functions rather than using the lf directly. I think this is quite more flexible. I don't really know how to perform the inverse solution in this case. > *Please, If you could suggest me some article or book or paragraph > that I can read to clear these doubts, or if you could clear these to > me yourselves, I would be very much thankful to you, please I'm > begging you help please. Sorry for all the possible fouls and lacks of > politeness, sincerely.Thanks for your attention. > * See for example Michel et al.: EEG source imaging . Hope this helps. Cheers, Paul -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Fri Jul 23 12:14:32 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 23 Jul 2010 12:14:32 +0200 Subject: control variables / cfg.cvar In-Reply-To: <008001cb29f5$a99769f0$fcc63dd0$@maris@donders.ru.nl> Message-ID: Dear Eric, Thanks for the answer, which I understood. Your design is in both cases a between units of observation design. my exmaple (and actually my data) are a within units of observation design:   The independent variable in my example is condition (1,2). The units of observation are subjects, i.e. it would be a within unit of observation design. However, to exclude motor effects in the analysis, response hand assigments were balanced over subjects, as is done in many studies. Hence, we have a control variable with two levels. These levels could (naively) be the assigment rules (cond1-hand1/cond2-hand2 and vice versa) however then the nuisance effect is not linked to the control variable but to the interaction control-variable*independent variable. Hence, the copntrol variable should be the response hand itself (hand1, hand2). In this case, each of my units of observation has both levels of the control variable. To permute only within levels of the control variable I would then have to permute between units of observation, i.e. permute cond1 with cond2 between two subjects that had both left hand responses in cond1 and both right hand responses in cond 2 for example. This way the control variable should work, but i loose the power related to the within UO design. Michael -----Ursprüngliche Nachricht----- Von: Eric Maris Gesendet: Jul 23, 2010 1:28:59 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] control variables / cfg.cvar >Dear Michael, > > > >> So in my design I have two levels of the control variable: L1 are >> subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R >> pairing (?). If I now permute only within the levels (which I would do >> anyway if I used a dependend samples test?) then still there are >> perumtations where response hands are sorted on the two sets to be >> compared, giving rise to large unwanted clusters in this particular >> permutation and other that are similar to it. Sure, this will not >> result in false positives, but decrease the sensitivity of my >> experiment. >> >> But maybe I misunderstand the meaning of "permuting the data sets >> (single trials or subject averages) within each of the levels of the >> control variable" . Does a permutation within the levels mean, I >> permute left hand responses only with left hand repsonses and right >> hand responses only with right hand responses? In this case I would >> have to give up my dependend samples testing (within subjcets) and use >> independent samples testing (across) subjects, because I can only >> exchange left hand responses in condition 1 and left hand responses in >> condition 2 between subjects, correct? > > >An example should be able to clarify things. Control variables are especially useful in between-subject and (single subject) between-trials studies. Let's consider a between-subjects study in which our interest is in assessing the effect of some individual difference variable, such as two different alleles of some gene. Assume that dependent variable strongly depends on age. In that case, sensitivity wrt identifying the genetic effect could be increased (as compared with an analysis without the age variable) by making a number of fairly homogenous age groups, and to perform a permutation test by randomly permuting the two alleles WITHIN each of these age groups. > >I found it hard to use your example to illustrate the usefulness of permutation within the levels of a control variable. Probably, I'm missing a point here. Maybe you can help me by pointing out what is the independent variable whose effect you want to assess and which other variable (the control variable) is also responsible for variance in the dependent variable, but in whose effect you are not interested. > >Best, > >Eric > > > > > > > >> >> Thanks for your help on this, >> Michael >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Fri Jul 23 13:16:51 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 23 Jul 2010 13:16:51 +0200 Subject: control variables / cfg.cvar In-Reply-To: <339129844.1207346.1279880072314.JavaMail.fmail@mwmweb054> Message-ID: Dear Michael, > Thanks for the answer, which I understood. Your design is in both > cases a between units of observation design. my exmaple (and actually > my data) are a within units of observation design: > > The independent variable in my example is condition (1,2). The units of > observation are subjects, i.e. it would be a within unit of observation > design. However, to exclude motor effects in the analysis, response > hand assigments were balanced over subjects, as is done in many > studies. Hence, we have a control variable with two levels. These > levels could (naively) be the assigment rules (cond1-hand1/cond2-hand2 > and vice versa) however then the nuisance effect is not linked to the > control variable but to the interaction control-variable*independent > variable. Hence, the copntrol variable should be the response hand > itself (hand1, hand2). In this case, each of my units of observation > has both levels of the control variable. To permute only within levels > of the control variable I would then have to permute between units of > observation, i.e. permute cond1 with cond2 between two subjects that > had both left hand responses in cond1 and both right hand responses in > cond 2 for example. > This way the control variable should work, but i loose the power > related to the within UO design. Correct. In your case, use of the control variable to increase sensitivity would only work if the independent and the control variable were fully crossed (four-level within-subjects design; Left-C1, Right-C1, Left-C2, Right-C2). To evaluate the effect of C1-vs-C2, you can then permute within the levels of the control (hand) variable. Best, Eric > > Michael > > > -----Ursprüngliche Nachricht----- > Von: Eric Maris > Gesendet: Jul 23, 2010 1:28:59 AM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] control variables / cfg.cvar > > >Dear Michael, > > > > > > > >> So in my design I have two levels of the control variable: L1 are > >> subjects with c1-R/c2-L pairing and L2 are subjects with c1-L/c2-R > >> pairing (?). If I now permute only within the levels (which I would > >> do anyway if I used a dependend samples test?) then still there are > >> perumtations where response hands are sorted on the two sets to be > >> compared, giving rise to large unwanted clusters in this particular > >> permutation and other that are similar to it. Sure, this will not > >> result in false positives, but decrease the sensitivity of my > >> experiment. > >> > >> But maybe I misunderstand the meaning of "permuting the data sets > >> (single trials or subject averages) within each of the levels of > the > >> control variable" . Does a permutation within the levels mean, I > >> permute left hand responses only with left hand repsonses and right > >> hand responses only with right hand responses? In this case I would > >> have to give up my dependend samples testing (within subjcets) and > >> use independent samples testing (across) subjects, because I can > only > >> exchange left hand responses in condition 1 and left hand responses > >> in condition 2 between subjects, correct? > > > > > >An example should be able to clarify things. Control variables are > especially useful in between-subject and (single subject) between- > trials studies. Let's consider a between-subjects study in which our > interest is in assessing the effect of some individual difference > variable, such as two different alleles of some gene. Assume that > dependent variable strongly depends on age. In that case, sensitivity > wrt identifying the genetic effect could be increased (as compared with > an analysis without the age variable) by making a number of fairly > homogenous age groups, and to perform a permutation test by randomly > permuting the two alleles WITHIN each of these age groups. > > > >I found it hard to use your example to illustrate the usefulness of > permutation within the levels of a control variable. Probably, I'm > missing a point here. Maybe you can help me by pointing out what is the > independent variable whose effect you want to assess and which other > variable (the control variable) is also responsible for variance in the > dependent variable, but in whose effect you are not interested. > > > >Best, > > > >Eric > > > > > > > > > > > > > > > >> > >> Thanks for your help on this, > >> Michael > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of > >> the FieldTrip toolbox, to share experiences and to discuss new > ideas > >> for MEG and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lumatobu2 at HOTMAIL.COM Sun Jul 25 01:59:53 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 24 Jul 2010 18:59:53 -0500 Subject: Help with dipole fitting In-Reply-To: <4C493176.9000005@gmx.de> Message-ID: Hi Paul, Thanks for the answer, I'll put in bold the new entries in this message. Well, I am trying to compute a fordward model by now, like this: V=A*J where: V= a matrix of potentials measured in the scalp surface by each electrode, for example 32 electrodes or channels and 5 seconds at 256 samples per second, (which is equal to 5*256=1280, which comes to a 32x1280 matrix, one epoch I guess, and one trial, just measure, no events, please correct me if i'm wrong) This sounds quite correct, I think, but AFAIK you won't compute this directly but use some function like the ft_dipolesimulation function we talked about last time. This does exactly what you want to do, compute the electrode scalp potentials due to a given dipole distribution. Spares you all the stuff you are now to consider.>> I'll do that. Could you explain me also what an epoch stands for, please? J= a matrix of the sources in the brain that produce the potentials above, with its time course, which are more than the electrodes placed there. Let me understand this: ¿these sources and its time course, are the same dipole moments? If so, ¿The sources (dipoles) have a time component in the three dimensions in the dipoles? Thus, if we consider 128 sources, ¿ are we considering 128 dipoles, and J matrix would be 128x1280 with the time course? or ¿Are we considering 128 sources of 3 dimensions and J matrix would be of 128x(1280x3)? I think it's rather the latter, but see below. A= the lead field matrix. I've seen the function compute_leadfield of FieldTrip, This uses the electrodes positions, the dipoles (or sources) positions, and the standard volume of sphere and conductivities to perform the computing of a leadfield matrix that has dimensions numch x (3xnums) where numch=nuber of channels or electrodes (32 in this case) and nums=number of sources (in this case 128) ¿why is the number of sources multiplied by 3? ¿ it is because they compute the leadfield matrix to each of the cartesian coordinates? and if so, ¿How should I take the J matrix to compute the fordward model? ¿ should I take this each row having the time course of the sources, in the order: row 1:3 dipole n1 (x;y;z) , row 4:6 dipole n2 (x;y;z) , row 7:9 dipole n3 (x;y;z) , row 10:12 dipole n4 (x;y;z) and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3) rows and 1280 columns, and not like above 128x(1280x3)? Please see the documentation (reference for compute_leadfield) The forward solution is expressed as the leadfield matrix (Nchan*3), where each column corresponds with the potential or field distributions on all sensors for one of the x,y,z-orientations of the dipole. This appears to be the leadfield for a dipole at a certain position. You'd multiply the moment of the dipole you are trying to simulate with the very matrix. At least mathematically I think you'd build the lf-matrix for an number of dipoles as an (NchanX(Ndip*3)) matrix where every three columns represent the contribution of one dipole to the surface potential. The first of the three columns is the contribution of the x-moment of the dipole and same for 2nd and 3rd column representing the y- respectively z-moment. Note that this is - by now - only a consideration of time independent dipoles. What the lf-matrix does is mapping dipoles to electrodes. Nchan is the number of electrodes. For your 128 dipole-example (which could make a problem when fitting) the lf-matrix would be a 32x384-matrix with fixed positions for the dipoles. Where - as I said before - every row stands for an electrode and every triple of three cols for the contribution of one dipole to the electrodes. If you'd want to simulate the dipoles at a single point in time you'd build a vector dip = [d1x d1y d1z d2x d2y d2z ... d128x d128y d128z]' where dnx is the x-moment of the n-th dipole and same for y and z. This would be a column vector or matrix with a single column. If you'd make a (384x1280)-matrix with the rows being the dipoles and the columns the temporal change of the dipoles and multiply the lf matrix with this you'd get a matrix 32x1280 with the rows being the electrodes and the columns the time course. So the source matrix is not a (128x(1280*3))- but rather a ((128*3)x1280)-matrix. And, once I have performed the forward model and I compute the V matrix, ¿Which function could I use to perform the inverse problem, i.e. , could I use a function that allows me recovering or regain the J matrix from the A and V matrices, and compare the new J with the old J to see if the inverse problem could be performed well? Still I'd recommend the use of the dipolesimulation and dipolefitting functions rather than using the lf directly. I think this is quite more flexible. I don't really know how to perform the inverse solution in this case. Please, If you could suggest me some article or book or paragraph that I can read to clear these doubts, or if you could clear these to me yourselves, I would be very much thankful to you, please I'm begging you help please. Sorry for all the possible fouls and lacks of politeness, sincerely.Thanks for your attention. See for example Michel et al.: EEG source imaging. Hope this helps. Cheers, Paul Ok this has been very helpful, I think I still dont understand very well the concept of dipole moment, I'll search more information about this and how to manage the dipole moments as vectors; if you could suggest me some other book to learn about what is a dipole moment (also from the point of view of linear algebra) I'll thank you too, and this will help me think about how to use the dipolefitting function. Very Many thanks again. -- Paul Czienskowski Björnsonstr. 25 12163 Berlin Tel.: (+49)(0)30/221609359 Handy: (+49)(0)1788378772 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Sun Jul 25 03:38:08 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Sat, 24 Jul 2010 20:38:08 -0500 Subject: Help with dipole fitting In-Reply-To: <4C493176.9000005@gmx.de> Message-ID: Hi Paul, I don't know if you have heard or worked with eeglab, here they use a dipole fitting without considering the time course in the dipole moments, ¿Can I somehow use the functions of fieldtrip in eeglab to perform dipole fitting and consider the time course in eeglab too? Another question: when I perform the example below: http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit And I compute the dipole fit with the first simulated dataset, I get the next structure: dip1 = label: {1x128 cell} dip: [1x1 struct] Vdata: [128x250 double] Vmodel: [128x250 double] time: [1x250 double] dimord: 'chan_time' cfg: [1x1 struct] And, after define the dipole moment as [1 0 0]' , I go to the dip field and in the field mom (i.e. dip1.dip.mom) I get an 3x250 double matrix. So, when I define the dipole position it is [0 0.5 0.3] and in the dipole fit in the field dip1.dip.pos, I get this same position (aproximated) it is [-2.1186e-008 0.5000 0.3000], but in the dipole moment I don't get the same, not even aproximated, instead of [1 0 0]', I get this [3x250 double] matrix. ¿Am I commiting any mistake or is a concept error? and ¿ How we can interpret this when we have more than two dipoles? Thank you for your help. _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 16:48:46 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 16:48:46 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: Message-ID: Hi everybody, I just finished fully implementing the new low-level frequency analysis routines for cfg.method = mtmconvol and mtmfft. They are not yet used by default, and I would appreciate if it can be tested more before optimizing computation speeds (should be relatively equal now, but many optimizations possible). The new routines can be used by adding a third input argument to your ft_freqanalysis calls, as: New implementation: freq = ft_freqanalysis(cfg,data,1) Old implementation (default): freq = ft_freqanalysis(cfg,data,0) *Things that are different:* - all mtmconvol output is now phase-shifted such that an angle of 0 of any fourier-coefficient /always /means a peak of an oscillation in the data, and an angle of pi will /always/ mean the trough of an oscillation (wavelet wise angle = 0 is implemented as cosine at peak, and sine in up-going flank) - all mtmfft output is now phase-shifted such that any angle from any fourier-coefficient is from the perspective of the oscillation in the data being at its peak at time = 0 - mtmconvol now uses an accurate frequency vector for building its wavelets (determined by fsample and nsample, with cfg.foi as starting point), instead of an /uncorrected/ cfg.foi (mtmfft already used an accurate one) (note: this causes slight differences between the old and new implementation) - mtmfft can now take a cfg.foi input-vector as well, instead of the usual cfg.foilim (backwards compatible) - because of the above, nearly /all/ fourier-output is different, but e.g. phase differences between coefficients should be the same - we decided to drop the support for variable number of tapers in mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, and first element of vector is selected) - in the new format, many things can be upgraded/implemented etc. in the future As freqanalysis is a rather fundamental pilar of FieldTrip, I would really appreciate if some of you can do some testing based on the above differences and anything else you can think of. Different types of data, different approaches, etc. to see if both implementations give comparable results and such (do note raw fourier-coefficients will almost always be different). It could be I missed some fields from the old functions that I diligently checked, or made some errors that did not affect my current testing environment. I can be reached at the e-mail address below, via the mailing-list, or via bug-reports. Thanks in advance. All the best! Roemer PS: the changes will be on the ft-server tonight, but are of course already in the svn-version -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.litvak at ION.UCL.AC.UK Tue Jul 27 16:58:07 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 27 Jul 2010 15:58:07 +0100 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: <4C4EF1CE.5000002@donders.ru.nl> Message-ID: Dear Roemer, Why did you decide to drop the support for variable number of tapers in mtmconvol? That was actually quite a handy feature that I'm using to get TFs with more or less uniform smoothness across frequency. I don't know how many other people are using it but if there are many perhaps we can campaign for retaining it in the new implementation ;-) Best, Vladimir On Tue, Jul 27, 2010 at 3:48 PM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi everybody, > > I just finished fully implementing the new low-level frequency analysis > routines for cfg.method = mtmconvol and mtmfft. They are not yet used by > default, and I would appreciate if it can be tested more before optimizing > computation speeds (should be relatively equal now, but many optimizations > possible). > > The new routines can be used by adding a third input argument to your > ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of 0 of any > fourier-coefficient *always *means a peak of an oscillation in the data, > and an angle of pi will *always* mean the trough of an oscillation > (wavelet wise angle = 0 is implemented as cosine at peak, and sine in > up-going flank) > - all mtmfft output is now phase-shifted such that any angle from any > fourier-coefficient is from the perspective of the oscillation in the data > being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its wavelets > (determined by fsample and nsample, with cfg.foi as starting point), instead > of an *uncorrected* cfg.foi (mtmfft already used an accurate one) (note: > this causes slight differences between the old and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of the usual > cfg.foilim (backwards compatible) > - because of the above, nearly *all* fourier-output is different, but e.g. > phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, and > first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. in the > future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I would really > appreciate if some of you can do some testing based on the above differences > and anything else you can think of. Different types of data, different > approaches, etc. to see if both implementations give comparable results and > such (do note raw fourier-coefficients will almost always be different). It > could be I missed some fields from the old functions that I diligently > checked, or made some errors that did not affect my current testing > environment. > I can be reached at the e-mail address below, via the mailing-list, or via > bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of course already > in the svn-version > > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 17:11:38 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 17:11:38 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: <4C4EF1CE.5000002@donders.ru.nl> Message-ID: Hi everybody, Sorry for this, this was meant to go on the FieldTrip-Dev mailing list! Everything in this mail can be safely ignored. Best, Roemer On 7/27/2010 4:48 PM, Roemer van der Meij wrote: > Hi everybody, > > I just finished fully implementing the new low-level frequency > analysis routines for cfg.method = mtmconvol and mtmfft. They are not > yet used by default, and I would appreciate if it can be tested more > before optimizing computation speeds (should be relatively equal now, > but many optimizations possible). > > The new routines can be used by adding a third input argument to your > ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of 0 of > any fourier-coefficient /always /means a peak of an oscillation in the > data, and an angle of pi will /always/ mean the trough of an > oscillation (wavelet wise angle = 0 is implemented as cosine at peak, > and sine in up-going flank) > - all mtmfft output is now phase-shifted such that any angle from any > fourier-coefficient is from the perspective of the oscillation in the > data being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its > wavelets (determined by fsample and nsample, with cfg.foi as starting > point), instead of an /uncorrected/ cfg.foi (mtmfft already used an > accurate one) (note: this causes slight differences between the old > and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of the > usual cfg.foilim (backwards compatible) > - because of the above, nearly /all/ fourier-output is different, but > e.g. phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, > and first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. in > the future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I would > really appreciate if some of you can do some testing based on the > above differences and anything else you can think of. Different types > of data, different approaches, etc. to see if both implementations > give comparable results and such (do note raw fourier-coefficients > will almost always be different). It could be I missed some fields > from the old functions that I diligently checked, or made some errors > that did not affect my current testing environment. > I can be reached at the e-mail address below, via the mailing-list, or > via bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of course > already in the svn-version > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Jul 27 17:45:34 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 27 Jul 2010 17:45:34 +0200 Subject: New low-level routines for mtmconvol and mtmfft implemented In-Reply-To: Message-ID: Hi Vladimir, Well, it wasn't that final yet, I actually meant to sent the e-mail to dev-mailing list ;). I had a short discussion with Jan-Mathijs on it, but since it wasn't going live yet it didn't matter that much. The tapsmofrq being variable I realized doesn't necessarily mean different number of tapers, so I will implement that in the new-implementation tomorrow (tiny changes). However, implementing variable number of tapers requires some more thorough design decisions for the new low-level functions (especially in terms of consistent data representation throughout all low-level functions). Perhaps we should discuss this in more detail in the dev-mailing list? I'm sure Jan-Mathijs will join, Robert is on vacation at the moment. But thanks for your reply! Best, Roemer On 7/27/2010 4:58 PM, Vladimir Litvak wrote: > Dear Roemer, > > Why did you decide to drop the support for variable number of tapers > in mtmconvol? That was actually quite a handy feature that I'm using > to get TFs with more or less uniform smoothness across frequency. I > don't know how many other people are using it but if there are many > perhaps we can campaign for retaining it in the new implementation ;-) > > Best, > > Vladimir > > On Tue, Jul 27, 2010 at 3:48 PM, Roemer van der Meij > > wrote: > > Hi everybody, > > I just finished fully implementing the new low-level frequency > analysis routines for cfg.method = mtmconvol and mtmfft. They are > not yet used by default, and I would appreciate if it can be > tested more before optimizing computation speeds (should be > relatively equal now, but many optimizations possible). > > The new routines can be used by adding a third input argument to > your ft_freqanalysis calls, as: > New implementation: > freq = ft_freqanalysis(cfg,data,1) > Old implementation (default): > freq = ft_freqanalysis(cfg,data,0) > > *Things that are different:* > - all mtmconvol output is now phase-shifted such that an angle of > 0 of any fourier-coefficient /always /means a peak of an > oscillation in the data, and an angle of pi will /always/ mean the > trough of an oscillation (wavelet wise angle = 0 is implemented as > cosine at peak, and sine in up-going flank) > - all mtmfft output is now phase-shifted such that any angle from > any fourier-coefficient is from the perspective of the oscillation > in the data being at its peak at time = 0 > - mtmconvol now uses an accurate frequency vector for building its > wavelets (determined by fsample and nsample, with cfg.foi as > starting point), instead of an /uncorrected/ cfg.foi (mtmfft > already used an accurate one) (note: this causes slight > differences between the old and new implementation) > - mtmfft can now take a cfg.foi input-vector as well, instead of > the usual cfg.foilim (backwards compatible) > - because of the above, nearly /all/ fourier-output is different, > but e.g. phase differences between coefficients should be the same > - we decided to drop the support for variable number of tapers in > mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is > given, and first element of vector is selected) > - in the new format, many things can be upgraded/implemented etc. > in the future > > > As freqanalysis is a rather fundamental pilar of FieldTrip, I > would really appreciate if some of you can do some testing based > on the above differences and anything else you can think of. > Different types of data, different approaches, etc. to see if both > implementations give comparable results and such (do note raw > fourier-coefficients will almost always be different). It could be > I missed some fields from the old functions that I diligently > checked, or made some errors that did not affect my current > testing environment. > I can be reached at the e-mail address below, via the > mailing-list, or via bug-reports. Thanks in advance. > > All the best! > > Roemer > > > PS: the changes will be on the ft-server tonight, but are of > course already in the svn-version > > -- > Roemer van der Meij MSc > 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 > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc 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 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lumatobu2 at HOTMAIL.COM Tue Jul 27 20:34:51 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Tue, 27 Jul 2010 13:34:51 -0500 Subject: How can I fit more than two dipoles? In-Reply-To: Message-ID: If I have a lead field matrix, a matrix of sources and a matrix of scalp signals like in the script below; what functions can I use to perform the inverse problem, i.e. given the leadfield matrix (C) and the scalp simulated data (dat), what function of fieldtrip use to recover the x_orig matrix. The .mat file is included too. Thanks for your help. _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: proof.m URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: electrodes1020.mat Type: application/octet-stream Size: 8496 bytes Desc: not available URL: From lumatobu2 at HOTMAIL.COM Wed Jul 28 03:50:18 2010 From: lumatobu2 at HOTMAIL.COM (Ludwing Torres) Date: Tue, 27 Jul 2010 20:50:18 -0500 Subject: why ft_sourceplot doesn't work? In-Reply-To: Message-ID: Hello, I tried to make the example to fit dipoles explained in the page of fieldtrip: http://fieldtrip.fcdonders.nl/example/symmetric_dipoles in the part in which one computes the time average, using the function ft_timelockanalysis produces an error that says that the function needs the field cfg.covariancewindow: cfg = []; cfg.covariance = 'yes'; timelock = ft_timelockanalysis(cfg, data); it appears to be solved when I set this to the option 'poststim' and recompute the function. cfg.covariancewindow = 'poststim'; timelock = timelockanalysis(cfg, data); the input is raw data with 91 channels and 1 trials applying preprocessing options averaging trials averaging trial 1 of 1 Warning: Divide by zero. > In timelockanalysis at 606 This produces the division by zero seen above, but any of the options for covariancewindow field result the same for this. Then, after computing the sourceanalysis and sourcedescriptives function, I go to the part of ft_sourceplot with the same configuration as in the page, and the function produces the next error: cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'nai'; cfg.funcolorlim = [1.6 2.2]; >> sourceplot(cfg, source); the input is source data with 3468 positions not plotting anatomy no functional parameter no masking parameter voxel 1590, indices [9 9 6], location [-0.0 -0.0 5.0] ??? Error using ==> sourceplot at 654 no anatomy is present and no functional data is selected, please check your cfg.funparameter please, if anyone know why this is happening and how to fix this, let me know. thank you for your atention. _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Wed Jul 28 09:09:23 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 28 Jul 2010 09:09:23 +0200 Subject: why ft_sourceplot doesn't work? In-Reply-To: Message-ID: hi, > cfg = []; > cfg.covariance = 'yes'; > timelock = ft_timelockanalysis(cfg, data); > > it appears to be solved when I set this to the option 'poststim' and recompute the function. > > cfg.covariancewindow = 'poststim'; here you should define the time used for calculating cov. cfg.covariancewindow = [from to]; > no anatomy is present and no functional data > is selected, please check your > cfg.funparameter this error message is actually quite informative :-) check whether your source structure has an avg.nai field. if not then of course nothing is plotted. in that case check if you defined cfg.projectnoise='yes'; before calling ft_sourceanalysis. good luck. nathan > > please, if anyone know why this is happening and how to fix this, let me know. > thank you for your atention. > > > Discover the new Windows Vista Learn more! > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajay.halai at POSTGRAD.MANCHESTER.AC.UK Wed Jul 28 12:43:30 2010 From: ajay.halai at POSTGRAD.MANCHESTER.AC.UK (Ajay Halai) Date: Wed, 28 Jul 2010 12:43:30 +0200 Subject: EEG source localisation questions Message-ID: Dear FT users, I am a 1st year PhD student and new to FIELDTRIP, and any help will be very welcome. I have managed to run simple ERP analyses on a language experiment. I am now hoping to localise the peaks (P100 and N400) but am coming across some problems. I will try my best to explain briefly my current method of analyses and would greatly appreciate any comments or suggests, as I fear I am making a mistake somewhere. The problem I encounter is that the values returned for the avg.pow are the same for each condition. Naturally, I made sure that I specified different conditions at the ft_sourceanalysis (cfg, data) stage, but I did specify different conditions. I also checked the avg.noise, and was surprised to see these values were the same as the avg.pow, which leads me to think I have done something wrong or am failing to interpret this. Furthermore, I tried to then use loreta, and selected the timelock data, with the same cfg but get an error (Undefined function or method 'loreta' for input arguments of type 'struct') and wonder if I need to specify other cfg. I used the 'lcmv' method. projectnoise 'yes', rawtrial 'no', lambda = 0, and using the vol, grid and elec files from the created leadfield. Any suggestions on what I may be doing wrong would be greatly appreciated. Additionally, I have provided some more details about the stages before this, which may point to the problem. Best wishes Ajay Halai analysis details: I have 7 conditions in all, but take 2 conditions for 1 subject as an example. I have two types of speech, which show significant differences at P100. I used a bandpass filter (1-40hz), padding (0.1), baseline correction (-0.1 0), detrend and average EEG reference at the preprocessing stage. I removed artifacts by first removing components using the 'fastica' method, and then a visual rejection. Following this, I specified the time of interest limit to the P100, and used the timelockanalysis. I have not used keeptrial or keepindividual cfg, although I don't think this is the cause of the problem. I do not have individual MRIs, therefore I have used a template from the MNI. I have applied a segmentation (using volsegment). I specified the elec positions (64 sensors), and prepared leadfields using reducerank 2, threshold 0.1, smooth 5, units 'mm' ___________________________________________________________________ Neuroscience and Aphasia Research Unit (NARU) School of Psychological Sciences (Zochonis Building) University of Manchester Brunswick Street Manchester M13 9PL UK ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ajay.halai at POSTGRAD.MANCHESTER.AC.UK Wed Jul 28 17:06:43 2010 From: ajay.halai at POSTGRAD.MANCHESTER.AC.UK (Ajay Halai) Date: Wed, 28 Jul 2010 17:06:43 +0200 Subject: EEG source localisation questions Message-ID: My apologies, I have searched through the archives, and found a similiar problem by Floris de Lange, to which Robert.O replied. I will try that suggestion. Sorry to fill up your inbox. best Ajay Roberts reply: " Last week I discussed similar issues with Jan-Mathijs. Sofar at the FCDC we have not really optimized the data handling for LCMV beamforming. Markus Bauer is one of the few who had a go at it, and for him it did not really work that well. Jan-Mathijs mentioned that sofar we have been working with the data covariance that was estimated based on the single trialsd, and not with th edata covariance estimated on the average (note that the order matters for the covariance computation and averaging). Right now I don't know the details of your experiment and data any more, but you might want to try data = preprocessing(cfg) avg1 = timelockanalysis(cfg, data) with keeptrials=no, covariance=no avg2 = timelockanalysis(cfg, avg1) with keeptrials=no, covariance=yes and then use avg2 which includes the covariance of the average in the sourceanalysis. best regards, Robert " On Wed, 28 Jul 2010 12:43:30 +0200, Ajay Halai wrote: >Dear FT users, > >I am a 1st year PhD student and new to FIELDTRIP, and any help will be very >welcome. I have managed to run simple ERP analyses on a language experiment. >I am now hoping to localise the peaks (P100 and N400) but am coming across >some problems. > >I will try my best to explain briefly my current method of analyses and >would greatly appreciate any comments or suggests, as I fear I am making a >mistake somewhere. > >The problem I encounter is that the values returned for the avg.pow are the >same for each condition. Naturally, I made sure that I specified different >conditions at the ft_sourceanalysis (cfg, data) stage, but I did specify >different conditions. I also checked the avg.noise, and was surprised to see >these values were the same as the avg.pow, which leads me to think I have >done something wrong or am failing to interpret this. Furthermore, I tried >to then use loreta, and selected the timelock data, with the same cfg but >get an error (Undefined function or method 'loreta' for input arguments of >type 'struct') and wonder if I need to specify other cfg. > >I used the 'lcmv' method. projectnoise 'yes', rawtrial 'no', lambda = 0, and >using the vol, grid and elec files from the created leadfield. > >Any suggestions on what I may be doing wrong would be greatly appreciated. >Additionally, I have provided some more details about the stages before >this, which may point to the problem. > >Best wishes >Ajay Halai > >analysis details: > >I have 7 conditions in all, but take 2 conditions for 1 subject as an >example. I have two types of speech, which show significant differences at >P100. I used a bandpass filter (1-40hz), padding (0.1), baseline correction >(-0.1 0), detrend and average EEG reference at the preprocessing stage. I >removed artifacts by first removing components using the 'fastica' method, >and then a visual rejection. Following this, I specified the time of >interest limit to the P100, and used the timelockanalysis. I have not used >keeptrial or keepindividual cfg, although I don't think this is the cause of >the problem. > >I do not have individual MRIs, therefore I have used a template from the >MNI. I have applied a segmentation (using volsegment). I specified the elec >positions (64 sensors), and prepared leadfields using reducerank 2, >threshold 0.1, smooth 5, units 'mm' > >___________________________________________________________________ >Neuroscience and Aphasia Research Unit (NARU) >School of Psychological Sciences (Zochonis Building) >University of Manchester >Brunswick Street Manchester >M13 9PL >UK > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Jul 28 21:50:21 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 28 Jul 2010 21:50:21 +0200 Subject: cluster-based analysis question In-Reply-To: Message-ID: Dear Bornali, This is more of a statistical methods question. I'm interested in doing test-retest evaluation in a data set and, most specifically, formally assessing my intuition that there are stable individual differences in the ERSP associated with performing a certain task, such that the overall "pattern" of one subject's ERSP is highly replicable, and thus reliably different from the ERSPs of other subjects. Is the fieldtrip cluster-based permutation test a suitable procedure for implementing this test? Has anyone done this type of analysis already? Any advice would be appreciated. Yes, it is straightforward to do this type of analysis in Fieldtrip. This is a so-called between-trials analysis. Your independent variable is SUBJECT, with levels the different subjects in your study. You can do this analysis for every pair of subjects (using statfun=indepsamplesT) or for all subjects jointly (using statfun=indepsamplesF). You will be testing the null hypothesis that there are no differences between subjects (or, in reliability terminology, that there are no reliable individual differences). This is a strict null hypothesis. However, it will definitely be of interest to see where the individual differences are most pronounced; on which regions of the scalp, on which time points relative to some stimulus, and in which frequency bands. Good luck, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl Thanks so much, Bornali -- Medical Scientist Training Program Neuroscience Training Program University of Wisconsin - Madison Health Emotions Research Institute bkundu at wisc.edu ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at GMAIL.COM Fri Jul 30 21:42:36 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Fri, 30 Jul 2010 21:42:36 +0200 Subject: standard error of complex data Message-ID: Hello, I'd like to plot data from single channels/single subjects with error bars, so as to compare peak amplitudes across different experiment conditions. In brief, I have Hilbert transformed data filtered from 8-12Hz. Then with a function I wrote, I pull all the trials for each condition and put them into a n X m matrix (trials x timepoints) for each channel. The data are still complex because I have separate analyses for phase and amplitude. For amplitudes, I'm taking the evoked response by getting the mean of each timepoint across trials and then taking the magnitude (abs). For the standard error, I am first getting the standard deviation by stdev=sqrt[ (norm(x)-mean(x)) ^2 ] This produces a real number. For the standard error, would I then divide by the square root of N? Thanks for any feedback, Karl Doron PhD. Candidate UCSB ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.