From spike377 at KOREA.COM Mon Nov 3 13:00:31 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Mon, 3 Nov 2008 21:00:31 +0900 Subject: Some questions about 'phase locking value' and 'phase locking statistics' Message-ID: An HTML attachment was scrubbed... URL: From iversen at NSI.EDU Mon Nov 3 18:26:11 2008 From: iversen at NSI.EDU (John Iversen) Date: Mon, 3 Nov 2008 09:26:11 -0800 Subject: source localization given induced spectra Message-ID: Hello, Is there a way to do source localization on induced spectrograms? (Induced spectra being the mean of individual trials' power spectra.) Conceptually I am not sure how this would work, given that one starts with topographies of real, positive-valued power, with no phase information, so any dipole fit could be at best sign- indeterminate.There is no facility within fieldtrip to do such a thing as far as I can tell (induced spectra were calculated freqanalysis on multi-trial data and are within the .powspctrm field of the result, which is not handled by freq2timelock, and thus cannot feed any of the localization routines). What is of actual interest are task-related fluctuations of the power around a (much larger, and topographically varied) baseline. Is there a way to say where in the brain are the (presumed) subset of neural sources that vary in power with time? Thanks, John ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Mon Nov 3 22:18:39 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 3 Nov 2008 21:18:39 +0000 Subject: source localization given induced spectra In-Reply-To: Message-ID: Dear John, No, it is not possible to perform source localization on the spectrograms as you define them. You quite rightly point out that a spatial topography of power is always positive, so cannot account for a proper dipolar pattern. However, source localization of induced changes in oscillatory activity is possible. There's actually a nice tutorial on the fieldtrip website: "localizing oscillator sources, using beamformer techniques". Alternatively, you can actually call dipolefitting using frequency data as an input, but this requires either fourier-data, or cross- spectral densities between all channel combinations. Usually the fourier-data is more memory efficient. In this case I would propose a two-step strategy: compute spectrograms to identify your time- frequency region(s) of interest. Then call freqanalysis again, with cfg.output = 'fourier'. Then I would guess that dipolefitting runs through... At least it's worth a try. Yours, Jan-Mathijs On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > Hello, > > Is there a way to do source localization on induced spectrograms? > (Induced spectra being the mean of individual trials' power > spectra.) Conceptually I am not sure how this would work, given > that one starts with topographies of real, positive-valued power, > with no phase information, so any dipole fit could be at best sign- > indeterminate.There is no facility within fieldtrip to do such a > thing as far as I can tell (induced spectra were calculated > freqanalysis on multi-trial data and are within the .powspctrm > field of the result, which is not handled by freq2timelock, and > thus cannot feed any of the localization routines). > > What is of actual interest are task-related fluctuations of the > power around a (much larger, and topographically varied) baseline. > Is there a way to say where in the brain are the (presumed) subset > of neural sources that vary in power with time? > > Thanks, > > John > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Nov 4 17:19:14 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 4 Nov 2008 17:19:14 +0100 Subject: smoothing sensor data Message-ID: Hi everyone, Did anyone try smoothing single-subject data on sensor level before? In source-space I noticed that smoothing my single subjects (MEG)data made the GA-statistical analysis more sensitive because the source-locations were a bit shifted over subjects (MEG spatial resolution apparently isn't that bad after all ;) ). There I used a spm_smooth function on my volume data. But now I want to try the same on sensor level, I have pretty focal blobs, and cluster-analysis "looses" the cluster over time in the GA. Now I wonder how to do this. I could use the sensor locations in the grad and then adjust the values according to distance in 3D space. Before making this myself I was just wondering if anyone already made code to do the same. Ideas on how to do it are also much appreciated ;) Best regards, Ingrid ___________________________________ Ingrid Nieuwenhuis PhD student Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands Email: ingrid.nieuwenhuis at fcdonders.ru.nl Tel: 0031 (0)24 - 36 10887 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From iversen at NSI.EDU Tue Nov 4 18:02:17 2008 From: iversen at NSI.EDU (John Iversen) Date: Tue, 4 Nov 2008 09:02:17 -0800 Subject: source localization given induced spectra In-Reply-To: <139BC559-0787-41FB-B906-6DE42322692B@psy.gla.ac.uk> Message-ID: Dear Jan-Mathijs, Thanks for the quick reply. I'm sorry to hear I was right :) I may misunderstand what you've suggested, but is it not the case that if I chose cfg.output='fourier' it will average fourier spectra across trials (cares about phase) instead of power spectrum (phase blind, as I had been doing). In the end wont I simply get the equivalent of the fourier spectrum of the timelock average, which is substantially different from the induced spectrum that interests me? In many cases the sensor topography of the induced power looks somewhat dipolar, with two power peaks, so I may well try to do a fit, but optimizing not on the field but the field power (this would require modifying the output of the forward model within dipolefitting)--it will not be able to get the polarity of the dipole, but should be able to get a location. Maybe? It seems possible in principle, but I wonder if anyone has practical experience with this. I feel there should be a way to study this kind of question! Best, John On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > Dear John, > > No, it is not possible to perform source localization on the > spectrograms as you define them. You quite rightly point out that a > spatial topography of power is always positive, so cannot account > for a proper dipolar pattern. However, source localization of > induced changes in oscillatory activity is possible. There's > actually a nice tutorial on the fieldtrip website: "localizing > oscillator sources, using beamformer techniques". > Alternatively, you can actually call dipolefitting using frequency > data as an input, but this requires either fourier-data, or cross- > spectral densities between all channel combinations. Usually the > fourier-data is more memory efficient. In this case I would propose > a two-step strategy: compute spectrograms to identify your time- > frequency region(s) of interest. Then call freqanalysis again, with > cfg.output = 'fourier'. Then I would guess that dipolefitting runs > through... At least it's worth a try. > > Yours, > > Jan-Mathijs > > > On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > >> Hello, >> >> Is there a way to do source localization on induced spectrograms? >> (Induced spectra being the mean of individual trials' power >> spectra.) Conceptually I am not sure how this would work, given >> that one starts with topographies of real, positive-valued power, >> with no phase information, so any dipole fit could be at best sign- >> indeterminate.There is no facility within fieldtrip to do such a >> thing as far as I can tell (induced spectra were calculated >> freqanalysis on multi-trial data and are within the .powspctrm >> field of the result, which is not handled by freq2timelock, and >> thus cannot feed any of the localization routines). >> >> What is of actual interest are task-related fluctuations of the >> power around a (much larger, and topographically varied) baseline. >> Is there a way to say where in the brain are the (presumed) subset >> of neural sources that vary in power with time? >> >> Thanks, >> >> John >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and 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/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/fcdonders/fieldtrip. From rongf at NIDCD.NIH.GOV Tue Nov 4 18:12:22 2008 From: rongf at NIDCD.NIH.GOV (Rong, Feng (NIH/NIDCD) [F]) Date: Tue, 4 Nov 2008 12:12:22 -0500 Subject: source localization given induced spectra In-Reply-To: A<3DCA585C-35B0-4B39-ABF8-03C8C8C55C99@nsi.edu> Message-ID: John, Jan-Mathijs, Sorry I am not answering the question but asking another one. :) I wondering whether it is doable to estimate source first, and construct the source activities (moment norm, maybe) as 'pseudo-input' to the frequency analysis functions for computation of the spectrogram and further analysis. I saw one recent paper Gow et al. (2008) NeuroImage 43(3):614-623 taking that approach on sources estimated using mne. Is there any potential problem if I use sources estimated by lcmv? Best, Feng -----Original Message----- From: John Iversen [mailto:iversen at NSI.EDU] Sent: Tuesday, November 04, 2008 12:02 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] source localization given induced spectra Dear Jan-Mathijs, Thanks for the quick reply. I'm sorry to hear I was right :) I may misunderstand what you've suggested, but is it not the case that if I chose cfg.output='fourier' it will average fourier spectra across trials (cares about phase) instead of power spectrum (phase blind, as I had been doing). In the end wont I simply get the equivalent of the fourier spectrum of the timelock average, which is substantially different from the induced spectrum that interests me? In many cases the sensor topography of the induced power looks somewhat dipolar, with two power peaks, so I may well try to do a fit, but optimizing not on the field but the field power (this would require modifying the output of the forward model within dipolefitting)--it will not be able to get the polarity of the dipole, but should be able to get a location. Maybe? It seems possible in principle, but I wonder if anyone has practical experience with this. I feel there should be a way to study this kind of question! Best, John On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > Dear John, > > No, it is not possible to perform source localization on the > spectrograms as you define them. You quite rightly point out that a > spatial topography of power is always positive, so cannot account > for a proper dipolar pattern. However, source localization of > induced changes in oscillatory activity is possible. There's > actually a nice tutorial on the fieldtrip website: "localizing > oscillator sources, using beamformer techniques". > Alternatively, you can actually call dipolefitting using frequency > data as an input, but this requires either fourier-data, or cross- > spectral densities between all channel combinations. Usually the > fourier-data is more memory efficient. In this case I would propose > a two-step strategy: compute spectrograms to identify your time- > frequency region(s) of interest. Then call freqanalysis again, with > cfg.output = 'fourier'. Then I would guess that dipolefitting runs > through... At least it's worth a try. > > Yours, > > Jan-Mathijs > > > On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > >> Hello, >> >> Is there a way to do source localization on induced spectrograms? >> (Induced spectra being the mean of individual trials' power >> spectra.) Conceptually I am not sure how this would work, given >> that one starts with topographies of real, positive-valued power, >> with no phase information, so any dipole fit could be at best sign- >> indeterminate.There is no facility within fieldtrip to do such a >> thing as far as I can tell (induced spectra were calculated >> freqanalysis on multi-trial data and are within the .powspctrm >> field of the result, which is not handled by freq2timelock, and >> thus cannot feed any of the localization routines). >> >> What is of actual interest are task-related fluctuations of the >> power around a (much larger, and topographically varied) baseline. >> Is there a way to say where in the brain are the (presumed) subset >> of neural sources that vary in power with time? >> >> Thanks, >> >> John >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and 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/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/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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Tue Nov 4 18:09:53 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 4 Nov 2008 17:09:53 +0000 Subject: smoothing sensor data In-Reply-To: <02b501c93e99$14012eb0$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, You can do your whole analysis in SPM where you can export your sensor-level data to images and smooth it. But then there is no way back to Fieldtrip statistics. Best, Vladimir On Tue, Nov 4, 2008 at 4:19 PM, Ingrid Nieuwenhuis wrote: > Hi everyone, > > > > Did anyone try smoothing single-subject data on sensor level before? In > source-space I noticed that smoothing my single subjects (MEG)data made the > GA-statistical analysis more sensitive because the source-locations were a > bit shifted over subjects (MEG spatial resolution apparently isn't that bad > after all ;) ). There I used a spm_smooth function on my volume data. But > now I want to try the same on sensor level, I have pretty focal blobs, and > cluster-analysis "looses" the cluster over time in the GA. > > > > Now I wonder how to do this. I could use the sensor locations in the grad > and then adjust the values according to distance in 3D space. Before making > this myself I was just wondering if anyone already made code to do the same. > Ideas on how to do it are also much appreciated ;) > > > > Best regards, > > Ingrid > > > > ___________________________________ > > Ingrid Nieuwenhuis > > PhD student > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen, The Netherlands > > Email: ingrid.nieuwenhuis at fcdonders.ru.nl > > Tel: 0031 (0)24 - 36 10887 > > > > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Nov 4 18:35:40 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 4 Nov 2008 18:35:40 +0100 Subject: Problem running source grand average and source statistics Message-ID: Dear list users, I am having a problem running, source grandaverage and source statistics (over multiple subjects) on the output of soucrestatistictics (from multiple trials in single subjects). I ran first sourceanalysis supplying the backwads warped grids (as described in the wiki) to compute filters. Then I ran source analysis again to extract the single trial source images and the ran sourcestatistitics on this to get the single subject statistical images - all this runs fine. I then supply the pos (and dim) data of the template grid to each structure, replacing the original pos data (that do not match and of course prohibit using sourceststatistics and sourcegrandaverage). When trying to do either a source grand average or a sourcestatistics at the multisubject level I get the same error: subscripted assignment dimension mismatch dat(:,i) = tmp(:); Error in ==> sourcegrandaverage at 173 The corresponding lines of code in sourcegrandaverage are: % get the source parameter from each input source reconstruction % get the inside parameter from each input source reconstruction for i=1:Nsubject % TODO this function should use parameterselection if issubfield(varargin{i}, ['avg.' cfg.parameter]) tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); else tmp = getsubfield(varargin{i}, cfg.parameter); end dat(:,i) = tmp(:); tmp = getsubfield(varargin{i}, 'inside'); inside(tmp,i) = 1; end I get an identical error when using sourcestatistics at the multisubject level. The variable dat(:,i) is created like this: dat = zeros(Nvoxel, Nsubject) I suspect that somehow trying to use the 'stat' instead of the power parameter is a problem (TODO?) or that Nvoxel somehow differs over the various subjects ?? Any advice on what to try and test further would very much appreciated. Thanks in advance, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:19:56 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:19:56 +0000 Subject: Problem running source grand average and source statistics In-Reply-To: <822628835@web.de> Message-ID: Dear Michael, I agree with you that a likely cause is that the Nvoxel (which is based on the dimensionality of the first singlesubject-source in the input) varies across subjects. However, this would be strange, because you use the same dipole grid for all subjects. On the other hand: could it be that you 'sparsified' the single subjects? Each subject could have a slightly different number of 'inside' positions. This obviously leads to problems: 1 because the Nvoxel is incorrect in the first place (it's the product of the dim, so the input is assumed to be full 3D, or a linear array with all outside voxels present (either as nans or zeros or whichever number you fancy). 2 because the length of the array per subject varies. Hope this helps, Jan-M On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > Dear list users, > > I am having a problem running, source grandaverage and source > statistics (over multiple subjects) on the output of > soucrestatistictics (from multiple trials in single subjects). > > I ran first sourceanalysis supplying the backwads warped grids (as > described in the wiki) to compute filters. Then I ran source > analysis again to extract the single trial source images and the > ran sourcestatistitics on this to get the single subject > statistical images - all this runs fine. I then supply the pos (and > dim) data of the template grid to each structure, replacing the > original pos data (that do not match and of course prohibit using > sourceststatistics and sourcegrandaverage). When trying to do > either a source grand average or a sourcestatistics at the > multisubject level I get the same error: > > subscripted assignment dimension mismatch > dat(:,i) = tmp(:); > > Error in ==> sourcegrandaverage at 173 > > > The corresponding lines of code in sourcegrandaverage are: > > % get the source parameter from each input source reconstruction > % get the inside parameter from each input source reconstruction > for i=1:Nsubject > % TODO this function should use parameterselection > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > else > tmp = getsubfield(varargin{i}, cfg.parameter); > end > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I get an identical error when using sourcestatistics at the > multisubject level. > The variable dat(:,i) is created like this: > dat = zeros(Nvoxel, Nsubject) > > > I suspect that somehow trying to use the 'stat' instead of the > power parameter is a problem (TODO?) or that Nvoxel somehow differs > over the various subjects ?? > > Any advice on what to try and test further would very much > appreciated. > > Thanks in advance, > 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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:23:12 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:23:12 +0000 Subject: source localization given induced spectra In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B03F3C9B2@NIHCESMLBX8.nih.gov> Message-ID: Dear Feng, This is very much possible and no problem at all. Actually, this is an approach taken by many people in the field. It's perfectly OK to extimate the time course of a source of interest by using an LCMV beamformer and compute spectrograms on these 'virtual channels'. Yours, Jan-Mathijs On Nov 4, 2008, at 5:12 PM, Rong, Feng (NIH/NIDCD) [F] wrote: > John, Jan-Mathijs, > Sorry I am not answering the question but asking another one. :) > I wondering whether it is doable to estimate source first, and > construct > the source activities (moment norm, maybe) as 'pseudo-input' to the > frequency analysis functions for computation of the spectrogram and > further analysis. I saw one recent paper Gow et al. (2008) NeuroImage > 43(3):614-623 taking that approach on sources estimated using mne. Is > there any potential problem if I use sources estimated by lcmv? > > Best, > Feng > > -----Original Message----- > From: John Iversen [mailto:iversen at NSI.EDU] > Sent: Tuesday, November 04, 2008 12:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] source localization given induced spectra > > Dear Jan-Mathijs, > > Thanks for the quick reply. I'm sorry to hear I was right :) > > I may misunderstand what you've suggested, but is it not the case that > if I chose cfg.output='fourier' it will average fourier spectra across > trials (cares about phase) instead of power spectrum (phase blind, as > I had been doing). In the end wont I simply get the equivalent of the > fourier spectrum of the timelock average, which is substantially > different from the induced spectrum that interests me? > > In many cases the sensor topography of the induced power looks > somewhat dipolar, with two power peaks, so I may well try to do a fit, > but optimizing not on the field but the field power (this would > require modifying the output of the forward model within > dipolefitting)--it will not be able to get the polarity of the dipole, > but should be able to get a location. Maybe? It seems possible in > principle, but I wonder if anyone has practical experience with this. > > I feel there should be a way to study this kind of question! > > Best, > > John > > On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > >> Dear John, >> >> No, it is not possible to perform source localization on the >> spectrograms as you define them. You quite rightly point out that a >> spatial topography of power is always positive, so cannot account >> for a proper dipolar pattern. However, source localization of >> induced changes in oscillatory activity is possible. There's >> actually a nice tutorial on the fieldtrip website: "localizing >> oscillator sources, using beamformer techniques". >> Alternatively, you can actually call dipolefitting using frequency >> data as an input, but this requires either fourier-data, or cross- >> spectral densities between all channel combinations. Usually the >> fourier-data is more memory efficient. In this case I would propose >> a two-step strategy: compute spectrograms to identify your time- >> frequency region(s) of interest. Then call freqanalysis again, with >> cfg.output = 'fourier'. Then I would guess that dipolefitting runs >> through... At least it's worth a try. >> >> Yours, >> >> Jan-Mathijs >> >> >> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >> >>> Hello, >>> >>> Is there a way to do source localization on induced spectrograms? >>> (Induced spectra being the mean of individual trials' power >>> spectra.) Conceptually I am not sure how this would work, given >>> that one starts with topographies of real, positive-valued power, >>> with no phase information, so any dipole fit could be at best sign- >>> indeterminate.There is no facility within fieldtrip to do such a >>> thing as far as I can tell (induced spectra were calculated >>> freqanalysis on multi-trial data and are within the .powspctrm >>> field of the result, which is not handled by freq2timelock, and >>> thus cannot feed any of the localization routines). >>> >>> What is of actual interest are task-related fluctuations of the >>> power around a (much larger, and topographically varied) baseline. >>> Is there a way to say where in the brain are the (presumed) subset >>> of neural sources that vary in power with time? >>> >>> Thanks, >>> >>> John >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users >>> of the FieldTrip toolbox, to share experiences and to discuss new >>> ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html >>> and 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/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/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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:52:18 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:52:18 +0000 Subject: source localization given induced spectra In-Reply-To: <3DCA585C-35B0-4B39-ABF8-03C8C8C55C99@nsi.edu> Message-ID: Dear John, Probably I was a bit rash in answering to your earlier mail and did not think it through completely. Apologies for that and for any confusion created. Let's give it another try: As you pointed out, induced power can show a somewhat dipolar topography, but you cannot fit a dipole to this because of the fact that it is positive all over the place. However, if you would indeed have some phase information in your topography, showing the ingoing and outgoing field (MEG), or positive and negative potential (EEG), one could fit a dipole. I was talking rubbish when suggesting to use fourierspectra, because it is forbidden to average them across trials (not actually forbidden, but it does not make sense). However, it would make sense to average cross-spectral densities across trials (not the csd's between all channel combinations, but between a well chosen set of channel pairs). Why would this be the case? Well, if you cleverly choose your reference signal (I suggest one of the strong blobs in your dipolar powerspectrum), and you compute the cross-spectral density between this guy and the rest of the channels, then you can do business because the csd's represent the estimated phase-difference between the reference signal and the rest. The interesting signal (your dipolar field) which is buried in your single trial data now has a phase of 0 (channels are in the same blob of the dipolar field) or 180 degrees (channels are in the opposite blob of the dipolar field) with respect to the reference, and importantly this is the same for all trials. This means that you can average the cross-spectral densities across trials to generate a complex-valued topography. Plotting the real-part (or imaginary part) of this should lead to a nice dipolar pattern with positive, and negative values. As far as I know dipolefitting can deal with cross-spectra as an input, so my revised approach would be: compute spectrograms and identify your time-frequency region of interest. Then plot the topography and compute a sensible reference channel. Then call freqanalysis again, but with output='powandcsd', and channelcmb = {'all' 'yourchosenchannel'}. Then try a dipole fit. Hope this helps, Jan-Mathijs On Nov 4, 2008, at 5:02 PM, John Iversen wrote: > Dear Jan-Mathijs, > > Thanks for the quick reply. I'm sorry to hear I was right :) > > I may misunderstand what you've suggested, but is it not the case > that if I chose cfg.output='fourier' it will average fourier > spectra across trials (cares about phase) instead of power spectrum > (phase blind, as I had been doing). In the end wont I simply get > the equivalent of the fourier spectrum of the timelock average, > which is substantially different from the induced spectrum that > interests me? > > In many cases the sensor topography of the induced power looks > somewhat dipolar, with two power peaks, so I may well try to do a > fit, but optimizing not on the field but the field power (this > would require modifying the output of the forward model within > dipolefitting)--it will not be able to get the polarity of the > dipole, but should be able to get a location. Maybe? It seems > possible in principle, but I wonder if anyone has practical > experience with this. > > I feel there should be a way to study this kind of question! > > Best, > > John > > On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > >> Dear John, >> >> No, it is not possible to perform source localization on the >> spectrograms as you define them. You quite rightly point out that >> a spatial topography of power is always positive, so cannot >> account for a proper dipolar pattern. However, source localization >> of induced changes in oscillatory activity is possible. There's >> actually a nice tutorial on the fieldtrip website: "localizing >> oscillator sources, using beamformer techniques". >> Alternatively, you can actually call dipolefitting using frequency >> data as an input, but this requires either fourier-data, or cross- >> spectral densities between all channel combinations. Usually the >> fourier-data is more memory efficient. In this case I would >> propose a two-step strategy: compute spectrograms to identify your >> time-frequency region(s) of interest. Then call freqanalysis >> again, with cfg.output = 'fourier'. Then I would guess that >> dipolefitting runs through... At least it's worth a try. >> >> Yours, >> >> Jan-Mathijs >> >> >> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >> >>> Hello, >>> >>> Is there a way to do source localization on induced spectrograms? >>> (Induced spectra being the mean of individual trials' power >>> spectra.) Conceptually I am not sure how this would work, given >>> that one starts with topographies of real, positive-valued power, >>> with no phase information, so any dipole fit could be at best >>> sign-indeterminate.There is no facility within fieldtrip to do >>> such a thing as far as I can tell (induced spectra were >>> calculated freqanalysis on multi-trial data and are within >>> the .powspctrm field of the result, which is not handled by >>> freq2timelock, and thus cannot feed any of the localization >>> routines). >>> >>> What is of actual interest are task-related fluctuations of the >>> power around a (much larger, and topographically varied) >>> baseline. Is there a way to say where in the brain are the >>> (presumed) subset of neural sources that vary in power with time? >>> >>> Thanks, >>> >>> John >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between >>> users of the FieldTrip toolbox, to share experiences and to >>> discuss new ideas for MEG and EEG analysis. See also http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ >> 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/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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed Nov 5 13:41:44 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 5 Nov 2008 13:41:44 +0100 Subject: Problem running source grand average and source statistics In-Reply-To: <551DCBEB-4882-4FB9-BC42-AFA40269CE57@psy.gla.ac.uk> Message-ID: Dear Michael and Jan-Mathijs, If the same procedure is followed as on the wiki, the inside of the template grid is copied to the single subjects, so by definition also the 'sparsified' single subjects sources should all have the same amount of (inside) voxels. So point 2 J-M raised can't be it, point 1 could well be: Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and Nvoxels is the product of the dim. Best Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: Wednesday, November 05, 2008 10:20 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Problem running source grand average and source statistics Dear Michael, I agree with you that a likely cause is that the Nvoxel (which is based on the dimensionality of the first singlesubject-source in the input) varies across subjects. However, this would be strange, because you use the same dipole grid for all subjects. On the other hand: could it be that you 'sparsified' the single subjects? Each subject could have a slightly different number of 'inside' positions. This obviously leads to problems: 1 because the Nvoxel is incorrect in the first place (it's the product of the dim, so the input is assumed to be full 3D, or a linear array with all outside voxels present (either as nans or zeros or whichever number you fancy). 2 because the length of the array per subject varies. Hope this helps, Jan-M On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > Dear list users, > > I am having a problem running, source grandaverage and source > statistics (over multiple subjects) on the output of > soucrestatistictics (from multiple trials in single subjects). > > I ran first sourceanalysis supplying the backwads warped grids (as > described in the wiki) to compute filters. Then I ran source > analysis again to extract the single trial source images and the > ran sourcestatistitics on this to get the single subject > statistical images - all this runs fine. I then supply the pos (and > dim) data of the template grid to each structure, replacing the > original pos data (that do not match and of course prohibit using > sourceststatistics and sourcegrandaverage). When trying to do > either a source grand average or a sourcestatistics at the > multisubject level I get the same error: > > subscripted assignment dimension mismatch > dat(:,i) = tmp(:); > > Error in ==> sourcegrandaverage at 173 > > > The corresponding lines of code in sourcegrandaverage are: > > % get the source parameter from each input source reconstruction > % get the inside parameter from each input source reconstruction > for i=1:Nsubject > % TODO this function should use parameterselection > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > else > tmp = getsubfield(varargin{i}, cfg.parameter); > end > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I get an identical error when using sourcestatistics at the > multisubject level. > The variable dat(:,i) is created like this: > dat = zeros(Nvoxel, Nsubject) > > > I suspect that somehow trying to use the 'stat' instead of the > power parameter is a problem (TODO?) or that Nvoxel somehow differs > over the various subjects ?? > > Any advice on what to try and test further would very much > appreciated. > > Thanks in advance, > 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/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/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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Nov 5 14:50:15 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 5 Nov 2008 14:50:15 +0100 Subject: Problem running source grand average a nd source statistics Message-ID: Dear Ingrid, dear Jan-Mathijs I guess Ingrid is indeed correct, as all my datasets have the same dimension of the stat field and of the inside/outside fields. I was actually also supplying the dim field from the template to all datasets, so the product of dims' should be the same everywhere, but that hasn't really solved the problem. The length of the inside field is 3297, the outside field is 3129, their sum is 6426 which is identical to the product of dimensions of the template grid which are 17 x 21 x 18 =6426. So I am really a bit puzzled here... Anyway, here's the code I use, maybe someone a really stupid error, that I simply overlooked: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FIRST I prepare a file with the data and the settings for the statistics that is later read in again: % datapath = '/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Stats/'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DesignData1 = { 'ABA04_Up_StatSources.mat' 'IFS20_Up_StatSources.mat'; 'IKE28_Up_StatSources.mat'; 'JHA07_Up_StatSources.mat'; 'JPA05_Up_StatSources.mat'; 'MKA21_Up_StatSources.mat'; 'MMA07_Up_StatSources.mat'; 'PSS16_Up_StatSources.mat'; 'SNI05_Up_StatSources.mat'; 'UWA31_Up_StatSources.mat'; }; DesignData2 = { 'ABA04_In_StatSources.mat'; 'IFS20_In_StatSources.mat'; 'IKE28_In_StatSources.mat'; 'JHA07_In_StatSources.mat'; 'JPA05_In_StatSources.mat'; 'MKA21_In_StatSources.mat'; 'MMA07_In_StatSources.mat'; 'PSS16_In_StatSources.mat'; 'SNI05_In_StatSources.mat'; 'UWA31_In_StatSources.mat'; }; % The statistics configuration cfg = []; nSubjects = min(length(DesignData1),length(DesignData2)); a = [1:nSubjects]; b = ones(1,nSubjects); cfg.design = [a a; b (2*b)]; cfg.ivar = 2; % independent variable: condition cfg.uvar = 1; % subjects cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.01; cfg.alpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.numrandomization = 500; %2000; cfg.threshold = 0.01; cfg.parameter = 'stat'; cfg.statistic = 'depsamplesT'; % create output file OutFileName = strcat(datapath,'DesignStat2008_11_04.mat'); save(OutFileName, 'DesignData1', 'DesignData2', 'cfg', 'datapath'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECOND I read in this file and the template and try to perform grandaveraging and sourcestatistics at the second level: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [] = StatisticsDICS(DesignStatLCMVFile); template = load('/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Grids/MNItemplate_231008_-1p5iws.mat'); Nx = length(template.template_grid.xgrid) Ny = length(template.template_grid.ygrid) Nz = length(template.template_grid.zgrid) load(DesignStatLCMVFile); % contains datapath, DesignData1, DesignData2, cfg % Load Data from DesignData1,2 automatically ensuring matching sizes % please ensure that data pairs are OK if using paired statistics ! for i = 1:min(length(DesignData1),length(DesignData2)) m=strcat('loading dataset#:', num2str(2*i-1)); disp(m); fullname1 = strcat(datapath,DesignData1{i,1}); Data1{i} = load(fullname1); m=strcat('loading dataset#:', num2str(2*i)); disp(m); fullname2 = strcat(datapath,DesignData2{i,1}); Data2{i} = load(fullname2); end % Fixing the structure properties for l = 1:size(Data1,2) Data1{l}.SourceStat.xgrid = template.template_grid.xgrid; Data1{l}.SourceStat.ygrid = template.template_grid.ygrid; Data1{l}.SourceStat.zgrid = template.template_grid.zgrid; Data1{l}.SourceStat.dim = [Nx Ny Nz]; Data1{l}.SourceStat.pos = template.template_grid.pos; Data1{l}.SourceStat.inside = template.template_grid.inside; Data1{l}.SourceStat.outside = template.template_grid.outside; Data1{l} = Data1{l}.SourceStat; Data2{l}.SourceStat.xgrid = template.template_grid.xgrid; Data2{l}.SourceStat.ygrid = template.template_grid.ygrid; Data2{l}.SourceStat.zgrid = template.template_grid.zgrid; Data2{l}.SourceStat.dim = [Nx Ny Nz]; Data2{l}.SourceStat.pos = template.template_grid.pos; Data2{l}.SourceStat.inside = template.template_grid.inside; Data2{l}.SourceStat.outside = template.template_grid.outside; Data2{l} = Data2{l}.SourceStat; end % prepare the statistics by computing the grandaverage with individual % subject data retained % Compute grand average for Condition 1 and 2 cfgGA = []; cfgGA.keepindividual = 'yes'; cfgGA.parameter='stat'; % create command strings for the computaion: commandstr1 = strcat ('DataGA1', '=sourcegrandaverage(cfgGA'); commandstr2 = strcat ('DataGA2', '=sourcegrandaverage(cfgGA'); for l = 1 : length(Data1) commandstr1 = strcat(commandstr1, ',Data1{', num2str(l) , '}'); commandstr2 = strcat(commandstr2, ',Data2{', num2str(l) , '}'); end % finalize command strings commandstr1=strcat(commandstr1,');') commandstr2=strcat(commandstr2,');') eval(commandstr1) % yields DataGA1; eval(commandstr2) % yields DataGA2; clear Data1; clear Data2; % no longer needed we now have DataGA1,2 %SourceStatsitics cfg is known from the design file! sourceStat = sourcestatistics(cfg, DataGA1, DataGA2); OutFilename = ... strcat(datapath, 'SourceStatisticsLCMV_denoisedDataAndNewGrids_1000rand_',DesignData1{i,1}(7:end-4),'_calpha',num2str(cfg.clusteralpha), '_alpha_',num2str(cfg.alpha),'.mat'); save(OutFilename, 'sourceStat'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Here's the inforamtion from the datasets and the template: Information of a dataset after processing/preparing for sourcegrandaverage: stat: [3297x1 double] df: 134 critval: [-1.9778 1.9778] prob: [3297x1 double] mask: [3297x1 logical] dim: [17 21 18] inside: [1x3297 double] outside: [1x3129 double] pos: [6426x3 double] cfg: [1x1 struct] xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90] Information of the template: xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90] dim: [17 21 18] pos: [6426x3 double] inside: [1x3297 double] outside: [1x3129 double] The onlz thing that I see varying fron dataset to dataset is the df field. Any help appreciated, Michael > -----Ursprüngliche Nachricht----- > Von: "Ingrid Nieuwenhuis" > Gesendet: 05.11.08 14:02:04 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Problem running source grand average and source statistics > Dear Michael and Jan-Mathijs, > > If the same procedure is followed as on the wiki, the inside of the template > grid is copied to the single subjects, so by definition also the > 'sparsified' single subjects sources should all have the same amount of > (inside) voxels. So point 2 J-M raised can't be it, point 1 could well be: > Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and Nvoxels is > the product of the dim. > > Best Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen > Sent: Wednesday, November 05, 2008 10:20 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Problem running source grand average and source > statistics > > Dear Michael, > > I agree with you that a likely cause is that the Nvoxel (which is > based on the dimensionality of the first singlesubject-source in the > input) varies across subjects. However, this would be strange, > because you use the same dipole grid for all subjects. On the other > hand: could it be that you 'sparsified' the single subjects? Each > subject could have a slightly different number of 'inside' positions. > This obviously leads to problems: > 1 because the Nvoxel is incorrect in the first place (it's the > product of the dim, so the input is assumed to be full 3D, or a > linear array with all outside voxels present (either as nans or zeros > or whichever number you fancy). > 2 because the length of the array per subject varies. > > Hope this helps, > > Jan-M > > > > On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > > > Dear list users, > > > > I am having a problem running, source grandaverage and source > > statistics (over multiple subjects) on the output of > > soucrestatistictics (from multiple trials in single subjects). > > > > I ran first sourceanalysis supplying the backwads warped grids (as > > described in the wiki) to compute filters. Then I ran source > > analysis again to extract the single trial source images and the > > ran sourcestatistitics on this to get the single subject > > statistical images - all this runs fine. I then supply the pos (and > > dim) data of the template grid to each structure, replacing the > > original pos data (that do not match and of course prohibit using > > sourceststatistics and sourcegrandaverage). When trying to do > > either a source grand average or a sourcestatistics at the > > multisubject level I get the same error: > > > > subscripted assignment dimension mismatch > > dat(:,i) = tmp(:); > > > > Error in ==> sourcegrandaverage at 173 > > > > > > The corresponding lines of code in sourcegrandaverage are: > > > > % get the source parameter from each input source reconstruction > > % get the inside parameter from each input source reconstruction > > for i=1:Nsubject > > % TODO this function should use parameterselection > > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > > else > > tmp = getsubfield(varargin{i}, cfg.parameter); > > end > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > > > I get an identical error when using sourcestatistics at the > > multisubject level. > > The variable dat(:,i) is created like this: > > dat = zeros(Nvoxel, Nsubject) > > > > > > I suspect that somehow trying to use the 'stat' instead of the > > power parameter is a problem (TODO?) or that Nvoxel somehow differs > > over the various subjects ?? > > > > Any advice on what to try and test further would very much > > appreciated. > > > > Thanks in advance, > > 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/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/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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 15:04:43 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 14:04:43 +0000 Subject: Problem running source grand average a nd source statistics In-Reply-To: <823395519@web.de> Message-ID: Hi Michael, > stat: [3297x1 double] This indicates that your singlesubjects are indeed sparsified, so that when you getsubfield this guy, you end up with fewer data-points than expected (which is Nvoxel==prod(dim)). Does this give you enough guidelines to fix it? JM On Nov 5, 2008, at 1:50 PM, Michael Wibral wrote: > Dear Ingrid, dear Jan-Mathijs > > I guess Ingrid is indeed correct, as all my datasets have the same > dimension of the stat field and of the inside/outside fields. I was > actually also supplying the dim field from the template to all > datasets, so the product of dims' should be the same everywhere, > but that hasn't really solved the problem. The length of the inside > field is 3297, the outside field is 3129, their sum is 6426 which > is identical to the product of dimensions of the template grid > which are 17 x 21 x 18 =6426. So I am really a bit puzzled here... > > Anyway, here's the code I use, maybe someone a really stupid error, > that I simply overlooked: > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % FIRST I prepare a file with the data and the settings for the > statistics that is later read in again: > % datapath = '/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/ > DICSBeamformingMW200808/Stats/'; > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > DesignData1 = { > 'ABA04_Up_StatSources.mat' > 'IFS20_Up_StatSources.mat'; > 'IKE28_Up_StatSources.mat'; > 'JHA07_Up_StatSources.mat'; > 'JPA05_Up_StatSources.mat'; > 'MKA21_Up_StatSources.mat'; > 'MMA07_Up_StatSources.mat'; > 'PSS16_Up_StatSources.mat'; > 'SNI05_Up_StatSources.mat'; > 'UWA31_Up_StatSources.mat'; > > }; > > DesignData2 = { > 'ABA04_In_StatSources.mat'; > 'IFS20_In_StatSources.mat'; > 'IKE28_In_StatSources.mat'; > 'JHA07_In_StatSources.mat'; > 'JPA05_In_StatSources.mat'; > 'MKA21_In_StatSources.mat'; > 'MMA07_In_StatSources.mat'; > 'PSS16_In_StatSources.mat'; > 'SNI05_In_StatSources.mat'; > 'UWA31_In_StatSources.mat'; > > }; > > % The statistics configuration > cfg = []; > nSubjects = min(length(DesignData1),length(DesignData2)); > a = [1:nSubjects]; > b = ones(1,nSubjects); > cfg.design = [a a; b (2*b)]; > cfg.ivar = 2; % independent variable: condition > cfg.uvar = 1; % subjects > cfg.method = 'montecarlo'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.01; > cfg.alpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.numrandomization = 500; %2000; > cfg.threshold = 0.01; > cfg.parameter = 'stat'; > cfg.statistic = 'depsamplesT'; > > % create output file > OutFileName = strcat(datapath,'DesignStat2008_11_04.mat'); > save(OutFileName, 'DesignData1', 'DesignData2', 'cfg', 'datapath'); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % SECOND I read in this file and the template and try to perform > grandaveraging and sourcestatistics at the second level: > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > function [] = StatisticsDICS(DesignStatLCMVFile); > > > template = load('/data/home1/ctillman/data/ > MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Grids/ > MNItemplate_231008_-1p5iws.mat'); > Nx = length(template.template_grid.xgrid) > Ny = length(template.template_grid.ygrid) > Nz = length(template.template_grid.zgrid) > > load(DesignStatLCMVFile); % contains datapath, DesignData1, > DesignData2, cfg > > % Load Data from DesignData1,2 automatically ensuring matching sizes > % please ensure that data pairs are OK if using paired statistics ! > > > for i = 1:min(length(DesignData1),length(DesignData2)) > m=strcat('loading dataset#:', num2str(2*i-1)); > disp(m); > fullname1 = strcat(datapath,DesignData1{i,1}); > Data1{i} = load(fullname1); > m=strcat('loading dataset#:', num2str(2*i)); > disp(m); > fullname2 = strcat(datapath,DesignData2{i,1}); > Data2{i} = load(fullname2); > end > > % Fixing the structure properties > > for l = 1:size(Data1,2) > > Data1{l}.SourceStat.xgrid = template.template_grid.xgrid; > Data1{l}.SourceStat.ygrid = template.template_grid.ygrid; > Data1{l}.SourceStat.zgrid = template.template_grid.zgrid; > Data1{l}.SourceStat.dim = [Nx Ny Nz]; > Data1{l}.SourceStat.pos = template.template_grid.pos; > Data1{l}.SourceStat.inside = template.template_grid.inside; > Data1{l}.SourceStat.outside = template.template_grid.outside; > Data1{l} = Data1{l}.SourceStat; > > > Data2{l}.SourceStat.xgrid = template.template_grid.xgrid; > Data2{l}.SourceStat.ygrid = template.template_grid.ygrid; > Data2{l}.SourceStat.zgrid = template.template_grid.zgrid; > Data2{l}.SourceStat.dim = [Nx Ny Nz]; > Data2{l}.SourceStat.pos = template.template_grid.pos; > Data2{l}.SourceStat.inside = template.template_grid.inside; > Data2{l}.SourceStat.outside = template.template_grid.outside; > Data2{l} = Data2{l}.SourceStat; > > end > > % prepare the statistics by computing the grandaverage with individual > % subject data retained > % Compute grand average for Condition 1 and 2 > cfgGA = []; > cfgGA.keepindividual = 'yes'; > cfgGA.parameter='stat'; > % create command strings for the computaion: > commandstr1 = strcat ('DataGA1', '=sourcegrandaverage(cfgGA'); > commandstr2 = strcat ('DataGA2', '=sourcegrandaverage(cfgGA'); > > for l = 1 : length(Data1) > commandstr1 = strcat(commandstr1, ',Data1{', num2str(l) , '}'); > commandstr2 = strcat(commandstr2, ',Data2{', num2str(l) , '}'); > end > % finalize command strings > commandstr1=strcat(commandstr1,');') > commandstr2=strcat(commandstr2,');') > eval(commandstr1) % yields DataGA1; > eval(commandstr2) % yields DataGA2; > > clear Data1; clear Data2; % no longer needed we now have DataGA1,2 > > %SourceStatsitics cfg is known from the design file! > sourceStat = sourcestatistics(cfg, DataGA1, DataGA2); > OutFilename = ... > strcat(datapath, > 'SourceStatisticsLCMV_denoisedDataAndNewGrids_1000rand_',DesignData1 > {i,1}(7:end-4),'_calpha',num2str(cfg.clusteralpha), > '_alpha_',num2str(cfg.alpha),'.mat'); > save(OutFilename, 'sourceStat'); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > %%%%%%%%%%%%%%%%%%% > > > Here's the inforamtion from the datasets and the template: > > Information of a dataset after processing/preparing for > sourcegrandaverage: > > > stat: [3297x1 double] > df: 134 > critval: [-1.9778 1.9778] > prob: [3297x1 double] > mask: [3297x1 logical] > dim: [17 21 18] > inside: [1x3297 double] > outside: [1x3129 double] > pos: [6426x3 double] > cfg: [1x1 struct] > xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80] > ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 > 10 20 30 40 50 60 70 80] > zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80 90] > > Information of the template: > xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] > ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 > 10 20 30 40 50 60 70 80] > zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80 90] > dim: [17 21 18] > pos: [6426x3 double] > inside: [1x3297 double] > outside: [1x3129 double] > > The onlz thing that I see varying fron dataset to dataset is the df > field. > > Any help appreciated, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Ingrid Nieuwenhuis" >> Gesendet: 05.11.08 14:02:04 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] Problem running source grand average and >> source statistics > > >> Dear Michael and Jan-Mathijs, >> >> If the same procedure is followed as on the wiki, the inside of >> the template >> grid is copied to the single subjects, so by definition also the >> 'sparsified' single subjects sources should all have the same >> amount of >> (inside) voxels. So point 2 J-M raised can't be it, point 1 could >> well be: >> Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and >> Nvoxels is >> the product of the dim. >> >> Best Ingrid >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] >> On Behalf >> Of jan-mathijs schoffelen >> Sent: Wednesday, November 05, 2008 10:20 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Problem running source grand average and >> source >> statistics >> >> Dear Michael, >> >> I agree with you that a likely cause is that the Nvoxel (which is >> based on the dimensionality of the first singlesubject-source in the >> input) varies across subjects. However, this would be strange, >> because you use the same dipole grid for all subjects. On the other >> hand: could it be that you 'sparsified' the single subjects? Each >> subject could have a slightly different number of 'inside' positions. >> This obviously leads to problems: >> 1 because the Nvoxel is incorrect in the first place (it's the >> product of the dim, so the input is assumed to be full 3D, or a >> linear array with all outside voxels present (either as nans or zeros >> or whichever number you fancy). >> 2 because the length of the array per subject varies. >> >> Hope this helps, >> >> Jan-M >> >> >> >> On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: >> >>> Dear list users, >>> >>> I am having a problem running, source grandaverage and source >>> statistics (over multiple subjects) on the output of >>> soucrestatistictics (from multiple trials in single subjects). >>> >>> I ran first sourceanalysis supplying the backwads warped grids (as >>> described in the wiki) to compute filters. Then I ran source >>> analysis again to extract the single trial source images and the >>> ran sourcestatistitics on this to get the single subject >>> statistical images - all this runs fine. I then supply the pos (and >>> dim) data of the template grid to each structure, replacing the >>> original pos data (that do not match and of course prohibit using >>> sourceststatistics and sourcegrandaverage). When trying to do >>> either a source grand average or a sourcestatistics at the >>> multisubject level I get the same error: >>> >>> subscripted assignment dimension mismatch >>> dat(:,i) = tmp(:); >>> >>> Error in ==> sourcegrandaverage at 173 >>> >>> >>> The corresponding lines of code in sourcegrandaverage are: >>> >>> % get the source parameter from each input source reconstruction >>> % get the inside parameter from each input source reconstruction >>> for i=1:Nsubject >>> % TODO this function should use parameterselection >>> if issubfield(varargin{i}, ['avg.' cfg.parameter]) >>> tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); >>> else >>> tmp = getsubfield(varargin{i}, cfg.parameter); >>> end >>> dat(:,i) = tmp(:); >>> tmp = getsubfield(varargin{i}, 'inside'); >>> inside(tmp,i) = 1; >>> end >>> >>> I get an identical error when using sourcestatistics at the >>> multisubject level. >>> The variable dat(:,i) is created like this: >>> dat = zeros(Nvoxel, Nsubject) >>> >>> >>> I suspect that somehow trying to use the 'stat' instead of the >>> power parameter is a problem (TODO?) or that Nvoxel somehow differs >>> over the various subjects ?? >>> >>> Any advice on what to try and test further would very much >>> appreciated. >>> >>> Thanks in advance, >>> 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/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/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/ >> 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/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/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Wed Nov 5 16:13:58 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Wed, 5 Nov 2008 16:13:58 +0100 Subject: Problem running a BEM model for EEG Message-ID: Hi Fieldtrippers, In order to make a sourceplot for EEG data, I've been trying to create a BEM model. Using the example script on http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:examples:create_bem_headmodel_for_eeg , I get the following error. ??? Error using ==> spm_slice_vol Wrong sized dim. Error in ==> spm_read_vols at 35 Y(:,:,p,i) = spm_slice_vol(V(i),spm_matrix([0 0 p]),V(i).dim(1:2),0); Error in ==> read_fcdc_mri at 107 img = spm_read_vols(hdr); Error in ==> bemtest at 14 mri = read_fcdc_mri('t1_icbm_normal_1mm_pn0_rf0.mnc'); Recently, I did add the following file "spm_slice_vol.mexw32" (from the updated spm2.rar) to the spm2 dir as matlab did not recognise the spm_slice_vol.dll library. Is anyone familiar with this problem or does one know how to solve it? And yes; I do have the 't1_icbm_normal_1mm_pn0_rf0.mnc' file. Regards, Arjen ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From m.vanelk at DONDERS.RU.NL Wed Nov 5 17:08:18 2008 From: m.vanelk at DONDERS.RU.NL (Michiel van Elk) Date: Wed, 5 Nov 2008 17:08:18 +0100 Subject: error in prepare_leadfield Message-ID: Hi there, On the basis of the standar BEM model that is available on the Fieldtrip website I tried to prepare the grid on the basis of the standard electrode positions. The 'prepare_leadfield' seems to run fine, but after a couple of hours I get the following error message (note that I removed the 'computing leadfield' statements): selected 60 electrodes projecting electrodes on skin surface combining electrode transfer and system matrix 791211 dipoles inside, 7215640 dipoles outside brain making tight grid 791211 dipoles inside, 692565 dipoles outside brain ??? SWITCH expression must be a scalar or string constant. Error in ==> progress at 94 switch t Error in ==> prepare_leadfield at 236 progress('close'); Does someone have a clue what could have gone wrong in this analysis? I used the following cfg settings (e.g. is it correct to convert the elec.pnt from cm to mm?) cfg = []; cfg.elec = GA_CSD_ANIMAL.elec; cfg.elec.pnt = cfg.elec.pnt*10;%convert from cm to mm! cfg.vol = vol; cfg.reducerank = 2; cfg.channel = {'EEG'}; cfg.grid.resolution = 1; [grid] = prepare_leadfield(cfg); Yours, Michiel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From k.nazarpour at BHAM.AC.UK Thu Nov 6 15:20:31 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Thu, 6 Nov 2008 15:20:31 +0100 Subject: Post-doc Research Fellow Position at Prism Lab, University of Birmingham Message-ID: Please contact Prof Chris Miall regarding the below vacancy if you are interested in joining us! Dear colleagues I have a 6-8 month post-doc position that will be available from January 2009, and would like to recruit either someone with skills in EEG signals analysis to extend work we are doing on using EEG for brain-computer interfaces, or alternatively to develop software for experiments using a pneumatic fMRI-compatible robot arm, and run an fMRI experiment on human motor control. So the right person would have skills in EEG, fMRI or C++ programming. Details of the post should be on jobs.ac.uk very shortly, and are also on the Birmingham vacancies web pages, hidden away out of sight (yes, I realise that's not the best way to run a web system advertising jobs, but there you are!) http://www.vacancies.bham.ac.uk/vacancies/vacancySearch.htm using the ID 32737 I'd be grateful if you brought this to the attention of any potential candidates. -- Regards, Chris ---------------------------------------------------------- Professor R.C. Miall Behavioural Brain Sciences Tel +44 121 414 2867 School of Psychology, Fax +44 121 414 4897 University of Birmingham, Mobile: 07815 296483 Edgbaston, Email: r.c.miall at bham.ac.uk Birmingham B15 2TT UK Web: http://prism.bham.ac.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/fcdonders/fieldtrip. From iversen at NSI.EDU Thu Nov 6 19:29:05 2008 From: iversen at NSI.EDU (John Iversen) Date: Thu, 6 Nov 2008 10:29:05 -0800 Subject: source localization given induced spectra In-Reply-To: <99160EC4-B351-4143-AB31-C8447AF15EB8@psy.gla.ac.uk> Message-ID: Dear Jan-Mathijs, Lovely suggestion. This works fine, although I must intervene between the freqanalysis and dipole fit to put the information (I'm using the real part of the cross spectrum) in the correct form. The automatic route calls freq2timelock, which does indeed accept cross spectra, but prepare_freq_matrices seems to expect them to be square, because it chokes on such a 1-d cross spectrum. It seems more geared towards beamformer fitting, which I assume requires the full CSD matrix. I need to look at this further, and may have another question, but just to let you know now thanks for the suggestion. John On Nov 5, 2008, at 1:52 AM, jan-mathijs schoffelen wrote: > Dear John, > > Probably I was a bit rash in answering to your earlier mail and did > not think it through completely. Apologies for that and for any > confusion created. > Let's give it another try: > As you pointed out, induced power can show a somewhat dipolar > topography, but you cannot fit a dipole to this because of the fact > that it is positive all over the place. However, if you would indeed > have some phase information in your topography, showing the ingoing > and outgoing field (MEG), or positive and negative potential (EEG), > one could fit a dipole. I was talking rubbish when suggesting to use > fourierspectra, because it is forbidden to average them across > trials (not actually forbidden, but it does not make sense). > However, it would make sense to average cross-spectral densities > across trials (not the csd's between all channel combinations, but > between a well chosen set of channel pairs). Why would this be the > case? Well, if you cleverly choose your reference signal (I suggest > one of the strong blobs in your dipolar powerspectrum), and you > compute the cross-spectral density between this guy and the rest of > the channels, then you can do business because the csd's represent > the estimated phase-difference between the reference signal and the > rest. The interesting signal (your dipolar field) which is buried in > your single trial data now has a phase of 0 (channels are in the > same blob of the dipolar field) or 180 degrees (channels are in the > opposite blob of the dipolar field) with respect to the reference, > and importantly this is the same for all trials. This means that you > can average the cross-spectral densities across trials to generate a > complex-valued topography. Plotting the real-part (or imaginary > part) of this should lead to a nice dipolar pattern with positive, > and negative values. > As far as I know dipolefitting can deal with cross-spectra as an > input, so my revised approach would be: compute spectrograms and > identify your time-frequency region of interest. Then plot the > topography and compute a sensible reference channel. Then call > freqanalysis again, but with output='powandcsd', and channelcmb = > {'all' 'yourchosenchannel'}. Then try a dipole fit. > > Hope this helps, > > Jan-Mathijs > > > On Nov 4, 2008, at 5:02 PM, John Iversen wrote: > >> Dear Jan-Mathijs, >> >> Thanks for the quick reply. I'm sorry to hear I was right :) >> >> I may misunderstand what you've suggested, but is it not the case >> that if I chose cfg.output='fourier' it will average fourier >> spectra across trials (cares about phase) instead of power spectrum >> (phase blind, as I had been doing). In the end wont I simply get >> the equivalent of the fourier spectrum of the timelock average, >> which is substantially different from the induced spectrum that >> interests me? >> >> In many cases the sensor topography of the induced power looks >> somewhat dipolar, with two power peaks, so I may well try to do a >> fit, but optimizing not on the field but the field power (this >> would require modifying the output of the forward model within >> dipolefitting)--it will not be able to get the polarity of the >> dipole, but should be able to get a location. Maybe? It seems >> possible in principle, but I wonder if anyone has practical >> experience with this. >> >> I feel there should be a way to study this kind of question! >> >> Best, >> >> John >> >> On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: >> >>> Dear John, >>> >>> No, it is not possible to perform source localization on the >>> spectrograms as you define them. You quite rightly point out that >>> a spatial topography of power is always positive, so cannot >>> account for a proper dipolar pattern. However, source localization >>> of induced changes in oscillatory activity is possible. There's >>> actually a nice tutorial on the fieldtrip website: "localizing >>> oscillator sources, using beamformer techniques". >>> Alternatively, you can actually call dipolefitting using frequency >>> data as an input, but this requires either fourier-data, or cross- >>> spectral densities between all channel combinations. Usually the >>> fourier-data is more memory efficient. In this case I would >>> propose a two-step strategy: compute spectrograms to identify your >>> time-frequency region(s) of interest. Then call freqanalysis >>> again, with cfg.output = 'fourier'. Then I would guess that >>> dipolefitting runs through... At least it's worth a try. >>> >>> Yours, >>> >>> Jan-Mathijs >>> >>> >>> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >>> >>>> Hello, >>>> >>>> Is there a way to do source localization on induced spectrograms? >>>> (Induced spectra being the mean of individual trials' power >>>> spectra.) Conceptually I am not sure how this would work, given >>>> that one starts with topographies of real, positive-valued power, >>>> with no phase information, so any dipole fit could be at best >>>> sign-indeterminate.There is no facility within fieldtrip to do >>>> such a thing as far as I can tell (induced spectra were >>>> calculated freqanalysis on multi-trial data and are within >>>> the .powspctrm field of the result, which is not handled by >>>> freq2timelock, and thus cannot feed any of the localization >>>> routines). >>>> >>>> What is of actual interest are task-related fluctuations of the >>>> power around a (much larger, and topographically varied) >>>> baseline. Is there a way to say where in the brain are the >>>> (presumed) subset of neural sources that vary in power with time? >>>> >>>> Thanks, >>>> >>>> John >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >>>> and 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/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/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/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/fcdonders/fieldtrip. From m.vanelk at DONDERS.RU.NL Fri Nov 7 11:19:40 2008 From: m.vanelk at DONDERS.RU.NL (Michiel van Elk) Date: Fri, 7 Nov 2008 11:19:40 +0100 Subject: error in prepare_leadfield Message-ID: problem solved: the cfg.elec definition was incorrect. Now it seems to work... ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Sat Nov 8 10:16:50 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Sat, 8 Nov 2008 10:16:50 +0100 Subject: No subject Message-ID: Dear fieldtrippers, I am having a hard time trying to compute the source interpolation. For source analysis I use: cfg.xgrid = 'auto' cfg.ygrid = 'auto' cfg.zgrid = 'auto' which later results in: source.dim = [length(cfg.xgrid) length(cfg.ygrid) length(cfg.zgrid)]; or source.dim = [4 4 4]; the problem here is that sourceinterpolate calls the function checkdata where @ line 550: data.transform = pos / ind; here pos is a 4000x4 array and ind is a 64x4 array because ind is computed as following: xgrid = 1:data.dim(1); ygrid = 1:data.dim(2); zgrid = 1:data.dim(3); [x y z] = ndgrid(xgrid, ygrid, zgrid); ind = [x(:) y(:) z(:)]; so of course I get the error message that the array dimensions do not match for division because you cannot divide a 4000x4 array by a 64x4 array. so then I tried: source.dim = [4 4 250]; which results in the dimensions 4000x4 for ind and circumvents the error message.However, I guess that besides diminishing my personal frustration this does not really solve the problem. So if anyone out there has an idea or a suggestion I would be very, very, very thankful. Have nice week end, Frederic _________________________________________________________________ Messenger Games: Mit Freunde zusammen im Messenger spielen! http://redirect.gimas.net/?n=M0811xGamesDE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at HOTMAIL.DE Sat Nov 8 11:22:45 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Sat, 8 Nov 2008 11:22:45 +0100 Subject: error during source interpolation Message-ID: Dear fieldtrippers, I am having a hard time trying to compute the source interpolation. For source analysis I use: cfg.xgrid = 'auto' cfg.ygrid = 'auto' cfg.zgrid = 'auto' which later results in: source.dim = [length(cfg.xgrid) length(cfg.ygrid) length(cfg.zgrid)]; or source.dim = [4 4 4]; the problem here is that sourceinterpolate calls the function checkdata where @ line 550: data.transform = pos / ind; here pos is a 4000x4 array and ind is a 64x4 array because ind is computed as following: xgrid = 1:data.dim(1); ygrid = 1:data.dim(2); zgrid = 1:data.dim(3); [x y z] = ndgrid(xgrid, ygrid, zgrid); ind = [x(:) y(:) z(:)]; so of course I get the error message that the array dimensions do not match for division because you cannot divide a 4000x4 array by a 64x4 array. so then I tried: source.dim = [4 4 250]; which results in the dimensions 4000x4 for ind and circumvents the error message.However, I guess that besides diminishing my personal frustration this does not really solve the problem. So if anyone out there has an idea or a suggestion I would be very, very, very thankful. Have nice week end, Frederic _________________________________________________________________ Hotmail to go! Hol' Dir Hotmail aufs Handy! http://windowslivemobile.msn.com/BrowserServiceHotmail.aspx?lang=de-de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From shehsu at INDIANA.EDU Tue Nov 11 05:37:37 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Mon, 10 Nov 2008 23:37:37 -0500 Subject: coherence and phase locking values Message-ID: Dear Users, I have a question regarding the differences among the following phase-synchronization measures for channel pairs. 1. coherence, specified in the fieldtripbox, also called ERLCOH in the EEGlab toolbox 2.ERPCOH, specified in the EEGlab toolbox, also for computing event-related coherence between two channels (for formula, please see Journal of Neuroscience Methods 134(2004),9-21, p9). 3. Phase locking value, defined by Lachaux(1999). I was wondering if someone could direct me to the pros and cons of each measure. Many thanks, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From spike377 at KOREA.COM Wed Nov 12 00:37:26 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Wed, 12 Nov 2008 08:37:26 +0900 Subject: coherence and phase locking values Message-ID: An HTML attachment was scrubbed... URL: From pacodiaz at UB.EDU Wed Nov 12 15:59:47 2008 From: pacodiaz at UB.EDU (Paco Diaz) Date: Wed, 12 Nov 2008 15:59:47 +0100 Subject: Power Units in Freqanalysis Message-ID: Hi all, I have performed a time frequency analysis on the evoked activity for EEG data whose units where (of course) in microVolts. It seems that it all work fine, but I would appreciate some help to understand my results (my plot actually). Below you can see the configuration structure that I have used. Well, the question is as follows, which are the units for the z-axis (color code)?? I think that they should be (microV)^2 but the values I'm obtainning are very low when compared with the literature, my maximum value is 8*10^-3 but i have found in the literature values between 8 and 70 (microV)^2. Is there a scale factor that I am missing or is it all simply wrong?? cfg=[]; cfg.method='tfr'; cfg.output='pow'; cfg.foi=[30:0.5:40]; cfg.width=7; cfg.gwidth=5; tfr_data=freqanalysis(cfg,data); Thank you, Paco. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Wed Nov 12 16:26:51 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Wed, 12 Nov 2008 16:26:51 +0100 Subject: Power Units in Freqanalysis Message-ID: Dear Paco, Power is normally given in microV^2/Hz. The amplitude (microV) of the EEG signal can indeed be around 70mV. Nevertheless, your maximum value of 8*10^-3 (mV^2/Hz?) seems quite low. How have you acquisitioned your data? Have you used the get_data script in matlab? If so, my first impression would be that you have forgotten to undo the amplification. Divide the data by the amplification. Secondly, your data might be in voltages and not microvoltages. In matlab: %undo amplification with factor . Display in microvolts (1e6). data = (eegdata.*1e6)./; If you do not use matlab for data acquisition you may forgot all that is written. ;) Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Paco Diaz Verzonden: wo 11/12/2008 3:59 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] Power Units in Freqanalysis Hi all, I have performed a time frequency analysis on the evoked activity for EEG data whose units where (of course) in microVolts. It seems that it all work fine, but I would appreciate some help to understand my results (my plot actually). Below you can see the configuration structure that I have used. Well, the question is as follows, which are the units for the z-axis (color code)?? I think that they should be (microV)^2 but the values I'm obtainning are very low when compared with the literature, my maximum value is 8*10^-3 but i have found in the literature values between 8 and 70 (microV)^2. Is there a scale factor that I am missing or is it all simply wrong?? cfg=[]; cfg.method='tfr'; cfg.output='pow'; cfg.foi=[30:0.5:40]; cfg.width=7; cfg.gwidth=5; tfr_data=freqanalysis(cfg,data); Thank you, Paco. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From julian.keil at GMAIL.COM Thu Nov 13 10:23:32 2008 From: julian.keil at GMAIL.COM (Julian Keil) Date: Thu, 13 Nov 2008 10:23:32 +0100 Subject: Planar Gradiend for bti148 Message-ID: Good morning, has anyone ever computed the planar gradient for a bti 148 - system? When I try to do this, the megplanar.m function stops because the bti 148 system is not supported. Simply adding 'bti148' to line 171 does not solve this, as the distance in line 238 cannot be computed. Does anyone have hints on how to solve this? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Thu Nov 13 10:43:56 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Thu, 13 Nov 2008 09:43:56 +0000 Subject: Planar Gradiend for bti148 In-Reply-To: <5D507F45-56D6-4A72-89E8-6AD4BED8B256@gmail.com> Message-ID: Hi Julian, If you use Fieldtrip to read your data from the raw data file (so no .m4d, or .xyz as intermediate steps) there should be information about the location of the magnetometer coils in data.grad. I am not exactly sure what happens when you import your data into fieldtrip using an intermediate data-representation. Yours, Jan-Mathijs On Nov 13, 2008, at 9:23 AM, Julian Keil wrote: > Good morning, > > has anyone ever computed the planar gradient for a bti 148 - system? > When I try to do this, the megplanar.m function stops because the > bti 148 system is not supported. Simply adding 'bti148' to line 171 > does not solve this, as the distance in line 238 cannot be computed. > > Does anyone have hints on how to solve this? > > Thanks a lot > > Julian > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > 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/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.hartmann at UNI-KONSTANZ.DE Thu Nov 13 11:32:06 2008 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Thu, 13 Nov 2008 11:32:06 +0100 Subject: eeg cabin manufactures Message-ID: hi, as we are planning to build a brand new eeg-lab around our new amplifiers, we are looking for companies building eeg-cabins. has someone of you had some experiences with a company and might suggest a good one to me? thanks in advance, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Nov 13 21:59:53 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 13 Nov 2008 21:59:53 +0100 Subject: website moved to another server, hopefully nothing changed Message-ID: Dear FT users, The FieldTrip website has just been migrated to a new webserver. You still should be able to access it at http://www.ru.nl/neuroimaging/fieldtrip , which is the page that you should refer to in publications or on your own website if you want to link to FieldTrip. The actual low- level server of the wiki has another address (now fcdonders.ruhosting.nl, used to be www2.ru.nl), but you preferably should not use the low-level address, nor use deep links into the wiki. The low-level address and deep links are not guaranteed to work in the future, but we’ll try to keep the official address at http://www.ru.nl/neuroimaging/fieldtrip . Please let me know if you observe any unusual behaviour of the website. best regards, Robert ----------------------------------------------------------- Robert Oostenveld 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 ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Nov 13 22:57:19 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 13 Nov 2008 22:57:19 +0100 Subject: Planar Gradiend for bti148 In-Reply-To: <5D507F45-56D6-4A72-89E8-6AD4BED8B256@gmail.com> Message-ID: Hi Julian, A quick glance at the megrealign code shows that there is some hard- coded dependency on the ctf gradiometer definition, where only the bottom coils should be used. However, that should not be a limitation for bti148. Apparently Jan-Mathijs already has got it to work on bti248. I have made two changes (one for checkdata, the other for ensuring that grad.unit is known). Please try with attached version, this will be in the fieldtrip release on the ftp server tomorro evening. best regards, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: megplanar.m Type: application/octet-stream Size: 22013 bytes Desc: not available URL: -------------- next part -------------- On 13 Nov 2008, at 10:23, Julian Keil wrote: > Good morning, > > has anyone ever computed the planar gradient for a bti 148 - system? > When I try to do this, the megplanar.m function stops because the > bti 148 system is not supported. Simply adding 'bti148' to line 171 > does not solve this, as the distance in line 238 cannot be computed. > > Does anyone have hints on how to solve this? > > Thanks a lot > > Julian > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > 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/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 14 10:10:20 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 14 Nov 2008 10:10:20 +0100 Subject: error in prepare_leadfield In-Reply-To: Message-ID: Hi Michiel, The progress function is used to print the progress (or to make a graphical progress bar). Matlab has the waitbar function, but that is very slow if you update it every iteration. E.g. consider 10000 iterations, and the width of the graphical waitbar on your screen only being 60 pixels. Updating the waitbar on every iteration makes it very slow, so it only updates every 1% increase. This is implemented using persistent variables, i.e. the progress function remembers the state of the progress over subsequent calls. It seems to me in the error that you report below, that the persistent variable was somehow cleared in between two calls. That happens if you clear the function (see "help clear") or when matlab detects that teh function has changed. Perhaps your fieldtrip installation was updated while matlab was running? That may (actually should) happen automatically if you run it from home/common on the FCDC. The progress function does not change very often, but recently I did make some change to it (and that will have been autoupdated on home/common), which may explain the problem. I suggest you simply try again. Robert On 5 Nov 2008, at 17:08, Michiel van Elk wrote: > The 'prepare_leadfield' seems to run fine, but after a couple of hours > I get the following error message (note that I removed the 'computing > leadfield' statements): > > selected 60 electrodes > projecting electrodes on skin surface > combining electrode transfer and system matrix > 791211 dipoles inside, 7215640 dipoles outside brain > making tight grid > 791211 dipoles inside, 692565 dipoles outside brain > ??? SWITCH expression must be a scalar or string constant. > > Error in ==> progress at 94 > switch t > > Error in ==> prepare_leadfield at 236 > progress('close'); > > Does someone have a clue what could have gone wrong in this > analysis? I > used the following cfg settings (e.g. is it correct to convert the > elec.pnt from > cm to mm?) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From norbert.jausovec at UNI-MB.SI Tue Nov 18 01:01:48 2008 From: norbert.jausovec at UNI-MB.SI (Norbert Jausovec) Date: Tue, 18 Nov 2008 01:01:48 +0100 Subject: downolading and starting Message-ID: I have a problem downloading the fieldtrip toolbox. I was able to download only the lite version. After seting the path in Matlab, the toolbox is not recognized by matlab and I can not start it. Any suggestions what might be the reason. I am using Matlab R2007b on windows XP regards norbert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Tue Nov 18 13:00:18 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Tue, 18 Nov 2008 13:00:18 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: I am trying to run on my PC the Matlab script http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: documentation:examples:create_bem_headmodel_for_eeg but Matlab returns the error message: Undefined function or method 'strel_bol' On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and SPM2 . Any help is appreciated. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Tue Nov 18 14:17:49 2008 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Tue, 18 Nov 2008 13:17:49 +0000 Subject: Ph.D. in EEG/fMRI Message-ID: A Ph.D. position in EEG/fMRI is available at the University of Dundee, under the direction of Douglas Potter. The project is funded by SINAPSE, the Scottish Imaging Network. Title: Spatial and temporal imaging of attention reorienting mechanisms First supervisor: Dr Douglas Potter School of Psychology, University of Dundee Email: d.d.potter at dundee.ac.uk phone: 01382 384632 Co-supervisors: Dr Cyril Pernet Division of Clinical Neurosciences, SFC Brain Imaging Centre Western General Hospital, University of Edinburgh Email: cyril.pernet at ed.ac.uk phone: 01315373661 Dr Guillaume Rousselet Centre for Cognitive Neuroimaging (CCNi) & Department of Psychology University of Glasgow Email: g.rousselet at psy.gla.ac.uk phone: 01413306652 A description of the project and an application form are attached, ************************************************************************************ Guillaume A. Rousselet, Ph.D. Lecturer Centre for Cognitive Neuroimaging (CCNi) Department of Psychology Faculty of Information & Mathematical Sciences (FIMS) University of Glasgow 58 Hillhead Street Glasgow, UK G12 8QB The University of Glasgow, charity number SC004401 http://web.me.com/rousseg/GARs_website/ 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 "no test based upon a theory of probability can by itself provide any valuable evidence of the truth or falsehood of a hypothesis. But we may look at the purpose of tests from another viewpoint. Without hoping to know whether each separate hypothesis is true or false, we may search for rules to govern our behaviour with regard to them, in following which we insure that, in the long run of experience, we shall not often be wrong." Neyman J & Pearson E, 1933 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SINAPSE_PhD_proposal_EEG-fMRI-Stats.pdf Type: application/pdf Size: 184328 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.b.dijkman at STUDENT.UTWENTE.NL Tue Nov 18 21:52:18 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Tue, 18 Nov 2008 21:52:18 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: I have been playing with that same script as well, the reason Matlab returns an error is because the 'strel_bol' function is not a standard Matlab function. When I was busy with it I figured it probably was a function made by the author of that Fieldtrip example. I was hoping for a response to your question, because I was curious myself. I do know the function 'strel' does exist, to make a strucural element. So my gues is 'strel_bol' is supposed to make a 'sphere' or perhaps 'disk' structural element (bol = sphere in Dutch). Regards, Thomas Dijkman ________________________________ From: FieldTrip discussion list on behalf of Avni Pllana Sent: Tue 11/18/2008 1:00 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Matlab script: Create BEM headmodel for EEG I am trying to run on my PC the Matlab script http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: documentation:examples:create_bem_headmodel_for_eeg but Matlab returns the error message: Undefined function or method 'strel_bol' On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and SPM2 . Any help is appreciated. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Nov 19 12:00:50 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 12:00:50 +0100 Subject: problems with DICS Message-ID: hi, i'm not sure whether the following question is a fieldtrip-related question or a rather general question. we use a 148 sensor BTI system. since a couple of days we're struggling with a data-set in which we'd like to localize auditory cortical alpha desynchronizations. on a sensor level they are clearly observable (see attached Pitcure 2). however when running DICS it seems like the brain is more or less increasing power post-stimulus. what makes me wonder is that it's exactly the same script (i could provide more details of course) which worked very successfully previously. our notion was initially that something is weird with the leadfield. but -illegally- testing it with a leadfield from another subject where things worked out basically gave more or less the same picture. now we assume that something is fishy with the data itself, that is not clearly observable when looking at the data on a trial-by- trial basis, leading to bad spatial filters. any suggestions how this could be diagnosed? are there any other suggestions? or has anybody had similar problems lately? cheers, 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 2.png Type: image/png Size: 122154 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 1.png Type: image/png Size: 137882 bytes Desc: not available URL: From norbert.jausovec at UNI-MB.SI Wed Nov 19 14:18:54 2008 From: norbert.jausovec at UNI-MB.SI (Norbert) Date: Wed, 19 Nov 2008 14:18:54 +0100 Subject: Starting fieldtrip Message-ID: Hi, I am new to fieldtrip. I have downloaded the ziped file, set path in Matlab R2007b on Windows XP, but do not know how to start Fieldtrip, nothing works. Could someone provide me some advice. Regards Norbert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 19 14:28:09 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 19 Nov 2008 13:28:09 +0000 Subject: Starting fieldtrip In-Reply-To: <000601c94a49$5f0f5c40$1d2e14c0$@jausovec@uni-mb.si> Message-ID: Hi Norbert, Could you be a bit more specific on 'nothing works'? Assuming you correctly unzipped the downloaded file, I would advise you to follow the suggestions on the getting started section on the fieldtrip-webpage. Yours, Jan-Mathijs On Nov 19, 2008, at 1:18 PM, Norbert wrote: > Hi, > > I am new to fieldtrip. I have downloaded the ziped file, set path > in Matlab > R2007b on Windows XP, but do not know how to start Fieldtrip, > nothing works. > Could someone provide me some advice. > > Regards > > Norbert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 19 14:30:47 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 19 Nov 2008 13:30:47 +0000 Subject: Fwd: [FIELDTRIP] problems with DICS Message-ID: Begin forwarded message: > From: jan-mathijs schoffelen > Date: November 19, 2008 1:13:22 PM BST > To: nathanweisz at me.com > Subject: Re: [FIELDTRIP] problems with DICS > > Dear Nathan, > > Are you using precomputed leadfields? The reason I ask is because > there could be a discrepancy between the assumed order of the coils > in your leadfields, and the coil-order in your data. The issue with > the BTI system is that the channel order is somewhat erratic > (references ending up all over the place, and no nice alphabetical > ordering of the magnetometer coils). Prepare_leadfield (the low- > level function which computes the leadfield) just computes the > solution to the forward model for the list of sensors in the input, > the order of which is specified by the order in the data, or by the > order in the gradiometer structure, if no data is supplied. > I recently (about a month ago) made a change in bti2grad, which > changed the order of the coils in the grad-structure. Initially, I > thought it would be nice to have them ordered alphabetically, but > this led to problems later on when using precomputed leadfields > (and making implicit assumptions about the matching sensor order in > both data and gradiometers). It could be that your problems are > related to this. > On the other hand: could this be replicated in other datasets? How > many trials is your csd-matrix based on? Isn't there any hint of a > bilateral temporal decrease in alpha activity? > > Yours > > Jan-Mathijs > > > > On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: > >> hi, >> >> i'm not sure whether the following question is a fieldtrip-related >> question or a rather general question. >> >> we use a 148 sensor BTI system. >> since a couple of days we're struggling with a data-set in which >> we'd like to localize auditory cortical alpha desynchronizations. >> on a sensor level they are clearly observable (see attached >> Pitcure 2). however when running DICS it seems like the brain is >> more or less increasing power post-stimulus. >> what makes me wonder is that it's exactly the same script (i could >> provide more details of course) which worked very successfully >> previously. our notion was initially that something is weird with >> the leadfield. but -illegally- testing it with a leadfield from >> another subject where things worked out basically gave more or >> less the same picture. now we assume that something is fishy with >> the data itself, that is not clearly observable when looking at >> the data on a trial-by-trial basis, leading to bad spatial >> filters. any suggestions how this could be diagnosed? >> >> are there any other suggestions? or has anybody had similar >> problems lately? >> >> cheers, >> 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Toffanin at RUG.NL Wed Nov 19 14:35:13 2008 From: P.Toffanin at RUG.NL (P.Toffanin) Date: Wed, 19 Nov 2008 14:35:13 +0100 Subject: Starting fieldtrip In-Reply-To: <000601c94a49$5f0f5c40$1d2e14c0$@jausovec@uni-mb.si> Message-ID: Hi Norbert, I'm not sure I'm getting this right, and maybe I'm making a big mistake, but fieldtrip is a collection of functions, it does not have a GUI like EEGlab. It works exactly as if you would write a function in matlab: [output1, output2] = function(input1, input2); Does this help you in any way? Did you try to follow one of the tutorials, to see if there is a problem with the function calls maybe? Best Paolo On Wed, 19 Nov 2008 14:18:54 +0100 Norbert wrote: > Hi, > > I am new to fieldtrip. I have downloaded the ziped file, set path in >Matlab > R2007b on Windows XP, but do not know how to start Fieldtrip, >nothing works. > Could someone provide me some advice. > > Regards > > Norbert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Nov 19 15:07:31 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 15:07:31 +0100 Subject: problems with DICS In-Reply-To: <2CE4BC91-5101-4F44-A3CA-E60BAFF24D10@psy.gla.ac.uk> Message-ID: hi jan-mathijs, thanks once again for your quick help. it's about 60 trials which was sufficient in the past. the decrease is bilateral, however i can't imagine how this could lead to a more or less pronounced increase after sourceanalysis. in case of a DICS problem wouldn't the decrease just be placed somewhere in between the two spots? the labels in data.label, data.grad.label match. they also have the same order as in the .xyz file from the BTI system. for the sourceanalysis we precompute the leadfield. as a side note we also use predefined grid points so that they are exactly the same within one subject across conditions. one issue that we noticed is that we recalculated a leadfield that we calculated a long time ago and compared the values. they appear not to be exacly the same. when looking at the topographies (forward solution) yieldied by each source, they are similar but not exactly the same. is this possible? I'm attaching a plot. for each dipole i calculated the vector sum over orientations and averaged the energy over sensors. this i did for the old and the newly calculated leadfield. in the plot difference between the two leadfields is shown on y and dipole number on x. here's the code: %% checke tzvetans grid mit neuer FT cd /home/nadia/Matlab/zvetanskopf tvol=load('vol'); %old vol tgrid=load('grid'); %old grid %% cfg=[]; cfg.grid.pos=tgrid.grid.pos; cfg.grid.dim=tgrid.grid.dim; cfg.grid.inside=tgrid.grid.inside; cfg.grid.outside=tgrid.grid.outside; cfg.vol=tvol.vol; cfg.grad=tgrid.grid.cfg.grad; cfg.channel=tgrid.grid.cfg.channel; tgrid.grid2=prepare_leadfield(cfg); %new grid %% for i=1:length(tgrid.grid2.inside) diffLF (i)=mean(sqrt(sum(tgrid.grid.leadfield{tgrid.grid2.inside(i)}.^2,2)))- mean(sqrt(sum(tgrid.grid2.leadfield{tgrid.grid2.inside(i)}.^2,2))); end plot(diffLF) thanks for any input. nathan On 19.11.2008, at 14:13, jan-mathijs schoffelen wrote: > Dear Nathan, > > Are you using precomputed leadfields? The reason I ask is because > there could be a discripancy between the assumed order of the coils > in your leadfields, and the coil-order in your data. The issue with > the BTI system is that the channel order is somewhat erratic > (references ending up all over the place, and no nice alphabetical > ordering of the magnetometer coils). Prepare_leadfield (the low- > level function which computes the leadfield) just computes the > solution to the forward model for the list of sensors in the input, > the order of which is specified by the order in the data, or by the > order in the gradiometer structure, if no data is supplied. > I recently (about a month ago) made a change in bti2grad, which > changed the order of the coils in the grad-structure. Initially, I > thought it would be nice to have them ordered alphabetically, but > this led to problems later on when using precomputed leadfields (and > making implicit assumptions about the matching sensor order in both > data and gradiometers). It could be that your problems are related > to this. > On the other hand: could this be replicated in other datasets? How > many trials is your csd-matrix based on? Isn't there any hint of a > bilateral temporal decrease in alpha activity? > > Yours > > Jan-Mathijs > > > > On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: > >> hi, >> >> i'm not sure whether the following question is a fieldtrip-related >> question or a rather general question. >> >> we use a 148 sensor BTI system. >> since a couple of days we're struggling with a data-set in which >> we'd like to localize auditory cortical alpha desynchronizations. >> on a sensor level they are clearly observable (see attached Pitcure >> 2). however when running DICS it seems like the brain is more or >> less increasing power post-stimulus. >> what makes me wonder is that it's exactly the same script (i could >> provide more details of course) which worked very successfully >> previously. our notion was initially that something is weird with >> the leadfield. but -illegally- testing it with a leadfield from >> another subject where things worked out basically gave more or less >> the same picture. now we assume that something is fishy with the >> data itself, that is not clearly observable when looking at the >> data on a trial-by-trial basis, leading to bad spatial filters. any >> suggestions how this could be diagnosed? >> >> are there any other suggestions? or has anybody had similar >> problems lately? >> >> cheers, >> 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/ >> > -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 1.png Type: image/png Size: 40889 bytes Desc: not available URL: From nathanweisz at MAC.COM Wed Nov 19 16:46:29 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 16:46:29 +0100 Subject: Fwd: [FIELDTRIP] problems with DICS In-Reply-To: <6A219908-E045-4FB2-A67D-BB6CD5ABC445@psy.gla.ac.uk> Message-ID: ok ... we found the problem why the leadfields differ. apparently the older default for cfg.reducerank = 2. newer fieldtrip versions have cfg.reducerank = 3. n On 19.11.2008, at 14:30, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: jan-mathijs schoffelen >> Date: November 19, 2008 1:13:22 PM BST >> To: nathanweisz at me.com >> Subject: Re: [FIELDTRIP] problems with DICS >> >> Dear Nathan, >> >> Are you using precomputed leadfields? The reason I ask is because >> there could be a discrepancy between the assumed order of the coils >> in your leadfields, and the coil-order in your data. The issue with >> the BTI system is that the channel order is somewhat erratic >> (references ending up all over the place, and no nice alphabetical >> ordering of the magnetometer coils). Prepare_leadfield (the low- >> level function which computes the leadfield) just computes the >> solution to the forward model for the list of sensors in the input, >> the order of which is specified by the order in the data, or by the >> order in the gradiometer structure, if no data is supplied. >> I recently (about a month ago) made a change in bti2grad, which >> changed the order of the coils in the grad-structure. Initially, I >> thought it would be nice to have them ordered alphabetically, but >> this led to problems later on when using precomputed leadfields >> (and making implicit assumptions about the matching sensor order in >> both data and gradiometers). It could be that your problems are >> related to this. >> On the other hand: could this be replicated in other datasets? How >> many trials is your csd-matrix based on? Isn't there any hint of a >> bilateral temporal decrease in alpha activity? >> >> Yours >> >> Jan-Mathijs >> >> >> >> On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: >> >>> hi, >>> >>> i'm not sure whether the following question is a fieldtrip-related >>> question or a rather general question. >>> >>> we use a 148 sensor BTI system. >>> since a couple of days we're struggling with a data-set in which >>> we'd like to localize auditory cortical alpha desynchronizations. >>> on a sensor level they are clearly observable (see attached >>> Pitcure 2). however when running DICS it seems like the brain is >>> more or less increasing power post-stimulus. >>> what makes me wonder is that it's exactly the same script (i could >>> provide more details of course) which worked very successfully >>> previously. our notion was initially that something is weird with >>> the leadfield. but -illegally- testing it with a leadfield from >>> another subject where things worked out basically gave more or >>> less the same picture. now we assume that something is fishy with >>> the data itself, that is not clearly observable when looking at >>> the data on a trial-by-trial basis, leading to bad spatial >>> filters. any suggestions how this could be diagnosed? >>> >>> are there any other suggestions? or has anybody had similar >>> problems lately? >>> >>> cheers, >>> 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. > > 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Nov 20 13:08:35 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 20 Nov 2008 13:08:35 +0100 Subject: Matlab script: Create BEM headmodel for EEG In-Reply-To: Message-ID: Dear Thomas, strel_bol is indeed a function from me. Since no proper fieldtrip function relies on it, it is not included in the fieldtrip release. Please find it attached. best regards, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: strel_bol.m Type: application/octet-stream Size: 442 bytes Desc: not available URL: -------------- next part -------------- On 18 Nov 2008, at 21:52, Thomas Dijkman wrote: > I have been playing with that same script as well, the reason Matlab > returns an error is because the 'strel_bol' function is not a > standard Matlab function. When I was busy with it I figured it > probably was a function made by the author of that Fieldtrip > example. I was hoping for a response to your question, because I was > curious myself. > I do know the function 'strel' does exist, to make a strucural > element. So my gues is 'strel_bol' is supposed to make a 'sphere' or > perhaps 'disk' structural element (bol = sphere in Dutch). > > Regards, > > Thomas Dijkman > > > ________________________________ > > From: FieldTrip discussion list on behalf of Avni Pllana > Sent: Tue 11/18/2008 1:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Matlab script: Create BEM headmodel for EEG > > > > I am trying to run on my PC the Matlab script > > http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: > documentation:examples:create_bem_headmodel_for_eeg > > but Matlab returns the error message: Undefined function or > method 'strel_bol' > > On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and > SPM2 . Any help is appreciated. > > Best regards, > Avni > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 20 14:33:41 2008 From: marco.sperduti at UPMC.FR (Marco Sperduti) Date: Thu, 20 Nov 2008 14:33:41 +0100 Subject: Sources' reconstruction Message-ID: Dear all, I'm new with Fieldtrip, so i have some questions. I would like to do the sources' reconstruction of my time-frequency data (obtained by another software). I've allready done the preprocessing, time-frequency analysis for all subjects and now i have a file containing the average across subjects. How can i use that file in fieldtrip for the source reconstruction? sincerely, 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Thu Nov 20 16:34:52 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Thu, 20 Nov 2008 15:34:52 +0000 Subject: Sources' reconstruction In-Reply-To: Message-ID: Dear Marco, It does not really make sense to perform a sourceanalysis on subject- averaged data. I suggest to have a look at the tutorial documentation "applying beamformer techniques in the frequency domain". Best, Jan-Mathijs On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: > Dear all, > > I'm new with Fieldtrip, so i have some questions. > > I would like to do the sources' reconstruction of my time-frequency > data > (obtained by another software). > I've allready done the preprocessing, time-frequency analysis for all > subjects and now i have a file containing the average across > subjects. How > can i use that file in fieldtrip for the source reconstruction? > > sincerely, > > 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/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/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Thu Nov 20 16:52:04 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Thu, 20 Nov 2008 16:52:04 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: Dear Robert, many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM headmodel for EEG, Matlab returns another error message: Undefined function or method 'write_tri' Error in ==> prepare_bemmodel at 151 Please, could you post the missing function 'write_tri.m' . Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 20 17:54:48 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 20 Nov 2008 17:54:48 +0100 Subject: Sources' reconstruction In-Reply-To: <8CACDBF8-3987-4FB2-905B-D3A9C152F802@psy.gla.ac.uk> Message-ID: Thank you for the answer. I read the tutorial, but i would like to avoid to do all the analysis again, so what i would like to know is if there is a way to use my time-frequency data (i also have the data for each subjects separately). thank you, sincerely Marco Quoting jan-mathijs schoffelen : > Dear Marco, > > It does not really make sense to perform a sourceanalysis on > subject-averaged data. I suggest to have a look at the tutorial > documentation "applying beamformer techniques in the frequency domain". > > Best, > > Jan-Mathijs > > > On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: > >> Dear all, >> >> I'm new with Fieldtrip, so i have some questions. >> >> I would like to do the sources' reconstruction of my time-frequency data >> (obtained by another software). >> I've allready done the preprocessing, time-frequency analysis for all >> subjects and now i have a file containing the average across subjects. How >> can i use that file in fieldtrip for the source reconstruction? >> >> sincerely, >> >> 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/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/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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Fri Nov 21 09:13:39 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Fri, 21 Nov 2008 09:13:39 +0100 Subject: Sources' reconstruction In-Reply-To: <20081120175448.1foyoct28gs48scg@courriel.upmc.fr> Message-ID: dear marco, perhaps you could tell which other software to use. if you did it in eeglab then you could simply use the function eeglab2fieldtrip and read your preprocessed data and then continue from that point using the time-frequency window of interest that you gained by the other software. if it's not eeglab, then i think there's no other way than reading your raw data into fieldtrip. if you have a software that can save an event file (e.g. BESA) then you could construct your cfg.trl for the preprocessing-function (see help definetrial if you don't know what that is). this is handy if you e.g. rejected epochs in your other software. then again you skip time-frequency analysis in fieldtrip and go on directly with your source analysis as described in the tutorial. but -either way- as jan-mathijs says, you will have to go back to the raw, single-trial, level. hope this helps, nathan On 20.11.2008, at 17:54, Marco SPERDUTI wrote: > Thank you for the answer. > > I read the tutorial, but i would like to avoid to do all the > analysis again, so what i would like to know is if there is a way to > use my time-frequency data (i also have the data for each subjects > separately). > > thank you, sincerely > > Marco > > Quoting jan-mathijs schoffelen : > >> Dear Marco, >> >> It does not really make sense to perform a sourceanalysis on >> subject-averaged data. I suggest to have a look at the tutorial >> documentation "applying beamformer techniques in the frequency >> domain". >> >> Best, >> >> Jan-Mathijs >> >> >> On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: >> >>> Dear all, >>> >>> I'm new with Fieldtrip, so i have some questions. >>> >>> I would like to do the sources' reconstruction of my time- >>> frequency data >>> (obtained by another software). >>> I've allready done the preprocessing, time-frequency analysis for >>> all >>> subjects and now i have a file containing the average across >>> subjects. How >>> can i use that file in fieldtrip for the source reconstruction? >>> >>> sincerely, >>> >>> 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/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/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/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/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Fri Nov 21 15:23:11 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Fri, 21 Nov 2008 15:23:11 +0100 Subject: timelockstatistics for single-subjects Message-ID: Hello all, I have a small problem in calculating statistics comparing two conditions for one subject. When I have a grand average (created with keepindividual), everything works nicely, but for one subject (with avg created with keeptrials), I have to remove the field 'dof' from the avg structure. The reason for that is that 'dof' has the dimensions of channel x sample, and on line 673 of prepare_timefreq_data.m I get an error for trying to reshape it in trials x sample. Has anyone found it before or am I doing something wrong? The following example code was supposed to work: cfg = []; cfg.keeptrials = 'yes'; avg1 = timelockanalysis(cfg, data1); avg2 = timelockanalysis(cfg, data2); cfg = []; cfg.channel = 'MEG'; cfg.method = 'analytic'; cfg.statistic = 'indepsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'no'; Ntrl1 = size(avg1.trial,1); Ntrl2 = size(avg2.trial,1); cfg.design(1,1:(Ntrl1+Ntrl2)) = [ones(1,Ntrl1) 2*ones(1,Ntrl2)]; cfg.ivar = 1; stat = timelockstatistics(cfg,avg1,avg2) But only works when I use instead: stat = timelockstatistics(cfg,rmfield(avg1,'dof'),rmfield(avg2,'dof')) Any light on this? Best, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From njkillian at GATECH.EDU Mon Nov 24 02:56:41 2008 From: njkillian at GATECH.EDU (Nathan Killian) Date: Sun, 23 Nov 2008 20:56:41 -0500 Subject: possible bug, fixdimord error, v 20081122 Message-ID: "Undefined function or method 'fixdimord' for input arguments of type 'struct'" ...there seems to be a problem in calling private/fixdimord.m in v20081122, but not in v20080611. The highest level functions I called that might have caused this were freqanalysis and freqdescriptives. I can supply more information if needed. -- Nathan Killian Graduate Student - Georgia Tech Bioengineering Buffalo Lab at Emory-Yerkes: 404.712.9431 Potter Lab at Georgia Tech: 404.385.4083 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hulitju at GMAIL.COM Mon Nov 24 09:40:10 2008 From: hulitju at GMAIL.COM (=?GB2312?Q?Hu_Li?=) Date: Mon, 24 Nov 2008 09:40:10 +0100 Subject: How to use BEM model for the EEG source reconstruction? Message-ID: I want to do some source recontruction simulation study based on the BEM model. However, I did not find any example matlab script on the website which show the source reconstruction using BEM model. Would you please tell me how to do this, send me a demo? Thanks. Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Nov 24 10:26:40 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 10:26:40 +0100 Subject: freqanalysis Message-ID: Hi all, i have a problem, each time i try to use freqanalysis i have these errors: ??? Undefined command/function 'mbrealvector'. Error in ==> nearest at 20 mbrealvector(array) Error in ==> freqanalysis_tfr at 203 begsampl = nearest(indicvect,cfg.latency(1)); Error in ==> freqanalysis at 192 [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); That's the command i use: cfg = []; cfg.output = 'pow'; cfg.method = 'tfr'; cfg.foi = 34:1:38; cfg.waveletwidth = 8 cfg.keeptrials = 'yes' TFRdata = freqanalysis(cfg, data); any idea? 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Mon Nov 24 10:30:27 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Mon, 24 Nov 2008 10:30:27 +0100 Subject: freqanalysis In-Reply-To: <20081124102640.o7ue9nyqv4soo0gs@courriel.upmc.fr> Message-ID: hi marco, if i recall correctly then this file is under the fieldtrip/private folder. i usually rename (e.g. notprivate) that folder and then add it to the path. perhaps you'll have to restart matlab. hope this helps. best, nathan On 24.11.2008, at 10:26, Marco SPERDUTI wrote: > Hi all, > > i have a problem, each time i try to use freqanalysis i have these > errors: > > ??? Undefined command/function 'mbrealvector'. > > Error in ==> nearest at 20 > mbrealvector(array) > > Error in ==> freqanalysis_tfr at 203 > begsampl = nearest(indicvect,cfg.latency(1)); > > Error in ==> freqanalysis at 192 > [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, > data); > > That's the command i use: > > cfg = []; > cfg.output = 'pow'; > cfg.method = 'tfr'; > cfg.foi = 34:1:38; > cfg.waveletwidth = 8 > cfg.keeptrials = 'yes' > TFRdata = freqanalysis(cfg, data); > > any idea? > > 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/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/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Mon Nov 24 11:24:12 2008 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 24 Nov 2008 11:24:12 +0100 Subject: How to use BEM model for the EEG source reconstruction? In-Reply-To: Message-ID: Dear Hu, you find an example script for the construction of a BEM headmodel in the fieldtrip wiki (fieldtrip >> documentation >> example matlab script >> "Create BEM headmodel for EEG" and "Align EEG electrode positions to BEM headmodel"). If you don't want to use individual headmodels for your subjects as described in the example script, you can try to use a BEM constructed from a standard MNI brain. You can construct this yourself using the example, or you can find a standard BEM headmodel in eeglab >> plugins >> dipfit >> standard_BEM. Hope this helps, Till Hu Li schrieb: > I want to do some source recontruction simulation study based on the BEM > model. However, I did not find any example matlab script on the website which > show the source reconstruction using BEM model. Would you please tell me > how to do this, send me a demo? > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > -- Till Schneider Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf Körperschaft des öffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus From njkillian at GATECH.EDU Mon Nov 24 12:08:56 2008 From: njkillian at GATECH.EDU (Nathan Killian) Date: Mon, 24 Nov 2008 06:08:56 -0500 Subject: freqanalysis In-Reply-To: Message-ID: Nice idea. This would probably solve the problem I posted earlier today as well. Are you also using a newer version of fieldtrip Marco? If it's a new problem with the program structure perhaps the powers that be could update the version? :) Nathan On Mon, Nov 24, 2008 at 4:30 AM, Nathan Weisz wrote: > hi marco, > > if i recall correctly then this file is under the fieldtrip/private folder. > i usually rename (e.g. notprivate) that folder and then add it to the path. > perhaps you'll have to restart matlab. > > hope this helps. > > best, > nathan > > > > On 24.11.2008, at 10:26, Marco SPERDUTI wrote: > > Hi all, >> >> i have a problem, each time i try to use freqanalysis i have these errors: >> >> ??? Undefined command/function 'mbrealvector'. >> >> Error in ==> nearest at 20 >> mbrealvector(array) >> >> Error in ==> freqanalysis_tfr at 203 >> begsampl = nearest(indicvect,cfg.latency(1)); >> >> Error in ==> freqanalysis at 192 >> [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); >> >> That's the command i use: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.method = 'tfr'; >> cfg.foi = 34:1:38; >> cfg.waveletwidth = 8 >> cfg.keeptrials = 'yes' >> TFRdata = freqanalysis(cfg, data); >> >> any idea? >> >> 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/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/fcdonders/fieldtrip. > -- Nathan Killian Graduate Student - Georgia Tech Bioengineering Buffalo Lab at Emory-Yerkes: 404.712.9431 Potter Lab at Georgia Tech: 404.385.4083 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.sperduti at UPMC.FR Mon Nov 24 12:31:18 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 12:31:18 +0100 Subject: freqanalysis In-Reply-To: Message-ID: Yes I'm using a new version, but Nathan's suggestion worked. Thank you! sincerely, Marco Quoting Nathan Killian : > Nice idea. This would probably solve the problem I posted earlier today as > well. Are you also using a newer version of fieldtrip Marco? > > If it's a new problem with the program structure perhaps the powers that be > could update the version? :) > > Nathan > > On Mon, Nov 24, 2008 at 4:30 AM, Nathan Weisz wrote: > >> hi marco, >> >> if i recall correctly then this file is under the fieldtrip/private folder. >> i usually rename (e.g. notprivate) that folder and then add it to the path. >> perhaps you'll have to restart matlab. >> >> hope this helps. >> >> best, >> nathan >> >> >> >> On 24.11.2008, at 10:26, Marco SPERDUTI wrote: >> >> Hi all, >>> >>> i have a problem, each time i try to use freqanalysis i have these errors: >>> >>> ??? Undefined command/function 'mbrealvector'. >>> >>> Error in ==> nearest at 20 >>> mbrealvector(array) >>> >>> Error in ==> freqanalysis_tfr at 203 >>> begsampl = nearest(indicvect,cfg.latency(1)); >>> >>> Error in ==> freqanalysis at 192 >>> [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); >>> >>> That's the command i use: >>> >>> cfg = []; >>> cfg.output = 'pow'; >>> cfg.method = 'tfr'; >>> cfg.foi = 34:1:38; >>> cfg.waveletwidth = 8 >>> cfg.keeptrials = 'yes' >>> TFRdata = freqanalysis(cfg, data); >>> >>> any idea? >>> >>> 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/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/fcdonders/fieldtrip. >> > > > > -- > Nathan Killian > Graduate Student - Georgia Tech Bioengineering > Buffalo Lab at Emory-Yerkes: 404.712.9431 > Potter Lab at Georgia Tech: 404.385.4083 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Nov 24 12:34:11 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 12:34:11 +0100 Subject: Brain model Message-ID: Hi all, i would like to do the sources reconstruction of my time-frequency data, but i don't have the subjects' MRI. Is it possible to do it using a template or somenthing like that? How can i do? sincerly, 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/fcdonders/fieldtrip. From spike377 at KOREA.COM Tue Nov 25 07:00:58 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Tue, 25 Nov 2008 15:00:58 +0900 Subject: significance test of PLV Message-ID: An HTML attachment was scrubbed... URL: From huli at HKUSUA.HKU.HK Tue Nov 25 10:15:10 2008 From: huli at HKUSUA.HKU.HK (li hu) Date: Tue, 25 Nov 2008 17:15:10 +0800 Subject: Why can not open the website of Fieldtrip? Message-ID: Dear Developer, I have tried many times to open the website of fieldtrip, but I can not open it. Is there any problem or the address of it has been changed? Thanks. Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hulitju at GMAIL.COM Tue Nov 25 10:19:31 2008 From: hulitju at GMAIL.COM (=?GB2312?Q?Hu_Li?=) Date: Tue, 25 Nov 2008 10:19:31 +0100 Subject: Brain model Message-ID: You can use MRI template which can be download on the website of 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Tue Nov 25 10:52:20 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Tue, 25 Nov 2008 10:52:20 +0100 Subject: Why can not open the website of Fieldtrip? In-Reply-To: <71dee8e60811250115k5316831et1b1e5bc7cbe15b5d@mail.gmail.com> Message-ID: I have the same problem. sincerely, Marco Quoting li hu : > Dear Developer, > > I have tried many times to open the website of fieldtrip, but I can not open > it. Is there any problem or the address of it has been changed? > > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From huli at HKUSUA.HKU.HK Tue Nov 25 13:59:24 2008 From: huli at HKUSUA.HKU.HK (li hu) Date: Tue, 25 Nov 2008 20:59:24 +0800 Subject: Brain model In-Reply-To: Message-ID: Hi, All, Is LCMV method supported for component data? Is it possible to use the LCMV method for analysising ICA component data? Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From avni.pllana at UNIVIE.AC.AT Tue Nov 25 16:30:34 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Tue, 25 Nov 2008 16:30:34 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time Message-ID: Dear Robert, many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM headmodel for EEG, Matlab returns another error message: Undefined function or method 'write_tri' Error in ==> prepare_bemmodel at 151 It would be nice, if you could post the missing function 'write_tri.m' . Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Wed Nov 26 09:40:04 2008 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Wed, 26 Nov 2008 09:40:04 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time In-Reply-To: Message-ID: Dear Avni, please find attached the write_tri.m function. Best regards, Till Avni Pllana schrieb: > Dear Robert, > > many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM > headmodel for EEG, > Matlab returns another error message: > > Undefined function or method 'write_tri' > > Error in ==> prepare_bemmodel at 151 > > It would be nice, if you could post the missing function 'write_tri.m' . > > Best regards, > Avni > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > -- Till Schneider, Dipl.Psych. Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf Körperschaft des öffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: write_tri.m URL: From r.oostenveld at FCDONDERS.RU.NL Wed Nov 26 10:45:38 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Nov 2008 10:45:38 +0100 Subject: Why can not open the website of Fieldtrip? In-Reply-To: <71dee8e60811250115k5316831et1b1e5bc7cbe15b5d@mail.gmail.com> Message-ID: Dear FT users, Sorry for the website being down. The university network administration changed the name of the webserver without informing me. You should now again be able to access the FT wiki at http://neuroimaging.ruhosting.nl . The number one hit returned by google should also work again. best regards Robert On 25 Nov 2008, at 10:15, li hu wrote: > Dear Developer, > > I have tried many times to open the website of fieldtrip, but I can > not open it. Is there any problem or the address of it has been > changed? > > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Nov 26 10:47:02 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 26 Nov 2008 10:47:02 +0100 Subject: Brain model Message-ID: Dear Hu Li, dear all, as far as I know the covariance matrix of an ICA component should be of rank 1, i.e. it is extremely rank deficient, meaning that LCMV will not work (and also not make sense). This is because an ICA component has ONE single timecourse. When projecting it back to the sensor level (i.e. by using the mixing weights aka map) all sensors will have that one timecourse. It is also important to consider that after performing ICA there is no need for one of the main capabilities of LCMV, i.e. to suppress unwanted signals from other sources, as these should be part of other ICA components. So the best option for localizing ICA components should be to use DIPFIT if the map is relatively clearly dipolar, or some distributed linear inverse (like LAURA, s/sw/c-LORETA or the like) when it is not, to localize the component taking the values from the component map. 'Hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "li hu" > Gesendet: 25.11.08 14:04:43 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Brain model > > Hi, All, > > Is LCMV method supported for component data? Is it possible to use > the LCMV method for analysising ICA component data? > > Best regards, > > HU Li > > > ---------------------------------- > The aim of this list 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Wed Nov 26 10:47:57 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Nov 2008 10:47:57 +0100 Subject: possible bug, fixdimord error, v 20081122 In-Reply-To: Message-ID: Hi Nathan, Sorry, there were some low level m-files (including the fixdimord function) misplaced in recent fieldtrip releases. Please download the latest version, it should be fixed in that. best regards, Robert On 24 Nov 2008, at 2:56, Nathan Killian wrote: > "Undefined function or method 'fixdimord' for input arguments of > type 'struct'" > > ...there seems to be a problem in calling private/fixdimord.m in > v20081122, but not in v20080611. The highest level functions I > called that might have caused this were freqanalysis and > freqdescriptives. I can supply more information if needed. > > > -- > Nathan Killian > Graduate Student - Georgia Tech Bioengineering > Buffalo Lab at Emory-Yerkes: 404.712.9431 > Potter Lab at Georgia Tech: 404.385.4083 > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Wed Nov 26 16:30:45 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Wed, 26 Nov 2008 16:30:45 +0100 Subject: error offset Message-ID: Hi all, i'm trying to do frequency analysis with mtmconvol, but it gives me this error: ??? Reference to non-existent field 'offset'. Error in ==> freqanalysis_mtmconvol at 323 min_smp = min(data.offset); Error in ==> freqanalysis at 192 [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); Error in ==> field_trip_new at 42 TF_data = freqanalysis(cfg, data); this is the command i'm using: cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.channel = 'MEG'; cfg.foi = 36; cfg.toi = 0.800; cfg.t_ftimwin = 1.000; cfg.tapsmofrq = 4; TF_data = freqanalysis(cfg, data); any idea? thanks a lot, 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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Thu Nov 27 04:10:43 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Wed, 26 Nov 2008 22:10:43 -0500 Subject: significance test of PLV In-Reply-To: <1227592869196254.0.outsmtp04@outsmtp04> Message-ID: Hi Hyoungdong, It is legitimate in my humble opinion, but I am glad to hear other comments. There was a discussion on the differences between the bootstrap and permutation tests in this forum. Good luck, Shen-Mou ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of hyoungdong.park [spike377 at KOREA.COM] Sent: Tuesday, November 25, 2008 1:00 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] significance test of PLV Dear fieldtrip users. I want to know calculated PLV value is different significantly against background fluctuation. This is about what Lachaux et. al (Lachaux et al. 1999, HBM) calls phase locking statistics.(PLS) They calculated PLS by bootstrap. Can I do that with permutation test, which is implemented in fieldtrip? If you have any idea, please let me know. Thank you very much for reading. Best regards. Hyoungdong. [http://ads.korea.com/RealMedia/ads/adstream_nx.ads/Mail.Korea/Footer at x22?KoreaHouse_080222_MFoot_01] [http://ads.korea.com/RealMedia/ads/adstream_nx.ads/Mail.Korea/Footer at x21?KoreaHouse_080222_MFoot_Logo] ---------------------------------- The aim of this list 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 27 12:05:33 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 27 Nov 2008 12:05:33 +0100 Subject: sourceanalysis Message-ID: Hallo, ecah time i use sourceanalysis i have this error: ??? Undefined command/function 'createsubcfg'. Error in ==> sourceanalysis at 549 cfg = createsubcfg(cfg, cfg.method); this is the my command: cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.vol = vol; cfg.channel = 'MEG'; cfg.frequency = 36; cfg.projectnoise = 'yes'; cfg.lambda = mean(TF_Data.powspctrm)/100; source_Data = sourceanalysis(cfg,TF_Data); can you help me? sincerely, 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/fcdonders/fieldtrip. From t.b.dijkman at STUDENT.UTWENTE.NL Thu Nov 27 23:49:44 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Thu, 27 Nov 2008 23:49:44 +0100 Subject: sourceanalysis Message-ID: This means the function sourceanalysis cannot find the function createsubcfg, which should be located in the 'private' folder in the Fieldtrip folder. Functions in that 'private' folder should be accesable to sourceanalysis, since it is located in the parent directory. Perhaps you should check whether that is actually the case, or perhaps not all necessary folders have been added to the matlab path? Renaming the private folder and adding it to the path is a workaround, but I don't think that that should be common practice? Regards, Thomas Dijkman -----Original Message----- From: FieldTrip discussion list on behalf of Marco SPERDUTI Sent: Thu 11/27/2008 12:05 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sourceanalysis Hallo, ecah time i use sourceanalysis i have this error: ??? Undefined command/function 'createsubcfg'. Error in ==> sourceanalysis at 549 cfg = createsubcfg(cfg, cfg.method); this is the my command: cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.vol = vol; cfg.channel = 'MEG'; cfg.frequency = 36; cfg.projectnoise = 'yes'; cfg.lambda = mean(TF_Data.powspctrm)/100; source_Data = sourceanalysis(cfg,TF_Data); can you help me? sincerely, 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/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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 28 10:57:41 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 28 Nov 2008 10:57:41 +0100 Subject: error offset In-Reply-To: <20081126163045.fu2s2lrk0sg0k484@courriel.upmc.fr> Message-ID: On 26 Nov 2008, at 16:30, Marco SPERDUTI wrote: > Hi all, > > i'm trying to do frequency analysis with mtmconvol, but it gives me > this error: > > ??? Reference to non-existent field 'offset'. > > Error in ==> freqanalysis_mtmconvol at 323 > min_smp = min(data.offset); > ... > any idea? This field should be added by the checkconfig function (see line 157 in freqanalysis). It uses the time2offset helper function. Could you use the matlab debugger to check that it is actually added? 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 28 11:04:43 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 28 Nov 2008 11:04:43 +0100 Subject: sourceanalysis In-Reply-To: <20081127120533.tvmsmh5jxcgc8w48@courriel.upmc.fr> Message-ID: Hi Marco, To me it seems to suggest that you are using an older version of the sourecanalysis.m file with a newer version of the private directory. The createsubcfg function has recently been removed and the functionality replaced by checkconfig. Please update to a fully cnosistent latest FT version and try again. best regards, Robert PS renaming private and adding it to your path indeed is not recommeded and should not be needed. However, recently we have done quite some restructuring of the directory layout within fieldtrip, and that has not yet completely stabilized. So sometimes indeed a private function might be misplaced, and then the suggestion from Thomas may help. On 27 Nov 2008, at 12:05, Marco SPERDUTI wrote: > ecah time i use sourceanalysis i have this error: > ??? Undefined command/function 'createsubcfg'. > > Error in ==> sourceanalysis at 549 > cfg = createsubcfg(cfg, cfg.method); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Nov 28 12:28:22 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 28 Nov 2008 12:28:22 +0100 Subject: sourceanalysis In-Reply-To: <92797675-4412-4594-A459-AC4E4F5CBA09@fcdonders.ru.nl> Message-ID: Thank's a lot Robert, finally i solved all my problems, at least i hope so! actually createsubcfg function wasn't there, that was the problem as you say. thank you again, Marco Quoting Robert Oostenveld : > Hi Marco, > > To me it seems to suggest that you are using an older version of the > sourecanalysis.m file with a newer version of the private directory. > The createsubcfg function has recently been removed and the > functionality replaced by checkconfig. Please update to a fully > cnosistent latest FT version and try again. > > best regards, > Robert > > PS renaming private and adding it to your path indeed is not recommeded > and should not be needed. However, recently we have done quite some > restructuring of the directory layout within fieldtrip, and that has > not yet completely stabilized. So sometimes indeed a private function > might be misplaced, and then the suggestion from Thomas may help. > > > > > On 27 Nov 2008, at 12:05, Marco SPERDUTI wrote: > >> ecah time i use sourceanalysis i have this error: >> ??? Undefined command/function 'createsubcfg'. >> >> Error in ==> sourceanalysis at 549 >> cfg = createsubcfg(cfg, cfg.method); > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Fri Nov 28 13:07:44 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Fri, 28 Nov 2008 13:07:44 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time Message-ID: Hi Till, Many thanks for posting 'write_tri.m' . Now the script works, but the result for skull is just an envelope of brain. For a BEM one needs a better approximation of skull and its inner side and outer side. There is something to be done in that direction. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Nov 28 14:35:02 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 28 Nov 2008 14:35:02 +0100 Subject: coordinates Message-ID: hallo, i would like to know it is possible, once i've made the source reconstruction, to have a text file with the coordinates of the sources. thank's a lot, 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/fcdonders/fieldtrip. From spike377 at KOREA.COM Mon Nov 3 13:00:31 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Mon, 3 Nov 2008 21:00:31 +0900 Subject: Some questions about 'phase locking value' and 'phase locking statistics' Message-ID: An HTML attachment was scrubbed... URL: From iversen at NSI.EDU Mon Nov 3 18:26:11 2008 From: iversen at NSI.EDU (John Iversen) Date: Mon, 3 Nov 2008 09:26:11 -0800 Subject: source localization given induced spectra Message-ID: Hello, Is there a way to do source localization on induced spectrograms? (Induced spectra being the mean of individual trials' power spectra.) Conceptually I am not sure how this would work, given that one starts with topographies of real, positive-valued power, with no phase information, so any dipole fit could be at best sign- indeterminate.There is no facility within fieldtrip to do such a thing as far as I can tell (induced spectra were calculated freqanalysis on multi-trial data and are within the .powspctrm field of the result, which is not handled by freq2timelock, and thus cannot feed any of the localization routines). What is of actual interest are task-related fluctuations of the power around a (much larger, and topographically varied) baseline. Is there a way to say where in the brain are the (presumed) subset of neural sources that vary in power with time? Thanks, John ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Mon Nov 3 22:18:39 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 3 Nov 2008 21:18:39 +0000 Subject: source localization given induced spectra In-Reply-To: Message-ID: Dear John, No, it is not possible to perform source localization on the spectrograms as you define them. You quite rightly point out that a spatial topography of power is always positive, so cannot account for a proper dipolar pattern. However, source localization of induced changes in oscillatory activity is possible. There's actually a nice tutorial on the fieldtrip website: "localizing oscillator sources, using beamformer techniques". Alternatively, you can actually call dipolefitting using frequency data as an input, but this requires either fourier-data, or cross- spectral densities between all channel combinations. Usually the fourier-data is more memory efficient. In this case I would propose a two-step strategy: compute spectrograms to identify your time- frequency region(s) of interest. Then call freqanalysis again, with cfg.output = 'fourier'. Then I would guess that dipolefitting runs through... At least it's worth a try. Yours, Jan-Mathijs On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > Hello, > > Is there a way to do source localization on induced spectrograms? > (Induced spectra being the mean of individual trials' power > spectra.) Conceptually I am not sure how this would work, given > that one starts with topographies of real, positive-valued power, > with no phase information, so any dipole fit could be at best sign- > indeterminate.There is no facility within fieldtrip to do such a > thing as far as I can tell (induced spectra were calculated > freqanalysis on multi-trial data and are within the .powspctrm > field of the result, which is not handled by freq2timelock, and > thus cannot feed any of the localization routines). > > What is of actual interest are task-related fluctuations of the > power around a (much larger, and topographically varied) baseline. > Is there a way to say where in the brain are the (presumed) subset > of neural sources that vary in power with time? > > Thanks, > > John > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Nov 4 17:19:14 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 4 Nov 2008 17:19:14 +0100 Subject: smoothing sensor data Message-ID: Hi everyone, Did anyone try smoothing single-subject data on sensor level before? In source-space I noticed that smoothing my single subjects (MEG)data made the GA-statistical analysis more sensitive because the source-locations were a bit shifted over subjects (MEG spatial resolution apparently isn't that bad after all ;) ). There I used a spm_smooth function on my volume data. But now I want to try the same on sensor level, I have pretty focal blobs, and cluster-analysis "looses" the cluster over time in the GA. Now I wonder how to do this. I could use the sensor locations in the grad and then adjust the values according to distance in 3D space. Before making this myself I was just wondering if anyone already made code to do the same. Ideas on how to do it are also much appreciated ;) Best regards, Ingrid ___________________________________ Ingrid Nieuwenhuis PhD student Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands Email: ingrid.nieuwenhuis at fcdonders.ru.nl Tel: 0031 (0)24 - 36 10887 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From iversen at NSI.EDU Tue Nov 4 18:02:17 2008 From: iversen at NSI.EDU (John Iversen) Date: Tue, 4 Nov 2008 09:02:17 -0800 Subject: source localization given induced spectra In-Reply-To: <139BC559-0787-41FB-B906-6DE42322692B@psy.gla.ac.uk> Message-ID: Dear Jan-Mathijs, Thanks for the quick reply. I'm sorry to hear I was right :) I may misunderstand what you've suggested, but is it not the case that if I chose cfg.output='fourier' it will average fourier spectra across trials (cares about phase) instead of power spectrum (phase blind, as I had been doing). In the end wont I simply get the equivalent of the fourier spectrum of the timelock average, which is substantially different from the induced spectrum that interests me? In many cases the sensor topography of the induced power looks somewhat dipolar, with two power peaks, so I may well try to do a fit, but optimizing not on the field but the field power (this would require modifying the output of the forward model within dipolefitting)--it will not be able to get the polarity of the dipole, but should be able to get a location. Maybe? It seems possible in principle, but I wonder if anyone has practical experience with this. I feel there should be a way to study this kind of question! Best, John On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > Dear John, > > No, it is not possible to perform source localization on the > spectrograms as you define them. You quite rightly point out that a > spatial topography of power is always positive, so cannot account > for a proper dipolar pattern. However, source localization of > induced changes in oscillatory activity is possible. There's > actually a nice tutorial on the fieldtrip website: "localizing > oscillator sources, using beamformer techniques". > Alternatively, you can actually call dipolefitting using frequency > data as an input, but this requires either fourier-data, or cross- > spectral densities between all channel combinations. Usually the > fourier-data is more memory efficient. In this case I would propose > a two-step strategy: compute spectrograms to identify your time- > frequency region(s) of interest. Then call freqanalysis again, with > cfg.output = 'fourier'. Then I would guess that dipolefitting runs > through... At least it's worth a try. > > Yours, > > Jan-Mathijs > > > On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > >> Hello, >> >> Is there a way to do source localization on induced spectrograms? >> (Induced spectra being the mean of individual trials' power >> spectra.) Conceptually I am not sure how this would work, given >> that one starts with topographies of real, positive-valued power, >> with no phase information, so any dipole fit could be at best sign- >> indeterminate.There is no facility within fieldtrip to do such a >> thing as far as I can tell (induced spectra were calculated >> freqanalysis on multi-trial data and are within the .powspctrm >> field of the result, which is not handled by freq2timelock, and >> thus cannot feed any of the localization routines). >> >> What is of actual interest are task-related fluctuations of the >> power around a (much larger, and topographically varied) baseline. >> Is there a way to say where in the brain are the (presumed) subset >> of neural sources that vary in power with time? >> >> Thanks, >> >> John >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and 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/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/fcdonders/fieldtrip. From rongf at NIDCD.NIH.GOV Tue Nov 4 18:12:22 2008 From: rongf at NIDCD.NIH.GOV (Rong, Feng (NIH/NIDCD) [F]) Date: Tue, 4 Nov 2008 12:12:22 -0500 Subject: source localization given induced spectra In-Reply-To: A<3DCA585C-35B0-4B39-ABF8-03C8C8C55C99@nsi.edu> Message-ID: John, Jan-Mathijs, Sorry I am not answering the question but asking another one. :) I wondering whether it is doable to estimate source first, and construct the source activities (moment norm, maybe) as 'pseudo-input' to the frequency analysis functions for computation of the spectrogram and further analysis. I saw one recent paper Gow et al. (2008) NeuroImage 43(3):614-623 taking that approach on sources estimated using mne. Is there any potential problem if I use sources estimated by lcmv? Best, Feng -----Original Message----- From: John Iversen [mailto:iversen at NSI.EDU] Sent: Tuesday, November 04, 2008 12:02 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] source localization given induced spectra Dear Jan-Mathijs, Thanks for the quick reply. I'm sorry to hear I was right :) I may misunderstand what you've suggested, but is it not the case that if I chose cfg.output='fourier' it will average fourier spectra across trials (cares about phase) instead of power spectrum (phase blind, as I had been doing). In the end wont I simply get the equivalent of the fourier spectrum of the timelock average, which is substantially different from the induced spectrum that interests me? In many cases the sensor topography of the induced power looks somewhat dipolar, with two power peaks, so I may well try to do a fit, but optimizing not on the field but the field power (this would require modifying the output of the forward model within dipolefitting)--it will not be able to get the polarity of the dipole, but should be able to get a location. Maybe? It seems possible in principle, but I wonder if anyone has practical experience with this. I feel there should be a way to study this kind of question! Best, John On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > Dear John, > > No, it is not possible to perform source localization on the > spectrograms as you define them. You quite rightly point out that a > spatial topography of power is always positive, so cannot account > for a proper dipolar pattern. However, source localization of > induced changes in oscillatory activity is possible. There's > actually a nice tutorial on the fieldtrip website: "localizing > oscillator sources, using beamformer techniques". > Alternatively, you can actually call dipolefitting using frequency > data as an input, but this requires either fourier-data, or cross- > spectral densities between all channel combinations. Usually the > fourier-data is more memory efficient. In this case I would propose > a two-step strategy: compute spectrograms to identify your time- > frequency region(s) of interest. Then call freqanalysis again, with > cfg.output = 'fourier'. Then I would guess that dipolefitting runs > through... At least it's worth a try. > > Yours, > > Jan-Mathijs > > > On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > >> Hello, >> >> Is there a way to do source localization on induced spectrograms? >> (Induced spectra being the mean of individual trials' power >> spectra.) Conceptually I am not sure how this would work, given >> that one starts with topographies of real, positive-valued power, >> with no phase information, so any dipole fit could be at best sign- >> indeterminate.There is no facility within fieldtrip to do such a >> thing as far as I can tell (induced spectra were calculated >> freqanalysis on multi-trial data and are within the .powspctrm >> field of the result, which is not handled by freq2timelock, and >> thus cannot feed any of the localization routines). >> >> What is of actual interest are task-related fluctuations of the >> power around a (much larger, and topographically varied) baseline. >> Is there a way to say where in the brain are the (presumed) subset >> of neural sources that vary in power with time? >> >> Thanks, >> >> John >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and 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/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/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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Tue Nov 4 18:09:53 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 4 Nov 2008 17:09:53 +0000 Subject: smoothing sensor data In-Reply-To: <02b501c93e99$14012eb0$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, You can do your whole analysis in SPM where you can export your sensor-level data to images and smooth it. But then there is no way back to Fieldtrip statistics. Best, Vladimir On Tue, Nov 4, 2008 at 4:19 PM, Ingrid Nieuwenhuis wrote: > Hi everyone, > > > > Did anyone try smoothing single-subject data on sensor level before? In > source-space I noticed that smoothing my single subjects (MEG)data made the > GA-statistical analysis more sensitive because the source-locations were a > bit shifted over subjects (MEG spatial resolution apparently isn't that bad > after all ;) ). There I used a spm_smooth function on my volume data. But > now I want to try the same on sensor level, I have pretty focal blobs, and > cluster-analysis "looses" the cluster over time in the GA. > > > > Now I wonder how to do this. I could use the sensor locations in the grad > and then adjust the values according to distance in 3D space. Before making > this myself I was just wondering if anyone already made code to do the same. > Ideas on how to do it are also much appreciated ;) > > > > Best regards, > > Ingrid > > > > ___________________________________ > > Ingrid Nieuwenhuis > > PhD student > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen, The Netherlands > > Email: ingrid.nieuwenhuis at fcdonders.ru.nl > > Tel: 0031 (0)24 - 36 10887 > > > > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Nov 4 18:35:40 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 4 Nov 2008 18:35:40 +0100 Subject: Problem running source grand average and source statistics Message-ID: Dear list users, I am having a problem running, source grandaverage and source statistics (over multiple subjects) on the output of soucrestatistictics (from multiple trials in single subjects). I ran first sourceanalysis supplying the backwads warped grids (as described in the wiki) to compute filters. Then I ran source analysis again to extract the single trial source images and the ran sourcestatistitics on this to get the single subject statistical images - all this runs fine. I then supply the pos (and dim) data of the template grid to each structure, replacing the original pos data (that do not match and of course prohibit using sourceststatistics and sourcegrandaverage). When trying to do either a source grand average or a sourcestatistics at the multisubject level I get the same error: subscripted assignment dimension mismatch dat(:,i) = tmp(:); Error in ==> sourcegrandaverage at 173 The corresponding lines of code in sourcegrandaverage are: % get the source parameter from each input source reconstruction % get the inside parameter from each input source reconstruction for i=1:Nsubject % TODO this function should use parameterselection if issubfield(varargin{i}, ['avg.' cfg.parameter]) tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); else tmp = getsubfield(varargin{i}, cfg.parameter); end dat(:,i) = tmp(:); tmp = getsubfield(varargin{i}, 'inside'); inside(tmp,i) = 1; end I get an identical error when using sourcestatistics at the multisubject level. The variable dat(:,i) is created like this: dat = zeros(Nvoxel, Nsubject) I suspect that somehow trying to use the 'stat' instead of the power parameter is a problem (TODO?) or that Nvoxel somehow differs over the various subjects ?? Any advice on what to try and test further would very much appreciated. Thanks in advance, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:19:56 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:19:56 +0000 Subject: Problem running source grand average and source statistics In-Reply-To: <822628835@web.de> Message-ID: Dear Michael, I agree with you that a likely cause is that the Nvoxel (which is based on the dimensionality of the first singlesubject-source in the input) varies across subjects. However, this would be strange, because you use the same dipole grid for all subjects. On the other hand: could it be that you 'sparsified' the single subjects? Each subject could have a slightly different number of 'inside' positions. This obviously leads to problems: 1 because the Nvoxel is incorrect in the first place (it's the product of the dim, so the input is assumed to be full 3D, or a linear array with all outside voxels present (either as nans or zeros or whichever number you fancy). 2 because the length of the array per subject varies. Hope this helps, Jan-M On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > Dear list users, > > I am having a problem running, source grandaverage and source > statistics (over multiple subjects) on the output of > soucrestatistictics (from multiple trials in single subjects). > > I ran first sourceanalysis supplying the backwads warped grids (as > described in the wiki) to compute filters. Then I ran source > analysis again to extract the single trial source images and the > ran sourcestatistitics on this to get the single subject > statistical images - all this runs fine. I then supply the pos (and > dim) data of the template grid to each structure, replacing the > original pos data (that do not match and of course prohibit using > sourceststatistics and sourcegrandaverage). When trying to do > either a source grand average or a sourcestatistics at the > multisubject level I get the same error: > > subscripted assignment dimension mismatch > dat(:,i) = tmp(:); > > Error in ==> sourcegrandaverage at 173 > > > The corresponding lines of code in sourcegrandaverage are: > > % get the source parameter from each input source reconstruction > % get the inside parameter from each input source reconstruction > for i=1:Nsubject > % TODO this function should use parameterselection > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > else > tmp = getsubfield(varargin{i}, cfg.parameter); > end > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I get an identical error when using sourcestatistics at the > multisubject level. > The variable dat(:,i) is created like this: > dat = zeros(Nvoxel, Nsubject) > > > I suspect that somehow trying to use the 'stat' instead of the > power parameter is a problem (TODO?) or that Nvoxel somehow differs > over the various subjects ?? > > Any advice on what to try and test further would very much > appreciated. > > Thanks in advance, > 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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:23:12 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:23:12 +0000 Subject: source localization given induced spectra In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B03F3C9B2@NIHCESMLBX8.nih.gov> Message-ID: Dear Feng, This is very much possible and no problem at all. Actually, this is an approach taken by many people in the field. It's perfectly OK to extimate the time course of a source of interest by using an LCMV beamformer and compute spectrograms on these 'virtual channels'. Yours, Jan-Mathijs On Nov 4, 2008, at 5:12 PM, Rong, Feng (NIH/NIDCD) [F] wrote: > John, Jan-Mathijs, > Sorry I am not answering the question but asking another one. :) > I wondering whether it is doable to estimate source first, and > construct > the source activities (moment norm, maybe) as 'pseudo-input' to the > frequency analysis functions for computation of the spectrogram and > further analysis. I saw one recent paper Gow et al. (2008) NeuroImage > 43(3):614-623 taking that approach on sources estimated using mne. Is > there any potential problem if I use sources estimated by lcmv? > > Best, > Feng > > -----Original Message----- > From: John Iversen [mailto:iversen at NSI.EDU] > Sent: Tuesday, November 04, 2008 12:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] source localization given induced spectra > > Dear Jan-Mathijs, > > Thanks for the quick reply. I'm sorry to hear I was right :) > > I may misunderstand what you've suggested, but is it not the case that > if I chose cfg.output='fourier' it will average fourier spectra across > trials (cares about phase) instead of power spectrum (phase blind, as > I had been doing). In the end wont I simply get the equivalent of the > fourier spectrum of the timelock average, which is substantially > different from the induced spectrum that interests me? > > In many cases the sensor topography of the induced power looks > somewhat dipolar, with two power peaks, so I may well try to do a fit, > but optimizing not on the field but the field power (this would > require modifying the output of the forward model within > dipolefitting)--it will not be able to get the polarity of the dipole, > but should be able to get a location. Maybe? It seems possible in > principle, but I wonder if anyone has practical experience with this. > > I feel there should be a way to study this kind of question! > > Best, > > John > > On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > >> Dear John, >> >> No, it is not possible to perform source localization on the >> spectrograms as you define them. You quite rightly point out that a >> spatial topography of power is always positive, so cannot account >> for a proper dipolar pattern. However, source localization of >> induced changes in oscillatory activity is possible. There's >> actually a nice tutorial on the fieldtrip website: "localizing >> oscillator sources, using beamformer techniques". >> Alternatively, you can actually call dipolefitting using frequency >> data as an input, but this requires either fourier-data, or cross- >> spectral densities between all channel combinations. Usually the >> fourier-data is more memory efficient. In this case I would propose >> a two-step strategy: compute spectrograms to identify your time- >> frequency region(s) of interest. Then call freqanalysis again, with >> cfg.output = 'fourier'. Then I would guess that dipolefitting runs >> through... At least it's worth a try. >> >> Yours, >> >> Jan-Mathijs >> >> >> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >> >>> Hello, >>> >>> Is there a way to do source localization on induced spectrograms? >>> (Induced spectra being the mean of individual trials' power >>> spectra.) Conceptually I am not sure how this would work, given >>> that one starts with topographies of real, positive-valued power, >>> with no phase information, so any dipole fit could be at best sign- >>> indeterminate.There is no facility within fieldtrip to do such a >>> thing as far as I can tell (induced spectra were calculated >>> freqanalysis on multi-trial data and are within the .powspctrm >>> field of the result, which is not handled by freq2timelock, and >>> thus cannot feed any of the localization routines). >>> >>> What is of actual interest are task-related fluctuations of the >>> power around a (much larger, and topographically varied) baseline. >>> Is there a way to say where in the brain are the (presumed) subset >>> of neural sources that vary in power with time? >>> >>> Thanks, >>> >>> John >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users >>> of the FieldTrip toolbox, to share experiences and to discuss new >>> ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html >>> and 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/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/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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:52:18 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:52:18 +0000 Subject: source localization given induced spectra In-Reply-To: <3DCA585C-35B0-4B39-ABF8-03C8C8C55C99@nsi.edu> Message-ID: Dear John, Probably I was a bit rash in answering to your earlier mail and did not think it through completely. Apologies for that and for any confusion created. Let's give it another try: As you pointed out, induced power can show a somewhat dipolar topography, but you cannot fit a dipole to this because of the fact that it is positive all over the place. However, if you would indeed have some phase information in your topography, showing the ingoing and outgoing field (MEG), or positive and negative potential (EEG), one could fit a dipole. I was talking rubbish when suggesting to use fourierspectra, because it is forbidden to average them across trials (not actually forbidden, but it does not make sense). However, it would make sense to average cross-spectral densities across trials (not the csd's between all channel combinations, but between a well chosen set of channel pairs). Why would this be the case? Well, if you cleverly choose your reference signal (I suggest one of the strong blobs in your dipolar powerspectrum), and you compute the cross-spectral density between this guy and the rest of the channels, then you can do business because the csd's represent the estimated phase-difference between the reference signal and the rest. The interesting signal (your dipolar field) which is buried in your single trial data now has a phase of 0 (channels are in the same blob of the dipolar field) or 180 degrees (channels are in the opposite blob of the dipolar field) with respect to the reference, and importantly this is the same for all trials. This means that you can average the cross-spectral densities across trials to generate a complex-valued topography. Plotting the real-part (or imaginary part) of this should lead to a nice dipolar pattern with positive, and negative values. As far as I know dipolefitting can deal with cross-spectra as an input, so my revised approach would be: compute spectrograms and identify your time-frequency region of interest. Then plot the topography and compute a sensible reference channel. Then call freqanalysis again, but with output='powandcsd', and channelcmb = {'all' 'yourchosenchannel'}. Then try a dipole fit. Hope this helps, Jan-Mathijs On Nov 4, 2008, at 5:02 PM, John Iversen wrote: > Dear Jan-Mathijs, > > Thanks for the quick reply. I'm sorry to hear I was right :) > > I may misunderstand what you've suggested, but is it not the case > that if I chose cfg.output='fourier' it will average fourier > spectra across trials (cares about phase) instead of power spectrum > (phase blind, as I had been doing). In the end wont I simply get > the equivalent of the fourier spectrum of the timelock average, > which is substantially different from the induced spectrum that > interests me? > > In many cases the sensor topography of the induced power looks > somewhat dipolar, with two power peaks, so I may well try to do a > fit, but optimizing not on the field but the field power (this > would require modifying the output of the forward model within > dipolefitting)--it will not be able to get the polarity of the > dipole, but should be able to get a location. Maybe? It seems > possible in principle, but I wonder if anyone has practical > experience with this. > > I feel there should be a way to study this kind of question! > > Best, > > John > > On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > >> Dear John, >> >> No, it is not possible to perform source localization on the >> spectrograms as you define them. You quite rightly point out that >> a spatial topography of power is always positive, so cannot >> account for a proper dipolar pattern. However, source localization >> of induced changes in oscillatory activity is possible. There's >> actually a nice tutorial on the fieldtrip website: "localizing >> oscillator sources, using beamformer techniques". >> Alternatively, you can actually call dipolefitting using frequency >> data as an input, but this requires either fourier-data, or cross- >> spectral densities between all channel combinations. Usually the >> fourier-data is more memory efficient. In this case I would >> propose a two-step strategy: compute spectrograms to identify your >> time-frequency region(s) of interest. Then call freqanalysis >> again, with cfg.output = 'fourier'. Then I would guess that >> dipolefitting runs through... At least it's worth a try. >> >> Yours, >> >> Jan-Mathijs >> >> >> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >> >>> Hello, >>> >>> Is there a way to do source localization on induced spectrograms? >>> (Induced spectra being the mean of individual trials' power >>> spectra.) Conceptually I am not sure how this would work, given >>> that one starts with topographies of real, positive-valued power, >>> with no phase information, so any dipole fit could be at best >>> sign-indeterminate.There is no facility within fieldtrip to do >>> such a thing as far as I can tell (induced spectra were >>> calculated freqanalysis on multi-trial data and are within >>> the .powspctrm field of the result, which is not handled by >>> freq2timelock, and thus cannot feed any of the localization >>> routines). >>> >>> What is of actual interest are task-related fluctuations of the >>> power around a (much larger, and topographically varied) >>> baseline. Is there a way to say where in the brain are the >>> (presumed) subset of neural sources that vary in power with time? >>> >>> Thanks, >>> >>> John >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between >>> users of the FieldTrip toolbox, to share experiences and to >>> discuss new ideas for MEG and EEG analysis. See also http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ >> 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/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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed Nov 5 13:41:44 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 5 Nov 2008 13:41:44 +0100 Subject: Problem running source grand average and source statistics In-Reply-To: <551DCBEB-4882-4FB9-BC42-AFA40269CE57@psy.gla.ac.uk> Message-ID: Dear Michael and Jan-Mathijs, If the same procedure is followed as on the wiki, the inside of the template grid is copied to the single subjects, so by definition also the 'sparsified' single subjects sources should all have the same amount of (inside) voxels. So point 2 J-M raised can't be it, point 1 could well be: Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and Nvoxels is the product of the dim. Best Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: Wednesday, November 05, 2008 10:20 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Problem running source grand average and source statistics Dear Michael, I agree with you that a likely cause is that the Nvoxel (which is based on the dimensionality of the first singlesubject-source in the input) varies across subjects. However, this would be strange, because you use the same dipole grid for all subjects. On the other hand: could it be that you 'sparsified' the single subjects? Each subject could have a slightly different number of 'inside' positions. This obviously leads to problems: 1 because the Nvoxel is incorrect in the first place (it's the product of the dim, so the input is assumed to be full 3D, or a linear array with all outside voxels present (either as nans or zeros or whichever number you fancy). 2 because the length of the array per subject varies. Hope this helps, Jan-M On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > Dear list users, > > I am having a problem running, source grandaverage and source > statistics (over multiple subjects) on the output of > soucrestatistictics (from multiple trials in single subjects). > > I ran first sourceanalysis supplying the backwads warped grids (as > described in the wiki) to compute filters. Then I ran source > analysis again to extract the single trial source images and the > ran sourcestatistitics on this to get the single subject > statistical images - all this runs fine. I then supply the pos (and > dim) data of the template grid to each structure, replacing the > original pos data (that do not match and of course prohibit using > sourceststatistics and sourcegrandaverage). When trying to do > either a source grand average or a sourcestatistics at the > multisubject level I get the same error: > > subscripted assignment dimension mismatch > dat(:,i) = tmp(:); > > Error in ==> sourcegrandaverage at 173 > > > The corresponding lines of code in sourcegrandaverage are: > > % get the source parameter from each input source reconstruction > % get the inside parameter from each input source reconstruction > for i=1:Nsubject > % TODO this function should use parameterselection > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > else > tmp = getsubfield(varargin{i}, cfg.parameter); > end > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I get an identical error when using sourcestatistics at the > multisubject level. > The variable dat(:,i) is created like this: > dat = zeros(Nvoxel, Nsubject) > > > I suspect that somehow trying to use the 'stat' instead of the > power parameter is a problem (TODO?) or that Nvoxel somehow differs > over the various subjects ?? > > Any advice on what to try and test further would very much > appreciated. > > Thanks in advance, > 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/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/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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Nov 5 14:50:15 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 5 Nov 2008 14:50:15 +0100 Subject: Problem running source grand average a nd source statistics Message-ID: Dear Ingrid, dear Jan-Mathijs I guess Ingrid is indeed correct, as all my datasets have the same dimension of the stat field and of the inside/outside fields. I was actually also supplying the dim field from the template to all datasets, so the product of dims' should be the same everywhere, but that hasn't really solved the problem. The length of the inside field is 3297, the outside field is 3129, their sum is 6426 which is identical to the product of dimensions of the template grid which are 17 x 21 x 18 =6426. So I am really a bit puzzled here... Anyway, here's the code I use, maybe someone a really stupid error, that I simply overlooked: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FIRST I prepare a file with the data and the settings for the statistics that is later read in again: % datapath = '/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Stats/'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DesignData1 = { 'ABA04_Up_StatSources.mat' 'IFS20_Up_StatSources.mat'; 'IKE28_Up_StatSources.mat'; 'JHA07_Up_StatSources.mat'; 'JPA05_Up_StatSources.mat'; 'MKA21_Up_StatSources.mat'; 'MMA07_Up_StatSources.mat'; 'PSS16_Up_StatSources.mat'; 'SNI05_Up_StatSources.mat'; 'UWA31_Up_StatSources.mat'; }; DesignData2 = { 'ABA04_In_StatSources.mat'; 'IFS20_In_StatSources.mat'; 'IKE28_In_StatSources.mat'; 'JHA07_In_StatSources.mat'; 'JPA05_In_StatSources.mat'; 'MKA21_In_StatSources.mat'; 'MMA07_In_StatSources.mat'; 'PSS16_In_StatSources.mat'; 'SNI05_In_StatSources.mat'; 'UWA31_In_StatSources.mat'; }; % The statistics configuration cfg = []; nSubjects = min(length(DesignData1),length(DesignData2)); a = [1:nSubjects]; b = ones(1,nSubjects); cfg.design = [a a; b (2*b)]; cfg.ivar = 2; % independent variable: condition cfg.uvar = 1; % subjects cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.01; cfg.alpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.numrandomization = 500; %2000; cfg.threshold = 0.01; cfg.parameter = 'stat'; cfg.statistic = 'depsamplesT'; % create output file OutFileName = strcat(datapath,'DesignStat2008_11_04.mat'); save(OutFileName, 'DesignData1', 'DesignData2', 'cfg', 'datapath'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECOND I read in this file and the template and try to perform grandaveraging and sourcestatistics at the second level: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [] = StatisticsDICS(DesignStatLCMVFile); template = load('/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Grids/MNItemplate_231008_-1p5iws.mat'); Nx = length(template.template_grid.xgrid) Ny = length(template.template_grid.ygrid) Nz = length(template.template_grid.zgrid) load(DesignStatLCMVFile); % contains datapath, DesignData1, DesignData2, cfg % Load Data from DesignData1,2 automatically ensuring matching sizes % please ensure that data pairs are OK if using paired statistics ! for i = 1:min(length(DesignData1),length(DesignData2)) m=strcat('loading dataset#:', num2str(2*i-1)); disp(m); fullname1 = strcat(datapath,DesignData1{i,1}); Data1{i} = load(fullname1); m=strcat('loading dataset#:', num2str(2*i)); disp(m); fullname2 = strcat(datapath,DesignData2{i,1}); Data2{i} = load(fullname2); end % Fixing the structure properties for l = 1:size(Data1,2) Data1{l}.SourceStat.xgrid = template.template_grid.xgrid; Data1{l}.SourceStat.ygrid = template.template_grid.ygrid; Data1{l}.SourceStat.zgrid = template.template_grid.zgrid; Data1{l}.SourceStat.dim = [Nx Ny Nz]; Data1{l}.SourceStat.pos = template.template_grid.pos; Data1{l}.SourceStat.inside = template.template_grid.inside; Data1{l}.SourceStat.outside = template.template_grid.outside; Data1{l} = Data1{l}.SourceStat; Data2{l}.SourceStat.xgrid = template.template_grid.xgrid; Data2{l}.SourceStat.ygrid = template.template_grid.ygrid; Data2{l}.SourceStat.zgrid = template.template_grid.zgrid; Data2{l}.SourceStat.dim = [Nx Ny Nz]; Data2{l}.SourceStat.pos = template.template_grid.pos; Data2{l}.SourceStat.inside = template.template_grid.inside; Data2{l}.SourceStat.outside = template.template_grid.outside; Data2{l} = Data2{l}.SourceStat; end % prepare the statistics by computing the grandaverage with individual % subject data retained % Compute grand average for Condition 1 and 2 cfgGA = []; cfgGA.keepindividual = 'yes'; cfgGA.parameter='stat'; % create command strings for the computaion: commandstr1 = strcat ('DataGA1', '=sourcegrandaverage(cfgGA'); commandstr2 = strcat ('DataGA2', '=sourcegrandaverage(cfgGA'); for l = 1 : length(Data1) commandstr1 = strcat(commandstr1, ',Data1{', num2str(l) , '}'); commandstr2 = strcat(commandstr2, ',Data2{', num2str(l) , '}'); end % finalize command strings commandstr1=strcat(commandstr1,');') commandstr2=strcat(commandstr2,');') eval(commandstr1) % yields DataGA1; eval(commandstr2) % yields DataGA2; clear Data1; clear Data2; % no longer needed we now have DataGA1,2 %SourceStatsitics cfg is known from the design file! sourceStat = sourcestatistics(cfg, DataGA1, DataGA2); OutFilename = ... strcat(datapath, 'SourceStatisticsLCMV_denoisedDataAndNewGrids_1000rand_',DesignData1{i,1}(7:end-4),'_calpha',num2str(cfg.clusteralpha), '_alpha_',num2str(cfg.alpha),'.mat'); save(OutFilename, 'sourceStat'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Here's the inforamtion from the datasets and the template: Information of a dataset after processing/preparing for sourcegrandaverage: stat: [3297x1 double] df: 134 critval: [-1.9778 1.9778] prob: [3297x1 double] mask: [3297x1 logical] dim: [17 21 18] inside: [1x3297 double] outside: [1x3129 double] pos: [6426x3 double] cfg: [1x1 struct] xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90] Information of the template: xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90] dim: [17 21 18] pos: [6426x3 double] inside: [1x3297 double] outside: [1x3129 double] The onlz thing that I see varying fron dataset to dataset is the df field. Any help appreciated, Michael > -----Ursprüngliche Nachricht----- > Von: "Ingrid Nieuwenhuis" > Gesendet: 05.11.08 14:02:04 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Problem running source grand average and source statistics > Dear Michael and Jan-Mathijs, > > If the same procedure is followed as on the wiki, the inside of the template > grid is copied to the single subjects, so by definition also the > 'sparsified' single subjects sources should all have the same amount of > (inside) voxels. So point 2 J-M raised can't be it, point 1 could well be: > Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and Nvoxels is > the product of the dim. > > Best Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen > Sent: Wednesday, November 05, 2008 10:20 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Problem running source grand average and source > statistics > > Dear Michael, > > I agree with you that a likely cause is that the Nvoxel (which is > based on the dimensionality of the first singlesubject-source in the > input) varies across subjects. However, this would be strange, > because you use the same dipole grid for all subjects. On the other > hand: could it be that you 'sparsified' the single subjects? Each > subject could have a slightly different number of 'inside' positions. > This obviously leads to problems: > 1 because the Nvoxel is incorrect in the first place (it's the > product of the dim, so the input is assumed to be full 3D, or a > linear array with all outside voxels present (either as nans or zeros > or whichever number you fancy). > 2 because the length of the array per subject varies. > > Hope this helps, > > Jan-M > > > > On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > > > Dear list users, > > > > I am having a problem running, source grandaverage and source > > statistics (over multiple subjects) on the output of > > soucrestatistictics (from multiple trials in single subjects). > > > > I ran first sourceanalysis supplying the backwads warped grids (as > > described in the wiki) to compute filters. Then I ran source > > analysis again to extract the single trial source images and the > > ran sourcestatistitics on this to get the single subject > > statistical images - all this runs fine. I then supply the pos (and > > dim) data of the template grid to each structure, replacing the > > original pos data (that do not match and of course prohibit using > > sourceststatistics and sourcegrandaverage). When trying to do > > either a source grand average or a sourcestatistics at the > > multisubject level I get the same error: > > > > subscripted assignment dimension mismatch > > dat(:,i) = tmp(:); > > > > Error in ==> sourcegrandaverage at 173 > > > > > > The corresponding lines of code in sourcegrandaverage are: > > > > % get the source parameter from each input source reconstruction > > % get the inside parameter from each input source reconstruction > > for i=1:Nsubject > > % TODO this function should use parameterselection > > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > > else > > tmp = getsubfield(varargin{i}, cfg.parameter); > > end > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > > > I get an identical error when using sourcestatistics at the > > multisubject level. > > The variable dat(:,i) is created like this: > > dat = zeros(Nvoxel, Nsubject) > > > > > > I suspect that somehow trying to use the 'stat' instead of the > > power parameter is a problem (TODO?) or that Nvoxel somehow differs > > over the various subjects ?? > > > > Any advice on what to try and test further would very much > > appreciated. > > > > Thanks in advance, > > 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/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/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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 15:04:43 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 14:04:43 +0000 Subject: Problem running source grand average a nd source statistics In-Reply-To: <823395519@web.de> Message-ID: Hi Michael, > stat: [3297x1 double] This indicates that your singlesubjects are indeed sparsified, so that when you getsubfield this guy, you end up with fewer data-points than expected (which is Nvoxel==prod(dim)). Does this give you enough guidelines to fix it? JM On Nov 5, 2008, at 1:50 PM, Michael Wibral wrote: > Dear Ingrid, dear Jan-Mathijs > > I guess Ingrid is indeed correct, as all my datasets have the same > dimension of the stat field and of the inside/outside fields. I was > actually also supplying the dim field from the template to all > datasets, so the product of dims' should be the same everywhere, > but that hasn't really solved the problem. The length of the inside > field is 3297, the outside field is 3129, their sum is 6426 which > is identical to the product of dimensions of the template grid > which are 17 x 21 x 18 =6426. So I am really a bit puzzled here... > > Anyway, here's the code I use, maybe someone a really stupid error, > that I simply overlooked: > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % FIRST I prepare a file with the data and the settings for the > statistics that is later read in again: > % datapath = '/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/ > DICSBeamformingMW200808/Stats/'; > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > DesignData1 = { > 'ABA04_Up_StatSources.mat' > 'IFS20_Up_StatSources.mat'; > 'IKE28_Up_StatSources.mat'; > 'JHA07_Up_StatSources.mat'; > 'JPA05_Up_StatSources.mat'; > 'MKA21_Up_StatSources.mat'; > 'MMA07_Up_StatSources.mat'; > 'PSS16_Up_StatSources.mat'; > 'SNI05_Up_StatSources.mat'; > 'UWA31_Up_StatSources.mat'; > > }; > > DesignData2 = { > 'ABA04_In_StatSources.mat'; > 'IFS20_In_StatSources.mat'; > 'IKE28_In_StatSources.mat'; > 'JHA07_In_StatSources.mat'; > 'JPA05_In_StatSources.mat'; > 'MKA21_In_StatSources.mat'; > 'MMA07_In_StatSources.mat'; > 'PSS16_In_StatSources.mat'; > 'SNI05_In_StatSources.mat'; > 'UWA31_In_StatSources.mat'; > > }; > > % The statistics configuration > cfg = []; > nSubjects = min(length(DesignData1),length(DesignData2)); > a = [1:nSubjects]; > b = ones(1,nSubjects); > cfg.design = [a a; b (2*b)]; > cfg.ivar = 2; % independent variable: condition > cfg.uvar = 1; % subjects > cfg.method = 'montecarlo'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.01; > cfg.alpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.numrandomization = 500; %2000; > cfg.threshold = 0.01; > cfg.parameter = 'stat'; > cfg.statistic = 'depsamplesT'; > > % create output file > OutFileName = strcat(datapath,'DesignStat2008_11_04.mat'); > save(OutFileName, 'DesignData1', 'DesignData2', 'cfg', 'datapath'); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % SECOND I read in this file and the template and try to perform > grandaveraging and sourcestatistics at the second level: > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > function [] = StatisticsDICS(DesignStatLCMVFile); > > > template = load('/data/home1/ctillman/data/ > MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Grids/ > MNItemplate_231008_-1p5iws.mat'); > Nx = length(template.template_grid.xgrid) > Ny = length(template.template_grid.ygrid) > Nz = length(template.template_grid.zgrid) > > load(DesignStatLCMVFile); % contains datapath, DesignData1, > DesignData2, cfg > > % Load Data from DesignData1,2 automatically ensuring matching sizes > % please ensure that data pairs are OK if using paired statistics ! > > > for i = 1:min(length(DesignData1),length(DesignData2)) > m=strcat('loading dataset#:', num2str(2*i-1)); > disp(m); > fullname1 = strcat(datapath,DesignData1{i,1}); > Data1{i} = load(fullname1); > m=strcat('loading dataset#:', num2str(2*i)); > disp(m); > fullname2 = strcat(datapath,DesignData2{i,1}); > Data2{i} = load(fullname2); > end > > % Fixing the structure properties > > for l = 1:size(Data1,2) > > Data1{l}.SourceStat.xgrid = template.template_grid.xgrid; > Data1{l}.SourceStat.ygrid = template.template_grid.ygrid; > Data1{l}.SourceStat.zgrid = template.template_grid.zgrid; > Data1{l}.SourceStat.dim = [Nx Ny Nz]; > Data1{l}.SourceStat.pos = template.template_grid.pos; > Data1{l}.SourceStat.inside = template.template_grid.inside; > Data1{l}.SourceStat.outside = template.template_grid.outside; > Data1{l} = Data1{l}.SourceStat; > > > Data2{l}.SourceStat.xgrid = template.template_grid.xgrid; > Data2{l}.SourceStat.ygrid = template.template_grid.ygrid; > Data2{l}.SourceStat.zgrid = template.template_grid.zgrid; > Data2{l}.SourceStat.dim = [Nx Ny Nz]; > Data2{l}.SourceStat.pos = template.template_grid.pos; > Data2{l}.SourceStat.inside = template.template_grid.inside; > Data2{l}.SourceStat.outside = template.template_grid.outside; > Data2{l} = Data2{l}.SourceStat; > > end > > % prepare the statistics by computing the grandaverage with individual > % subject data retained > % Compute grand average for Condition 1 and 2 > cfgGA = []; > cfgGA.keepindividual = 'yes'; > cfgGA.parameter='stat'; > % create command strings for the computaion: > commandstr1 = strcat ('DataGA1', '=sourcegrandaverage(cfgGA'); > commandstr2 = strcat ('DataGA2', '=sourcegrandaverage(cfgGA'); > > for l = 1 : length(Data1) > commandstr1 = strcat(commandstr1, ',Data1{', num2str(l) , '}'); > commandstr2 = strcat(commandstr2, ',Data2{', num2str(l) , '}'); > end > % finalize command strings > commandstr1=strcat(commandstr1,');') > commandstr2=strcat(commandstr2,');') > eval(commandstr1) % yields DataGA1; > eval(commandstr2) % yields DataGA2; > > clear Data1; clear Data2; % no longer needed we now have DataGA1,2 > > %SourceStatsitics cfg is known from the design file! > sourceStat = sourcestatistics(cfg, DataGA1, DataGA2); > OutFilename = ... > strcat(datapath, > 'SourceStatisticsLCMV_denoisedDataAndNewGrids_1000rand_',DesignData1 > {i,1}(7:end-4),'_calpha',num2str(cfg.clusteralpha), > '_alpha_',num2str(cfg.alpha),'.mat'); > save(OutFilename, 'sourceStat'); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > %%%%%%%%%%%%%%%%%%% > > > Here's the inforamtion from the datasets and the template: > > Information of a dataset after processing/preparing for > sourcegrandaverage: > > > stat: [3297x1 double] > df: 134 > critval: [-1.9778 1.9778] > prob: [3297x1 double] > mask: [3297x1 logical] > dim: [17 21 18] > inside: [1x3297 double] > outside: [1x3129 double] > pos: [6426x3 double] > cfg: [1x1 struct] > xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80] > ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 > 10 20 30 40 50 60 70 80] > zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80 90] > > Information of the template: > xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] > ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 > 10 20 30 40 50 60 70 80] > zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80 90] > dim: [17 21 18] > pos: [6426x3 double] > inside: [1x3297 double] > outside: [1x3129 double] > > The onlz thing that I see varying fron dataset to dataset is the df > field. > > Any help appreciated, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Ingrid Nieuwenhuis" >> Gesendet: 05.11.08 14:02:04 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] Problem running source grand average and >> source statistics > > >> Dear Michael and Jan-Mathijs, >> >> If the same procedure is followed as on the wiki, the inside of >> the template >> grid is copied to the single subjects, so by definition also the >> 'sparsified' single subjects sources should all have the same >> amount of >> (inside) voxels. So point 2 J-M raised can't be it, point 1 could >> well be: >> Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and >> Nvoxels is >> the product of the dim. >> >> Best Ingrid >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] >> On Behalf >> Of jan-mathijs schoffelen >> Sent: Wednesday, November 05, 2008 10:20 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Problem running source grand average and >> source >> statistics >> >> Dear Michael, >> >> I agree with you that a likely cause is that the Nvoxel (which is >> based on the dimensionality of the first singlesubject-source in the >> input) varies across subjects. However, this would be strange, >> because you use the same dipole grid for all subjects. On the other >> hand: could it be that you 'sparsified' the single subjects? Each >> subject could have a slightly different number of 'inside' positions. >> This obviously leads to problems: >> 1 because the Nvoxel is incorrect in the first place (it's the >> product of the dim, so the input is assumed to be full 3D, or a >> linear array with all outside voxels present (either as nans or zeros >> or whichever number you fancy). >> 2 because the length of the array per subject varies. >> >> Hope this helps, >> >> Jan-M >> >> >> >> On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: >> >>> Dear list users, >>> >>> I am having a problem running, source grandaverage and source >>> statistics (over multiple subjects) on the output of >>> soucrestatistictics (from multiple trials in single subjects). >>> >>> I ran first sourceanalysis supplying the backwads warped grids (as >>> described in the wiki) to compute filters. Then I ran source >>> analysis again to extract the single trial source images and the >>> ran sourcestatistitics on this to get the single subject >>> statistical images - all this runs fine. I then supply the pos (and >>> dim) data of the template grid to each structure, replacing the >>> original pos data (that do not match and of course prohibit using >>> sourceststatistics and sourcegrandaverage). When trying to do >>> either a source grand average or a sourcestatistics at the >>> multisubject level I get the same error: >>> >>> subscripted assignment dimension mismatch >>> dat(:,i) = tmp(:); >>> >>> Error in ==> sourcegrandaverage at 173 >>> >>> >>> The corresponding lines of code in sourcegrandaverage are: >>> >>> % get the source parameter from each input source reconstruction >>> % get the inside parameter from each input source reconstruction >>> for i=1:Nsubject >>> % TODO this function should use parameterselection >>> if issubfield(varargin{i}, ['avg.' cfg.parameter]) >>> tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); >>> else >>> tmp = getsubfield(varargin{i}, cfg.parameter); >>> end >>> dat(:,i) = tmp(:); >>> tmp = getsubfield(varargin{i}, 'inside'); >>> inside(tmp,i) = 1; >>> end >>> >>> I get an identical error when using sourcestatistics at the >>> multisubject level. >>> The variable dat(:,i) is created like this: >>> dat = zeros(Nvoxel, Nsubject) >>> >>> >>> I suspect that somehow trying to use the 'stat' instead of the >>> power parameter is a problem (TODO?) or that Nvoxel somehow differs >>> over the various subjects ?? >>> >>> Any advice on what to try and test further would very much >>> appreciated. >>> >>> Thanks in advance, >>> 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/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/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/ >> 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/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/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Wed Nov 5 16:13:58 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Wed, 5 Nov 2008 16:13:58 +0100 Subject: Problem running a BEM model for EEG Message-ID: Hi Fieldtrippers, In order to make a sourceplot for EEG data, I've been trying to create a BEM model. Using the example script on http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:examples:create_bem_headmodel_for_eeg , I get the following error. ??? Error using ==> spm_slice_vol Wrong sized dim. Error in ==> spm_read_vols at 35 Y(:,:,p,i) = spm_slice_vol(V(i),spm_matrix([0 0 p]),V(i).dim(1:2),0); Error in ==> read_fcdc_mri at 107 img = spm_read_vols(hdr); Error in ==> bemtest at 14 mri = read_fcdc_mri('t1_icbm_normal_1mm_pn0_rf0.mnc'); Recently, I did add the following file "spm_slice_vol.mexw32" (from the updated spm2.rar) to the spm2 dir as matlab did not recognise the spm_slice_vol.dll library. Is anyone familiar with this problem or does one know how to solve it? And yes; I do have the 't1_icbm_normal_1mm_pn0_rf0.mnc' file. Regards, Arjen ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From m.vanelk at DONDERS.RU.NL Wed Nov 5 17:08:18 2008 From: m.vanelk at DONDERS.RU.NL (Michiel van Elk) Date: Wed, 5 Nov 2008 17:08:18 +0100 Subject: error in prepare_leadfield Message-ID: Hi there, On the basis of the standar BEM model that is available on the Fieldtrip website I tried to prepare the grid on the basis of the standard electrode positions. The 'prepare_leadfield' seems to run fine, but after a couple of hours I get the following error message (note that I removed the 'computing leadfield' statements): selected 60 electrodes projecting electrodes on skin surface combining electrode transfer and system matrix 791211 dipoles inside, 7215640 dipoles outside brain making tight grid 791211 dipoles inside, 692565 dipoles outside brain ??? SWITCH expression must be a scalar or string constant. Error in ==> progress at 94 switch t Error in ==> prepare_leadfield at 236 progress('close'); Does someone have a clue what could have gone wrong in this analysis? I used the following cfg settings (e.g. is it correct to convert the elec.pnt from cm to mm?) cfg = []; cfg.elec = GA_CSD_ANIMAL.elec; cfg.elec.pnt = cfg.elec.pnt*10;%convert from cm to mm! cfg.vol = vol; cfg.reducerank = 2; cfg.channel = {'EEG'}; cfg.grid.resolution = 1; [grid] = prepare_leadfield(cfg); Yours, Michiel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From k.nazarpour at BHAM.AC.UK Thu Nov 6 15:20:31 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Thu, 6 Nov 2008 15:20:31 +0100 Subject: Post-doc Research Fellow Position at Prism Lab, University of Birmingham Message-ID: Please contact Prof Chris Miall regarding the below vacancy if you are interested in joining us! Dear colleagues I have a 6-8 month post-doc position that will be available from January 2009, and would like to recruit either someone with skills in EEG signals analysis to extend work we are doing on using EEG for brain-computer interfaces, or alternatively to develop software for experiments using a pneumatic fMRI-compatible robot arm, and run an fMRI experiment on human motor control. So the right person would have skills in EEG, fMRI or C++ programming. Details of the post should be on jobs.ac.uk very shortly, and are also on the Birmingham vacancies web pages, hidden away out of sight (yes, I realise that's not the best way to run a web system advertising jobs, but there you are!) http://www.vacancies.bham.ac.uk/vacancies/vacancySearch.htm using the ID 32737 I'd be grateful if you brought this to the attention of any potential candidates. -- Regards, Chris ---------------------------------------------------------- Professor R.C. Miall Behavioural Brain Sciences Tel +44 121 414 2867 School of Psychology, Fax +44 121 414 4897 University of Birmingham, Mobile: 07815 296483 Edgbaston, Email: r.c.miall at bham.ac.uk Birmingham B15 2TT UK Web: http://prism.bham.ac.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/fcdonders/fieldtrip. From iversen at NSI.EDU Thu Nov 6 19:29:05 2008 From: iversen at NSI.EDU (John Iversen) Date: Thu, 6 Nov 2008 10:29:05 -0800 Subject: source localization given induced spectra In-Reply-To: <99160EC4-B351-4143-AB31-C8447AF15EB8@psy.gla.ac.uk> Message-ID: Dear Jan-Mathijs, Lovely suggestion. This works fine, although I must intervene between the freqanalysis and dipole fit to put the information (I'm using the real part of the cross spectrum) in the correct form. The automatic route calls freq2timelock, which does indeed accept cross spectra, but prepare_freq_matrices seems to expect them to be square, because it chokes on such a 1-d cross spectrum. It seems more geared towards beamformer fitting, which I assume requires the full CSD matrix. I need to look at this further, and may have another question, but just to let you know now thanks for the suggestion. John On Nov 5, 2008, at 1:52 AM, jan-mathijs schoffelen wrote: > Dear John, > > Probably I was a bit rash in answering to your earlier mail and did > not think it through completely. Apologies for that and for any > confusion created. > Let's give it another try: > As you pointed out, induced power can show a somewhat dipolar > topography, but you cannot fit a dipole to this because of the fact > that it is positive all over the place. However, if you would indeed > have some phase information in your topography, showing the ingoing > and outgoing field (MEG), or positive and negative potential (EEG), > one could fit a dipole. I was talking rubbish when suggesting to use > fourierspectra, because it is forbidden to average them across > trials (not actually forbidden, but it does not make sense). > However, it would make sense to average cross-spectral densities > across trials (not the csd's between all channel combinations, but > between a well chosen set of channel pairs). Why would this be the > case? Well, if you cleverly choose your reference signal (I suggest > one of the strong blobs in your dipolar powerspectrum), and you > compute the cross-spectral density between this guy and the rest of > the channels, then you can do business because the csd's represent > the estimated phase-difference between the reference signal and the > rest. The interesting signal (your dipolar field) which is buried in > your single trial data now has a phase of 0 (channels are in the > same blob of the dipolar field) or 180 degrees (channels are in the > opposite blob of the dipolar field) with respect to the reference, > and importantly this is the same for all trials. This means that you > can average the cross-spectral densities across trials to generate a > complex-valued topography. Plotting the real-part (or imaginary > part) of this should lead to a nice dipolar pattern with positive, > and negative values. > As far as I know dipolefitting can deal with cross-spectra as an > input, so my revised approach would be: compute spectrograms and > identify your time-frequency region of interest. Then plot the > topography and compute a sensible reference channel. Then call > freqanalysis again, but with output='powandcsd', and channelcmb = > {'all' 'yourchosenchannel'}. Then try a dipole fit. > > Hope this helps, > > Jan-Mathijs > > > On Nov 4, 2008, at 5:02 PM, John Iversen wrote: > >> Dear Jan-Mathijs, >> >> Thanks for the quick reply. I'm sorry to hear I was right :) >> >> I may misunderstand what you've suggested, but is it not the case >> that if I chose cfg.output='fourier' it will average fourier >> spectra across trials (cares about phase) instead of power spectrum >> (phase blind, as I had been doing). In the end wont I simply get >> the equivalent of the fourier spectrum of the timelock average, >> which is substantially different from the induced spectrum that >> interests me? >> >> In many cases the sensor topography of the induced power looks >> somewhat dipolar, with two power peaks, so I may well try to do a >> fit, but optimizing not on the field but the field power (this >> would require modifying the output of the forward model within >> dipolefitting)--it will not be able to get the polarity of the >> dipole, but should be able to get a location. Maybe? It seems >> possible in principle, but I wonder if anyone has practical >> experience with this. >> >> I feel there should be a way to study this kind of question! >> >> Best, >> >> John >> >> On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: >> >>> Dear John, >>> >>> No, it is not possible to perform source localization on the >>> spectrograms as you define them. You quite rightly point out that >>> a spatial topography of power is always positive, so cannot >>> account for a proper dipolar pattern. However, source localization >>> of induced changes in oscillatory activity is possible. There's >>> actually a nice tutorial on the fieldtrip website: "localizing >>> oscillator sources, using beamformer techniques". >>> Alternatively, you can actually call dipolefitting using frequency >>> data as an input, but this requires either fourier-data, or cross- >>> spectral densities between all channel combinations. Usually the >>> fourier-data is more memory efficient. In this case I would >>> propose a two-step strategy: compute spectrograms to identify your >>> time-frequency region(s) of interest. Then call freqanalysis >>> again, with cfg.output = 'fourier'. Then I would guess that >>> dipolefitting runs through... At least it's worth a try. >>> >>> Yours, >>> >>> Jan-Mathijs >>> >>> >>> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >>> >>>> Hello, >>>> >>>> Is there a way to do source localization on induced spectrograms? >>>> (Induced spectra being the mean of individual trials' power >>>> spectra.) Conceptually I am not sure how this would work, given >>>> that one starts with topographies of real, positive-valued power, >>>> with no phase information, so any dipole fit could be at best >>>> sign-indeterminate.There is no facility within fieldtrip to do >>>> such a thing as far as I can tell (induced spectra were >>>> calculated freqanalysis on multi-trial data and are within >>>> the .powspctrm field of the result, which is not handled by >>>> freq2timelock, and thus cannot feed any of the localization >>>> routines). >>>> >>>> What is of actual interest are task-related fluctuations of the >>>> power around a (much larger, and topographically varied) >>>> baseline. Is there a way to say where in the brain are the >>>> (presumed) subset of neural sources that vary in power with time? >>>> >>>> Thanks, >>>> >>>> John >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >>>> and 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/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/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/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/fcdonders/fieldtrip. From m.vanelk at DONDERS.RU.NL Fri Nov 7 11:19:40 2008 From: m.vanelk at DONDERS.RU.NL (Michiel van Elk) Date: Fri, 7 Nov 2008 11:19:40 +0100 Subject: error in prepare_leadfield Message-ID: problem solved: the cfg.elec definition was incorrect. Now it seems to work... ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Sat Nov 8 10:16:50 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Sat, 8 Nov 2008 10:16:50 +0100 Subject: No subject Message-ID: Dear fieldtrippers, I am having a hard time trying to compute the source interpolation. For source analysis I use: cfg.xgrid = 'auto' cfg.ygrid = 'auto' cfg.zgrid = 'auto' which later results in: source.dim = [length(cfg.xgrid) length(cfg.ygrid) length(cfg.zgrid)]; or source.dim = [4 4 4]; the problem here is that sourceinterpolate calls the function checkdata where @ line 550: data.transform = pos / ind; here pos is a 4000x4 array and ind is a 64x4 array because ind is computed as following: xgrid = 1:data.dim(1); ygrid = 1:data.dim(2); zgrid = 1:data.dim(3); [x y z] = ndgrid(xgrid, ygrid, zgrid); ind = [x(:) y(:) z(:)]; so of course I get the error message that the array dimensions do not match for division because you cannot divide a 4000x4 array by a 64x4 array. so then I tried: source.dim = [4 4 250]; which results in the dimensions 4000x4 for ind and circumvents the error message.However, I guess that besides diminishing my personal frustration this does not really solve the problem. So if anyone out there has an idea or a suggestion I would be very, very, very thankful. Have nice week end, Frederic _________________________________________________________________ Messenger Games: Mit Freunde zusammen im Messenger spielen! http://redirect.gimas.net/?n=M0811xGamesDE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at HOTMAIL.DE Sat Nov 8 11:22:45 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Sat, 8 Nov 2008 11:22:45 +0100 Subject: error during source interpolation Message-ID: Dear fieldtrippers, I am having a hard time trying to compute the source interpolation. For source analysis I use: cfg.xgrid = 'auto' cfg.ygrid = 'auto' cfg.zgrid = 'auto' which later results in: source.dim = [length(cfg.xgrid) length(cfg.ygrid) length(cfg.zgrid)]; or source.dim = [4 4 4]; the problem here is that sourceinterpolate calls the function checkdata where @ line 550: data.transform = pos / ind; here pos is a 4000x4 array and ind is a 64x4 array because ind is computed as following: xgrid = 1:data.dim(1); ygrid = 1:data.dim(2); zgrid = 1:data.dim(3); [x y z] = ndgrid(xgrid, ygrid, zgrid); ind = [x(:) y(:) z(:)]; so of course I get the error message that the array dimensions do not match for division because you cannot divide a 4000x4 array by a 64x4 array. so then I tried: source.dim = [4 4 250]; which results in the dimensions 4000x4 for ind and circumvents the error message.However, I guess that besides diminishing my personal frustration this does not really solve the problem. So if anyone out there has an idea or a suggestion I would be very, very, very thankful. Have nice week end, Frederic _________________________________________________________________ Hotmail to go! Hol' Dir Hotmail aufs Handy! http://windowslivemobile.msn.com/BrowserServiceHotmail.aspx?lang=de-de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From shehsu at INDIANA.EDU Tue Nov 11 05:37:37 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Mon, 10 Nov 2008 23:37:37 -0500 Subject: coherence and phase locking values Message-ID: Dear Users, I have a question regarding the differences among the following phase-synchronization measures for channel pairs. 1. coherence, specified in the fieldtripbox, also called ERLCOH in the EEGlab toolbox 2.ERPCOH, specified in the EEGlab toolbox, also for computing event-related coherence between two channels (for formula, please see Journal of Neuroscience Methods 134(2004),9-21, p9). 3. Phase locking value, defined by Lachaux(1999). I was wondering if someone could direct me to the pros and cons of each measure. Many thanks, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From spike377 at KOREA.COM Wed Nov 12 00:37:26 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Wed, 12 Nov 2008 08:37:26 +0900 Subject: coherence and phase locking values Message-ID: An HTML attachment was scrubbed... URL: From pacodiaz at UB.EDU Wed Nov 12 15:59:47 2008 From: pacodiaz at UB.EDU (Paco Diaz) Date: Wed, 12 Nov 2008 15:59:47 +0100 Subject: Power Units in Freqanalysis Message-ID: Hi all, I have performed a time frequency analysis on the evoked activity for EEG data whose units where (of course) in microVolts. It seems that it all work fine, but I would appreciate some help to understand my results (my plot actually). Below you can see the configuration structure that I have used. Well, the question is as follows, which are the units for the z-axis (color code)?? I think that they should be (microV)^2 but the values I'm obtainning are very low when compared with the literature, my maximum value is 8*10^-3 but i have found in the literature values between 8 and 70 (microV)^2. Is there a scale factor that I am missing or is it all simply wrong?? cfg=[]; cfg.method='tfr'; cfg.output='pow'; cfg.foi=[30:0.5:40]; cfg.width=7; cfg.gwidth=5; tfr_data=freqanalysis(cfg,data); Thank you, Paco. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Wed Nov 12 16:26:51 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Wed, 12 Nov 2008 16:26:51 +0100 Subject: Power Units in Freqanalysis Message-ID: Dear Paco, Power is normally given in microV^2/Hz. The amplitude (microV) of the EEG signal can indeed be around 70mV. Nevertheless, your maximum value of 8*10^-3 (mV^2/Hz?) seems quite low. How have you acquisitioned your data? Have you used the get_data script in matlab? If so, my first impression would be that you have forgotten to undo the amplification. Divide the data by the amplification. Secondly, your data might be in voltages and not microvoltages. In matlab: %undo amplification with factor . Display in microvolts (1e6). data = (eegdata.*1e6)./; If you do not use matlab for data acquisition you may forgot all that is written. ;) Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Paco Diaz Verzonden: wo 11/12/2008 3:59 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] Power Units in Freqanalysis Hi all, I have performed a time frequency analysis on the evoked activity for EEG data whose units where (of course) in microVolts. It seems that it all work fine, but I would appreciate some help to understand my results (my plot actually). Below you can see the configuration structure that I have used. Well, the question is as follows, which are the units for the z-axis (color code)?? I think that they should be (microV)^2 but the values I'm obtainning are very low when compared with the literature, my maximum value is 8*10^-3 but i have found in the literature values between 8 and 70 (microV)^2. Is there a scale factor that I am missing or is it all simply wrong?? cfg=[]; cfg.method='tfr'; cfg.output='pow'; cfg.foi=[30:0.5:40]; cfg.width=7; cfg.gwidth=5; tfr_data=freqanalysis(cfg,data); Thank you, Paco. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From julian.keil at GMAIL.COM Thu Nov 13 10:23:32 2008 From: julian.keil at GMAIL.COM (Julian Keil) Date: Thu, 13 Nov 2008 10:23:32 +0100 Subject: Planar Gradiend for bti148 Message-ID: Good morning, has anyone ever computed the planar gradient for a bti 148 - system? When I try to do this, the megplanar.m function stops because the bti 148 system is not supported. Simply adding 'bti148' to line 171 does not solve this, as the distance in line 238 cannot be computed. Does anyone have hints on how to solve this? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Thu Nov 13 10:43:56 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Thu, 13 Nov 2008 09:43:56 +0000 Subject: Planar Gradiend for bti148 In-Reply-To: <5D507F45-56D6-4A72-89E8-6AD4BED8B256@gmail.com> Message-ID: Hi Julian, If you use Fieldtrip to read your data from the raw data file (so no .m4d, or .xyz as intermediate steps) there should be information about the location of the magnetometer coils in data.grad. I am not exactly sure what happens when you import your data into fieldtrip using an intermediate data-representation. Yours, Jan-Mathijs On Nov 13, 2008, at 9:23 AM, Julian Keil wrote: > Good morning, > > has anyone ever computed the planar gradient for a bti 148 - system? > When I try to do this, the megplanar.m function stops because the > bti 148 system is not supported. Simply adding 'bti148' to line 171 > does not solve this, as the distance in line 238 cannot be computed. > > Does anyone have hints on how to solve this? > > Thanks a lot > > Julian > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > 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/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.hartmann at UNI-KONSTANZ.DE Thu Nov 13 11:32:06 2008 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Thu, 13 Nov 2008 11:32:06 +0100 Subject: eeg cabin manufactures Message-ID: hi, as we are planning to build a brand new eeg-lab around our new amplifiers, we are looking for companies building eeg-cabins. has someone of you had some experiences with a company and might suggest a good one to me? thanks in advance, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Nov 13 21:59:53 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 13 Nov 2008 21:59:53 +0100 Subject: website moved to another server, hopefully nothing changed Message-ID: Dear FT users, The FieldTrip website has just been migrated to a new webserver. You still should be able to access it at http://www.ru.nl/neuroimaging/fieldtrip , which is the page that you should refer to in publications or on your own website if you want to link to FieldTrip. The actual low- level server of the wiki has another address (now fcdonders.ruhosting.nl, used to be www2.ru.nl), but you preferably should not use the low-level address, nor use deep links into the wiki. The low-level address and deep links are not guaranteed to work in the future, but we’ll try to keep the official address at http://www.ru.nl/neuroimaging/fieldtrip . Please let me know if you observe any unusual behaviour of the website. best regards, Robert ----------------------------------------------------------- Robert Oostenveld 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 ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Nov 13 22:57:19 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 13 Nov 2008 22:57:19 +0100 Subject: Planar Gradiend for bti148 In-Reply-To: <5D507F45-56D6-4A72-89E8-6AD4BED8B256@gmail.com> Message-ID: Hi Julian, A quick glance at the megrealign code shows that there is some hard- coded dependency on the ctf gradiometer definition, where only the bottom coils should be used. However, that should not be a limitation for bti148. Apparently Jan-Mathijs already has got it to work on bti248. I have made two changes (one for checkdata, the other for ensuring that grad.unit is known). Please try with attached version, this will be in the fieldtrip release on the ftp server tomorro evening. best regards, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: megplanar.m Type: application/octet-stream Size: 22013 bytes Desc: not available URL: -------------- next part -------------- On 13 Nov 2008, at 10:23, Julian Keil wrote: > Good morning, > > has anyone ever computed the planar gradient for a bti 148 - system? > When I try to do this, the megplanar.m function stops because the > bti 148 system is not supported. Simply adding 'bti148' to line 171 > does not solve this, as the distance in line 238 cannot be computed. > > Does anyone have hints on how to solve this? > > Thanks a lot > > Julian > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > 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/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 14 10:10:20 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 14 Nov 2008 10:10:20 +0100 Subject: error in prepare_leadfield In-Reply-To: Message-ID: Hi Michiel, The progress function is used to print the progress (or to make a graphical progress bar). Matlab has the waitbar function, but that is very slow if you update it every iteration. E.g. consider 10000 iterations, and the width of the graphical waitbar on your screen only being 60 pixels. Updating the waitbar on every iteration makes it very slow, so it only updates every 1% increase. This is implemented using persistent variables, i.e. the progress function remembers the state of the progress over subsequent calls. It seems to me in the error that you report below, that the persistent variable was somehow cleared in between two calls. That happens if you clear the function (see "help clear") or when matlab detects that teh function has changed. Perhaps your fieldtrip installation was updated while matlab was running? That may (actually should) happen automatically if you run it from home/common on the FCDC. The progress function does not change very often, but recently I did make some change to it (and that will have been autoupdated on home/common), which may explain the problem. I suggest you simply try again. Robert On 5 Nov 2008, at 17:08, Michiel van Elk wrote: > The 'prepare_leadfield' seems to run fine, but after a couple of hours > I get the following error message (note that I removed the 'computing > leadfield' statements): > > selected 60 electrodes > projecting electrodes on skin surface > combining electrode transfer and system matrix > 791211 dipoles inside, 7215640 dipoles outside brain > making tight grid > 791211 dipoles inside, 692565 dipoles outside brain > ??? SWITCH expression must be a scalar or string constant. > > Error in ==> progress at 94 > switch t > > Error in ==> prepare_leadfield at 236 > progress('close'); > > Does someone have a clue what could have gone wrong in this > analysis? I > used the following cfg settings (e.g. is it correct to convert the > elec.pnt from > cm to mm?) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From norbert.jausovec at UNI-MB.SI Tue Nov 18 01:01:48 2008 From: norbert.jausovec at UNI-MB.SI (Norbert Jausovec) Date: Tue, 18 Nov 2008 01:01:48 +0100 Subject: downolading and starting Message-ID: I have a problem downloading the fieldtrip toolbox. I was able to download only the lite version. After seting the path in Matlab, the toolbox is not recognized by matlab and I can not start it. Any suggestions what might be the reason. I am using Matlab R2007b on windows XP regards norbert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Tue Nov 18 13:00:18 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Tue, 18 Nov 2008 13:00:18 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: I am trying to run on my PC the Matlab script http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: documentation:examples:create_bem_headmodel_for_eeg but Matlab returns the error message: Undefined function or method 'strel_bol' On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and SPM2 . Any help is appreciated. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Tue Nov 18 14:17:49 2008 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Tue, 18 Nov 2008 13:17:49 +0000 Subject: Ph.D. in EEG/fMRI Message-ID: A Ph.D. position in EEG/fMRI is available at the University of Dundee, under the direction of Douglas Potter. The project is funded by SINAPSE, the Scottish Imaging Network. Title: Spatial and temporal imaging of attention reorienting mechanisms First supervisor: Dr Douglas Potter School of Psychology, University of Dundee Email: d.d.potter at dundee.ac.uk phone: 01382 384632 Co-supervisors: Dr Cyril Pernet Division of Clinical Neurosciences, SFC Brain Imaging Centre Western General Hospital, University of Edinburgh Email: cyril.pernet at ed.ac.uk phone: 01315373661 Dr Guillaume Rousselet Centre for Cognitive Neuroimaging (CCNi) & Department of Psychology University of Glasgow Email: g.rousselet at psy.gla.ac.uk phone: 01413306652 A description of the project and an application form are attached, ************************************************************************************ Guillaume A. Rousselet, Ph.D. Lecturer Centre for Cognitive Neuroimaging (CCNi) Department of Psychology Faculty of Information & Mathematical Sciences (FIMS) University of Glasgow 58 Hillhead Street Glasgow, UK G12 8QB The University of Glasgow, charity number SC004401 http://web.me.com/rousseg/GARs_website/ 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 "no test based upon a theory of probability can by itself provide any valuable evidence of the truth or falsehood of a hypothesis. But we may look at the purpose of tests from another viewpoint. Without hoping to know whether each separate hypothesis is true or false, we may search for rules to govern our behaviour with regard to them, in following which we insure that, in the long run of experience, we shall not often be wrong." Neyman J & Pearson E, 1933 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SINAPSE_PhD_proposal_EEG-fMRI-Stats.pdf Type: application/pdf Size: 184328 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.b.dijkman at STUDENT.UTWENTE.NL Tue Nov 18 21:52:18 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Tue, 18 Nov 2008 21:52:18 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: I have been playing with that same script as well, the reason Matlab returns an error is because the 'strel_bol' function is not a standard Matlab function. When I was busy with it I figured it probably was a function made by the author of that Fieldtrip example. I was hoping for a response to your question, because I was curious myself. I do know the function 'strel' does exist, to make a strucural element. So my gues is 'strel_bol' is supposed to make a 'sphere' or perhaps 'disk' structural element (bol = sphere in Dutch). Regards, Thomas Dijkman ________________________________ From: FieldTrip discussion list on behalf of Avni Pllana Sent: Tue 11/18/2008 1:00 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Matlab script: Create BEM headmodel for EEG I am trying to run on my PC the Matlab script http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: documentation:examples:create_bem_headmodel_for_eeg but Matlab returns the error message: Undefined function or method 'strel_bol' On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and SPM2 . Any help is appreciated. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Nov 19 12:00:50 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 12:00:50 +0100 Subject: problems with DICS Message-ID: hi, i'm not sure whether the following question is a fieldtrip-related question or a rather general question. we use a 148 sensor BTI system. since a couple of days we're struggling with a data-set in which we'd like to localize auditory cortical alpha desynchronizations. on a sensor level they are clearly observable (see attached Pitcure 2). however when running DICS it seems like the brain is more or less increasing power post-stimulus. what makes me wonder is that it's exactly the same script (i could provide more details of course) which worked very successfully previously. our notion was initially that something is weird with the leadfield. but -illegally- testing it with a leadfield from another subject where things worked out basically gave more or less the same picture. now we assume that something is fishy with the data itself, that is not clearly observable when looking at the data on a trial-by- trial basis, leading to bad spatial filters. any suggestions how this could be diagnosed? are there any other suggestions? or has anybody had similar problems lately? cheers, 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 2.png Type: image/png Size: 122154 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 1.png Type: image/png Size: 137882 bytes Desc: not available URL: From norbert.jausovec at UNI-MB.SI Wed Nov 19 14:18:54 2008 From: norbert.jausovec at UNI-MB.SI (Norbert) Date: Wed, 19 Nov 2008 14:18:54 +0100 Subject: Starting fieldtrip Message-ID: Hi, I am new to fieldtrip. I have downloaded the ziped file, set path in Matlab R2007b on Windows XP, but do not know how to start Fieldtrip, nothing works. Could someone provide me some advice. Regards Norbert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 19 14:28:09 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 19 Nov 2008 13:28:09 +0000 Subject: Starting fieldtrip In-Reply-To: <000601c94a49$5f0f5c40$1d2e14c0$@jausovec@uni-mb.si> Message-ID: Hi Norbert, Could you be a bit more specific on 'nothing works'? Assuming you correctly unzipped the downloaded file, I would advise you to follow the suggestions on the getting started section on the fieldtrip-webpage. Yours, Jan-Mathijs On Nov 19, 2008, at 1:18 PM, Norbert wrote: > Hi, > > I am new to fieldtrip. I have downloaded the ziped file, set path > in Matlab > R2007b on Windows XP, but do not know how to start Fieldtrip, > nothing works. > Could someone provide me some advice. > > Regards > > Norbert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 19 14:30:47 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 19 Nov 2008 13:30:47 +0000 Subject: Fwd: [FIELDTRIP] problems with DICS Message-ID: Begin forwarded message: > From: jan-mathijs schoffelen > Date: November 19, 2008 1:13:22 PM BST > To: nathanweisz at me.com > Subject: Re: [FIELDTRIP] problems with DICS > > Dear Nathan, > > Are you using precomputed leadfields? The reason I ask is because > there could be a discrepancy between the assumed order of the coils > in your leadfields, and the coil-order in your data. The issue with > the BTI system is that the channel order is somewhat erratic > (references ending up all over the place, and no nice alphabetical > ordering of the magnetometer coils). Prepare_leadfield (the low- > level function which computes the leadfield) just computes the > solution to the forward model for the list of sensors in the input, > the order of which is specified by the order in the data, or by the > order in the gradiometer structure, if no data is supplied. > I recently (about a month ago) made a change in bti2grad, which > changed the order of the coils in the grad-structure. Initially, I > thought it would be nice to have them ordered alphabetically, but > this led to problems later on when using precomputed leadfields > (and making implicit assumptions about the matching sensor order in > both data and gradiometers). It could be that your problems are > related to this. > On the other hand: could this be replicated in other datasets? How > many trials is your csd-matrix based on? Isn't there any hint of a > bilateral temporal decrease in alpha activity? > > Yours > > Jan-Mathijs > > > > On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: > >> hi, >> >> i'm not sure whether the following question is a fieldtrip-related >> question or a rather general question. >> >> we use a 148 sensor BTI system. >> since a couple of days we're struggling with a data-set in which >> we'd like to localize auditory cortical alpha desynchronizations. >> on a sensor level they are clearly observable (see attached >> Pitcure 2). however when running DICS it seems like the brain is >> more or less increasing power post-stimulus. >> what makes me wonder is that it's exactly the same script (i could >> provide more details of course) which worked very successfully >> previously. our notion was initially that something is weird with >> the leadfield. but -illegally- testing it with a leadfield from >> another subject where things worked out basically gave more or >> less the same picture. now we assume that something is fishy with >> the data itself, that is not clearly observable when looking at >> the data on a trial-by-trial basis, leading to bad spatial >> filters. any suggestions how this could be diagnosed? >> >> are there any other suggestions? or has anybody had similar >> problems lately? >> >> cheers, >> 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Toffanin at RUG.NL Wed Nov 19 14:35:13 2008 From: P.Toffanin at RUG.NL (P.Toffanin) Date: Wed, 19 Nov 2008 14:35:13 +0100 Subject: Starting fieldtrip In-Reply-To: <000601c94a49$5f0f5c40$1d2e14c0$@jausovec@uni-mb.si> Message-ID: Hi Norbert, I'm not sure I'm getting this right, and maybe I'm making a big mistake, but fieldtrip is a collection of functions, it does not have a GUI like EEGlab. It works exactly as if you would write a function in matlab: [output1, output2] = function(input1, input2); Does this help you in any way? Did you try to follow one of the tutorials, to see if there is a problem with the function calls maybe? Best Paolo On Wed, 19 Nov 2008 14:18:54 +0100 Norbert wrote: > Hi, > > I am new to fieldtrip. I have downloaded the ziped file, set path in >Matlab > R2007b on Windows XP, but do not know how to start Fieldtrip, >nothing works. > Could someone provide me some advice. > > Regards > > Norbert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Nov 19 15:07:31 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 15:07:31 +0100 Subject: problems with DICS In-Reply-To: <2CE4BC91-5101-4F44-A3CA-E60BAFF24D10@psy.gla.ac.uk> Message-ID: hi jan-mathijs, thanks once again for your quick help. it's about 60 trials which was sufficient in the past. the decrease is bilateral, however i can't imagine how this could lead to a more or less pronounced increase after sourceanalysis. in case of a DICS problem wouldn't the decrease just be placed somewhere in between the two spots? the labels in data.label, data.grad.label match. they also have the same order as in the .xyz file from the BTI system. for the sourceanalysis we precompute the leadfield. as a side note we also use predefined grid points so that they are exactly the same within one subject across conditions. one issue that we noticed is that we recalculated a leadfield that we calculated a long time ago and compared the values. they appear not to be exacly the same. when looking at the topographies (forward solution) yieldied by each source, they are similar but not exactly the same. is this possible? I'm attaching a plot. for each dipole i calculated the vector sum over orientations and averaged the energy over sensors. this i did for the old and the newly calculated leadfield. in the plot difference between the two leadfields is shown on y and dipole number on x. here's the code: %% checke tzvetans grid mit neuer FT cd /home/nadia/Matlab/zvetanskopf tvol=load('vol'); %old vol tgrid=load('grid'); %old grid %% cfg=[]; cfg.grid.pos=tgrid.grid.pos; cfg.grid.dim=tgrid.grid.dim; cfg.grid.inside=tgrid.grid.inside; cfg.grid.outside=tgrid.grid.outside; cfg.vol=tvol.vol; cfg.grad=tgrid.grid.cfg.grad; cfg.channel=tgrid.grid.cfg.channel; tgrid.grid2=prepare_leadfield(cfg); %new grid %% for i=1:length(tgrid.grid2.inside) diffLF (i)=mean(sqrt(sum(tgrid.grid.leadfield{tgrid.grid2.inside(i)}.^2,2)))- mean(sqrt(sum(tgrid.grid2.leadfield{tgrid.grid2.inside(i)}.^2,2))); end plot(diffLF) thanks for any input. nathan On 19.11.2008, at 14:13, jan-mathijs schoffelen wrote: > Dear Nathan, > > Are you using precomputed leadfields? The reason I ask is because > there could be a discripancy between the assumed order of the coils > in your leadfields, and the coil-order in your data. The issue with > the BTI system is that the channel order is somewhat erratic > (references ending up all over the place, and no nice alphabetical > ordering of the magnetometer coils). Prepare_leadfield (the low- > level function which computes the leadfield) just computes the > solution to the forward model for the list of sensors in the input, > the order of which is specified by the order in the data, or by the > order in the gradiometer structure, if no data is supplied. > I recently (about a month ago) made a change in bti2grad, which > changed the order of the coils in the grad-structure. Initially, I > thought it would be nice to have them ordered alphabetically, but > this led to problems later on when using precomputed leadfields (and > making implicit assumptions about the matching sensor order in both > data and gradiometers). It could be that your problems are related > to this. > On the other hand: could this be replicated in other datasets? How > many trials is your csd-matrix based on? Isn't there any hint of a > bilateral temporal decrease in alpha activity? > > Yours > > Jan-Mathijs > > > > On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: > >> hi, >> >> i'm not sure whether the following question is a fieldtrip-related >> question or a rather general question. >> >> we use a 148 sensor BTI system. >> since a couple of days we're struggling with a data-set in which >> we'd like to localize auditory cortical alpha desynchronizations. >> on a sensor level they are clearly observable (see attached Pitcure >> 2). however when running DICS it seems like the brain is more or >> less increasing power post-stimulus. >> what makes me wonder is that it's exactly the same script (i could >> provide more details of course) which worked very successfully >> previously. our notion was initially that something is weird with >> the leadfield. but -illegally- testing it with a leadfield from >> another subject where things worked out basically gave more or less >> the same picture. now we assume that something is fishy with the >> data itself, that is not clearly observable when looking at the >> data on a trial-by-trial basis, leading to bad spatial filters. any >> suggestions how this could be diagnosed? >> >> are there any other suggestions? or has anybody had similar >> problems lately? >> >> cheers, >> 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/ >> > -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 1.png Type: image/png Size: 40889 bytes Desc: not available URL: From nathanweisz at MAC.COM Wed Nov 19 16:46:29 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 16:46:29 +0100 Subject: Fwd: [FIELDTRIP] problems with DICS In-Reply-To: <6A219908-E045-4FB2-A67D-BB6CD5ABC445@psy.gla.ac.uk> Message-ID: ok ... we found the problem why the leadfields differ. apparently the older default for cfg.reducerank = 2. newer fieldtrip versions have cfg.reducerank = 3. n On 19.11.2008, at 14:30, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: jan-mathijs schoffelen >> Date: November 19, 2008 1:13:22 PM BST >> To: nathanweisz at me.com >> Subject: Re: [FIELDTRIP] problems with DICS >> >> Dear Nathan, >> >> Are you using precomputed leadfields? The reason I ask is because >> there could be a discrepancy between the assumed order of the coils >> in your leadfields, and the coil-order in your data. The issue with >> the BTI system is that the channel order is somewhat erratic >> (references ending up all over the place, and no nice alphabetical >> ordering of the magnetometer coils). Prepare_leadfield (the low- >> level function which computes the leadfield) just computes the >> solution to the forward model for the list of sensors in the input, >> the order of which is specified by the order in the data, or by the >> order in the gradiometer structure, if no data is supplied. >> I recently (about a month ago) made a change in bti2grad, which >> changed the order of the coils in the grad-structure. Initially, I >> thought it would be nice to have them ordered alphabetically, but >> this led to problems later on when using precomputed leadfields >> (and making implicit assumptions about the matching sensor order in >> both data and gradiometers). It could be that your problems are >> related to this. >> On the other hand: could this be replicated in other datasets? How >> many trials is your csd-matrix based on? Isn't there any hint of a >> bilateral temporal decrease in alpha activity? >> >> Yours >> >> Jan-Mathijs >> >> >> >> On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: >> >>> hi, >>> >>> i'm not sure whether the following question is a fieldtrip-related >>> question or a rather general question. >>> >>> we use a 148 sensor BTI system. >>> since a couple of days we're struggling with a data-set in which >>> we'd like to localize auditory cortical alpha desynchronizations. >>> on a sensor level they are clearly observable (see attached >>> Pitcure 2). however when running DICS it seems like the brain is >>> more or less increasing power post-stimulus. >>> what makes me wonder is that it's exactly the same script (i could >>> provide more details of course) which worked very successfully >>> previously. our notion was initially that something is weird with >>> the leadfield. but -illegally- testing it with a leadfield from >>> another subject where things worked out basically gave more or >>> less the same picture. now we assume that something is fishy with >>> the data itself, that is not clearly observable when looking at >>> the data on a trial-by-trial basis, leading to bad spatial >>> filters. any suggestions how this could be diagnosed? >>> >>> are there any other suggestions? or has anybody had similar >>> problems lately? >>> >>> cheers, >>> 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. > > 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Nov 20 13:08:35 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 20 Nov 2008 13:08:35 +0100 Subject: Matlab script: Create BEM headmodel for EEG In-Reply-To: Message-ID: Dear Thomas, strel_bol is indeed a function from me. Since no proper fieldtrip function relies on it, it is not included in the fieldtrip release. Please find it attached. best regards, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: strel_bol.m Type: application/octet-stream Size: 442 bytes Desc: not available URL: -------------- next part -------------- On 18 Nov 2008, at 21:52, Thomas Dijkman wrote: > I have been playing with that same script as well, the reason Matlab > returns an error is because the 'strel_bol' function is not a > standard Matlab function. When I was busy with it I figured it > probably was a function made by the author of that Fieldtrip > example. I was hoping for a response to your question, because I was > curious myself. > I do know the function 'strel' does exist, to make a strucural > element. So my gues is 'strel_bol' is supposed to make a 'sphere' or > perhaps 'disk' structural element (bol = sphere in Dutch). > > Regards, > > Thomas Dijkman > > > ________________________________ > > From: FieldTrip discussion list on behalf of Avni Pllana > Sent: Tue 11/18/2008 1:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Matlab script: Create BEM headmodel for EEG > > > > I am trying to run on my PC the Matlab script > > http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: > documentation:examples:create_bem_headmodel_for_eeg > > but Matlab returns the error message: Undefined function or > method 'strel_bol' > > On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and > SPM2 . Any help is appreciated. > > Best regards, > Avni > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 20 14:33:41 2008 From: marco.sperduti at UPMC.FR (Marco Sperduti) Date: Thu, 20 Nov 2008 14:33:41 +0100 Subject: Sources' reconstruction Message-ID: Dear all, I'm new with Fieldtrip, so i have some questions. I would like to do the sources' reconstruction of my time-frequency data (obtained by another software). I've allready done the preprocessing, time-frequency analysis for all subjects and now i have a file containing the average across subjects. How can i use that file in fieldtrip for the source reconstruction? sincerely, 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Thu Nov 20 16:34:52 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Thu, 20 Nov 2008 15:34:52 +0000 Subject: Sources' reconstruction In-Reply-To: Message-ID: Dear Marco, It does not really make sense to perform a sourceanalysis on subject- averaged data. I suggest to have a look at the tutorial documentation "applying beamformer techniques in the frequency domain". Best, Jan-Mathijs On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: > Dear all, > > I'm new with Fieldtrip, so i have some questions. > > I would like to do the sources' reconstruction of my time-frequency > data > (obtained by another software). > I've allready done the preprocessing, time-frequency analysis for all > subjects and now i have a file containing the average across > subjects. How > can i use that file in fieldtrip for the source reconstruction? > > sincerely, > > 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/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/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Thu Nov 20 16:52:04 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Thu, 20 Nov 2008 16:52:04 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: Dear Robert, many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM headmodel for EEG, Matlab returns another error message: Undefined function or method 'write_tri' Error in ==> prepare_bemmodel at 151 Please, could you post the missing function 'write_tri.m' . Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 20 17:54:48 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 20 Nov 2008 17:54:48 +0100 Subject: Sources' reconstruction In-Reply-To: <8CACDBF8-3987-4FB2-905B-D3A9C152F802@psy.gla.ac.uk> Message-ID: Thank you for the answer. I read the tutorial, but i would like to avoid to do all the analysis again, so what i would like to know is if there is a way to use my time-frequency data (i also have the data for each subjects separately). thank you, sincerely Marco Quoting jan-mathijs schoffelen : > Dear Marco, > > It does not really make sense to perform a sourceanalysis on > subject-averaged data. I suggest to have a look at the tutorial > documentation "applying beamformer techniques in the frequency domain". > > Best, > > Jan-Mathijs > > > On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: > >> Dear all, >> >> I'm new with Fieldtrip, so i have some questions. >> >> I would like to do the sources' reconstruction of my time-frequency data >> (obtained by another software). >> I've allready done the preprocessing, time-frequency analysis for all >> subjects and now i have a file containing the average across subjects. How >> can i use that file in fieldtrip for the source reconstruction? >> >> sincerely, >> >> 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/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/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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Fri Nov 21 09:13:39 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Fri, 21 Nov 2008 09:13:39 +0100 Subject: Sources' reconstruction In-Reply-To: <20081120175448.1foyoct28gs48scg@courriel.upmc.fr> Message-ID: dear marco, perhaps you could tell which other software to use. if you did it in eeglab then you could simply use the function eeglab2fieldtrip and read your preprocessed data and then continue from that point using the time-frequency window of interest that you gained by the other software. if it's not eeglab, then i think there's no other way than reading your raw data into fieldtrip. if you have a software that can save an event file (e.g. BESA) then you could construct your cfg.trl for the preprocessing-function (see help definetrial if you don't know what that is). this is handy if you e.g. rejected epochs in your other software. then again you skip time-frequency analysis in fieldtrip and go on directly with your source analysis as described in the tutorial. but -either way- as jan-mathijs says, you will have to go back to the raw, single-trial, level. hope this helps, nathan On 20.11.2008, at 17:54, Marco SPERDUTI wrote: > Thank you for the answer. > > I read the tutorial, but i would like to avoid to do all the > analysis again, so what i would like to know is if there is a way to > use my time-frequency data (i also have the data for each subjects > separately). > > thank you, sincerely > > Marco > > Quoting jan-mathijs schoffelen : > >> Dear Marco, >> >> It does not really make sense to perform a sourceanalysis on >> subject-averaged data. I suggest to have a look at the tutorial >> documentation "applying beamformer techniques in the frequency >> domain". >> >> Best, >> >> Jan-Mathijs >> >> >> On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: >> >>> Dear all, >>> >>> I'm new with Fieldtrip, so i have some questions. >>> >>> I would like to do the sources' reconstruction of my time- >>> frequency data >>> (obtained by another software). >>> I've allready done the preprocessing, time-frequency analysis for >>> all >>> subjects and now i have a file containing the average across >>> subjects. How >>> can i use that file in fieldtrip for the source reconstruction? >>> >>> sincerely, >>> >>> 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/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/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/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/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Fri Nov 21 15:23:11 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Fri, 21 Nov 2008 15:23:11 +0100 Subject: timelockstatistics for single-subjects Message-ID: Hello all, I have a small problem in calculating statistics comparing two conditions for one subject. When I have a grand average (created with keepindividual), everything works nicely, but for one subject (with avg created with keeptrials), I have to remove the field 'dof' from the avg structure. The reason for that is that 'dof' has the dimensions of channel x sample, and on line 673 of prepare_timefreq_data.m I get an error for trying to reshape it in trials x sample. Has anyone found it before or am I doing something wrong? The following example code was supposed to work: cfg = []; cfg.keeptrials = 'yes'; avg1 = timelockanalysis(cfg, data1); avg2 = timelockanalysis(cfg, data2); cfg = []; cfg.channel = 'MEG'; cfg.method = 'analytic'; cfg.statistic = 'indepsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'no'; Ntrl1 = size(avg1.trial,1); Ntrl2 = size(avg2.trial,1); cfg.design(1,1:(Ntrl1+Ntrl2)) = [ones(1,Ntrl1) 2*ones(1,Ntrl2)]; cfg.ivar = 1; stat = timelockstatistics(cfg,avg1,avg2) But only works when I use instead: stat = timelockstatistics(cfg,rmfield(avg1,'dof'),rmfield(avg2,'dof')) Any light on this? Best, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From njkillian at GATECH.EDU Mon Nov 24 02:56:41 2008 From: njkillian at GATECH.EDU (Nathan Killian) Date: Sun, 23 Nov 2008 20:56:41 -0500 Subject: possible bug, fixdimord error, v 20081122 Message-ID: "Undefined function or method 'fixdimord' for input arguments of type 'struct'" ...there seems to be a problem in calling private/fixdimord.m in v20081122, but not in v20080611. The highest level functions I called that might have caused this were freqanalysis and freqdescriptives. I can supply more information if needed. -- Nathan Killian Graduate Student - Georgia Tech Bioengineering Buffalo Lab at Emory-Yerkes: 404.712.9431 Potter Lab at Georgia Tech: 404.385.4083 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hulitju at GMAIL.COM Mon Nov 24 09:40:10 2008 From: hulitju at GMAIL.COM (=?GB2312?Q?Hu_Li?=) Date: Mon, 24 Nov 2008 09:40:10 +0100 Subject: How to use BEM model for the EEG source reconstruction? Message-ID: I want to do some source recontruction simulation study based on the BEM model. However, I did not find any example matlab script on the website which show the source reconstruction using BEM model. Would you please tell me how to do this, send me a demo? Thanks. Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Nov 24 10:26:40 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 10:26:40 +0100 Subject: freqanalysis Message-ID: Hi all, i have a problem, each time i try to use freqanalysis i have these errors: ??? Undefined command/function 'mbrealvector'. Error in ==> nearest at 20 mbrealvector(array) Error in ==> freqanalysis_tfr at 203 begsampl = nearest(indicvect,cfg.latency(1)); Error in ==> freqanalysis at 192 [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); That's the command i use: cfg = []; cfg.output = 'pow'; cfg.method = 'tfr'; cfg.foi = 34:1:38; cfg.waveletwidth = 8 cfg.keeptrials = 'yes' TFRdata = freqanalysis(cfg, data); any idea? 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Mon Nov 24 10:30:27 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Mon, 24 Nov 2008 10:30:27 +0100 Subject: freqanalysis In-Reply-To: <20081124102640.o7ue9nyqv4soo0gs@courriel.upmc.fr> Message-ID: hi marco, if i recall correctly then this file is under the fieldtrip/private folder. i usually rename (e.g. notprivate) that folder and then add it to the path. perhaps you'll have to restart matlab. hope this helps. best, nathan On 24.11.2008, at 10:26, Marco SPERDUTI wrote: > Hi all, > > i have a problem, each time i try to use freqanalysis i have these > errors: > > ??? Undefined command/function 'mbrealvector'. > > Error in ==> nearest at 20 > mbrealvector(array) > > Error in ==> freqanalysis_tfr at 203 > begsampl = nearest(indicvect,cfg.latency(1)); > > Error in ==> freqanalysis at 192 > [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, > data); > > That's the command i use: > > cfg = []; > cfg.output = 'pow'; > cfg.method = 'tfr'; > cfg.foi = 34:1:38; > cfg.waveletwidth = 8 > cfg.keeptrials = 'yes' > TFRdata = freqanalysis(cfg, data); > > any idea? > > 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/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/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Mon Nov 24 11:24:12 2008 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 24 Nov 2008 11:24:12 +0100 Subject: How to use BEM model for the EEG source reconstruction? In-Reply-To: Message-ID: Dear Hu, you find an example script for the construction of a BEM headmodel in the fieldtrip wiki (fieldtrip >> documentation >> example matlab script >> "Create BEM headmodel for EEG" and "Align EEG electrode positions to BEM headmodel"). If you don't want to use individual headmodels for your subjects as described in the example script, you can try to use a BEM constructed from a standard MNI brain. You can construct this yourself using the example, or you can find a standard BEM headmodel in eeglab >> plugins >> dipfit >> standard_BEM. Hope this helps, Till Hu Li schrieb: > I want to do some source recontruction simulation study based on the BEM > model. However, I did not find any example matlab script on the website which > show the source reconstruction using BEM model. Would you please tell me > how to do this, send me a demo? > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > -- Till Schneider Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf Körperschaft des öffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus From njkillian at GATECH.EDU Mon Nov 24 12:08:56 2008 From: njkillian at GATECH.EDU (Nathan Killian) Date: Mon, 24 Nov 2008 06:08:56 -0500 Subject: freqanalysis In-Reply-To: Message-ID: Nice idea. This would probably solve the problem I posted earlier today as well. Are you also using a newer version of fieldtrip Marco? If it's a new problem with the program structure perhaps the powers that be could update the version? :) Nathan On Mon, Nov 24, 2008 at 4:30 AM, Nathan Weisz wrote: > hi marco, > > if i recall correctly then this file is under the fieldtrip/private folder. > i usually rename (e.g. notprivate) that folder and then add it to the path. > perhaps you'll have to restart matlab. > > hope this helps. > > best, > nathan > > > > On 24.11.2008, at 10:26, Marco SPERDUTI wrote: > > Hi all, >> >> i have a problem, each time i try to use freqanalysis i have these errors: >> >> ??? Undefined command/function 'mbrealvector'. >> >> Error in ==> nearest at 20 >> mbrealvector(array) >> >> Error in ==> freqanalysis_tfr at 203 >> begsampl = nearest(indicvect,cfg.latency(1)); >> >> Error in ==> freqanalysis at 192 >> [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); >> >> That's the command i use: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.method = 'tfr'; >> cfg.foi = 34:1:38; >> cfg.waveletwidth = 8 >> cfg.keeptrials = 'yes' >> TFRdata = freqanalysis(cfg, data); >> >> any idea? >> >> 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/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/fcdonders/fieldtrip. > -- Nathan Killian Graduate Student - Georgia Tech Bioengineering Buffalo Lab at Emory-Yerkes: 404.712.9431 Potter Lab at Georgia Tech: 404.385.4083 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.sperduti at UPMC.FR Mon Nov 24 12:31:18 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 12:31:18 +0100 Subject: freqanalysis In-Reply-To: Message-ID: Yes I'm using a new version, but Nathan's suggestion worked. Thank you! sincerely, Marco Quoting Nathan Killian : > Nice idea. This would probably solve the problem I posted earlier today as > well. Are you also using a newer version of fieldtrip Marco? > > If it's a new problem with the program structure perhaps the powers that be > could update the version? :) > > Nathan > > On Mon, Nov 24, 2008 at 4:30 AM, Nathan Weisz wrote: > >> hi marco, >> >> if i recall correctly then this file is under the fieldtrip/private folder. >> i usually rename (e.g. notprivate) that folder and then add it to the path. >> perhaps you'll have to restart matlab. >> >> hope this helps. >> >> best, >> nathan >> >> >> >> On 24.11.2008, at 10:26, Marco SPERDUTI wrote: >> >> Hi all, >>> >>> i have a problem, each time i try to use freqanalysis i have these errors: >>> >>> ??? Undefined command/function 'mbrealvector'. >>> >>> Error in ==> nearest at 20 >>> mbrealvector(array) >>> >>> Error in ==> freqanalysis_tfr at 203 >>> begsampl = nearest(indicvect,cfg.latency(1)); >>> >>> Error in ==> freqanalysis at 192 >>> [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); >>> >>> That's the command i use: >>> >>> cfg = []; >>> cfg.output = 'pow'; >>> cfg.method = 'tfr'; >>> cfg.foi = 34:1:38; >>> cfg.waveletwidth = 8 >>> cfg.keeptrials = 'yes' >>> TFRdata = freqanalysis(cfg, data); >>> >>> any idea? >>> >>> 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/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/fcdonders/fieldtrip. >> > > > > -- > Nathan Killian > Graduate Student - Georgia Tech Bioengineering > Buffalo Lab at Emory-Yerkes: 404.712.9431 > Potter Lab at Georgia Tech: 404.385.4083 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Nov 24 12:34:11 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 12:34:11 +0100 Subject: Brain model Message-ID: Hi all, i would like to do the sources reconstruction of my time-frequency data, but i don't have the subjects' MRI. Is it possible to do it using a template or somenthing like that? How can i do? sincerly, 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/fcdonders/fieldtrip. From spike377 at KOREA.COM Tue Nov 25 07:00:58 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Tue, 25 Nov 2008 15:00:58 +0900 Subject: significance test of PLV Message-ID: An HTML attachment was scrubbed... URL: From huli at HKUSUA.HKU.HK Tue Nov 25 10:15:10 2008 From: huli at HKUSUA.HKU.HK (li hu) Date: Tue, 25 Nov 2008 17:15:10 +0800 Subject: Why can not open the website of Fieldtrip? Message-ID: Dear Developer, I have tried many times to open the website of fieldtrip, but I can not open it. Is there any problem or the address of it has been changed? Thanks. Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hulitju at GMAIL.COM Tue Nov 25 10:19:31 2008 From: hulitju at GMAIL.COM (=?GB2312?Q?Hu_Li?=) Date: Tue, 25 Nov 2008 10:19:31 +0100 Subject: Brain model Message-ID: You can use MRI template which can be download on the website of 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Tue Nov 25 10:52:20 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Tue, 25 Nov 2008 10:52:20 +0100 Subject: Why can not open the website of Fieldtrip? In-Reply-To: <71dee8e60811250115k5316831et1b1e5bc7cbe15b5d@mail.gmail.com> Message-ID: I have the same problem. sincerely, Marco Quoting li hu : > Dear Developer, > > I have tried many times to open the website of fieldtrip, but I can not open > it. Is there any problem or the address of it has been changed? > > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From huli at HKUSUA.HKU.HK Tue Nov 25 13:59:24 2008 From: huli at HKUSUA.HKU.HK (li hu) Date: Tue, 25 Nov 2008 20:59:24 +0800 Subject: Brain model In-Reply-To: Message-ID: Hi, All, Is LCMV method supported for component data? Is it possible to use the LCMV method for analysising ICA component data? Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From avni.pllana at UNIVIE.AC.AT Tue Nov 25 16:30:34 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Tue, 25 Nov 2008 16:30:34 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time Message-ID: Dear Robert, many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM headmodel for EEG, Matlab returns another error message: Undefined function or method 'write_tri' Error in ==> prepare_bemmodel at 151 It would be nice, if you could post the missing function 'write_tri.m' . Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Wed Nov 26 09:40:04 2008 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Wed, 26 Nov 2008 09:40:04 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time In-Reply-To: Message-ID: Dear Avni, please find attached the write_tri.m function. Best regards, Till Avni Pllana schrieb: > Dear Robert, > > many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM > headmodel for EEG, > Matlab returns another error message: > > Undefined function or method 'write_tri' > > Error in ==> prepare_bemmodel at 151 > > It would be nice, if you could post the missing function 'write_tri.m' . > > Best regards, > Avni > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > -- Till Schneider, Dipl.Psych. Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf Körperschaft des öffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: write_tri.m URL: From r.oostenveld at FCDONDERS.RU.NL Wed Nov 26 10:45:38 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Nov 2008 10:45:38 +0100 Subject: Why can not open the website of Fieldtrip? In-Reply-To: <71dee8e60811250115k5316831et1b1e5bc7cbe15b5d@mail.gmail.com> Message-ID: Dear FT users, Sorry for the website being down. The university network administration changed the name of the webserver without informing me. You should now again be able to access the FT wiki at http://neuroimaging.ruhosting.nl . The number one hit returned by google should also work again. best regards Robert On 25 Nov 2008, at 10:15, li hu wrote: > Dear Developer, > > I have tried many times to open the website of fieldtrip, but I can > not open it. Is there any problem or the address of it has been > changed? > > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Nov 26 10:47:02 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 26 Nov 2008 10:47:02 +0100 Subject: Brain model Message-ID: Dear Hu Li, dear all, as far as I know the covariance matrix of an ICA component should be of rank 1, i.e. it is extremely rank deficient, meaning that LCMV will not work (and also not make sense). This is because an ICA component has ONE single timecourse. When projecting it back to the sensor level (i.e. by using the mixing weights aka map) all sensors will have that one timecourse. It is also important to consider that after performing ICA there is no need for one of the main capabilities of LCMV, i.e. to suppress unwanted signals from other sources, as these should be part of other ICA components. So the best option for localizing ICA components should be to use DIPFIT if the map is relatively clearly dipolar, or some distributed linear inverse (like LAURA, s/sw/c-LORETA or the like) when it is not, to localize the component taking the values from the component map. 'Hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "li hu" > Gesendet: 25.11.08 14:04:43 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Brain model > > Hi, All, > > Is LCMV method supported for component data? Is it possible to use > the LCMV method for analysising ICA component data? > > Best regards, > > HU Li > > > ---------------------------------- > The aim of this list 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Wed Nov 26 10:47:57 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Nov 2008 10:47:57 +0100 Subject: possible bug, fixdimord error, v 20081122 In-Reply-To: Message-ID: Hi Nathan, Sorry, there were some low level m-files (including the fixdimord function) misplaced in recent fieldtrip releases. Please download the latest version, it should be fixed in that. best regards, Robert On 24 Nov 2008, at 2:56, Nathan Killian wrote: > "Undefined function or method 'fixdimord' for input arguments of > type 'struct'" > > ...there seems to be a problem in calling private/fixdimord.m in > v20081122, but not in v20080611. The highest level functions I > called that might have caused this were freqanalysis and > freqdescriptives. I can supply more information if needed. > > > -- > Nathan Killian > Graduate Student - Georgia Tech Bioengineering > Buffalo Lab at Emory-Yerkes: 404.712.9431 > Potter Lab at Georgia Tech: 404.385.4083 > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Wed Nov 26 16:30:45 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Wed, 26 Nov 2008 16:30:45 +0100 Subject: error offset Message-ID: Hi all, i'm trying to do frequency analysis with mtmconvol, but it gives me this error: ??? Reference to non-existent field 'offset'. Error in ==> freqanalysis_mtmconvol at 323 min_smp = min(data.offset); Error in ==> freqanalysis at 192 [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); Error in ==> field_trip_new at 42 TF_data = freqanalysis(cfg, data); this is the command i'm using: cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.channel = 'MEG'; cfg.foi = 36; cfg.toi = 0.800; cfg.t_ftimwin = 1.000; cfg.tapsmofrq = 4; TF_data = freqanalysis(cfg, data); any idea? thanks a lot, 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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Thu Nov 27 04:10:43 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Wed, 26 Nov 2008 22:10:43 -0500 Subject: significance test of PLV In-Reply-To: <1227592869196254.0.outsmtp04@outsmtp04> Message-ID: Hi Hyoungdong, It is legitimate in my humble opinion, but I am glad to hear other comments. There was a discussion on the differences between the bootstrap and permutation tests in this forum. Good luck, Shen-Mou ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of hyoungdong.park [spike377 at KOREA.COM] Sent: Tuesday, November 25, 2008 1:00 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] significance test of PLV Dear fieldtrip users. I want to know calculated PLV value is different significantly against background fluctuation. This is about what Lachaux et. al (Lachaux et al. 1999, HBM) calls phase locking statistics.(PLS) They calculated PLS by bootstrap. Can I do that with permutation test, which is implemented in fieldtrip? If you have any idea, please let me know. Thank you very much for reading. Best regards. Hyoungdong. [http://ads.korea.com/RealMedia/ads/adstream_nx.ads/Mail.Korea/Footer at x22?KoreaHouse_080222_MFoot_01] [http://ads.korea.com/RealMedia/ads/adstream_nx.ads/Mail.Korea/Footer at x21?KoreaHouse_080222_MFoot_Logo] ---------------------------------- The aim of this list 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 27 12:05:33 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 27 Nov 2008 12:05:33 +0100 Subject: sourceanalysis Message-ID: Hallo, ecah time i use sourceanalysis i have this error: ??? Undefined command/function 'createsubcfg'. Error in ==> sourceanalysis at 549 cfg = createsubcfg(cfg, cfg.method); this is the my command: cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.vol = vol; cfg.channel = 'MEG'; cfg.frequency = 36; cfg.projectnoise = 'yes'; cfg.lambda = mean(TF_Data.powspctrm)/100; source_Data = sourceanalysis(cfg,TF_Data); can you help me? sincerely, 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/fcdonders/fieldtrip. From t.b.dijkman at STUDENT.UTWENTE.NL Thu Nov 27 23:49:44 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Thu, 27 Nov 2008 23:49:44 +0100 Subject: sourceanalysis Message-ID: This means the function sourceanalysis cannot find the function createsubcfg, which should be located in the 'private' folder in the Fieldtrip folder. Functions in that 'private' folder should be accesable to sourceanalysis, since it is located in the parent directory. Perhaps you should check whether that is actually the case, or perhaps not all necessary folders have been added to the matlab path? Renaming the private folder and adding it to the path is a workaround, but I don't think that that should be common practice? Regards, Thomas Dijkman -----Original Message----- From: FieldTrip discussion list on behalf of Marco SPERDUTI Sent: Thu 11/27/2008 12:05 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sourceanalysis Hallo, ecah time i use sourceanalysis i have this error: ??? Undefined command/function 'createsubcfg'. Error in ==> sourceanalysis at 549 cfg = createsubcfg(cfg, cfg.method); this is the my command: cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.vol = vol; cfg.channel = 'MEG'; cfg.frequency = 36; cfg.projectnoise = 'yes'; cfg.lambda = mean(TF_Data.powspctrm)/100; source_Data = sourceanalysis(cfg,TF_Data); can you help me? sincerely, 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/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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 28 10:57:41 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 28 Nov 2008 10:57:41 +0100 Subject: error offset In-Reply-To: <20081126163045.fu2s2lrk0sg0k484@courriel.upmc.fr> Message-ID: On 26 Nov 2008, at 16:30, Marco SPERDUTI wrote: > Hi all, > > i'm trying to do frequency analysis with mtmconvol, but it gives me > this error: > > ??? Reference to non-existent field 'offset'. > > Error in ==> freqanalysis_mtmconvol at 323 > min_smp = min(data.offset); > ... > any idea? This field should be added by the checkconfig function (see line 157 in freqanalysis). It uses the time2offset helper function. Could you use the matlab debugger to check that it is actually added? 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 28 11:04:43 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 28 Nov 2008 11:04:43 +0100 Subject: sourceanalysis In-Reply-To: <20081127120533.tvmsmh5jxcgc8w48@courriel.upmc.fr> Message-ID: Hi Marco, To me it seems to suggest that you are using an older version of the sourecanalysis.m file with a newer version of the private directory. The createsubcfg function has recently been removed and the functionality replaced by checkconfig. Please update to a fully cnosistent latest FT version and try again. best regards, Robert PS renaming private and adding it to your path indeed is not recommeded and should not be needed. However, recently we have done quite some restructuring of the directory layout within fieldtrip, and that has not yet completely stabilized. So sometimes indeed a private function might be misplaced, and then the suggestion from Thomas may help. On 27 Nov 2008, at 12:05, Marco SPERDUTI wrote: > ecah time i use sourceanalysis i have this error: > ??? Undefined command/function 'createsubcfg'. > > Error in ==> sourceanalysis at 549 > cfg = createsubcfg(cfg, cfg.method); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Nov 28 12:28:22 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 28 Nov 2008 12:28:22 +0100 Subject: sourceanalysis In-Reply-To: <92797675-4412-4594-A459-AC4E4F5CBA09@fcdonders.ru.nl> Message-ID: Thank's a lot Robert, finally i solved all my problems, at least i hope so! actually createsubcfg function wasn't there, that was the problem as you say. thank you again, Marco Quoting Robert Oostenveld : > Hi Marco, > > To me it seems to suggest that you are using an older version of the > sourecanalysis.m file with a newer version of the private directory. > The createsubcfg function has recently been removed and the > functionality replaced by checkconfig. Please update to a fully > cnosistent latest FT version and try again. > > best regards, > Robert > > PS renaming private and adding it to your path indeed is not recommeded > and should not be needed. However, recently we have done quite some > restructuring of the directory layout within fieldtrip, and that has > not yet completely stabilized. So sometimes indeed a private function > might be misplaced, and then the suggestion from Thomas may help. > > > > > On 27 Nov 2008, at 12:05, Marco SPERDUTI wrote: > >> ecah time i use sourceanalysis i have this error: >> ??? Undefined command/function 'createsubcfg'. >> >> Error in ==> sourceanalysis at 549 >> cfg = createsubcfg(cfg, cfg.method); > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Fri Nov 28 13:07:44 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Fri, 28 Nov 2008 13:07:44 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time Message-ID: Hi Till, Many thanks for posting 'write_tri.m' . Now the script works, but the result for skull is just an envelope of brain. For a BEM one needs a better approximation of skull and its inner side and outer side. There is something to be done in that direction. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Nov 28 14:35:02 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 28 Nov 2008 14:35:02 +0100 Subject: coordinates Message-ID: hallo, i would like to know it is possible, once i've made the source reconstruction, to have a text file with the coordinates of the sources. thank's a lot, 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/fcdonders/fieldtrip. From spike377 at KOREA.COM Mon Nov 3 13:00:31 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Mon, 3 Nov 2008 21:00:31 +0900 Subject: Some questions about 'phase locking value' and 'phase locking statistics' Message-ID: An HTML attachment was scrubbed... URL: From iversen at NSI.EDU Mon Nov 3 18:26:11 2008 From: iversen at NSI.EDU (John Iversen) Date: Mon, 3 Nov 2008 09:26:11 -0800 Subject: source localization given induced spectra Message-ID: Hello, Is there a way to do source localization on induced spectrograms? (Induced spectra being the mean of individual trials' power spectra.) Conceptually I am not sure how this would work, given that one starts with topographies of real, positive-valued power, with no phase information, so any dipole fit could be at best sign- indeterminate.There is no facility within fieldtrip to do such a thing as far as I can tell (induced spectra were calculated freqanalysis on multi-trial data and are within the .powspctrm field of the result, which is not handled by freq2timelock, and thus cannot feed any of the localization routines). What is of actual interest are task-related fluctuations of the power around a (much larger, and topographically varied) baseline. Is there a way to say where in the brain are the (presumed) subset of neural sources that vary in power with time? Thanks, John ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Mon Nov 3 22:18:39 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 3 Nov 2008 21:18:39 +0000 Subject: source localization given induced spectra In-Reply-To: Message-ID: Dear John, No, it is not possible to perform source localization on the spectrograms as you define them. You quite rightly point out that a spatial topography of power is always positive, so cannot account for a proper dipolar pattern. However, source localization of induced changes in oscillatory activity is possible. There's actually a nice tutorial on the fieldtrip website: "localizing oscillator sources, using beamformer techniques". Alternatively, you can actually call dipolefitting using frequency data as an input, but this requires either fourier-data, or cross- spectral densities between all channel combinations. Usually the fourier-data is more memory efficient. In this case I would propose a two-step strategy: compute spectrograms to identify your time- frequency region(s) of interest. Then call freqanalysis again, with cfg.output = 'fourier'. Then I would guess that dipolefitting runs through... At least it's worth a try. Yours, Jan-Mathijs On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > Hello, > > Is there a way to do source localization on induced spectrograms? > (Induced spectra being the mean of individual trials' power > spectra.) Conceptually I am not sure how this would work, given > that one starts with topographies of real, positive-valued power, > with no phase information, so any dipole fit could be at best sign- > indeterminate.There is no facility within fieldtrip to do such a > thing as far as I can tell (induced spectra were calculated > freqanalysis on multi-trial data and are within the .powspctrm > field of the result, which is not handled by freq2timelock, and > thus cannot feed any of the localization routines). > > What is of actual interest are task-related fluctuations of the > power around a (much larger, and topographically varied) baseline. > Is there a way to say where in the brain are the (presumed) subset > of neural sources that vary in power with time? > > Thanks, > > John > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Nov 4 17:19:14 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 4 Nov 2008 17:19:14 +0100 Subject: smoothing sensor data Message-ID: Hi everyone, Did anyone try smoothing single-subject data on sensor level before? In source-space I noticed that smoothing my single subjects (MEG)data made the GA-statistical analysis more sensitive because the source-locations were a bit shifted over subjects (MEG spatial resolution apparently isn't that bad after all ;) ). There I used a spm_smooth function on my volume data. But now I want to try the same on sensor level, I have pretty focal blobs, and cluster-analysis "looses" the cluster over time in the GA. Now I wonder how to do this. I could use the sensor locations in the grad and then adjust the values according to distance in 3D space. Before making this myself I was just wondering if anyone already made code to do the same. Ideas on how to do it are also much appreciated ;) Best regards, Ingrid ___________________________________ Ingrid Nieuwenhuis PhD student Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands Email: ingrid.nieuwenhuis at fcdonders.ru.nl Tel: 0031 (0)24 - 36 10887 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From iversen at NSI.EDU Tue Nov 4 18:02:17 2008 From: iversen at NSI.EDU (John Iversen) Date: Tue, 4 Nov 2008 09:02:17 -0800 Subject: source localization given induced spectra In-Reply-To: <139BC559-0787-41FB-B906-6DE42322692B@psy.gla.ac.uk> Message-ID: Dear Jan-Mathijs, Thanks for the quick reply. I'm sorry to hear I was right :) I may misunderstand what you've suggested, but is it not the case that if I chose cfg.output='fourier' it will average fourier spectra across trials (cares about phase) instead of power spectrum (phase blind, as I had been doing). In the end wont I simply get the equivalent of the fourier spectrum of the timelock average, which is substantially different from the induced spectrum that interests me? In many cases the sensor topography of the induced power looks somewhat dipolar, with two power peaks, so I may well try to do a fit, but optimizing not on the field but the field power (this would require modifying the output of the forward model within dipolefitting)--it will not be able to get the polarity of the dipole, but should be able to get a location. Maybe? It seems possible in principle, but I wonder if anyone has practical experience with this. I feel there should be a way to study this kind of question! Best, John On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > Dear John, > > No, it is not possible to perform source localization on the > spectrograms as you define them. You quite rightly point out that a > spatial topography of power is always positive, so cannot account > for a proper dipolar pattern. However, source localization of > induced changes in oscillatory activity is possible. There's > actually a nice tutorial on the fieldtrip website: "localizing > oscillator sources, using beamformer techniques". > Alternatively, you can actually call dipolefitting using frequency > data as an input, but this requires either fourier-data, or cross- > spectral densities between all channel combinations. Usually the > fourier-data is more memory efficient. In this case I would propose > a two-step strategy: compute spectrograms to identify your time- > frequency region(s) of interest. Then call freqanalysis again, with > cfg.output = 'fourier'. Then I would guess that dipolefitting runs > through... At least it's worth a try. > > Yours, > > Jan-Mathijs > > > On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > >> Hello, >> >> Is there a way to do source localization on induced spectrograms? >> (Induced spectra being the mean of individual trials' power >> spectra.) Conceptually I am not sure how this would work, given >> that one starts with topographies of real, positive-valued power, >> with no phase information, so any dipole fit could be at best sign- >> indeterminate.There is no facility within fieldtrip to do such a >> thing as far as I can tell (induced spectra were calculated >> freqanalysis on multi-trial data and are within the .powspctrm >> field of the result, which is not handled by freq2timelock, and >> thus cannot feed any of the localization routines). >> >> What is of actual interest are task-related fluctuations of the >> power around a (much larger, and topographically varied) baseline. >> Is there a way to say where in the brain are the (presumed) subset >> of neural sources that vary in power with time? >> >> Thanks, >> >> John >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and 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/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/fcdonders/fieldtrip. From rongf at NIDCD.NIH.GOV Tue Nov 4 18:12:22 2008 From: rongf at NIDCD.NIH.GOV (Rong, Feng (NIH/NIDCD) [F]) Date: Tue, 4 Nov 2008 12:12:22 -0500 Subject: source localization given induced spectra In-Reply-To: A<3DCA585C-35B0-4B39-ABF8-03C8C8C55C99@nsi.edu> Message-ID: John, Jan-Mathijs, Sorry I am not answering the question but asking another one. :) I wondering whether it is doable to estimate source first, and construct the source activities (moment norm, maybe) as 'pseudo-input' to the frequency analysis functions for computation of the spectrogram and further analysis. I saw one recent paper Gow et al. (2008) NeuroImage 43(3):614-623 taking that approach on sources estimated using mne. Is there any potential problem if I use sources estimated by lcmv? Best, Feng -----Original Message----- From: John Iversen [mailto:iversen at NSI.EDU] Sent: Tuesday, November 04, 2008 12:02 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] source localization given induced spectra Dear Jan-Mathijs, Thanks for the quick reply. I'm sorry to hear I was right :) I may misunderstand what you've suggested, but is it not the case that if I chose cfg.output='fourier' it will average fourier spectra across trials (cares about phase) instead of power spectrum (phase blind, as I had been doing). In the end wont I simply get the equivalent of the fourier spectrum of the timelock average, which is substantially different from the induced spectrum that interests me? In many cases the sensor topography of the induced power looks somewhat dipolar, with two power peaks, so I may well try to do a fit, but optimizing not on the field but the field power (this would require modifying the output of the forward model within dipolefitting)--it will not be able to get the polarity of the dipole, but should be able to get a location. Maybe? It seems possible in principle, but I wonder if anyone has practical experience with this. I feel there should be a way to study this kind of question! Best, John On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > Dear John, > > No, it is not possible to perform source localization on the > spectrograms as you define them. You quite rightly point out that a > spatial topography of power is always positive, so cannot account > for a proper dipolar pattern. However, source localization of > induced changes in oscillatory activity is possible. There's > actually a nice tutorial on the fieldtrip website: "localizing > oscillator sources, using beamformer techniques". > Alternatively, you can actually call dipolefitting using frequency > data as an input, but this requires either fourier-data, or cross- > spectral densities between all channel combinations. Usually the > fourier-data is more memory efficient. In this case I would propose > a two-step strategy: compute spectrograms to identify your time- > frequency region(s) of interest. Then call freqanalysis again, with > cfg.output = 'fourier'. Then I would guess that dipolefitting runs > through... At least it's worth a try. > > Yours, > > Jan-Mathijs > > > On Nov 3, 2008, at 5:26 PM, John Iversen wrote: > >> Hello, >> >> Is there a way to do source localization on induced spectrograms? >> (Induced spectra being the mean of individual trials' power >> spectra.) Conceptually I am not sure how this would work, given >> that one starts with topographies of real, positive-valued power, >> with no phase information, so any dipole fit could be at best sign- >> indeterminate.There is no facility within fieldtrip to do such a >> thing as far as I can tell (induced spectra were calculated >> freqanalysis on multi-trial data and are within the .powspctrm >> field of the result, which is not handled by freq2timelock, and >> thus cannot feed any of the localization routines). >> >> What is of actual interest are task-related fluctuations of the >> power around a (much larger, and topographically varied) baseline. >> Is there a way to say where in the brain are the (presumed) subset >> of neural sources that vary in power with time? >> >> Thanks, >> >> John >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and 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/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/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/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Tue Nov 4 18:09:53 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 4 Nov 2008 17:09:53 +0000 Subject: smoothing sensor data In-Reply-To: <02b501c93e99$14012eb0$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, You can do your whole analysis in SPM where you can export your sensor-level data to images and smooth it. But then there is no way back to Fieldtrip statistics. Best, Vladimir On Tue, Nov 4, 2008 at 4:19 PM, Ingrid Nieuwenhuis wrote: > Hi everyone, > > > > Did anyone try smoothing single-subject data on sensor level before? In > source-space I noticed that smoothing my single subjects (MEG)data made the > GA-statistical analysis more sensitive because the source-locations were a > bit shifted over subjects (MEG spatial resolution apparently isn't that bad > after all ;) ). There I used a spm_smooth function on my volume data. But > now I want to try the same on sensor level, I have pretty focal blobs, and > cluster-analysis "looses" the cluster over time in the GA. > > > > Now I wonder how to do this. I could use the sensor locations in the grad > and then adjust the values according to distance in 3D space. Before making > this myself I was just wondering if anyone already made code to do the same. > Ideas on how to do it are also much appreciated ;) > > > > Best regards, > > Ingrid > > > > ___________________________________ > > Ingrid Nieuwenhuis > > PhD student > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen, The Netherlands > > Email: ingrid.nieuwenhuis at fcdonders.ru.nl > > Tel: 0031 (0)24 - 36 10887 > > > > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Nov 4 18:35:40 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 4 Nov 2008 18:35:40 +0100 Subject: Problem running source grand average and source statistics Message-ID: Dear list users, I am having a problem running, source grandaverage and source statistics (over multiple subjects) on the output of soucrestatistictics (from multiple trials in single subjects). I ran first sourceanalysis supplying the backwads warped grids (as described in the wiki) to compute filters. Then I ran source analysis again to extract the single trial source images and the ran sourcestatistitics on this to get the single subject statistical images - all this runs fine. I then supply the pos (and dim) data of the template grid to each structure, replacing the original pos data (that do not match and of course prohibit using sourceststatistics and sourcegrandaverage). When trying to do either a source grand average or a sourcestatistics at the multisubject level I get the same error: subscripted assignment dimension mismatch dat(:,i) = tmp(:); Error in ==> sourcegrandaverage at 173 The corresponding lines of code in sourcegrandaverage are: % get the source parameter from each input source reconstruction % get the inside parameter from each input source reconstruction for i=1:Nsubject % TODO this function should use parameterselection if issubfield(varargin{i}, ['avg.' cfg.parameter]) tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); else tmp = getsubfield(varargin{i}, cfg.parameter); end dat(:,i) = tmp(:); tmp = getsubfield(varargin{i}, 'inside'); inside(tmp,i) = 1; end I get an identical error when using sourcestatistics at the multisubject level. The variable dat(:,i) is created like this: dat = zeros(Nvoxel, Nsubject) I suspect that somehow trying to use the 'stat' instead of the power parameter is a problem (TODO?) or that Nvoxel somehow differs over the various subjects ?? Any advice on what to try and test further would very much appreciated. Thanks in advance, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:19:56 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:19:56 +0000 Subject: Problem running source grand average and source statistics In-Reply-To: <822628835@web.de> Message-ID: Dear Michael, I agree with you that a likely cause is that the Nvoxel (which is based on the dimensionality of the first singlesubject-source in the input) varies across subjects. However, this would be strange, because you use the same dipole grid for all subjects. On the other hand: could it be that you 'sparsified' the single subjects? Each subject could have a slightly different number of 'inside' positions. This obviously leads to problems: 1 because the Nvoxel is incorrect in the first place (it's the product of the dim, so the input is assumed to be full 3D, or a linear array with all outside voxels present (either as nans or zeros or whichever number you fancy). 2 because the length of the array per subject varies. Hope this helps, Jan-M On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > Dear list users, > > I am having a problem running, source grandaverage and source > statistics (over multiple subjects) on the output of > soucrestatistictics (from multiple trials in single subjects). > > I ran first sourceanalysis supplying the backwads warped grids (as > described in the wiki) to compute filters. Then I ran source > analysis again to extract the single trial source images and the > ran sourcestatistitics on this to get the single subject > statistical images - all this runs fine. I then supply the pos (and > dim) data of the template grid to each structure, replacing the > original pos data (that do not match and of course prohibit using > sourceststatistics and sourcegrandaverage). When trying to do > either a source grand average or a sourcestatistics at the > multisubject level I get the same error: > > subscripted assignment dimension mismatch > dat(:,i) = tmp(:); > > Error in ==> sourcegrandaverage at 173 > > > The corresponding lines of code in sourcegrandaverage are: > > % get the source parameter from each input source reconstruction > % get the inside parameter from each input source reconstruction > for i=1:Nsubject > % TODO this function should use parameterselection > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > else > tmp = getsubfield(varargin{i}, cfg.parameter); > end > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I get an identical error when using sourcestatistics at the > multisubject level. > The variable dat(:,i) is created like this: > dat = zeros(Nvoxel, Nsubject) > > > I suspect that somehow trying to use the 'stat' instead of the > power parameter is a problem (TODO?) or that Nvoxel somehow differs > over the various subjects ?? > > Any advice on what to try and test further would very much > appreciated. > > Thanks in advance, > 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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:23:12 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:23:12 +0000 Subject: source localization given induced spectra In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B03F3C9B2@NIHCESMLBX8.nih.gov> Message-ID: Dear Feng, This is very much possible and no problem at all. Actually, this is an approach taken by many people in the field. It's perfectly OK to extimate the time course of a source of interest by using an LCMV beamformer and compute spectrograms on these 'virtual channels'. Yours, Jan-Mathijs On Nov 4, 2008, at 5:12 PM, Rong, Feng (NIH/NIDCD) [F] wrote: > John, Jan-Mathijs, > Sorry I am not answering the question but asking another one. :) > I wondering whether it is doable to estimate source first, and > construct > the source activities (moment norm, maybe) as 'pseudo-input' to the > frequency analysis functions for computation of the spectrogram and > further analysis. I saw one recent paper Gow et al. (2008) NeuroImage > 43(3):614-623 taking that approach on sources estimated using mne. Is > there any potential problem if I use sources estimated by lcmv? > > Best, > Feng > > -----Original Message----- > From: John Iversen [mailto:iversen at NSI.EDU] > Sent: Tuesday, November 04, 2008 12:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] source localization given induced spectra > > Dear Jan-Mathijs, > > Thanks for the quick reply. I'm sorry to hear I was right :) > > I may misunderstand what you've suggested, but is it not the case that > if I chose cfg.output='fourier' it will average fourier spectra across > trials (cares about phase) instead of power spectrum (phase blind, as > I had been doing). In the end wont I simply get the equivalent of the > fourier spectrum of the timelock average, which is substantially > different from the induced spectrum that interests me? > > In many cases the sensor topography of the induced power looks > somewhat dipolar, with two power peaks, so I may well try to do a fit, > but optimizing not on the field but the field power (this would > require modifying the output of the forward model within > dipolefitting)--it will not be able to get the polarity of the dipole, > but should be able to get a location. Maybe? It seems possible in > principle, but I wonder if anyone has practical experience with this. > > I feel there should be a way to study this kind of question! > > Best, > > John > > On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > >> Dear John, >> >> No, it is not possible to perform source localization on the >> spectrograms as you define them. You quite rightly point out that a >> spatial topography of power is always positive, so cannot account >> for a proper dipolar pattern. However, source localization of >> induced changes in oscillatory activity is possible. There's >> actually a nice tutorial on the fieldtrip website: "localizing >> oscillator sources, using beamformer techniques". >> Alternatively, you can actually call dipolefitting using frequency >> data as an input, but this requires either fourier-data, or cross- >> spectral densities between all channel combinations. Usually the >> fourier-data is more memory efficient. In this case I would propose >> a two-step strategy: compute spectrograms to identify your time- >> frequency region(s) of interest. Then call freqanalysis again, with >> cfg.output = 'fourier'. Then I would guess that dipolefitting runs >> through... At least it's worth a try. >> >> Yours, >> >> Jan-Mathijs >> >> >> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >> >>> Hello, >>> >>> Is there a way to do source localization on induced spectrograms? >>> (Induced spectra being the mean of individual trials' power >>> spectra.) Conceptually I am not sure how this would work, given >>> that one starts with topographies of real, positive-valued power, >>> with no phase information, so any dipole fit could be at best sign- >>> indeterminate.There is no facility within fieldtrip to do such a >>> thing as far as I can tell (induced spectra were calculated >>> freqanalysis on multi-trial data and are within the .powspctrm >>> field of the result, which is not handled by freq2timelock, and >>> thus cannot feed any of the localization routines). >>> >>> What is of actual interest are task-related fluctuations of the >>> power around a (much larger, and topographically varied) baseline. >>> Is there a way to say where in the brain are the (presumed) subset >>> of neural sources that vary in power with time? >>> >>> Thanks, >>> >>> John >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users >>> of the FieldTrip toolbox, to share experiences and to discuss new >>> ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html >>> and 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/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/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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 10:52:18 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 09:52:18 +0000 Subject: source localization given induced spectra In-Reply-To: <3DCA585C-35B0-4B39-ABF8-03C8C8C55C99@nsi.edu> Message-ID: Dear John, Probably I was a bit rash in answering to your earlier mail and did not think it through completely. Apologies for that and for any confusion created. Let's give it another try: As you pointed out, induced power can show a somewhat dipolar topography, but you cannot fit a dipole to this because of the fact that it is positive all over the place. However, if you would indeed have some phase information in your topography, showing the ingoing and outgoing field (MEG), or positive and negative potential (EEG), one could fit a dipole. I was talking rubbish when suggesting to use fourierspectra, because it is forbidden to average them across trials (not actually forbidden, but it does not make sense). However, it would make sense to average cross-spectral densities across trials (not the csd's between all channel combinations, but between a well chosen set of channel pairs). Why would this be the case? Well, if you cleverly choose your reference signal (I suggest one of the strong blobs in your dipolar powerspectrum), and you compute the cross-spectral density between this guy and the rest of the channels, then you can do business because the csd's represent the estimated phase-difference between the reference signal and the rest. The interesting signal (your dipolar field) which is buried in your single trial data now has a phase of 0 (channels are in the same blob of the dipolar field) or 180 degrees (channels are in the opposite blob of the dipolar field) with respect to the reference, and importantly this is the same for all trials. This means that you can average the cross-spectral densities across trials to generate a complex-valued topography. Plotting the real-part (or imaginary part) of this should lead to a nice dipolar pattern with positive, and negative values. As far as I know dipolefitting can deal with cross-spectra as an input, so my revised approach would be: compute spectrograms and identify your time-frequency region of interest. Then plot the topography and compute a sensible reference channel. Then call freqanalysis again, but with output='powandcsd', and channelcmb = {'all' 'yourchosenchannel'}. Then try a dipole fit. Hope this helps, Jan-Mathijs On Nov 4, 2008, at 5:02 PM, John Iversen wrote: > Dear Jan-Mathijs, > > Thanks for the quick reply. I'm sorry to hear I was right :) > > I may misunderstand what you've suggested, but is it not the case > that if I chose cfg.output='fourier' it will average fourier > spectra across trials (cares about phase) instead of power spectrum > (phase blind, as I had been doing). In the end wont I simply get > the equivalent of the fourier spectrum of the timelock average, > which is substantially different from the induced spectrum that > interests me? > > In many cases the sensor topography of the induced power looks > somewhat dipolar, with two power peaks, so I may well try to do a > fit, but optimizing not on the field but the field power (this > would require modifying the output of the forward model within > dipolefitting)--it will not be able to get the polarity of the > dipole, but should be able to get a location. Maybe? It seems > possible in principle, but I wonder if anyone has practical > experience with this. > > I feel there should be a way to study this kind of question! > > Best, > > John > > On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: > >> Dear John, >> >> No, it is not possible to perform source localization on the >> spectrograms as you define them. You quite rightly point out that >> a spatial topography of power is always positive, so cannot >> account for a proper dipolar pattern. However, source localization >> of induced changes in oscillatory activity is possible. There's >> actually a nice tutorial on the fieldtrip website: "localizing >> oscillator sources, using beamformer techniques". >> Alternatively, you can actually call dipolefitting using frequency >> data as an input, but this requires either fourier-data, or cross- >> spectral densities between all channel combinations. Usually the >> fourier-data is more memory efficient. In this case I would >> propose a two-step strategy: compute spectrograms to identify your >> time-frequency region(s) of interest. Then call freqanalysis >> again, with cfg.output = 'fourier'. Then I would guess that >> dipolefitting runs through... At least it's worth a try. >> >> Yours, >> >> Jan-Mathijs >> >> >> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >> >>> Hello, >>> >>> Is there a way to do source localization on induced spectrograms? >>> (Induced spectra being the mean of individual trials' power >>> spectra.) Conceptually I am not sure how this would work, given >>> that one starts with topographies of real, positive-valued power, >>> with no phase information, so any dipole fit could be at best >>> sign-indeterminate.There is no facility within fieldtrip to do >>> such a thing as far as I can tell (induced spectra were >>> calculated freqanalysis on multi-trial data and are within >>> the .powspctrm field of the result, which is not handled by >>> freq2timelock, and thus cannot feed any of the localization >>> routines). >>> >>> What is of actual interest are task-related fluctuations of the >>> power around a (much larger, and topographically varied) >>> baseline. Is there a way to say where in the brain are the >>> (presumed) subset of neural sources that vary in power with time? >>> >>> Thanks, >>> >>> John >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between >>> users of the FieldTrip toolbox, to share experiences and to >>> discuss new ideas for MEG and EEG analysis. See also http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ >> 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/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/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed Nov 5 13:41:44 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 5 Nov 2008 13:41:44 +0100 Subject: Problem running source grand average and source statistics In-Reply-To: <551DCBEB-4882-4FB9-BC42-AFA40269CE57@psy.gla.ac.uk> Message-ID: Dear Michael and Jan-Mathijs, If the same procedure is followed as on the wiki, the inside of the template grid is copied to the single subjects, so by definition also the 'sparsified' single subjects sources should all have the same amount of (inside) voxels. So point 2 J-M raised can't be it, point 1 could well be: Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and Nvoxels is the product of the dim. Best Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: Wednesday, November 05, 2008 10:20 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Problem running source grand average and source statistics Dear Michael, I agree with you that a likely cause is that the Nvoxel (which is based on the dimensionality of the first singlesubject-source in the input) varies across subjects. However, this would be strange, because you use the same dipole grid for all subjects. On the other hand: could it be that you 'sparsified' the single subjects? Each subject could have a slightly different number of 'inside' positions. This obviously leads to problems: 1 because the Nvoxel is incorrect in the first place (it's the product of the dim, so the input is assumed to be full 3D, or a linear array with all outside voxels present (either as nans or zeros or whichever number you fancy). 2 because the length of the array per subject varies. Hope this helps, Jan-M On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > Dear list users, > > I am having a problem running, source grandaverage and source > statistics (over multiple subjects) on the output of > soucrestatistictics (from multiple trials in single subjects). > > I ran first sourceanalysis supplying the backwads warped grids (as > described in the wiki) to compute filters. Then I ran source > analysis again to extract the single trial source images and the > ran sourcestatistitics on this to get the single subject > statistical images - all this runs fine. I then supply the pos (and > dim) data of the template grid to each structure, replacing the > original pos data (that do not match and of course prohibit using > sourceststatistics and sourcegrandaverage). When trying to do > either a source grand average or a sourcestatistics at the > multisubject level I get the same error: > > subscripted assignment dimension mismatch > dat(:,i) = tmp(:); > > Error in ==> sourcegrandaverage at 173 > > > The corresponding lines of code in sourcegrandaverage are: > > % get the source parameter from each input source reconstruction > % get the inside parameter from each input source reconstruction > for i=1:Nsubject > % TODO this function should use parameterselection > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > else > tmp = getsubfield(varargin{i}, cfg.parameter); > end > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I get an identical error when using sourcestatistics at the > multisubject level. > The variable dat(:,i) is created like this: > dat = zeros(Nvoxel, Nsubject) > > > I suspect that somehow trying to use the 'stat' instead of the > power parameter is a problem (TODO?) or that Nvoxel somehow differs > over the various subjects ?? > > Any advice on what to try and test further would very much > appreciated. > > Thanks in advance, > 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/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/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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Nov 5 14:50:15 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 5 Nov 2008 14:50:15 +0100 Subject: Problem running source grand average a nd source statistics Message-ID: Dear Ingrid, dear Jan-Mathijs I guess Ingrid is indeed correct, as all my datasets have the same dimension of the stat field and of the inside/outside fields. I was actually also supplying the dim field from the template to all datasets, so the product of dims' should be the same everywhere, but that hasn't really solved the problem. The length of the inside field is 3297, the outside field is 3129, their sum is 6426 which is identical to the product of dimensions of the template grid which are 17 x 21 x 18 =6426. So I am really a bit puzzled here... Anyway, here's the code I use, maybe someone a really stupid error, that I simply overlooked: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FIRST I prepare a file with the data and the settings for the statistics that is later read in again: % datapath = '/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Stats/'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DesignData1 = { 'ABA04_Up_StatSources.mat' 'IFS20_Up_StatSources.mat'; 'IKE28_Up_StatSources.mat'; 'JHA07_Up_StatSources.mat'; 'JPA05_Up_StatSources.mat'; 'MKA21_Up_StatSources.mat'; 'MMA07_Up_StatSources.mat'; 'PSS16_Up_StatSources.mat'; 'SNI05_Up_StatSources.mat'; 'UWA31_Up_StatSources.mat'; }; DesignData2 = { 'ABA04_In_StatSources.mat'; 'IFS20_In_StatSources.mat'; 'IKE28_In_StatSources.mat'; 'JHA07_In_StatSources.mat'; 'JPA05_In_StatSources.mat'; 'MKA21_In_StatSources.mat'; 'MMA07_In_StatSources.mat'; 'PSS16_In_StatSources.mat'; 'SNI05_In_StatSources.mat'; 'UWA31_In_StatSources.mat'; }; % The statistics configuration cfg = []; nSubjects = min(length(DesignData1),length(DesignData2)); a = [1:nSubjects]; b = ones(1,nSubjects); cfg.design = [a a; b (2*b)]; cfg.ivar = 2; % independent variable: condition cfg.uvar = 1; % subjects cfg.method = 'montecarlo'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.01; cfg.alpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.numrandomization = 500; %2000; cfg.threshold = 0.01; cfg.parameter = 'stat'; cfg.statistic = 'depsamplesT'; % create output file OutFileName = strcat(datapath,'DesignStat2008_11_04.mat'); save(OutFileName, 'DesignData1', 'DesignData2', 'cfg', 'datapath'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SECOND I read in this file and the template and try to perform grandaveraging and sourcestatistics at the second level: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [] = StatisticsDICS(DesignStatLCMVFile); template = load('/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Grids/MNItemplate_231008_-1p5iws.mat'); Nx = length(template.template_grid.xgrid) Ny = length(template.template_grid.ygrid) Nz = length(template.template_grid.zgrid) load(DesignStatLCMVFile); % contains datapath, DesignData1, DesignData2, cfg % Load Data from DesignData1,2 automatically ensuring matching sizes % please ensure that data pairs are OK if using paired statistics ! for i = 1:min(length(DesignData1),length(DesignData2)) m=strcat('loading dataset#:', num2str(2*i-1)); disp(m); fullname1 = strcat(datapath,DesignData1{i,1}); Data1{i} = load(fullname1); m=strcat('loading dataset#:', num2str(2*i)); disp(m); fullname2 = strcat(datapath,DesignData2{i,1}); Data2{i} = load(fullname2); end % Fixing the structure properties for l = 1:size(Data1,2) Data1{l}.SourceStat.xgrid = template.template_grid.xgrid; Data1{l}.SourceStat.ygrid = template.template_grid.ygrid; Data1{l}.SourceStat.zgrid = template.template_grid.zgrid; Data1{l}.SourceStat.dim = [Nx Ny Nz]; Data1{l}.SourceStat.pos = template.template_grid.pos; Data1{l}.SourceStat.inside = template.template_grid.inside; Data1{l}.SourceStat.outside = template.template_grid.outside; Data1{l} = Data1{l}.SourceStat; Data2{l}.SourceStat.xgrid = template.template_grid.xgrid; Data2{l}.SourceStat.ygrid = template.template_grid.ygrid; Data2{l}.SourceStat.zgrid = template.template_grid.zgrid; Data2{l}.SourceStat.dim = [Nx Ny Nz]; Data2{l}.SourceStat.pos = template.template_grid.pos; Data2{l}.SourceStat.inside = template.template_grid.inside; Data2{l}.SourceStat.outside = template.template_grid.outside; Data2{l} = Data2{l}.SourceStat; end % prepare the statistics by computing the grandaverage with individual % subject data retained % Compute grand average for Condition 1 and 2 cfgGA = []; cfgGA.keepindividual = 'yes'; cfgGA.parameter='stat'; % create command strings for the computaion: commandstr1 = strcat ('DataGA1', '=sourcegrandaverage(cfgGA'); commandstr2 = strcat ('DataGA2', '=sourcegrandaverage(cfgGA'); for l = 1 : length(Data1) commandstr1 = strcat(commandstr1, ',Data1{', num2str(l) , '}'); commandstr2 = strcat(commandstr2, ',Data2{', num2str(l) , '}'); end % finalize command strings commandstr1=strcat(commandstr1,');') commandstr2=strcat(commandstr2,');') eval(commandstr1) % yields DataGA1; eval(commandstr2) % yields DataGA2; clear Data1; clear Data2; % no longer needed we now have DataGA1,2 %SourceStatsitics cfg is known from the design file! sourceStat = sourcestatistics(cfg, DataGA1, DataGA2); OutFilename = ... strcat(datapath, 'SourceStatisticsLCMV_denoisedDataAndNewGrids_1000rand_',DesignData1{i,1}(7:end-4),'_calpha',num2str(cfg.clusteralpha), '_alpha_',num2str(cfg.alpha),'.mat'); save(OutFilename, 'sourceStat'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Here's the inforamtion from the datasets and the template: Information of a dataset after processing/preparing for sourcegrandaverage: stat: [3297x1 double] df: 134 critval: [-1.9778 1.9778] prob: [3297x1 double] mask: [3297x1 logical] dim: [17 21 18] inside: [1x3297 double] outside: [1x3129 double] pos: [6426x3 double] cfg: [1x1 struct] xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90] Information of the template: xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90] dim: [17 21 18] pos: [6426x3 double] inside: [1x3297 double] outside: [1x3129 double] The onlz thing that I see varying fron dataset to dataset is the df field. Any help appreciated, Michael > -----Ursprüngliche Nachricht----- > Von: "Ingrid Nieuwenhuis" > Gesendet: 05.11.08 14:02:04 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Problem running source grand average and source statistics > Dear Michael and Jan-Mathijs, > > If the same procedure is followed as on the wiki, the inside of the template > grid is copied to the single subjects, so by definition also the > 'sparsified' single subjects sources should all have the same amount of > (inside) voxels. So point 2 J-M raised can't be it, point 1 could well be: > Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and Nvoxels is > the product of the dim. > > Best Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of jan-mathijs schoffelen > Sent: Wednesday, November 05, 2008 10:20 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Problem running source grand average and source > statistics > > Dear Michael, > > I agree with you that a likely cause is that the Nvoxel (which is > based on the dimensionality of the first singlesubject-source in the > input) varies across subjects. However, this would be strange, > because you use the same dipole grid for all subjects. On the other > hand: could it be that you 'sparsified' the single subjects? Each > subject could have a slightly different number of 'inside' positions. > This obviously leads to problems: > 1 because the Nvoxel is incorrect in the first place (it's the > product of the dim, so the input is assumed to be full 3D, or a > linear array with all outside voxels present (either as nans or zeros > or whichever number you fancy). > 2 because the length of the array per subject varies. > > Hope this helps, > > Jan-M > > > > On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: > > > Dear list users, > > > > I am having a problem running, source grandaverage and source > > statistics (over multiple subjects) on the output of > > soucrestatistictics (from multiple trials in single subjects). > > > > I ran first sourceanalysis supplying the backwads warped grids (as > > described in the wiki) to compute filters. Then I ran source > > analysis again to extract the single trial source images and the > > ran sourcestatistitics on this to get the single subject > > statistical images - all this runs fine. I then supply the pos (and > > dim) data of the template grid to each structure, replacing the > > original pos data (that do not match and of course prohibit using > > sourceststatistics and sourcegrandaverage). When trying to do > > either a source grand average or a sourcestatistics at the > > multisubject level I get the same error: > > > > subscripted assignment dimension mismatch > > dat(:,i) = tmp(:); > > > > Error in ==> sourcegrandaverage at 173 > > > > > > The corresponding lines of code in sourcegrandaverage are: > > > > % get the source parameter from each input source reconstruction > > % get the inside parameter from each input source reconstruction > > for i=1:Nsubject > > % TODO this function should use parameterselection > > if issubfield(varargin{i}, ['avg.' cfg.parameter]) > > tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); > > else > > tmp = getsubfield(varargin{i}, cfg.parameter); > > end > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > > > I get an identical error when using sourcestatistics at the > > multisubject level. > > The variable dat(:,i) is created like this: > > dat = zeros(Nvoxel, Nsubject) > > > > > > I suspect that somehow trying to use the 'stat' instead of the > > power parameter is a problem (TODO?) or that Nvoxel somehow differs > > over the various subjects ?? > > > > Any advice on what to try and test further would very much > > appreciated. > > > > Thanks in advance, > > 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/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/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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Wed Nov 5 15:04:43 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Nov 2008 14:04:43 +0000 Subject: Problem running source grand average a nd source statistics In-Reply-To: <823395519@web.de> Message-ID: Hi Michael, > stat: [3297x1 double] This indicates that your singlesubjects are indeed sparsified, so that when you getsubfield this guy, you end up with fewer data-points than expected (which is Nvoxel==prod(dim)). Does this give you enough guidelines to fix it? JM On Nov 5, 2008, at 1:50 PM, Michael Wibral wrote: > Dear Ingrid, dear Jan-Mathijs > > I guess Ingrid is indeed correct, as all my datasets have the same > dimension of the stat field and of the inside/outside fields. I was > actually also supplying the dim field from the template to all > datasets, so the product of dims' should be the same everywhere, > but that hasn't really solved the problem. The length of the inside > field is 3297, the outside field is 3129, their sum is 6426 which > is identical to the product of dimensions of the template grid > which are 17 x 21 x 18 =6426. So I am really a bit puzzled here... > > Anyway, here's the code I use, maybe someone a really stupid error, > that I simply overlooked: > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % FIRST I prepare a file with the data and the settings for the > statistics that is later read in again: > % datapath = '/data/home1/ctillman/data/MooneyMEEGFieldtripAnalysis/ > DICSBeamformingMW200808/Stats/'; > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > DesignData1 = { > 'ABA04_Up_StatSources.mat' > 'IFS20_Up_StatSources.mat'; > 'IKE28_Up_StatSources.mat'; > 'JHA07_Up_StatSources.mat'; > 'JPA05_Up_StatSources.mat'; > 'MKA21_Up_StatSources.mat'; > 'MMA07_Up_StatSources.mat'; > 'PSS16_Up_StatSources.mat'; > 'SNI05_Up_StatSources.mat'; > 'UWA31_Up_StatSources.mat'; > > }; > > DesignData2 = { > 'ABA04_In_StatSources.mat'; > 'IFS20_In_StatSources.mat'; > 'IKE28_In_StatSources.mat'; > 'JHA07_In_StatSources.mat'; > 'JPA05_In_StatSources.mat'; > 'MKA21_In_StatSources.mat'; > 'MMA07_In_StatSources.mat'; > 'PSS16_In_StatSources.mat'; > 'SNI05_In_StatSources.mat'; > 'UWA31_In_StatSources.mat'; > > }; > > % The statistics configuration > cfg = []; > nSubjects = min(length(DesignData1),length(DesignData2)); > a = [1:nSubjects]; > b = ones(1,nSubjects); > cfg.design = [a a; b (2*b)]; > cfg.ivar = 2; % independent variable: condition > cfg.uvar = 1; % subjects > cfg.method = 'montecarlo'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.01; > cfg.alpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.numrandomization = 500; %2000; > cfg.threshold = 0.01; > cfg.parameter = 'stat'; > cfg.statistic = 'depsamplesT'; > > % create output file > OutFileName = strcat(datapath,'DesignStat2008_11_04.mat'); > save(OutFileName, 'DesignData1', 'DesignData2', 'cfg', 'datapath'); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % SECOND I read in this file and the template and try to perform > grandaveraging and sourcestatistics at the second level: > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > function [] = StatisticsDICS(DesignStatLCMVFile); > > > template = load('/data/home1/ctillman/data/ > MooneyMEEGFieldtripAnalysis/DICSBeamformingMW200808/Grids/ > MNItemplate_231008_-1p5iws.mat'); > Nx = length(template.template_grid.xgrid) > Ny = length(template.template_grid.ygrid) > Nz = length(template.template_grid.zgrid) > > load(DesignStatLCMVFile); % contains datapath, DesignData1, > DesignData2, cfg > > % Load Data from DesignData1,2 automatically ensuring matching sizes > % please ensure that data pairs are OK if using paired statistics ! > > > for i = 1:min(length(DesignData1),length(DesignData2)) > m=strcat('loading dataset#:', num2str(2*i-1)); > disp(m); > fullname1 = strcat(datapath,DesignData1{i,1}); > Data1{i} = load(fullname1); > m=strcat('loading dataset#:', num2str(2*i)); > disp(m); > fullname2 = strcat(datapath,DesignData2{i,1}); > Data2{i} = load(fullname2); > end > > % Fixing the structure properties > > for l = 1:size(Data1,2) > > Data1{l}.SourceStat.xgrid = template.template_grid.xgrid; > Data1{l}.SourceStat.ygrid = template.template_grid.ygrid; > Data1{l}.SourceStat.zgrid = template.template_grid.zgrid; > Data1{l}.SourceStat.dim = [Nx Ny Nz]; > Data1{l}.SourceStat.pos = template.template_grid.pos; > Data1{l}.SourceStat.inside = template.template_grid.inside; > Data1{l}.SourceStat.outside = template.template_grid.outside; > Data1{l} = Data1{l}.SourceStat; > > > Data2{l}.SourceStat.xgrid = template.template_grid.xgrid; > Data2{l}.SourceStat.ygrid = template.template_grid.ygrid; > Data2{l}.SourceStat.zgrid = template.template_grid.zgrid; > Data2{l}.SourceStat.dim = [Nx Ny Nz]; > Data2{l}.SourceStat.pos = template.template_grid.pos; > Data2{l}.SourceStat.inside = template.template_grid.inside; > Data2{l}.SourceStat.outside = template.template_grid.outside; > Data2{l} = Data2{l}.SourceStat; > > end > > % prepare the statistics by computing the grandaverage with individual > % subject data retained > % Compute grand average for Condition 1 and 2 > cfgGA = []; > cfgGA.keepindividual = 'yes'; > cfgGA.parameter='stat'; > % create command strings for the computaion: > commandstr1 = strcat ('DataGA1', '=sourcegrandaverage(cfgGA'); > commandstr2 = strcat ('DataGA2', '=sourcegrandaverage(cfgGA'); > > for l = 1 : length(Data1) > commandstr1 = strcat(commandstr1, ',Data1{', num2str(l) , '}'); > commandstr2 = strcat(commandstr2, ',Data2{', num2str(l) , '}'); > end > % finalize command strings > commandstr1=strcat(commandstr1,');') > commandstr2=strcat(commandstr2,');') > eval(commandstr1) % yields DataGA1; > eval(commandstr2) % yields DataGA2; > > clear Data1; clear Data2; % no longer needed we now have DataGA1,2 > > %SourceStatsitics cfg is known from the design file! > sourceStat = sourcestatistics(cfg, DataGA1, DataGA2); > OutFilename = ... > strcat(datapath, > 'SourceStatisticsLCMV_denoisedDataAndNewGrids_1000rand_',DesignData1 > {i,1}(7:end-4),'_calpha',num2str(cfg.clusteralpha), > '_alpha_',num2str(cfg.alpha),'.mat'); > save(OutFilename, 'sourceStat'); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > %%%%%%%%%%%%%%%%%%% > > > Here's the inforamtion from the datasets and the template: > > Information of a dataset after processing/preparing for > sourcegrandaverage: > > > stat: [3297x1 double] > df: 134 > critval: [-1.9778 1.9778] > prob: [3297x1 double] > mask: [3297x1 logical] > dim: [17 21 18] > inside: [1x3297 double] > outside: [1x3129 double] > pos: [6426x3 double] > cfg: [1x1 struct] > xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80] > ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 > 10 20 30 40 50 60 70 80] > zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80 90] > > Information of the template: > xgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80] > ygrid: [-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 > 10 20 30 40 50 60 70 80] > zgrid: [-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 > 70 80 90] > dim: [17 21 18] > pos: [6426x3 double] > inside: [1x3297 double] > outside: [1x3129 double] > > The onlz thing that I see varying fron dataset to dataset is the df > field. > > Any help appreciated, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Ingrid Nieuwenhuis" >> Gesendet: 05.11.08 14:02:04 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] Problem running source grand average and >> source statistics > > >> Dear Michael and Jan-Mathijs, >> >> If the same procedure is followed as on the wiki, the inside of >> the template >> grid is copied to the single subjects, so by definition also the >> 'sparsified' single subjects sources should all have the same >> amount of >> (inside) voxels. So point 2 J-M raised can't be it, point 1 could >> well be: >> Because in line 115 dat's size is defined as (Nvoxels, Nsubj) and >> Nvoxels is >> the product of the dim. >> >> Best Ingrid >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] >> On Behalf >> Of jan-mathijs schoffelen >> Sent: Wednesday, November 05, 2008 10:20 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Problem running source grand average and >> source >> statistics >> >> Dear Michael, >> >> I agree with you that a likely cause is that the Nvoxel (which is >> based on the dimensionality of the first singlesubject-source in the >> input) varies across subjects. However, this would be strange, >> because you use the same dipole grid for all subjects. On the other >> hand: could it be that you 'sparsified' the single subjects? Each >> subject could have a slightly different number of 'inside' positions. >> This obviously leads to problems: >> 1 because the Nvoxel is incorrect in the first place (it's the >> product of the dim, so the input is assumed to be full 3D, or a >> linear array with all outside voxels present (either as nans or zeros >> or whichever number you fancy). >> 2 because the length of the array per subject varies. >> >> Hope this helps, >> >> Jan-M >> >> >> >> On Nov 4, 2008, at 5:35 PM, Michael Wibral wrote: >> >>> Dear list users, >>> >>> I am having a problem running, source grandaverage and source >>> statistics (over multiple subjects) on the output of >>> soucrestatistictics (from multiple trials in single subjects). >>> >>> I ran first sourceanalysis supplying the backwads warped grids (as >>> described in the wiki) to compute filters. Then I ran source >>> analysis again to extract the single trial source images and the >>> ran sourcestatistitics on this to get the single subject >>> statistical images - all this runs fine. I then supply the pos (and >>> dim) data of the template grid to each structure, replacing the >>> original pos data (that do not match and of course prohibit using >>> sourceststatistics and sourcegrandaverage). When trying to do >>> either a source grand average or a sourcestatistics at the >>> multisubject level I get the same error: >>> >>> subscripted assignment dimension mismatch >>> dat(:,i) = tmp(:); >>> >>> Error in ==> sourcegrandaverage at 173 >>> >>> >>> The corresponding lines of code in sourcegrandaverage are: >>> >>> % get the source parameter from each input source reconstruction >>> % get the inside parameter from each input source reconstruction >>> for i=1:Nsubject >>> % TODO this function should use parameterselection >>> if issubfield(varargin{i}, ['avg.' cfg.parameter]) >>> tmp = getsubfield(varargin{i}, ['avg.' cfg.parameter]); >>> else >>> tmp = getsubfield(varargin{i}, cfg.parameter); >>> end >>> dat(:,i) = tmp(:); >>> tmp = getsubfield(varargin{i}, 'inside'); >>> inside(tmp,i) = 1; >>> end >>> >>> I get an identical error when using sourcestatistics at the >>> multisubject level. >>> The variable dat(:,i) is created like this: >>> dat = zeros(Nvoxel, Nsubject) >>> >>> >>> I suspect that somehow trying to use the 'stat' instead of the >>> power parameter is a problem (TODO?) or that Nvoxel somehow differs >>> over the various subjects ?? >>> >>> Any advice on what to try and test further would very much >>> appreciated. >>> >>> Thanks in advance, >>> 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/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/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/ >> 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/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/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Wed Nov 5 16:13:58 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Wed, 5 Nov 2008 16:13:58 +0100 Subject: Problem running a BEM model for EEG Message-ID: Hi Fieldtrippers, In order to make a sourceplot for EEG data, I've been trying to create a BEM model. Using the example script on http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:examples:create_bem_headmodel_for_eeg , I get the following error. ??? Error using ==> spm_slice_vol Wrong sized dim. Error in ==> spm_read_vols at 35 Y(:,:,p,i) = spm_slice_vol(V(i),spm_matrix([0 0 p]),V(i).dim(1:2),0); Error in ==> read_fcdc_mri at 107 img = spm_read_vols(hdr); Error in ==> bemtest at 14 mri = read_fcdc_mri('t1_icbm_normal_1mm_pn0_rf0.mnc'); Recently, I did add the following file "spm_slice_vol.mexw32" (from the updated spm2.rar) to the spm2 dir as matlab did not recognise the spm_slice_vol.dll library. Is anyone familiar with this problem or does one know how to solve it? And yes; I do have the 't1_icbm_normal_1mm_pn0_rf0.mnc' file. Regards, Arjen ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From m.vanelk at DONDERS.RU.NL Wed Nov 5 17:08:18 2008 From: m.vanelk at DONDERS.RU.NL (Michiel van Elk) Date: Wed, 5 Nov 2008 17:08:18 +0100 Subject: error in prepare_leadfield Message-ID: Hi there, On the basis of the standar BEM model that is available on the Fieldtrip website I tried to prepare the grid on the basis of the standard electrode positions. The 'prepare_leadfield' seems to run fine, but after a couple of hours I get the following error message (note that I removed the 'computing leadfield' statements): selected 60 electrodes projecting electrodes on skin surface combining electrode transfer and system matrix 791211 dipoles inside, 7215640 dipoles outside brain making tight grid 791211 dipoles inside, 692565 dipoles outside brain ??? SWITCH expression must be a scalar or string constant. Error in ==> progress at 94 switch t Error in ==> prepare_leadfield at 236 progress('close'); Does someone have a clue what could have gone wrong in this analysis? I used the following cfg settings (e.g. is it correct to convert the elec.pnt from cm to mm?) cfg = []; cfg.elec = GA_CSD_ANIMAL.elec; cfg.elec.pnt = cfg.elec.pnt*10;%convert from cm to mm! cfg.vol = vol; cfg.reducerank = 2; cfg.channel = {'EEG'}; cfg.grid.resolution = 1; [grid] = prepare_leadfield(cfg); Yours, Michiel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From k.nazarpour at BHAM.AC.UK Thu Nov 6 15:20:31 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Thu, 6 Nov 2008 15:20:31 +0100 Subject: Post-doc Research Fellow Position at Prism Lab, University of Birmingham Message-ID: Please contact Prof Chris Miall regarding the below vacancy if you are interested in joining us! Dear colleagues I have a 6-8 month post-doc position that will be available from January 2009, and would like to recruit either someone with skills in EEG signals analysis to extend work we are doing on using EEG for brain-computer interfaces, or alternatively to develop software for experiments using a pneumatic fMRI-compatible robot arm, and run an fMRI experiment on human motor control. So the right person would have skills in EEG, fMRI or C++ programming. Details of the post should be on jobs.ac.uk very shortly, and are also on the Birmingham vacancies web pages, hidden away out of sight (yes, I realise that's not the best way to run a web system advertising jobs, but there you are!) http://www.vacancies.bham.ac.uk/vacancies/vacancySearch.htm using the ID 32737 I'd be grateful if you brought this to the attention of any potential candidates. -- Regards, Chris ---------------------------------------------------------- Professor R.C. Miall Behavioural Brain Sciences Tel +44 121 414 2867 School of Psychology, Fax +44 121 414 4897 University of Birmingham, Mobile: 07815 296483 Edgbaston, Email: r.c.miall at bham.ac.uk Birmingham B15 2TT UK Web: http://prism.bham.ac.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/fcdonders/fieldtrip. From iversen at NSI.EDU Thu Nov 6 19:29:05 2008 From: iversen at NSI.EDU (John Iversen) Date: Thu, 6 Nov 2008 10:29:05 -0800 Subject: source localization given induced spectra In-Reply-To: <99160EC4-B351-4143-AB31-C8447AF15EB8@psy.gla.ac.uk> Message-ID: Dear Jan-Mathijs, Lovely suggestion. This works fine, although I must intervene between the freqanalysis and dipole fit to put the information (I'm using the real part of the cross spectrum) in the correct form. The automatic route calls freq2timelock, which does indeed accept cross spectra, but prepare_freq_matrices seems to expect them to be square, because it chokes on such a 1-d cross spectrum. It seems more geared towards beamformer fitting, which I assume requires the full CSD matrix. I need to look at this further, and may have another question, but just to let you know now thanks for the suggestion. John On Nov 5, 2008, at 1:52 AM, jan-mathijs schoffelen wrote: > Dear John, > > Probably I was a bit rash in answering to your earlier mail and did > not think it through completely. Apologies for that and for any > confusion created. > Let's give it another try: > As you pointed out, induced power can show a somewhat dipolar > topography, but you cannot fit a dipole to this because of the fact > that it is positive all over the place. However, if you would indeed > have some phase information in your topography, showing the ingoing > and outgoing field (MEG), or positive and negative potential (EEG), > one could fit a dipole. I was talking rubbish when suggesting to use > fourierspectra, because it is forbidden to average them across > trials (not actually forbidden, but it does not make sense). > However, it would make sense to average cross-spectral densities > across trials (not the csd's between all channel combinations, but > between a well chosen set of channel pairs). Why would this be the > case? Well, if you cleverly choose your reference signal (I suggest > one of the strong blobs in your dipolar powerspectrum), and you > compute the cross-spectral density between this guy and the rest of > the channels, then you can do business because the csd's represent > the estimated phase-difference between the reference signal and the > rest. The interesting signal (your dipolar field) which is buried in > your single trial data now has a phase of 0 (channels are in the > same blob of the dipolar field) or 180 degrees (channels are in the > opposite blob of the dipolar field) with respect to the reference, > and importantly this is the same for all trials. This means that you > can average the cross-spectral densities across trials to generate a > complex-valued topography. Plotting the real-part (or imaginary > part) of this should lead to a nice dipolar pattern with positive, > and negative values. > As far as I know dipolefitting can deal with cross-spectra as an > input, so my revised approach would be: compute spectrograms and > identify your time-frequency region of interest. Then plot the > topography and compute a sensible reference channel. Then call > freqanalysis again, but with output='powandcsd', and channelcmb = > {'all' 'yourchosenchannel'}. Then try a dipole fit. > > Hope this helps, > > Jan-Mathijs > > > On Nov 4, 2008, at 5:02 PM, John Iversen wrote: > >> Dear Jan-Mathijs, >> >> Thanks for the quick reply. I'm sorry to hear I was right :) >> >> I may misunderstand what you've suggested, but is it not the case >> that if I chose cfg.output='fourier' it will average fourier >> spectra across trials (cares about phase) instead of power spectrum >> (phase blind, as I had been doing). In the end wont I simply get >> the equivalent of the fourier spectrum of the timelock average, >> which is substantially different from the induced spectrum that >> interests me? >> >> In many cases the sensor topography of the induced power looks >> somewhat dipolar, with two power peaks, so I may well try to do a >> fit, but optimizing not on the field but the field power (this >> would require modifying the output of the forward model within >> dipolefitting)--it will not be able to get the polarity of the >> dipole, but should be able to get a location. Maybe? It seems >> possible in principle, but I wonder if anyone has practical >> experience with this. >> >> I feel there should be a way to study this kind of question! >> >> Best, >> >> John >> >> On Nov 3, 2008, at 1:18 PM, jan-mathijs schoffelen wrote: >> >>> Dear John, >>> >>> No, it is not possible to perform source localization on the >>> spectrograms as you define them. You quite rightly point out that >>> a spatial topography of power is always positive, so cannot >>> account for a proper dipolar pattern. However, source localization >>> of induced changes in oscillatory activity is possible. There's >>> actually a nice tutorial on the fieldtrip website: "localizing >>> oscillator sources, using beamformer techniques". >>> Alternatively, you can actually call dipolefitting using frequency >>> data as an input, but this requires either fourier-data, or cross- >>> spectral densities between all channel combinations. Usually the >>> fourier-data is more memory efficient. In this case I would >>> propose a two-step strategy: compute spectrograms to identify your >>> time-frequency region(s) of interest. Then call freqanalysis >>> again, with cfg.output = 'fourier'. Then I would guess that >>> dipolefitting runs through... At least it's worth a try. >>> >>> Yours, >>> >>> Jan-Mathijs >>> >>> >>> On Nov 3, 2008, at 5:26 PM, John Iversen wrote: >>> >>>> Hello, >>>> >>>> Is there a way to do source localization on induced spectrograms? >>>> (Induced spectra being the mean of individual trials' power >>>> spectra.) Conceptually I am not sure how this would work, given >>>> that one starts with topographies of real, positive-valued power, >>>> with no phase information, so any dipole fit could be at best >>>> sign-indeterminate.There is no facility within fieldtrip to do >>>> such a thing as far as I can tell (induced spectra were >>>> calculated freqanalysis on multi-trial data and are within >>>> the .powspctrm field of the result, which is not handled by >>>> freq2timelock, and thus cannot feed any of the localization >>>> routines). >>>> >>>> What is of actual interest are task-related fluctuations of the >>>> power around a (much larger, and topographically varied) >>>> baseline. Is there a way to say where in the brain are the >>>> (presumed) subset of neural sources that vary in power with time? >>>> >>>> Thanks, >>>> >>>> John >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >>>> and 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/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/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/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/fcdonders/fieldtrip. From m.vanelk at DONDERS.RU.NL Fri Nov 7 11:19:40 2008 From: m.vanelk at DONDERS.RU.NL (Michiel van Elk) Date: Fri, 7 Nov 2008 11:19:40 +0100 Subject: error in prepare_leadfield Message-ID: problem solved: the cfg.elec definition was incorrect. Now it seems to work... ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Sat Nov 8 10:16:50 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Sat, 8 Nov 2008 10:16:50 +0100 Subject: No subject Message-ID: Dear fieldtrippers, I am having a hard time trying to compute the source interpolation. For source analysis I use: cfg.xgrid = 'auto' cfg.ygrid = 'auto' cfg.zgrid = 'auto' which later results in: source.dim = [length(cfg.xgrid) length(cfg.ygrid) length(cfg.zgrid)]; or source.dim = [4 4 4]; the problem here is that sourceinterpolate calls the function checkdata where @ line 550: data.transform = pos / ind; here pos is a 4000x4 array and ind is a 64x4 array because ind is computed as following: xgrid = 1:data.dim(1); ygrid = 1:data.dim(2); zgrid = 1:data.dim(3); [x y z] = ndgrid(xgrid, ygrid, zgrid); ind = [x(:) y(:) z(:)]; so of course I get the error message that the array dimensions do not match for division because you cannot divide a 4000x4 array by a 64x4 array. so then I tried: source.dim = [4 4 250]; which results in the dimensions 4000x4 for ind and circumvents the error message.However, I guess that besides diminishing my personal frustration this does not really solve the problem. So if anyone out there has an idea or a suggestion I would be very, very, very thankful. Have nice week end, Frederic _________________________________________________________________ Messenger Games: Mit Freunde zusammen im Messenger spielen! http://redirect.gimas.net/?n=M0811xGamesDE ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at HOTMAIL.DE Sat Nov 8 11:22:45 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Sat, 8 Nov 2008 11:22:45 +0100 Subject: error during source interpolation Message-ID: Dear fieldtrippers, I am having a hard time trying to compute the source interpolation. For source analysis I use: cfg.xgrid = 'auto' cfg.ygrid = 'auto' cfg.zgrid = 'auto' which later results in: source.dim = [length(cfg.xgrid) length(cfg.ygrid) length(cfg.zgrid)]; or source.dim = [4 4 4]; the problem here is that sourceinterpolate calls the function checkdata where @ line 550: data.transform = pos / ind; here pos is a 4000x4 array and ind is a 64x4 array because ind is computed as following: xgrid = 1:data.dim(1); ygrid = 1:data.dim(2); zgrid = 1:data.dim(3); [x y z] = ndgrid(xgrid, ygrid, zgrid); ind = [x(:) y(:) z(:)]; so of course I get the error message that the array dimensions do not match for division because you cannot divide a 4000x4 array by a 64x4 array. so then I tried: source.dim = [4 4 250]; which results in the dimensions 4000x4 for ind and circumvents the error message.However, I guess that besides diminishing my personal frustration this does not really solve the problem. So if anyone out there has an idea or a suggestion I would be very, very, very thankful. Have nice week end, Frederic _________________________________________________________________ Hotmail to go! Hol' Dir Hotmail aufs Handy! http://windowslivemobile.msn.com/BrowserServiceHotmail.aspx?lang=de-de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From shehsu at INDIANA.EDU Tue Nov 11 05:37:37 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Mon, 10 Nov 2008 23:37:37 -0500 Subject: coherence and phase locking values Message-ID: Dear Users, I have a question regarding the differences among the following phase-synchronization measures for channel pairs. 1. coherence, specified in the fieldtripbox, also called ERLCOH in the EEGlab toolbox 2.ERPCOH, specified in the EEGlab toolbox, also for computing event-related coherence between two channels (for formula, please see Journal of Neuroscience Methods 134(2004),9-21, p9). 3. Phase locking value, defined by Lachaux(1999). I was wondering if someone could direct me to the pros and cons of each measure. Many thanks, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From spike377 at KOREA.COM Wed Nov 12 00:37:26 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Wed, 12 Nov 2008 08:37:26 +0900 Subject: coherence and phase locking values Message-ID: An HTML attachment was scrubbed... URL: From pacodiaz at UB.EDU Wed Nov 12 15:59:47 2008 From: pacodiaz at UB.EDU (Paco Diaz) Date: Wed, 12 Nov 2008 15:59:47 +0100 Subject: Power Units in Freqanalysis Message-ID: Hi all, I have performed a time frequency analysis on the evoked activity for EEG data whose units where (of course) in microVolts. It seems that it all work fine, but I would appreciate some help to understand my results (my plot actually). Below you can see the configuration structure that I have used. Well, the question is as follows, which are the units for the z-axis (color code)?? I think that they should be (microV)^2 but the values I'm obtainning are very low when compared with the literature, my maximum value is 8*10^-3 but i have found in the literature values between 8 and 70 (microV)^2. Is there a scale factor that I am missing or is it all simply wrong?? cfg=[]; cfg.method='tfr'; cfg.output='pow'; cfg.foi=[30:0.5:40]; cfg.width=7; cfg.gwidth=5; tfr_data=freqanalysis(cfg,data); Thank you, Paco. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Wed Nov 12 16:26:51 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Wed, 12 Nov 2008 16:26:51 +0100 Subject: Power Units in Freqanalysis Message-ID: Dear Paco, Power is normally given in microV^2/Hz. The amplitude (microV) of the EEG signal can indeed be around 70mV. Nevertheless, your maximum value of 8*10^-3 (mV^2/Hz?) seems quite low. How have you acquisitioned your data? Have you used the get_data script in matlab? If so, my first impression would be that you have forgotten to undo the amplification. Divide the data by the amplification. Secondly, your data might be in voltages and not microvoltages. In matlab: %undo amplification with factor . Display in microvolts (1e6). data = (eegdata.*1e6)./; If you do not use matlab for data acquisition you may forgot all that is written. ;) Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Paco Diaz Verzonden: wo 11/12/2008 3:59 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] Power Units in Freqanalysis Hi all, I have performed a time frequency analysis on the evoked activity for EEG data whose units where (of course) in microVolts. It seems that it all work fine, but I would appreciate some help to understand my results (my plot actually). Below you can see the configuration structure that I have used. Well, the question is as follows, which are the units for the z-axis (color code)?? I think that they should be (microV)^2 but the values I'm obtainning are very low when compared with the literature, my maximum value is 8*10^-3 but i have found in the literature values between 8 and 70 (microV)^2. Is there a scale factor that I am missing or is it all simply wrong?? cfg=[]; cfg.method='tfr'; cfg.output='pow'; cfg.foi=[30:0.5:40]; cfg.width=7; cfg.gwidth=5; tfr_data=freqanalysis(cfg,data); Thank you, Paco. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From julian.keil at GMAIL.COM Thu Nov 13 10:23:32 2008 From: julian.keil at GMAIL.COM (Julian Keil) Date: Thu, 13 Nov 2008 10:23:32 +0100 Subject: Planar Gradiend for bti148 Message-ID: Good morning, has anyone ever computed the planar gradient for a bti 148 - system? When I try to do this, the megplanar.m function stops because the bti 148 system is not supported. Simply adding 'bti148' to line 171 does not solve this, as the distance in line 238 cannot be computed. Does anyone have hints on how to solve this? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Thu Nov 13 10:43:56 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Thu, 13 Nov 2008 09:43:56 +0000 Subject: Planar Gradiend for bti148 In-Reply-To: <5D507F45-56D6-4A72-89E8-6AD4BED8B256@gmail.com> Message-ID: Hi Julian, If you use Fieldtrip to read your data from the raw data file (so no .m4d, or .xyz as intermediate steps) there should be information about the location of the magnetometer coils in data.grad. I am not exactly sure what happens when you import your data into fieldtrip using an intermediate data-representation. Yours, Jan-Mathijs On Nov 13, 2008, at 9:23 AM, Julian Keil wrote: > Good morning, > > has anyone ever computed the planar gradient for a bti 148 - system? > When I try to do this, the megplanar.m function stops because the > bti 148 system is not supported. Simply adding 'bti148' to line 171 > does not solve this, as the distance in line 238 cannot be computed. > > Does anyone have hints on how to solve this? > > Thanks a lot > > Julian > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > 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/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.hartmann at UNI-KONSTANZ.DE Thu Nov 13 11:32:06 2008 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Thu, 13 Nov 2008 11:32:06 +0100 Subject: eeg cabin manufactures Message-ID: hi, as we are planning to build a brand new eeg-lab around our new amplifiers, we are looking for companies building eeg-cabins. has someone of you had some experiences with a company and might suggest a good one to me? thanks in advance, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Nov 13 21:59:53 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 13 Nov 2008 21:59:53 +0100 Subject: website moved to another server, hopefully nothing changed Message-ID: Dear FT users, The FieldTrip website has just been migrated to a new webserver. You still should be able to access it at http://www.ru.nl/neuroimaging/fieldtrip , which is the page that you should refer to in publications or on your own website if you want to link to FieldTrip. The actual low- level server of the wiki has another address (now fcdonders.ruhosting.nl, used to be www2.ru.nl), but you preferably should not use the low-level address, nor use deep links into the wiki. The low-level address and deep links are not guaranteed to work in the future, but we’ll try to keep the official address at http://www.ru.nl/neuroimaging/fieldtrip . Please let me know if you observe any unusual behaviour of the website. best regards, Robert ----------------------------------------------------------- Robert Oostenveld 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 ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Nov 13 22:57:19 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 13 Nov 2008 22:57:19 +0100 Subject: Planar Gradiend for bti148 In-Reply-To: <5D507F45-56D6-4A72-89E8-6AD4BED8B256@gmail.com> Message-ID: Hi Julian, A quick glance at the megrealign code shows that there is some hard- coded dependency on the ctf gradiometer definition, where only the bottom coils should be used. However, that should not be a limitation for bti148. Apparently Jan-Mathijs already has got it to work on bti248. I have made two changes (one for checkdata, the other for ensuring that grad.unit is known). Please try with attached version, this will be in the fieldtrip release on the ftp server tomorro evening. best regards, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: megplanar.m Type: application/octet-stream Size: 22013 bytes Desc: not available URL: -------------- next part -------------- On 13 Nov 2008, at 10:23, Julian Keil wrote: > Good morning, > > has anyone ever computed the planar gradient for a bti 148 - system? > When I try to do this, the megplanar.m function stops because the > bti 148 system is not supported. Simply adding 'bti148' to line 171 > does not solve this, as the distance in line 238 cannot be computed. > > Does anyone have hints on how to solve this? > > Thanks a lot > > Julian > > > Dipl. Psych. Julian Keil > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D23 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 45 84 > 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/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 14 10:10:20 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 14 Nov 2008 10:10:20 +0100 Subject: error in prepare_leadfield In-Reply-To: Message-ID: Hi Michiel, The progress function is used to print the progress (or to make a graphical progress bar). Matlab has the waitbar function, but that is very slow if you update it every iteration. E.g. consider 10000 iterations, and the width of the graphical waitbar on your screen only being 60 pixels. Updating the waitbar on every iteration makes it very slow, so it only updates every 1% increase. This is implemented using persistent variables, i.e. the progress function remembers the state of the progress over subsequent calls. It seems to me in the error that you report below, that the persistent variable was somehow cleared in between two calls. That happens if you clear the function (see "help clear") or when matlab detects that teh function has changed. Perhaps your fieldtrip installation was updated while matlab was running? That may (actually should) happen automatically if you run it from home/common on the FCDC. The progress function does not change very often, but recently I did make some change to it (and that will have been autoupdated on home/common), which may explain the problem. I suggest you simply try again. Robert On 5 Nov 2008, at 17:08, Michiel van Elk wrote: > The 'prepare_leadfield' seems to run fine, but after a couple of hours > I get the following error message (note that I removed the 'computing > leadfield' statements): > > selected 60 electrodes > projecting electrodes on skin surface > combining electrode transfer and system matrix > 791211 dipoles inside, 7215640 dipoles outside brain > making tight grid > 791211 dipoles inside, 692565 dipoles outside brain > ??? SWITCH expression must be a scalar or string constant. > > Error in ==> progress at 94 > switch t > > Error in ==> prepare_leadfield at 236 > progress('close'); > > Does someone have a clue what could have gone wrong in this > analysis? I > used the following cfg settings (e.g. is it correct to convert the > elec.pnt from > cm to mm?) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From norbert.jausovec at UNI-MB.SI Tue Nov 18 01:01:48 2008 From: norbert.jausovec at UNI-MB.SI (Norbert Jausovec) Date: Tue, 18 Nov 2008 01:01:48 +0100 Subject: downolading and starting Message-ID: I have a problem downloading the fieldtrip toolbox. I was able to download only the lite version. After seting the path in Matlab, the toolbox is not recognized by matlab and I can not start it. Any suggestions what might be the reason. I am using Matlab R2007b on windows XP regards norbert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Tue Nov 18 13:00:18 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Tue, 18 Nov 2008 13:00:18 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: I am trying to run on my PC the Matlab script http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: documentation:examples:create_bem_headmodel_for_eeg but Matlab returns the error message: Undefined function or method 'strel_bol' On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and SPM2 . Any help is appreciated. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From g.rousselet at PSY.GLA.AC.UK Tue Nov 18 14:17:49 2008 From: g.rousselet at PSY.GLA.AC.UK (Guillaume Rousselet) Date: Tue, 18 Nov 2008 13:17:49 +0000 Subject: Ph.D. in EEG/fMRI Message-ID: A Ph.D. position in EEG/fMRI is available at the University of Dundee, under the direction of Douglas Potter. The project is funded by SINAPSE, the Scottish Imaging Network. Title: Spatial and temporal imaging of attention reorienting mechanisms First supervisor: Dr Douglas Potter School of Psychology, University of Dundee Email: d.d.potter at dundee.ac.uk phone: 01382 384632 Co-supervisors: Dr Cyril Pernet Division of Clinical Neurosciences, SFC Brain Imaging Centre Western General Hospital, University of Edinburgh Email: cyril.pernet at ed.ac.uk phone: 01315373661 Dr Guillaume Rousselet Centre for Cognitive Neuroimaging (CCNi) & Department of Psychology University of Glasgow Email: g.rousselet at psy.gla.ac.uk phone: 01413306652 A description of the project and an application form are attached, ************************************************************************************ Guillaume A. Rousselet, Ph.D. Lecturer Centre for Cognitive Neuroimaging (CCNi) Department of Psychology Faculty of Information & Mathematical Sciences (FIMS) University of Glasgow 58 Hillhead Street Glasgow, UK G12 8QB The University of Glasgow, charity number SC004401 http://web.me.com/rousseg/GARs_website/ 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 "no test based upon a theory of probability can by itself provide any valuable evidence of the truth or falsehood of a hypothesis. But we may look at the purpose of tests from another viewpoint. Without hoping to know whether each separate hypothesis is true or false, we may search for rules to govern our behaviour with regard to them, in following which we insure that, in the long run of experience, we shall not often be wrong." Neyman J & Pearson E, 1933 ************************************************************************************ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SINAPSE_PhD_proposal_EEG-fMRI-Stats.pdf Type: application/pdf Size: 184328 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.b.dijkman at STUDENT.UTWENTE.NL Tue Nov 18 21:52:18 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Tue, 18 Nov 2008 21:52:18 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: I have been playing with that same script as well, the reason Matlab returns an error is because the 'strel_bol' function is not a standard Matlab function. When I was busy with it I figured it probably was a function made by the author of that Fieldtrip example. I was hoping for a response to your question, because I was curious myself. I do know the function 'strel' does exist, to make a strucural element. So my gues is 'strel_bol' is supposed to make a 'sphere' or perhaps 'disk' structural element (bol = sphere in Dutch). Regards, Thomas Dijkman ________________________________ From: FieldTrip discussion list on behalf of Avni Pllana Sent: Tue 11/18/2008 1:00 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Matlab script: Create BEM headmodel for EEG I am trying to run on my PC the Matlab script http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: documentation:examples:create_bem_headmodel_for_eeg but Matlab returns the error message: Undefined function or method 'strel_bol' On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and SPM2 . Any help is appreciated. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Nov 19 12:00:50 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 12:00:50 +0100 Subject: problems with DICS Message-ID: hi, i'm not sure whether the following question is a fieldtrip-related question or a rather general question. we use a 148 sensor BTI system. since a couple of days we're struggling with a data-set in which we'd like to localize auditory cortical alpha desynchronizations. on a sensor level they are clearly observable (see attached Pitcure 2). however when running DICS it seems like the brain is more or less increasing power post-stimulus. what makes me wonder is that it's exactly the same script (i could provide more details of course) which worked very successfully previously. our notion was initially that something is weird with the leadfield. but -illegally- testing it with a leadfield from another subject where things worked out basically gave more or less the same picture. now we assume that something is fishy with the data itself, that is not clearly observable when looking at the data on a trial-by- trial basis, leading to bad spatial filters. any suggestions how this could be diagnosed? are there any other suggestions? or has anybody had similar problems lately? cheers, 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 2.png Type: image/png Size: 122154 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 1.png Type: image/png Size: 137882 bytes Desc: not available URL: From norbert.jausovec at UNI-MB.SI Wed Nov 19 14:18:54 2008 From: norbert.jausovec at UNI-MB.SI (Norbert) Date: Wed, 19 Nov 2008 14:18:54 +0100 Subject: Starting fieldtrip Message-ID: Hi, I am new to fieldtrip. I have downloaded the ziped file, set path in Matlab R2007b on Windows XP, but do not know how to start Fieldtrip, nothing works. Could someone provide me some advice. Regards Norbert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 19 14:28:09 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 19 Nov 2008 13:28:09 +0000 Subject: Starting fieldtrip In-Reply-To: <000601c94a49$5f0f5c40$1d2e14c0$@jausovec@uni-mb.si> Message-ID: Hi Norbert, Could you be a bit more specific on 'nothing works'? Assuming you correctly unzipped the downloaded file, I would advise you to follow the suggestions on the getting started section on the fieldtrip-webpage. Yours, Jan-Mathijs On Nov 19, 2008, at 1:18 PM, Norbert wrote: > Hi, > > I am new to fieldtrip. I have downloaded the ziped file, set path > in Matlab > R2007b on Windows XP, but do not know how to start Fieldtrip, > nothing works. > Could someone provide me some advice. > > Regards > > Norbert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Nov 19 14:30:47 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 19 Nov 2008 13:30:47 +0000 Subject: Fwd: [FIELDTRIP] problems with DICS Message-ID: Begin forwarded message: > From: jan-mathijs schoffelen > Date: November 19, 2008 1:13:22 PM BST > To: nathanweisz at me.com > Subject: Re: [FIELDTRIP] problems with DICS > > Dear Nathan, > > Are you using precomputed leadfields? The reason I ask is because > there could be a discrepancy between the assumed order of the coils > in your leadfields, and the coil-order in your data. The issue with > the BTI system is that the channel order is somewhat erratic > (references ending up all over the place, and no nice alphabetical > ordering of the magnetometer coils). Prepare_leadfield (the low- > level function which computes the leadfield) just computes the > solution to the forward model for the list of sensors in the input, > the order of which is specified by the order in the data, or by the > order in the gradiometer structure, if no data is supplied. > I recently (about a month ago) made a change in bti2grad, which > changed the order of the coils in the grad-structure. Initially, I > thought it would be nice to have them ordered alphabetically, but > this led to problems later on when using precomputed leadfields > (and making implicit assumptions about the matching sensor order in > both data and gradiometers). It could be that your problems are > related to this. > On the other hand: could this be replicated in other datasets? How > many trials is your csd-matrix based on? Isn't there any hint of a > bilateral temporal decrease in alpha activity? > > Yours > > Jan-Mathijs > > > > On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: > >> hi, >> >> i'm not sure whether the following question is a fieldtrip-related >> question or a rather general question. >> >> we use a 148 sensor BTI system. >> since a couple of days we're struggling with a data-set in which >> we'd like to localize auditory cortical alpha desynchronizations. >> on a sensor level they are clearly observable (see attached >> Pitcure 2). however when running DICS it seems like the brain is >> more or less increasing power post-stimulus. >> what makes me wonder is that it's exactly the same script (i could >> provide more details of course) which worked very successfully >> previously. our notion was initially that something is weird with >> the leadfield. but -illegally- testing it with a leadfield from >> another subject where things worked out basically gave more or >> less the same picture. now we assume that something is fishy with >> the data itself, that is not clearly observable when looking at >> the data on a trial-by-trial basis, leading to bad spatial >> filters. any suggestions how this could be diagnosed? >> >> are there any other suggestions? or has anybody had similar >> problems lately? >> >> cheers, >> 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Toffanin at RUG.NL Wed Nov 19 14:35:13 2008 From: P.Toffanin at RUG.NL (P.Toffanin) Date: Wed, 19 Nov 2008 14:35:13 +0100 Subject: Starting fieldtrip In-Reply-To: <000601c94a49$5f0f5c40$1d2e14c0$@jausovec@uni-mb.si> Message-ID: Hi Norbert, I'm not sure I'm getting this right, and maybe I'm making a big mistake, but fieldtrip is a collection of functions, it does not have a GUI like EEGlab. It works exactly as if you would write a function in matlab: [output1, output2] = function(input1, input2); Does this help you in any way? Did you try to follow one of the tutorials, to see if there is a problem with the function calls maybe? Best Paolo On Wed, 19 Nov 2008 14:18:54 +0100 Norbert wrote: > Hi, > > I am new to fieldtrip. I have downloaded the ziped file, set path in >Matlab > R2007b on Windows XP, but do not know how to start Fieldtrip, >nothing works. > Could someone provide me some advice. > > Regards > > Norbert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Nov 19 15:07:31 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 15:07:31 +0100 Subject: problems with DICS In-Reply-To: <2CE4BC91-5101-4F44-A3CA-E60BAFF24D10@psy.gla.ac.uk> Message-ID: hi jan-mathijs, thanks once again for your quick help. it's about 60 trials which was sufficient in the past. the decrease is bilateral, however i can't imagine how this could lead to a more or less pronounced increase after sourceanalysis. in case of a DICS problem wouldn't the decrease just be placed somewhere in between the two spots? the labels in data.label, data.grad.label match. they also have the same order as in the .xyz file from the BTI system. for the sourceanalysis we precompute the leadfield. as a side note we also use predefined grid points so that they are exactly the same within one subject across conditions. one issue that we noticed is that we recalculated a leadfield that we calculated a long time ago and compared the values. they appear not to be exacly the same. when looking at the topographies (forward solution) yieldied by each source, they are similar but not exactly the same. is this possible? I'm attaching a plot. for each dipole i calculated the vector sum over orientations and averaged the energy over sensors. this i did for the old and the newly calculated leadfield. in the plot difference between the two leadfields is shown on y and dipole number on x. here's the code: %% checke tzvetans grid mit neuer FT cd /home/nadia/Matlab/zvetanskopf tvol=load('vol'); %old vol tgrid=load('grid'); %old grid %% cfg=[]; cfg.grid.pos=tgrid.grid.pos; cfg.grid.dim=tgrid.grid.dim; cfg.grid.inside=tgrid.grid.inside; cfg.grid.outside=tgrid.grid.outside; cfg.vol=tvol.vol; cfg.grad=tgrid.grid.cfg.grad; cfg.channel=tgrid.grid.cfg.channel; tgrid.grid2=prepare_leadfield(cfg); %new grid %% for i=1:length(tgrid.grid2.inside) diffLF (i)=mean(sqrt(sum(tgrid.grid.leadfield{tgrid.grid2.inside(i)}.^2,2)))- mean(sqrt(sum(tgrid.grid2.leadfield{tgrid.grid2.inside(i)}.^2,2))); end plot(diffLF) thanks for any input. nathan On 19.11.2008, at 14:13, jan-mathijs schoffelen wrote: > Dear Nathan, > > Are you using precomputed leadfields? The reason I ask is because > there could be a discripancy between the assumed order of the coils > in your leadfields, and the coil-order in your data. The issue with > the BTI system is that the channel order is somewhat erratic > (references ending up all over the place, and no nice alphabetical > ordering of the magnetometer coils). Prepare_leadfield (the low- > level function which computes the leadfield) just computes the > solution to the forward model for the list of sensors in the input, > the order of which is specified by the order in the data, or by the > order in the gradiometer structure, if no data is supplied. > I recently (about a month ago) made a change in bti2grad, which > changed the order of the coils in the grad-structure. Initially, I > thought it would be nice to have them ordered alphabetically, but > this led to problems later on when using precomputed leadfields (and > making implicit assumptions about the matching sensor order in both > data and gradiometers). It could be that your problems are related > to this. > On the other hand: could this be replicated in other datasets? How > many trials is your csd-matrix based on? Isn't there any hint of a > bilateral temporal decrease in alpha activity? > > Yours > > Jan-Mathijs > > > > On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: > >> hi, >> >> i'm not sure whether the following question is a fieldtrip-related >> question or a rather general question. >> >> we use a 148 sensor BTI system. >> since a couple of days we're struggling with a data-set in which >> we'd like to localize auditory cortical alpha desynchronizations. >> on a sensor level they are clearly observable (see attached Pitcure >> 2). however when running DICS it seems like the brain is more or >> less increasing power post-stimulus. >> what makes me wonder is that it's exactly the same script (i could >> provide more details of course) which worked very successfully >> previously. our notion was initially that something is weird with >> the leadfield. but -illegally- testing it with a leadfield from >> another subject where things worked out basically gave more or less >> the same picture. now we assume that something is fishy with the >> data itself, that is not clearly observable when looking at the >> data on a trial-by-trial basis, leading to bad spatial filters. any >> suggestions how this could be diagnosed? >> >> are there any other suggestions? or has anybody had similar >> problems lately? >> >> cheers, >> 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/ >> > -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 1.png Type: image/png Size: 40889 bytes Desc: not available URL: From nathanweisz at MAC.COM Wed Nov 19 16:46:29 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Nov 2008 16:46:29 +0100 Subject: Fwd: [FIELDTRIP] problems with DICS In-Reply-To: <6A219908-E045-4FB2-A67D-BB6CD5ABC445@psy.gla.ac.uk> Message-ID: ok ... we found the problem why the leadfields differ. apparently the older default for cfg.reducerank = 2. newer fieldtrip versions have cfg.reducerank = 3. n On 19.11.2008, at 14:30, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: jan-mathijs schoffelen >> Date: November 19, 2008 1:13:22 PM BST >> To: nathanweisz at me.com >> Subject: Re: [FIELDTRIP] problems with DICS >> >> Dear Nathan, >> >> Are you using precomputed leadfields? The reason I ask is because >> there could be a discrepancy between the assumed order of the coils >> in your leadfields, and the coil-order in your data. The issue with >> the BTI system is that the channel order is somewhat erratic >> (references ending up all over the place, and no nice alphabetical >> ordering of the magnetometer coils). Prepare_leadfield (the low- >> level function which computes the leadfield) just computes the >> solution to the forward model for the list of sensors in the input, >> the order of which is specified by the order in the data, or by the >> order in the gradiometer structure, if no data is supplied. >> I recently (about a month ago) made a change in bti2grad, which >> changed the order of the coils in the grad-structure. Initially, I >> thought it would be nice to have them ordered alphabetically, but >> this led to problems later on when using precomputed leadfields >> (and making implicit assumptions about the matching sensor order in >> both data and gradiometers). It could be that your problems are >> related to this. >> On the other hand: could this be replicated in other datasets? How >> many trials is your csd-matrix based on? Isn't there any hint of a >> bilateral temporal decrease in alpha activity? >> >> Yours >> >> Jan-Mathijs >> >> >> >> On Nov 19, 2008, at 11:00 AM, Nathan Weisz wrote: >> >>> hi, >>> >>> i'm not sure whether the following question is a fieldtrip-related >>> question or a rather general question. >>> >>> we use a 148 sensor BTI system. >>> since a couple of days we're struggling with a data-set in which >>> we'd like to localize auditory cortical alpha desynchronizations. >>> on a sensor level they are clearly observable (see attached >>> Pitcure 2). however when running DICS it seems like the brain is >>> more or less increasing power post-stimulus. >>> what makes me wonder is that it's exactly the same script (i could >>> provide more details of course) which worked very successfully >>> previously. our notion was initially that something is weird with >>> the leadfield. but -illegally- testing it with a leadfield from >>> another subject where things worked out basically gave more or >>> less the same picture. now we assume that something is fishy with >>> the data itself, that is not clearly observable when looking at >>> the data on a trial-by-trial basis, leading to bad spatial >>> filters. any suggestions how this could be diagnosed? >>> >>> are there any other suggestions? or has anybody had similar >>> problems lately? >>> >>> cheers, >>> 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. > > 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Thu Nov 20 13:08:35 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 20 Nov 2008 13:08:35 +0100 Subject: Matlab script: Create BEM headmodel for EEG In-Reply-To: Message-ID: Dear Thomas, strel_bol is indeed a function from me. Since no proper fieldtrip function relies on it, it is not included in the fieldtrip release. Please find it attached. best regards, 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: strel_bol.m Type: application/octet-stream Size: 442 bytes Desc: not available URL: -------------- next part -------------- On 18 Nov 2008, at 21:52, Thomas Dijkman wrote: > I have been playing with that same script as well, the reason Matlab > returns an error is because the 'strel_bol' function is not a > standard Matlab function. When I was busy with it I figured it > probably was a function made by the author of that Fieldtrip > example. I was hoping for a response to your question, because I was > curious myself. > I do know the function 'strel' does exist, to make a strucural > element. So my gues is 'strel_bol' is supposed to make a 'sphere' or > perhaps 'disk' structural element (bol = sphere in Dutch). > > Regards, > > Thomas Dijkman > > > ________________________________ > > From: FieldTrip discussion list on behalf of Avni Pllana > Sent: Tue 11/18/2008 1:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Matlab script: Create BEM headmodel for EEG > > > > I am trying to run on my PC the Matlab script > > http://fcdonders.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip: > documentation:examples:create_bem_headmodel_for_eeg > > but Matlab returns the error message: Undefined function or > method 'strel_bol' > > On my PC are installed: Matlab 7.5 , Fieldtrip-20080423 and > SPM2 . Any help is appreciated. > > Best regards, > Avni > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 20 14:33:41 2008 From: marco.sperduti at UPMC.FR (Marco Sperduti) Date: Thu, 20 Nov 2008 14:33:41 +0100 Subject: Sources' reconstruction Message-ID: Dear all, I'm new with Fieldtrip, so i have some questions. I would like to do the sources' reconstruction of my time-frequency data (obtained by another software). I've allready done the preprocessing, time-frequency analysis for all subjects and now i have a file containing the average across subjects. How can i use that file in fieldtrip for the source reconstruction? sincerely, 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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Thu Nov 20 16:34:52 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Thu, 20 Nov 2008 15:34:52 +0000 Subject: Sources' reconstruction In-Reply-To: Message-ID: Dear Marco, It does not really make sense to perform a sourceanalysis on subject- averaged data. I suggest to have a look at the tutorial documentation "applying beamformer techniques in the frequency domain". Best, Jan-Mathijs On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: > Dear all, > > I'm new with Fieldtrip, so i have some questions. > > I would like to do the sources' reconstruction of my time-frequency > data > (obtained by another software). > I've allready done the preprocessing, time-frequency analysis for all > subjects and now i have a file containing the average across > subjects. How > can i use that file in fieldtrip for the source reconstruction? > > sincerely, > > 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/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/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Thu Nov 20 16:52:04 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Thu, 20 Nov 2008 16:52:04 +0100 Subject: Matlab script: Create BEM headmodel for EEG Message-ID: Dear Robert, many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM headmodel for EEG, Matlab returns another error message: Undefined function or method 'write_tri' Error in ==> prepare_bemmodel at 151 Please, could you post the missing function 'write_tri.m' . Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 20 17:54:48 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 20 Nov 2008 17:54:48 +0100 Subject: Sources' reconstruction In-Reply-To: <8CACDBF8-3987-4FB2-905B-D3A9C152F802@psy.gla.ac.uk> Message-ID: Thank you for the answer. I read the tutorial, but i would like to avoid to do all the analysis again, so what i would like to know is if there is a way to use my time-frequency data (i also have the data for each subjects separately). thank you, sincerely Marco Quoting jan-mathijs schoffelen : > Dear Marco, > > It does not really make sense to perform a sourceanalysis on > subject-averaged data. I suggest to have a look at the tutorial > documentation "applying beamformer techniques in the frequency domain". > > Best, > > Jan-Mathijs > > > On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: > >> Dear all, >> >> I'm new with Fieldtrip, so i have some questions. >> >> I would like to do the sources' reconstruction of my time-frequency data >> (obtained by another software). >> I've allready done the preprocessing, time-frequency analysis for all >> subjects and now i have a file containing the average across subjects. How >> can i use that file in fieldtrip for the source reconstruction? >> >> sincerely, >> >> 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/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/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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Fri Nov 21 09:13:39 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Fri, 21 Nov 2008 09:13:39 +0100 Subject: Sources' reconstruction In-Reply-To: <20081120175448.1foyoct28gs48scg@courriel.upmc.fr> Message-ID: dear marco, perhaps you could tell which other software to use. if you did it in eeglab then you could simply use the function eeglab2fieldtrip and read your preprocessed data and then continue from that point using the time-frequency window of interest that you gained by the other software. if it's not eeglab, then i think there's no other way than reading your raw data into fieldtrip. if you have a software that can save an event file (e.g. BESA) then you could construct your cfg.trl for the preprocessing-function (see help definetrial if you don't know what that is). this is handy if you e.g. rejected epochs in your other software. then again you skip time-frequency analysis in fieldtrip and go on directly with your source analysis as described in the tutorial. but -either way- as jan-mathijs says, you will have to go back to the raw, single-trial, level. hope this helps, nathan On 20.11.2008, at 17:54, Marco SPERDUTI wrote: > Thank you for the answer. > > I read the tutorial, but i would like to avoid to do all the > analysis again, so what i would like to know is if there is a way to > use my time-frequency data (i also have the data for each subjects > separately). > > thank you, sincerely > > Marco > > Quoting jan-mathijs schoffelen : > >> Dear Marco, >> >> It does not really make sense to perform a sourceanalysis on >> subject-averaged data. I suggest to have a look at the tutorial >> documentation "applying beamformer techniques in the frequency >> domain". >> >> Best, >> >> Jan-Mathijs >> >> >> On Nov 20, 2008, at 1:33 PM, Marco Sperduti wrote: >> >>> Dear all, >>> >>> I'm new with Fieldtrip, so i have some questions. >>> >>> I would like to do the sources' reconstruction of my time- >>> frequency data >>> (obtained by another software). >>> I've allready done the preprocessing, time-frequency analysis for >>> all >>> subjects and now i have a file containing the average across >>> subjects. How >>> can i use that file in fieldtrip for the source reconstruction? >>> >>> sincerely, >>> >>> 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/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/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/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/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Fri Nov 21 15:23:11 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Fri, 21 Nov 2008 15:23:11 +0100 Subject: timelockstatistics for single-subjects Message-ID: Hello all, I have a small problem in calculating statistics comparing two conditions for one subject. When I have a grand average (created with keepindividual), everything works nicely, but for one subject (with avg created with keeptrials), I have to remove the field 'dof' from the avg structure. The reason for that is that 'dof' has the dimensions of channel x sample, and on line 673 of prepare_timefreq_data.m I get an error for trying to reshape it in trials x sample. Has anyone found it before or am I doing something wrong? The following example code was supposed to work: cfg = []; cfg.keeptrials = 'yes'; avg1 = timelockanalysis(cfg, data1); avg2 = timelockanalysis(cfg, data2); cfg = []; cfg.channel = 'MEG'; cfg.method = 'analytic'; cfg.statistic = 'indepsamplesT'; cfg.alpha = 0.05; cfg.correctm = 'no'; Ntrl1 = size(avg1.trial,1); Ntrl2 = size(avg2.trial,1); cfg.design(1,1:(Ntrl1+Ntrl2)) = [ones(1,Ntrl1) 2*ones(1,Ntrl2)]; cfg.ivar = 1; stat = timelockstatistics(cfg,avg1,avg2) But only works when I use instead: stat = timelockstatistics(cfg,rmfield(avg1,'dof'),rmfield(avg2,'dof')) Any light on this? Best, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From njkillian at GATECH.EDU Mon Nov 24 02:56:41 2008 From: njkillian at GATECH.EDU (Nathan Killian) Date: Sun, 23 Nov 2008 20:56:41 -0500 Subject: possible bug, fixdimord error, v 20081122 Message-ID: "Undefined function or method 'fixdimord' for input arguments of type 'struct'" ...there seems to be a problem in calling private/fixdimord.m in v20081122, but not in v20080611. The highest level functions I called that might have caused this were freqanalysis and freqdescriptives. I can supply more information if needed. -- Nathan Killian Graduate Student - Georgia Tech Bioengineering Buffalo Lab at Emory-Yerkes: 404.712.9431 Potter Lab at Georgia Tech: 404.385.4083 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hulitju at GMAIL.COM Mon Nov 24 09:40:10 2008 From: hulitju at GMAIL.COM (=?GB2312?Q?Hu_Li?=) Date: Mon, 24 Nov 2008 09:40:10 +0100 Subject: How to use BEM model for the EEG source reconstruction? Message-ID: I want to do some source recontruction simulation study based on the BEM model. However, I did not find any example matlab script on the website which show the source reconstruction using BEM model. Would you please tell me how to do this, send me a demo? Thanks. Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Nov 24 10:26:40 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 10:26:40 +0100 Subject: freqanalysis Message-ID: Hi all, i have a problem, each time i try to use freqanalysis i have these errors: ??? Undefined command/function 'mbrealvector'. Error in ==> nearest at 20 mbrealvector(array) Error in ==> freqanalysis_tfr at 203 begsampl = nearest(indicvect,cfg.latency(1)); Error in ==> freqanalysis at 192 [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); That's the command i use: cfg = []; cfg.output = 'pow'; cfg.method = 'tfr'; cfg.foi = 34:1:38; cfg.waveletwidth = 8 cfg.keeptrials = 'yes' TFRdata = freqanalysis(cfg, data); any idea? 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Mon Nov 24 10:30:27 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Mon, 24 Nov 2008 10:30:27 +0100 Subject: freqanalysis In-Reply-To: <20081124102640.o7ue9nyqv4soo0gs@courriel.upmc.fr> Message-ID: hi marco, if i recall correctly then this file is under the fieldtrip/private folder. i usually rename (e.g. notprivate) that folder and then add it to the path. perhaps you'll have to restart matlab. hope this helps. best, nathan On 24.11.2008, at 10:26, Marco SPERDUTI wrote: > Hi all, > > i have a problem, each time i try to use freqanalysis i have these > errors: > > ??? Undefined command/function 'mbrealvector'. > > Error in ==> nearest at 20 > mbrealvector(array) > > Error in ==> freqanalysis_tfr at 203 > begsampl = nearest(indicvect,cfg.latency(1)); > > Error in ==> freqanalysis at 192 > [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, > data); > > That's the command i use: > > cfg = []; > cfg.output = 'pow'; > cfg.method = 'tfr'; > cfg.foi = 34:1:38; > cfg.waveletwidth = 8 > cfg.keeptrials = 'yes' > TFRdata = freqanalysis(cfg, data); > > any idea? > > 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/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/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Mon Nov 24 11:24:12 2008 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 24 Nov 2008 11:24:12 +0100 Subject: How to use BEM model for the EEG source reconstruction? In-Reply-To: Message-ID: Dear Hu, you find an example script for the construction of a BEM headmodel in the fieldtrip wiki (fieldtrip >> documentation >> example matlab script >> "Create BEM headmodel for EEG" and "Align EEG electrode positions to BEM headmodel"). If you don't want to use individual headmodels for your subjects as described in the example script, you can try to use a BEM constructed from a standard MNI brain. You can construct this yourself using the example, or you can find a standard BEM headmodel in eeglab >> plugins >> dipfit >> standard_BEM. Hope this helps, Till Hu Li schrieb: > I want to do some source recontruction simulation study based on the BEM > model. However, I did not find any example matlab script on the website which > show the source reconstruction using BEM model. Would you please tell me > how to do this, send me a demo? > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > -- Till Schneider Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf Körperschaft des öffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus From njkillian at GATECH.EDU Mon Nov 24 12:08:56 2008 From: njkillian at GATECH.EDU (Nathan Killian) Date: Mon, 24 Nov 2008 06:08:56 -0500 Subject: freqanalysis In-Reply-To: Message-ID: Nice idea. This would probably solve the problem I posted earlier today as well. Are you also using a newer version of fieldtrip Marco? If it's a new problem with the program structure perhaps the powers that be could update the version? :) Nathan On Mon, Nov 24, 2008 at 4:30 AM, Nathan Weisz wrote: > hi marco, > > if i recall correctly then this file is under the fieldtrip/private folder. > i usually rename (e.g. notprivate) that folder and then add it to the path. > perhaps you'll have to restart matlab. > > hope this helps. > > best, > nathan > > > > On 24.11.2008, at 10:26, Marco SPERDUTI wrote: > > Hi all, >> >> i have a problem, each time i try to use freqanalysis i have these errors: >> >> ??? Undefined command/function 'mbrealvector'. >> >> Error in ==> nearest at 20 >> mbrealvector(array) >> >> Error in ==> freqanalysis_tfr at 203 >> begsampl = nearest(indicvect,cfg.latency(1)); >> >> Error in ==> freqanalysis at 192 >> [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); >> >> That's the command i use: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.method = 'tfr'; >> cfg.foi = 34:1:38; >> cfg.waveletwidth = 8 >> cfg.keeptrials = 'yes' >> TFRdata = freqanalysis(cfg, data); >> >> any idea? >> >> 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/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/fcdonders/fieldtrip. > -- Nathan Killian Graduate Student - Georgia Tech Bioengineering Buffalo Lab at Emory-Yerkes: 404.712.9431 Potter Lab at Georgia Tech: 404.385.4083 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.sperduti at UPMC.FR Mon Nov 24 12:31:18 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 12:31:18 +0100 Subject: freqanalysis In-Reply-To: Message-ID: Yes I'm using a new version, but Nathan's suggestion worked. Thank you! sincerely, Marco Quoting Nathan Killian : > Nice idea. This would probably solve the problem I posted earlier today as > well. Are you also using a newer version of fieldtrip Marco? > > If it's a new problem with the program structure perhaps the powers that be > could update the version? :) > > Nathan > > On Mon, Nov 24, 2008 at 4:30 AM, Nathan Weisz wrote: > >> hi marco, >> >> if i recall correctly then this file is under the fieldtrip/private folder. >> i usually rename (e.g. notprivate) that folder and then add it to the path. >> perhaps you'll have to restart matlab. >> >> hope this helps. >> >> best, >> nathan >> >> >> >> On 24.11.2008, at 10:26, Marco SPERDUTI wrote: >> >> Hi all, >>> >>> i have a problem, each time i try to use freqanalysis i have these errors: >>> >>> ??? Undefined command/function 'mbrealvector'. >>> >>> Error in ==> nearest at 20 >>> mbrealvector(array) >>> >>> Error in ==> freqanalysis_tfr at 203 >>> begsampl = nearest(indicvect,cfg.latency(1)); >>> >>> Error in ==> freqanalysis at 192 >>> [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); >>> >>> That's the command i use: >>> >>> cfg = []; >>> cfg.output = 'pow'; >>> cfg.method = 'tfr'; >>> cfg.foi = 34:1:38; >>> cfg.waveletwidth = 8 >>> cfg.keeptrials = 'yes' >>> TFRdata = freqanalysis(cfg, data); >>> >>> any idea? >>> >>> 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/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/fcdonders/fieldtrip. >> > > > > -- > Nathan Killian > Graduate Student - Georgia Tech Bioengineering > Buffalo Lab at Emory-Yerkes: 404.712.9431 > Potter Lab at Georgia Tech: 404.385.4083 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Mon Nov 24 12:34:11 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Mon, 24 Nov 2008 12:34:11 +0100 Subject: Brain model Message-ID: Hi all, i would like to do the sources reconstruction of my time-frequency data, but i don't have the subjects' MRI. Is it possible to do it using a template or somenthing like that? How can i do? sincerly, 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/fcdonders/fieldtrip. From spike377 at KOREA.COM Tue Nov 25 07:00:58 2008 From: spike377 at KOREA.COM (=?EUC-KR?B?aHlvdW5nZG9uZy5wYXJr?=) Date: Tue, 25 Nov 2008 15:00:58 +0900 Subject: significance test of PLV Message-ID: An HTML attachment was scrubbed... URL: From huli at HKUSUA.HKU.HK Tue Nov 25 10:15:10 2008 From: huli at HKUSUA.HKU.HK (li hu) Date: Tue, 25 Nov 2008 17:15:10 +0800 Subject: Why can not open the website of Fieldtrip? Message-ID: Dear Developer, I have tried many times to open the website of fieldtrip, but I can not open it. Is there any problem or the address of it has been changed? Thanks. Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hulitju at GMAIL.COM Tue Nov 25 10:19:31 2008 From: hulitju at GMAIL.COM (=?GB2312?Q?Hu_Li?=) Date: Tue, 25 Nov 2008 10:19:31 +0100 Subject: Brain model Message-ID: You can use MRI template which can be download on the website of 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Tue Nov 25 10:52:20 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Tue, 25 Nov 2008 10:52:20 +0100 Subject: Why can not open the website of Fieldtrip? In-Reply-To: <71dee8e60811250115k5316831et1b1e5bc7cbe15b5d@mail.gmail.com> Message-ID: I have the same problem. sincerely, Marco Quoting li hu : > Dear Developer, > > I have tried many times to open the website of fieldtrip, but I can not open > it. Is there any problem or the address of it has been changed? > > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From huli at HKUSUA.HKU.HK Tue Nov 25 13:59:24 2008 From: huli at HKUSUA.HKU.HK (li hu) Date: Tue, 25 Nov 2008 20:59:24 +0800 Subject: Brain model In-Reply-To: Message-ID: Hi, All, Is LCMV method supported for component data? Is it possible to use the LCMV method for analysising ICA component data? Best regards, HU Li ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From avni.pllana at UNIVIE.AC.AT Tue Nov 25 16:30:34 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Tue, 25 Nov 2008 16:30:34 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time Message-ID: Dear Robert, many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM headmodel for EEG, Matlab returns another error message: Undefined function or method 'write_tri' Error in ==> prepare_bemmodel at 151 It would be nice, if you could post the missing function 'write_tri.m' . Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Wed Nov 26 09:40:04 2008 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Wed, 26 Nov 2008 09:40:04 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time In-Reply-To: Message-ID: Dear Avni, please find attached the write_tri.m function. Best regards, Till Avni Pllana schrieb: > Dear Robert, > > many thanks for posting 'strel_bol.m', but running Matlab script: Create BEM > headmodel for EEG, > Matlab returns another error message: > > Undefined function or method 'write_tri' > > Error in ==> prepare_bemmodel at 151 > > It would be nice, if you could post the missing function 'write_tri.m' . > > Best regards, > Avni > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > -- Till Schneider, Dipl.Psych. Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf Körperschaft des öffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: write_tri.m URL: From r.oostenveld at FCDONDERS.RU.NL Wed Nov 26 10:45:38 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Nov 2008 10:45:38 +0100 Subject: Why can not open the website of Fieldtrip? In-Reply-To: <71dee8e60811250115k5316831et1b1e5bc7cbe15b5d@mail.gmail.com> Message-ID: Dear FT users, Sorry for the website being down. The university network administration changed the name of the webserver without informing me. You should now again be able to access the FT wiki at http://neuroimaging.ruhosting.nl . The number one hit returned by google should also work again. best regards Robert On 25 Nov 2008, at 10:15, li hu wrote: > Dear Developer, > > I have tried many times to open the website of fieldtrip, but I can > not open it. Is there any problem or the address of it has been > changed? > > Thanks. > > Best regards, > > HU Li > > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Wed Nov 26 10:47:02 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 26 Nov 2008 10:47:02 +0100 Subject: Brain model Message-ID: Dear Hu Li, dear all, as far as I know the covariance matrix of an ICA component should be of rank 1, i.e. it is extremely rank deficient, meaning that LCMV will not work (and also not make sense). This is because an ICA component has ONE single timecourse. When projecting it back to the sensor level (i.e. by using the mixing weights aka map) all sensors will have that one timecourse. It is also important to consider that after performing ICA there is no need for one of the main capabilities of LCMV, i.e. to suppress unwanted signals from other sources, as these should be part of other ICA components. So the best option for localizing ICA components should be to use DIPFIT if the map is relatively clearly dipolar, or some distributed linear inverse (like LAURA, s/sw/c-LORETA or the like) when it is not, to localize the component taking the values from the component map. 'Hope this helps, Michael > -----Ursprüngliche Nachricht----- > Von: "li hu" > Gesendet: 25.11.08 14:04:43 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Brain model > > Hi, All, > > Is LCMV method supported for component data? Is it possible to use > the LCMV method for analysising ICA component data? > > Best regards, > > HU Li > > > ---------------------------------- > The aim of this list 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Wed Nov 26 10:47:57 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Nov 2008 10:47:57 +0100 Subject: possible bug, fixdimord error, v 20081122 In-Reply-To: Message-ID: Hi Nathan, Sorry, there were some low level m-files (including the fixdimord function) misplaced in recent fieldtrip releases. Please download the latest version, it should be fixed in that. best regards, Robert On 24 Nov 2008, at 2:56, Nathan Killian wrote: > "Undefined function or method 'fixdimord' for input arguments of > type 'struct'" > > ...there seems to be a problem in calling private/fixdimord.m in > v20081122, but not in v20080611. The highest level functions I > called that might have caused this were freqanalysis and > freqdescriptives. I can supply more information if needed. > > > -- > Nathan Killian > Graduate Student - Georgia Tech Bioengineering > Buffalo Lab at Emory-Yerkes: 404.712.9431 > Potter Lab at Georgia Tech: 404.385.4083 > ---------------------------------- > > The aim of this list 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Wed Nov 26 16:30:45 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Wed, 26 Nov 2008 16:30:45 +0100 Subject: error offset Message-ID: Hi all, i'm trying to do frequency analysis with mtmconvol, but it gives me this error: ??? Reference to non-existent field 'offset'. Error in ==> freqanalysis_mtmconvol at 323 min_smp = min(data.offset); Error in ==> freqanalysis at 192 [freq] = feval(sprintf('freqanalysis_%s', lower(cfg.method)), cfg, data); Error in ==> field_trip_new at 42 TF_data = freqanalysis(cfg, data); this is the command i'm using: cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.channel = 'MEG'; cfg.foi = 36; cfg.toi = 0.800; cfg.t_ftimwin = 1.000; cfg.tapsmofrq = 4; TF_data = freqanalysis(cfg, data); any idea? thanks a lot, 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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Thu Nov 27 04:10:43 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Wed, 26 Nov 2008 22:10:43 -0500 Subject: significance test of PLV In-Reply-To: <1227592869196254.0.outsmtp04@outsmtp04> Message-ID: Hi Hyoungdong, It is legitimate in my humble opinion, but I am glad to hear other comments. There was a discussion on the differences between the bootstrap and permutation tests in this forum. Good luck, Shen-Mou ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of hyoungdong.park [spike377 at KOREA.COM] Sent: Tuesday, November 25, 2008 1:00 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] significance test of PLV Dear fieldtrip users. I want to know calculated PLV value is different significantly against background fluctuation. This is about what Lachaux et. al (Lachaux et al. 1999, HBM) calls phase locking statistics.(PLS) They calculated PLS by bootstrap. Can I do that with permutation test, which is implemented in fieldtrip? If you have any idea, please let me know. Thank you very much for reading. Best regards. Hyoungdong. [http://ads.korea.com/RealMedia/ads/adstream_nx.ads/Mail.Korea/Footer at x22?KoreaHouse_080222_MFoot_01] [http://ads.korea.com/RealMedia/ads/adstream_nx.ads/Mail.Korea/Footer at x21?KoreaHouse_080222_MFoot_Logo] ---------------------------------- The aim of this list 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/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Thu Nov 27 12:05:33 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Thu, 27 Nov 2008 12:05:33 +0100 Subject: sourceanalysis Message-ID: Hallo, ecah time i use sourceanalysis i have this error: ??? Undefined command/function 'createsubcfg'. Error in ==> sourceanalysis at 549 cfg = createsubcfg(cfg, cfg.method); this is the my command: cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.vol = vol; cfg.channel = 'MEG'; cfg.frequency = 36; cfg.projectnoise = 'yes'; cfg.lambda = mean(TF_Data.powspctrm)/100; source_Data = sourceanalysis(cfg,TF_Data); can you help me? sincerely, 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/fcdonders/fieldtrip. From t.b.dijkman at STUDENT.UTWENTE.NL Thu Nov 27 23:49:44 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Thu, 27 Nov 2008 23:49:44 +0100 Subject: sourceanalysis Message-ID: This means the function sourceanalysis cannot find the function createsubcfg, which should be located in the 'private' folder in the Fieldtrip folder. Functions in that 'private' folder should be accesable to sourceanalysis, since it is located in the parent directory. Perhaps you should check whether that is actually the case, or perhaps not all necessary folders have been added to the matlab path? Renaming the private folder and adding it to the path is a workaround, but I don't think that that should be common practice? Regards, Thomas Dijkman -----Original Message----- From: FieldTrip discussion list on behalf of Marco SPERDUTI Sent: Thu 11/27/2008 12:05 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sourceanalysis Hallo, ecah time i use sourceanalysis i have this error: ??? Undefined command/function 'createsubcfg'. Error in ==> sourceanalysis at 549 cfg = createsubcfg(cfg, cfg.method); this is the my command: cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.vol = vol; cfg.channel = 'MEG'; cfg.frequency = 36; cfg.projectnoise = 'yes'; cfg.lambda = mean(TF_Data.powspctrm)/100; source_Data = sourceanalysis(cfg,TF_Data); can you help me? sincerely, 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/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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 28 10:57:41 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 28 Nov 2008 10:57:41 +0100 Subject: error offset In-Reply-To: <20081126163045.fu2s2lrk0sg0k484@courriel.upmc.fr> Message-ID: On 26 Nov 2008, at 16:30, Marco SPERDUTI wrote: > Hi all, > > i'm trying to do frequency analysis with mtmconvol, but it gives me > this error: > > ??? Reference to non-existent field 'offset'. > > Error in ==> freqanalysis_mtmconvol at 323 > min_smp = min(data.offset); > ... > any idea? This field should be added by the checkconfig function (see line 157 in freqanalysis). It uses the time2offset helper function. Could you use the matlab debugger to check that it is actually added? 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Nov 28 11:04:43 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 28 Nov 2008 11:04:43 +0100 Subject: sourceanalysis In-Reply-To: <20081127120533.tvmsmh5jxcgc8w48@courriel.upmc.fr> Message-ID: Hi Marco, To me it seems to suggest that you are using an older version of the sourecanalysis.m file with a newer version of the private directory. The createsubcfg function has recently been removed and the functionality replaced by checkconfig. Please update to a fully cnosistent latest FT version and try again. best regards, Robert PS renaming private and adding it to your path indeed is not recommeded and should not be needed. However, recently we have done quite some restructuring of the directory layout within fieldtrip, and that has not yet completely stabilized. So sometimes indeed a private function might be misplaced, and then the suggestion from Thomas may help. On 27 Nov 2008, at 12:05, Marco SPERDUTI wrote: > ecah time i use sourceanalysis i have this error: > ??? Undefined command/function 'createsubcfg'. > > Error in ==> sourceanalysis at 549 > cfg = createsubcfg(cfg, cfg.method); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Nov 28 12:28:22 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 28 Nov 2008 12:28:22 +0100 Subject: sourceanalysis In-Reply-To: <92797675-4412-4594-A459-AC4E4F5CBA09@fcdonders.ru.nl> Message-ID: Thank's a lot Robert, finally i solved all my problems, at least i hope so! actually createsubcfg function wasn't there, that was the problem as you say. thank you again, Marco Quoting Robert Oostenveld : > Hi Marco, > > To me it seems to suggest that you are using an older version of the > sourecanalysis.m file with a newer version of the private directory. > The createsubcfg function has recently been removed and the > functionality replaced by checkconfig. Please update to a fully > cnosistent latest FT version and try again. > > best regards, > Robert > > PS renaming private and adding it to your path indeed is not recommeded > and should not be needed. However, recently we have done quite some > restructuring of the directory layout within fieldtrip, and that has > not yet completely stabilized. So sometimes indeed a private function > might be misplaced, and then the suggestion from Thomas may help. > > > > > On 27 Nov 2008, at 12:05, Marco SPERDUTI wrote: > >> ecah time i use sourceanalysis i have this error: >> ??? Undefined command/function 'createsubcfg'. >> >> Error in ==> sourceanalysis at 549 >> cfg = createsubcfg(cfg, cfg.method); > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > 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/fcdonders/fieldtrip. From avni.pllana at UNIVIE.AC.AT Fri Nov 28 13:07:44 2008 From: avni.pllana at UNIVIE.AC.AT (Avni Pllana) Date: Fri, 28 Nov 2008 13:07:44 +0100 Subject: Matlab script: Create BEM headmodel for EEG - Second time Message-ID: Hi Till, Many thanks for posting 'write_tri.m' . Now the script works, but the result for skull is just an envelope of brain. For a BEM one needs a better approximation of skull and its inner side and outer side. There is something to be done in that direction. Best regards, Avni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marco.sperduti at UPMC.FR Fri Nov 28 14:35:02 2008 From: marco.sperduti at UPMC.FR (Marco SPERDUTI) Date: Fri, 28 Nov 2008 14:35:02 +0100 Subject: coordinates Message-ID: hallo, i would like to know it is possible, once i've made the source reconstruction, to have a text file with the coordinates of the sources. thank's a lot, 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/fcdonders/fieldtrip.