From k.nazarpour at BHAM.AC.UK Wed Apr 2 19:39:54 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 19:39:54 +0200 Subject: 2 simple questions Message-ID: Hello FTers, I have been trying to get the tutorial beamforming example to run for over a week! I have tried several matlab versions and also the spm2 R2007a updtats dll files. Also gone through previous posts on this issue in the FT and SPM archives have not helped. Still unsuccessful in doing volume segmentation! The problem is as below: ??? Cant open image file. Error in ==> spm_segment>get_affine_mapping at 240 VFS(1).pinfo(1:2,:) = VFS(1).pinfo(1:2,:)/spm_global(VFS(1)); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Anyone knows how "cant map image file" error can be rectified? Regards, Kianoush ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Apr 2 20:13:54 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 20:13:54 +0200 Subject: 2 simple questions Message-ID: Hi All, The error reported for volume segmentation actually is: ??? Error using ==> spm_slice_vol Cant open image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); Error in ==> spm_smoothto8bit at 14 VO = smoothto8bit(V,fwhm); Error in ==> spm_segment>get_affine_mapping at 233 VFS = spm_smoothto8bit(VF(1),aflags.smosrc); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Regards, Kianoush ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Apr 2 20:21:46 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 2 Apr 2008 20:21:46 +0200 Subject: 2 simple questions In-Reply-To: Message-ID: Hi Kianoush, As you probably have seen, the error occurs in an spm-function. From this point it is hard to tell, whether the error is a consequence of something going on in your spm-version, or whether it is due to a fieldtrip-related issue. Could you provide some info with respect to the MRI you use as an input to volumesegment? Yours, Jan-Mathijs On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > Hi All, > > The error reported for volume segmentation actually is: > > ??? Error using ==> spm_slice_vol > Cant open image file. > > Error in ==> spm_smoothto8bit>smoothto8bit at 51 > img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); > > Error in ==> spm_smoothto8bit at 14 > VO = smoothto8bit(V,fwhm); > > Error in ==> spm_segment>get_affine_mapping at 233 > VFS = spm_smoothto8bit(VF(1),aflags.smosrc); > > Error in ==> spm_segment>init_sp at 567 > MM = get_affine_mapping(VF,PG,flags.affreg); > > Error in ==> spm_segment at 91 > SP = init_sp(flags.estimate,VF,PG); > > Error in ==> volumesegment at 250 > spm_segment(Va,cfg.template,flags); > > > Regards, > Kianoush > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to 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 K.Nazarpour at BHAM.AC.UK Wed Apr 2 20:35:17 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 19:35:17 +0100 Subject: 2 simple questions In-Reply-To: <398EB287-FD60-4768-90DC-074A945B5E7D@psy.gla.ac.uk> Message-ID: Hi Jan-Mathijs, Thank you for your reply. I simply use Subject01 mri data in the tutorial. Kia jan-mathijs schoffelen wrote: > Hi Kianoush, > > As you probably have seen, the error occurs in an spm-function. From > this point it is hard to tell, whether the error is a consequence of > something going on in your spm-version, > or whether it is due to a fieldtrip-related issue. Could you provide > some info with respect to the MRI you use as an input to volumesegment? > > Yours, > > Jan-Mathijs > > > On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > >> Hi All, >> >> The error reported for volume segmentation actually is: >> >> ??? Error using ==> spm_slice_vol >> Cant open image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Regards, >> Kianoush >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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.capilla at PSY.GLA.AC.UK Wed Apr 2 20:42:45 2008 From: a.capilla at PSY.GLA.AC.UK (Almudena Capilla) Date: Wed, 2 Apr 2008 19:42:45 +0100 Subject: 2 simple questions In-Reply-To: <47F3D1E5.6020203@bham.ac.uk> Message-ID: Hi Kianoush, I think this kind of error occurs when the name of your output volume already exists in your working directory. Maybe it will work if you rename the "cfg.name" Hope it helps, Almu -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Kianoush Nazarpour Sent: 02 April 2008 19:35 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] 2 simple questions Hi Jan-Mathijs, Thank you for your reply. I simply use Subject01 mri data in the tutorial. Kia jan-mathijs schoffelen wrote: > Hi Kianoush, > > As you probably have seen, the error occurs in an spm-function. From > this point it is hard to tell, whether the error is a consequence of > something going on in your spm-version, > or whether it is due to a fieldtrip-related issue. Could you provide > some info with respect to the MRI you use as an input to volumesegment? > > Yours, > > Jan-Mathijs > > > On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > >> Hi All, >> >> The error reported for volume segmentation actually is: >> >> ??? Error using ==> spm_slice_vol >> Cant open image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Regards, >> Kianoush >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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 k.nazarpour at BHAM.AC.UK Thu Apr 3 12:06:34 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Thu, 3 Apr 2008 12:06:34 +0200 Subject: 2 simple questions -> spm_slice_vol Message-ID: Thank you, I tried that as well, but does not solve the problem. Then, I decided to simply do the segmentation in the SPM and then bring the segmented images into FT. Therefore, I needed to make the mri variable in order to put all in FT format. The file used was t1_icbm_normal_1mm_pn0_rf0.mnc . The segmentation was done properly by SPM while the same file could not even be read properly by mri = read_fcdc_mri('t1_icbm_normal_1mm_pn0_rf0.mnc'); The error was ??? Error using ==> spm_slice_vol Cant open image file. 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 102 img = spm_read_vols(hdr); My question is if spm_slice_vol can be executed in SPM2 in Matlab MATLAB Version 7.5.0.342 (R2007b) why I can not be run on simialr Matlab platform but through FT ?! Bests, Kia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Paul.vandenHurk at FCDONDERS.RU.NL Thu Apr 3 17:46:47 2008 From: Paul.vandenHurk at FCDONDERS.RU.NL (Paul van den Hurk) Date: Thu, 3 Apr 2008 17:46:47 +0200 Subject: No subject Message-ID: Hi all, When I use the function 'timelockstatistics' I get the following error message: ======================================================== ??? Undefined function or variable "sens". Error in ==> neighbourselection at 106 if ~isstruct(sens) Error in ==> fieldtrip\private\statistics_wrapper at 226 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> timelockstatistics at 107 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> statistics_time_locked at 36 stat = timelockstatistics(cfg,grand_avg_s12_s51,grand_avg_s14_s51); ======================================================== The code I use for calling this function is the following: ======================================================== time_of_in_st = 0.1; % input('Beginning of interval: '); time_of_in_end = 0.8; % input('End of interval: '); interval = [time_of_in_st time_of_in_end]; cfg = []; cfg.channel = {'P8'}; cfg.latency = interval; cfg.statistic = 'depsamplesT'; cfg.parameter = 'individual'; cfg.method = 'analytic'; cfg.correctm = 'no'; cfg.alpha = 0.05; Nsub = input('Type in number of subjects to be included in timelockstatistics: '); cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = timelockstatistics(cfg,grand_avg_s12_s51,grand_avg_s14_s51); ======================================================== Could anyone tell me how to fix this? Thanks a lot in advance, Kind regards, Paul ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 7 18:02:00 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Apr 2008 18:02:00 +0200 Subject: change in defaults for resampledata Message-ID: Dear fieldtrip users, I have made a change in the default configuration of resampledata that you should be aware of. Previously this function used to detrend the data by default. The motivation for this is that the data is filtered prior to resampling to avoid aliassing and detrending prevents occasional edge artifacts of the filters. Detrending is fine for removing slow drifts in data prior to frequency analysis, but detrending is not good if you subsequenlty want to look at the evoked fields. Therefore the old default value of 'yes' has been removed. You now explicitely have to specify whether you want to detrend (probably so if you want to keep your analysis compatible with previous analyses that you did), or if you do not want to detrent (recommended in most cases). If you observe edge artifacts after detrending, it is recommended to apply a baseline correction to the data. 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. From r.oostenveld at FCDONDERS.RU.NL Mon Apr 7 21:40:19 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Apr 2008 21:40:19 +0200 Subject: No subject In-Reply-To: <000701c895a1$ecfb61f0$172dae83@fcdonders.nl> Message-ID: Hi Paul On 3 Apr 2008, at 17:46, Paul van den Hurk wrote: > When I use the function ‘timelockstatistics’ I get the following > error message: > > ======================================================== > ??? Undefined function or variable "sens". > > Error in ==> neighbourselection at 106 > if ~isstruct(sens) The sensor specification (in your case the position of the EEG electrodes, for other people the position of MEG sensors) is used for spatial clustering. I suggest that you explicitely use the neighbourselection function if you are interested in using clustering. In the help of that function you can read how to specify the sensor information. However, since you write > The code I use for calling this function is the following: > ... > cfg.correctm = 'no'; > cfg.alpha = 0.05; it seems that you don't want to cluster. The default handling of the configurations here is not optimal, since the default is to try and make a neighbourhood structure (required for clustering) even if you don't need it. I think that you can get around it with cfg.neighbours = []; I will change the function so that it handles the defaults better. 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. From mramirez at NKI.RFMH.ORG Tue Apr 8 05:10:12 2008 From: mramirez at NKI.RFMH.ORG (Manuel Gomez-Ramirez) Date: Tue, 8 Apr 2008 05:10:12 +0200 Subject: scalpcurrentdensity Message-ID: Hello, I'm having problems trying to run the "scalpcurrentdensity" function in fieldtrip. I just downloaded the latest version and it is still giving me problems. the error message reads as follows: ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a\toolbox\fieldtrip-20080405\private\plgndr.dll': The specified procedure could not be found. Error in ==> fieldtrip-20080405\private\splint>gh at 170 p(k) = plgndr(k,0,x(i,j)); Error in ==> fieldtrip-20080405\private\splint at 75 [gx, hx] = gh(CosEii); Error in ==> scalpcurrentdensity at 186 [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); ---- Has anybody else run into this situation??? Gladly appreciate your help! Thanks in advance Manuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 8 12:32:56 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Tue, 8 Apr 2008 11:32:56 +0100 Subject: scalpcurrentdensity In-Reply-To: Message-ID: Hi Manuel, In FT FAQ page http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:frequently_asked_questions there are instructions for some functions under "Matlab complains about a missing or invalid MEX file, what should I do?" Hope that helps, Kianoush Manuel Gomez-Ramirez wrote: > Hello, > I'm having problems trying to run the "scalpcurrentdensity" function in > fieldtrip. > > I just downloaded the latest version and it is still giving me problems. > > the error message reads as follows: > > ??? Invalid MEX-file 'C:\Program > Files\MATLAB\R2007a\toolbox\fieldtrip-20080405\private\plgndr.dll': The > specified procedure could not be found. > > Error in ==> fieldtrip-20080405\private\splint>gh at 170 > p(k) = plgndr(k,0,x(i,j)); > > Error in ==> fieldtrip-20080405\private\splint at 75 > [gx, hx] = gh(CosEii); > > Error in ==> scalpcurrentdensity at 186 > [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); > > ---- > Has anybody else run into this situation??? > Gladly appreciate your help! > Thanks in advance > > Manuel > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 florisdelange at GMAIL.COM Thu Apr 10 16:26:11 2008 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Thu, 10 Apr 2008 16:26:11 +0200 Subject: plotting planar gradient data Message-ID: Salut Fieldtrippers, I am wondering whether there is a small bug in the routine that transforms data to planar gradient (or alternatively, I'm doing something stupid). After I have created an average ERF, using timelockanalysis, I transform my data to planar gradient using the following two commands: cfg = []; cfg.planarmethod = 'sincos'; erf_planar = megplanar(cfg,erf_axial); erf_planarcomb = combineplanar([],erf_planar); Now, several fields are gone/not compatible anymore with the plotting routines. First of all, I have to add a dimord-field: erf_planarcomb.dimord = 'chan_time'; Then, the time-field gets encapsulated in a structure, which the plotting routines don't like, so I have to specify: erf_planarcomb.time = erf_planarcomb.time{1}; And the same for the data field: erf_planarcomb.avg = erf_planarcomb.trial{1}; Is this a bug, or am I doing something wrong? If I look at the ERF-tutorial (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) all these steps don't seem necessary.. Thanks for your feedback, All the best, Floris ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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.bauer at FIL.ION.UCL.AC.UK Thu Apr 10 18:59:36 2008 From: m.bauer at FIL.ION.UCL.AC.UK (Markus Bauer) Date: Thu, 10 Apr 2008 17:59:36 +0100 Subject: plotting planar gradient data In-Reply-To: Message-ID: hey dr. floris try > cfg = []; > cfg.planarmethod = 'sincos'; > erf_planar = megplanar(cfg,erf_axial); erfplanar = raw2data(erfplanar,'chan_time'); that should do it, might depend a bit on which fieldtrip version you're using it's cause the function converts it internally into "raw data format" - I guess to make it generally usable also for freqanalysis cheers markus > Salut Fieldtrippers, > > I am wondering whether there is a small bug in the routine that transforms > data to planar gradient (or alternatively, I'm doing something stupid). > > After I have created an average ERF, using timelockanalysis, I transform my > data to planar gradient using the following two commands: > > cfg = []; > cfg.planarmethod = 'sincos'; > erf_planar = megplanar(cfg,erf_axial); > erf_planarcomb = combineplanar([],erf_planar); > > Now, several fields are gone/not compatible anymore with the plotting routines. > > First of all, I have to add a dimord-field: > erf_planarcomb.dimord = 'chan_time'; > > Then, the time-field gets encapsulated in a structure, which the plotting > routines don't like, so I have to specify: > erf_planarcomb.time = erf_planarcomb.time{1}; > > And the same for the data field: > erf_planarcomb.avg = erf_planarcomb.trial{1}; > > Is this a bug, or am I doing something wrong? > If I look at the ERF-tutorial > (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) > all these steps don't seem necessary.. > > Thanks for your feedback, > All the best, > Floris > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 marie at PSY.GLA.AC.UK Thu Apr 10 19:24:27 2008 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 10 Apr 2008 18:24:27 +0100 Subject: Hello In-Reply-To: <47FE4778.2050201@fil.ion.ucl.ac.uk> Message-ID: Hi Markus Not sure if you remember me, but i just saw your fieldtrip post from the FIL and thought i would write and say congrats for your job in London. I hope things are good with you. Marie Quoting Markus Bauer : > hey dr. floris > > try > >> cfg = []; >> cfg.planarmethod = 'sincos'; >> erf_planar = megplanar(cfg,erf_axial); > > erfplanar = raw2data(erfplanar,'chan_time'); > > that should do it, might depend a bit on which fieldtrip version you're using > it's cause the function converts it internally into "raw data format" - > I guess to make it generally usable also for freqanalysis > > cheers > markus > > >> Salut Fieldtrippers, >> >> I am wondering whether there is a small bug in the routine that transforms >> data to planar gradient (or alternatively, I'm doing something >> stupid). After I have created an average ERF, using >> timelockanalysis, I transform my >> data to planar gradient using the following two commands: >> >> cfg = []; >> cfg.planarmethod = 'sincos'; >> erf_planar = megplanar(cfg,erf_axial); >> erf_planarcomb = combineplanar([],erf_planar); >> >> Now, several fields are gone/not compatible anymore with the >> plotting routines. First of all, I have to add a dimord-field: >> erf_planarcomb.dimord = 'chan_time'; >> >> Then, the time-field gets encapsulated in a structure, which the plotting >> routines don't like, so I have to specify: >> erf_planarcomb.time = erf_planarcomb.time{1}; >> >> And the same for the data field: >> erf_planarcomb.avg = erf_planarcomb.trial{1}; >> >> Is this a bug, or am I doing something wrong? If I look at the ERF-tutorial >> (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) >> all these steps don't seem necessary.. >> >> Thanks for your feedback, >> All the best, >> Floris >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to 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 University of Glasgow, Department of Psychology WebMail system ------------------------------------------------------------------ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Apr 11 15:10:11 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 11 Apr 2008 15:10:11 +0200 Subject: BrainSync: 2 postdoc positions available Message-ID: 2 Post-doctoral positions at the Institute of Advanced Technologies in Biomedicine (ITAB), University of Chieti, to work on BrainSync, a FP7 sponsored project (see abstract below), starting immediately (www.brainsynch.org). These positions are for experiments on the mechanisms of neuronal communication in resting state networks and during visual attention in healthy volunteers with fMRI and MEG. BrainSync is a multi-center project involving the following scientists (centers): Maurizio Corbetta & Gian Luca Romani (St.Louis, Chieti), Jean-Philippe Lachaux (Lyon), Guy Orban & Wim Vanduffel (Leuven, Boston), Pascal Fries (Njimegen), Jon Driver (London), and Andreas Engel (Hamburg). BrainSync involves studies in human and non- human primates using a variety of methods including single/multi-unit/ LFP/fMRI recordings in non-human primates; fMRI/MEG/TMS measurements in healthy subjects and patients with brain diseases. ITAB is equipped with two new Phillips scanner (1.5 and 3.0T), a 165 channel MEG, integrated TMS/EEG and EEG/fMRI systems, and new 500 channels MEG system operational in the fall of 2008. Candidates should have a PhD in Physics, Engineering, Psychology, Neuroscience, or Computer Science. MDs with a strong background in Cognitive Neuroscience may also apply. Candidates should be already familiar either with MEG or fMRI methods. Quantitative skills in signal processing and time course analysis, as well as computer programming (C++, Matlab) is highly desirable. Chieti is a university town, located in central Italy, about 15 minutes from the Adriatic coast, 30 minutes from the Parco Nazionale degli Abruzzi, the largest natural reserve in Italy, great skying, hiking, and mountain or seaside activities, only 2 hours from Rome. Applications should include CV, a research statement, and 2 letters of reccomendation. Please forward the application materials to Prof. Maurizio Corbetta, mau at npg.wustl.edu, Department of Neurology, Washington University, St.Louis, Box 8111, 660 S.Euclid, St.Louis, MO 63110. BrainSync abstract FP7 program ------------------------------ The goal of this project is to understand how neuronal assemblies exchange information (functional neuronal communication), and how variability in neuronal communication explains variability in behavioural performance, both in the intact and injured brain. Neural communication involves temporal interactions between neuronal assemblies, not only locally within an area but also on a larger- scale between brain areas. We focus on large-scale interactions that arise at two distinct but potentially related temporal scales: 'slow' (~0.1 Hz) fluctuations of the blood oxygen level dependent (BOLD) signal, as readily measured with functional magnetic resonance imaging (fMRI); and 'fast' (1-150 Hz) neuronal oscillations, as can be measured at various spatial scales (e.g. multi-unit activity (MUA) and local field potentials (LFP) at fine spatial scale; electroencephalography (EEG); magnetoencephalography (MEG) at intermediate scale. We will explore how the different temporal and spatial scales relate mechanistically, and how variability in ongoing spontaneous or task-induced neuronal interactions relates to cognition and behaviour. A potentially important clinical application is the development of easy-to-use diagnostic measures of neuronal communication, and pathological changes in this, for many major brain diseases, including stroke, head injury, multiple sclerosis, and Alzheimer's disease. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 soren.r.christensen at GSK.COM Fri Apr 11 16:04:54 2008 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Fri, 11 Apr 2008 15:04:54 +0100 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 11-Apr-2008 and will not return until 13-Apr-2008. Back on Monday ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 desain at NICI.RU.NL Mon Apr 14 10:24:33 2008 From: desain at NICI.RU.NL (Peter Desain) Date: Mon, 14 Apr 2008 10:24:33 +0200 Subject: Senior position in Artificial Intelligence (AI) with a focus on Brain-Computer Interface (BCI). Message-ID: Assistant Professor of Artificial Intelligence (1,0 fte) *Faculty of Social Sciences Maximum salary: Euro 4868,- gross/month Vacancynumber: 24.13.08 Closing date: 15-05-2008 *Jobdescription A senior position in Artificial Intelligence (AI) with a focus on Brain-Computer Interface (BCI). The successful candidate is expected to cooperate with the SmartMix project BrainGain (for more detail, see www.braingain.nu), provide contributions to BCI-oriented research in Theoretical Cognitive Science and to participate in the establishment of a coherent research line with the division of Cognitive Artificial Intelligence. Teaching tasks are: - To participate in the design of BCI courses for the AI programme; the research master's programme in Cognitive Neuroscience (CNS), and the teaching of courses in AI and CNS. - To contribute to the collaboration with the Computer Science department. - Supervision of interns (BSc and MSc theses), and PhD students. Organizational tasks are: - To assist in managing the NICI's division of Cognitive Artificial Intelligence. Maximum employment: 1,0 (0,5 research; 0,5 education). Requirements You have a background in Cognitive (Neuro) Science and EEG signal analysis with orientation on Brain-Computer Interfaces (BCI) and in Theoretical Cognitive Science, more specifically, conceptual and formal analysis of computational models of cognition and/or embodied embedded cognition. You have thorough experience in conducting scientific research and writing. Furthermore, you have good teaching skills, the ability to motivate and attract students. You have good collaboration and communication skills and the ability to work in a complex organization with many partners. You attitude is pragmatic and productive. Organisation The position is located in NICI's division "Cognitive Artificial Intelligence" (research) and in the School of Psychology and Artificial Intelligence (teaching) of the Faculty of Social Sciences. Website: www.ru.nl/fsw Conditions of employment Maximum employment: 1,0 Maximum salary per month, based on fulltime employment: Euro 4868,- Salary scale: 12 Duration of contract: Temporary, with the possibility of a permanent appointment after five years. Additional conditions of employment The candidate will be appointed for a period of five years in total. Starting with 1 year. If the evaluation is positive, the contract will be extended by 4 years, with the possibility of permanent appointment after five years. Additional information Dr. P. Desain Telephone: 0031-243615885 E-mail: desain at nici.ru.nl Application You can apply for the job (mention the vacancynumber 24.13.08 before 15-05-2008 by sending your application to: RU, Faculty of Social Sciences, HR Department P.O. Box 9104 6500 HE Nijmegen E-mail:vacancies at socsci.ru.nl -- Dr. ir. Peter Desain Cognitive Artificial Intelligence NICI, Radboud University Nijmegen P.O.Box 9104 6500 HE Nijmegen Montessoriln 3 6525 HR Nijmegen The Netherlands www.nici.ru.nl/mmm www.nici.ru.nl/braingain ++31-24-3615885 tel ++31-24-3616066 fax ++31-6-51888767 cell ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 P.PRAAMSTRA at BHAM.AC.UK Mon Apr 14 11:54:08 2008 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Mon, 14 Apr 2008 10:54:08 +0100 Subject: Sliceinterp Message-ID: Dear FTers, I have a query regarding the sliceinterp function. I am trying to plot the sources of beta power changes. The source activities are the result of a comparison of left and right hand movement conditions, hence they have a mirror reversed distribution and amplitude, ranging from say -15 in one hemisphere to +15 in the opposite hemisphere. In order to clip the displayed source activities to say [-10 -15] in one hemisphere and [10 15] in the other (and create opacity maps) I thought I could use cfg.clipsym = `yes´ (and cfg.maskclipsym). For instance: cfg = []; cfg.funparameter = 'pow'; cfg.colmin = 5; cfg.colmax = 15; cfg.clipsym = 'yes'; However, this doesn´t seem to work since the clipping is performed on only one end of the scale, eliminating the mirror reversed source at the other end. Am I wrong in assuming cfg.clipsym would work here or am I using it in the wrong way? (What I´m trying to do is exactly the same as realized in Figure 3 of Medendorp et al. CerCor 2007). Any suggestions? Peter Praamstra ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 15 12:29:04 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 15 Apr 2008 12:29:04 +0200 Subject: Sliceinterp In-Reply-To: <480337D0.14728.5CE540@P.PRAAMSTRA.Bham.ac.uk> Message-ID: Dear Peter, My suggestion would be to use sourceplot, instead of sliceinterp. Sourceplot is a more modern version of sliceinterp and incorporates most (if not all) of sliceinterp's functionality (and more!). The function is quite well documented, but to give you some handles: cfg.method = 'slices'; cfg.nslices = a number but by default something like 20 cfg.funparameter = 'pow'; cfg.funcolorlim = [-15 15]; Additionally, you can specify a maskparameter, which will be used for opacity-mapping. This could be cfg.maskparameter = 'pow'. There are several options for the opacity you can play with, but when not specifying anything, I believe you are already pretty much in the right direction. Alternatively, you can create a new field in your data-structure, in which you control the opacity more explicitly, e.g. data.mask = abs(data.pow) >10; Note that when you want to plot the output of a statistics-function, there's usually a .mask-field associated with the data. I hope this helps, Yours, Jan-Mathijs On Apr 14, 2008, at 11:54 AM, Peter Praamstra wrote: > Dear FTers, > I have a query regarding the sliceinterp function. I am trying to > plot the sources of beta power changes. The source activities are > the result of a comparison of left and right hand movement > conditions, hence they have a mirror reversed distribution and > amplitude, ranging from say -15 in one hemisphere to +15 in the > opposite hemisphere. > > In order to clip the displayed source activities to say [-10 -15] > in one hemisphere and [10 15] in the other (and create opacity > maps) I thought I could use cfg.clipsym = ‘yes’ (and cfg.maskclipsym). > For instance: > cfg = []; > cfg.funparameter = 'pow'; > cfg.colmin = 5; > cfg.colmax = 15; > cfg.clipsym = 'yes'; > > However, this doesn’t seem to work since the clipping is performed > on only one end of the scale, eliminating the mirror reversed > source at the other end. > > Am I wrong in assuming cfg.clipsym would work here or am I using it > in the wrong way? > > (What I’m trying to do is exactly the same as realized in Figure 3 > of Medendorp et al. CerCor 2007). > > Any suggestions? > > Peter Praamstra > > ---------------------------------- > > The aim of this list 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.PRAAMSTRA at BHAM.AC.UK Tue Apr 15 14:28:56 2008 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Tue, 15 Apr 2008 13:28:56 +0100 Subject: Sliceinterp In-Reply-To: Message-ID: Dear Jan-Mathijs, Many thanks for your advice! Just replacing sliceinterp with sourceplot - and using default settings for opacity mapping - already did the trick. Best wishes, Peter On 15 Apr 2008 at 12:29, jan-mathijs schoffelen wrote: > > Dear Peter, > > My suggestion would be to use sourceplot, instead of sliceinterp. > Sourceplot is a more modern > version of sliceinterp and incorporates most (if not all) of > sliceinterp's functionality (and more!). > The function is quite well documented, but to give you some > handles: > > cfg.method = 'slices'; > cfg.nslices = a number but by default something like 20 > cfg.funparameter = 'pow'; > cfg.funcolorlim = [-15 15]; > > Additionally, you can specify a maskparameter, which will be used > for opacity-mapping. This could > be cfg.maskparameter = 'pow'. > There are several options for the opacity you can play with, but > when not specifying anything, I > believe you are already pretty much in the right direction. > > Alternatively, you can create a new field in your data-structure, in > which you control the opacity > more explicitly, e.g. > data.mask = abs(data.pow) >10; > Note that when you want to plot the output of a statistics-function, > there's usually a .mask-field > associated with the data. > > I hope this helps, > > Yours, > > Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From victimontes at HOTMAIL.COM Wed Apr 16 22:50:26 2008 From: victimontes at HOTMAIL.COM (Victoria Eugenia Montes Restrepo) Date: Wed, 16 Apr 2008 20:50:26 +0000 Subject: References to implemented methods Message-ID: Hi all, I'm working with the minimum norm solution for the inverse problem. There are three references inside the function minimumnormestimate: "Dale et al 2000", "Liu et al 2002" and "Lin et al 2004". I would be very grateful if you could send me these three papers. Thanks in advance, Victoria Eugenia Montes _________________________________________________________________ La vida de los famosos al desnudo en MSN Entretenimiento http://entretenimiento.es.msn.com/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 lmoranr at GMAIL.COM Thu Apr 17 19:08:18 2008 From: lmoranr at GMAIL.COM (=?ISO-8859-1?Q?Luis_Mor=E1n?=) Date: Thu, 17 Apr 2008 19:08:18 +0200 Subject: problem with volume_segment Message-ID: Hi all!! I'm working on the tutorial "Applying beamforming techniques in the frequency domain". Whe I've tried to run next lines: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca GBT\spm2\templates\T1.mnc'; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); I've got the following errors: performing the segmentation on the specified volume ??? Cant map image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); Error in ==> spm_smoothto8bit at 14 VO = smoothto8bit(V,fwhm); Error in ==> spm_segment>get_affine_mapping at 233 VFS = spm_smoothto8bit(VF(1),aflags.smosrc); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Could anyone help me?? Thank you in advance for any help you can give -- Luis Morán ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 21 16:56:47 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 21 Apr 2008 16:56:47 +0200 Subject: problem with volume_segment In-Reply-To: <52b4c8f20804171008v33961378w5af1fb835e79adcf@mail.gmail.com> Message-ID: Dear Luis, Fieldtrip makes use of SPM2 (i.e. SPM version 2) for the segmentation. The segmentation is then used to construct a volume conduction model. There are some incompatibilities between SPM2 and later versions. Please check that you have the correct version of SPM. For segmenting, a temporary file is written to disk and then SPM is called. Although I am not an expert on SPM, the error message "??? Cant map image file" seems to indicate that there is a problem with reading the temporary file. You can use the matlab debugger to stop on the line where you encounter the problem and look at the problem in more detail. best regards, Robert On 17 Apr 2008, at 19:08, Luis Morán wrote: > Hi all!! > > I'm working on the tutorial "Applying beamforming techniques in the > frequency domain". Whe I've tried to run next lines: > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca GBT > \spm2\templates\T1.mnc'; > cfg.name = 'segment'; > cfg.write = 'yes'; > cfg.coordinates = 'ctf'; > [segmentedmri] = volumesegment(cfg, mri); > > I've got the following errors: > > performing the segmentation on the specified volume > ??? Cant map image file. > > Error in ==> spm_smoothto8bit>smoothto8bit at 51 > img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); > > Error in ==> spm_smoothto8bit at 14 > VO = smoothto8bit(V,fwhm); > > Error in ==> spm_segment>get_affine_mapping at 233 > VFS = spm_smoothto8bit(VF(1),aflags.smosrc); > > Error in ==> spm_segment>init_sp at 567 > MM = get_affine_mapping(VF,PG,flags.affreg); > > Error in ==> spm_segment at 91 > SP = init_sp(flags.estimate,VF,PG); > > Error in ==> volumesegment at 250 > spm_segment(Va,cfg.template,flags); > > > Could anyone help me?? > > Thank you in advance for any help you can give > > -- > Luis Morán > ---------------------------------- > > The aim of this list 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 Mon Apr 21 17:12:17 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 21 Apr 2008 17:12:17 +0200 Subject: Problem while using prepare_leadfield with parameters cfg.resolution and cfg.inwardshift In-Reply-To: Message-ID: Hi Ingmar Although your question/problem is not completely clear to me, I suspect it to be related to http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#why_is_there_a_rim _around_the_brain_for_which_the_source_reconstruction_is_not_computed In general fieldtrip tries to make a dipole grid that is just inside the brain but as close as possible to the brain surface. Some volume conduction models are not fitted to the brain surface however, but to the skin surface. In those cases the cfg.inwardshift option tries to get an estimate of the brain surface from the skin surface, in order to achieve teh same tight fit of the dipole grid in the brain and to prevent the solution to be computed for dipoles in teh skull or skin. However, with a low resolution and a grid that fits exactly in the brain you tend to get the problem as outlined in the FAQ. Therfore it can be usefull to play with the cfg.inwardshift parameter. You can set it to a negative number, i.e. inwardshift=-2.5, which results in a 2.5cm _outwardshift_ of the source compartment boundary. I hope this helps, if not then please ask again with more specifications of your analysis (what kind of MEG, what kind of volume model, etc). best regards, Robert On 13 Feb 2008, at 15:36, Ingmar Schneider wrote: > Hello everybody, > > I am currently trying to analyze my MEG data with the DICS beamforming > technique. While preparing my leadfield grid via the > prepare_leadfield.m > function I stumbled across a problem I don't understand. Every time > I try to > decrease the inwardshift to suit the leadfield upon my anatomy data > and at > the same time increase the resolution the resulting grid is even > smaller, > than without specification. > > For example applying the following parameters reduces the size of the > resulting grid instead of increasing its volume: > cfg.inwardshift = -1.5; %Increasing the grid size to cover the anatomy > cfg.resoltion = 0.5; %[cm] > > Without the cfg.resolution parameter a reduction of cfg.inwardshift > results > in the desired bigger leadfield grid which eventually fits upon the > MRI > data. Are these factors intertwined in the calculations so that one > effects > the other in the course of calculation? > > I hope someone can help me solve this little problem and am > grateful for any > kind of hint. > > Regards, > Ingmar > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to 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 K.Nazarpour at BHAM.AC.UK Mon Apr 21 17:49:38 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Mon, 21 Apr 2008 16:49:38 +0100 Subject: problem with volume_segment In-Reply-To: Message-ID: Dear Robert, I have had similar problem for some weeks. I have checked everything and really can't figure out where the problem is. As I posted earlier, if I simply ran SPM, volume segmentation can be done in SPM. However, if through simialr MATLAB platform (dll), vol segmentation is called from FT, the error comes up. Looking forward, Kianoush Robert Oostenveld wrote: > Dear Luis, > > Fieldtrip makes use of SPM2 (i.e. SPM version 2) for the segmentation. > The segmentation is then used to construct a volume conduction model. > > There are some incompatibilities between SPM2 and later versions. Please > check that you have the correct version of SPM. > > For segmenting, a temporary file is written to disk and then SPM is > called. Although I am not an expert on SPM, the error message "??? Cant > map image file" seems to indicate that there is a problem with reading > the temporary file. You can use the matlab debugger to stop on the line > where you encounter the problem and look at the problem in more detail. > > best regards, > Robert > > > > On 17 Apr 2008, at 19:08, Luis Morán wrote: >> Hi all!! >> >> I'm working on the tutorial "Applying beamforming techniques in the >> frequency domain". Whe I've tried to run next lines: >> mri = read_fcdc_mri('Subject01.mri'); >> cfg = []; >> cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca >> GBT\spm2\templates\T1.mnc'; >> cfg.name = 'segment'; >> cfg.write = 'yes'; >> cfg.coordinates = 'ctf'; >> [segmentedmri] = volumesegment(cfg, mri); >> >> I've got the following errors: >> >> performing the segmentation on the specified volume >> ??? Cant map image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Could anyone help me?? >> >> Thank you in advance for any help you can give >> >> -- >> Luis Morán >> ---------------------------------- >> >> The aim of this list 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. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Ingmar.Schneider at BIO.UNI-GIESSEN.DE Tue Apr 22 09:52:09 2008 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Tue, 22 Apr 2008 09:52:09 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolution and cfg.inwardshift In-Reply-To: <6CA37F03-1541-4B06-81D4-B72CD8D0DD13@fcdonders.ru.nl> Message-ID: Hello again, what you say is completely right and my problem is related to the problem described in the FAQ. As I tried to explain in the last mail and as you say: A reduction of the inwardshift (i.e. to a negative value) results in a leadfield, that covers the whole anatomy data. But if I simultaneously try to improve the resolution (i.e. to 0.5cm) the resulting field is smaller than the one with the default resolution-value of 1cm. I played with some combinations, but i never really got a suiting leadfield. I am using data from a VSM MedTech CTF-MEG with 275 channels and here's an excerpt of the Matlab-code to further specify my analysis. These specifications actually deliver a leadfield, that covers most of the anatomy, but in a poor resolution. %Preparation of the head model [vol, hdmcfg]=prepare_singleshell([], segmentedmriF); % Single sphere save(MRIoutname, 'vol', 'hdmcfg', '-append', '-v7.3'); clear segmentedmriF; %Preparation of the Leadfield for a specific dataset filename = strcat(SubjectID,'_10Hz_Redef_CSDM_20HzBin.mat'); fullname = strcat(INpath, filename); load(fullname); % Load redefined data file with gradiometers etc. for leadfield generation cfg = []; cfg.grad = freqPost.grad; cfg.vol = vol; cfg.inwardshift = -1.5; cfg.resolution = 1; cfg.reducerank = 2; cfg.channel = {'MEG', '-MLP12', '-MRC14', '-MLT41', '-MRC25', '-MRP56', '-MRT21', '-MLO21', '-MRO44', '-MRT47'}; cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; cfg.zgrid = 'auto'; [LFgrid] = prepare_leadfield(cfg); I hope this helps a bit to clarify my problem and the information is useful to you. Best regards, Ingmar Robert Oostenveld schrieb: > Hi Ingmar > > Although your question/problem is not completely clear to me, I > suspect it to be related to > > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:frequently_asked_questions#why_is_there_a_rim_around_the_brain_for_which_the_source_reconstruction_is_not_computed > > > In general fieldtrip tries to make a dipole grid that is just inside > the brain but as close as possible to the brain surface. Some volume > conduction models are not fitted to the brain surface however, but to > the skin surface. In those cases the cfg.inwardshift option tries to > get an estimate of the brain surface from the skin surface, in order > to achieve teh same tight fit of the dipole grid in the brain and to > prevent the solution to be computed for dipoles in teh skull or skin. > > However, with a low resolution and a grid that fits exactly in the > brain you tend to get the problem as outlined in the FAQ. Therfore it > can be usefull to play with the cfg.inwardshift parameter. You can set > it to a negative number, i.e. inwardshift=-2.5, which results in a > 2.5cm _outwardshift_ of the source compartment boundary. > > I hope this helps, if not then please ask again with more > specifications of your analysis (what kind of MEG, what kind of volume > model, etc). > > best regards, > Robert > > > On 13 Feb 2008, at 15:36, Ingmar Schneider wrote: >> Hello everybody, >> >> I am currently trying to analyze my MEG data with the DICS beamforming >> technique. While preparing my leadfield grid via the prepare_leadfield.m >> function I stumbled across a problem I don't understand. Every time I >> try to >> decrease the inwardshift to suit the leadfield upon my anatomy data >> and at >> the same time increase the resolution the resulting grid is even >> smaller, >> than without specification. >> >> For example applying the following parameters reduces the size of the >> resulting grid instead of increasing its volume: >> cfg.inwardshift = -1.5; %Increasing the grid size to cover the anatomy >> cfg.resoltion = 0.5; %[cm] >> >> Without the cfg.resolution parameter a reduction of cfg.inwardshift >> results >> in the desired bigger leadfield grid which eventually fits upon the MRI >> data. Are these factors intertwined in the calculations so that one >> effects >> the other in the course of calculation? >> >> I hope someone can help me solve this little problem and am grateful >> for any >> kind of hint. >> >> Regards, >> Ingmar >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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 r.oostenveld at FCDONDERS.RU.NL Tue Apr 22 21:05:23 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 22 Apr 2008 21:05:23 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolution and cfg.inwardshift In-Reply-To: <480D9929.1090608@bio.uni-giessen.de> Message-ID: Hi Ingmar On 22 Apr 2008, at 9:52, Ingmar Schneider wrote: > what you say is completely right and my problem is related to the > problem described in the FAQ. As I tried to explain in the last > mail and as you say: A reduction of the inwardshift (i.e. to a > negative value) results in a leadfield, that covers the whole > anatomy data. But if I simultaneously try to improve the resolution > (i.e. to 0.5cm) the resulting field is smaller than the one with > the default resolution-value of 1cm. I played with some > combinations, but i never really got a suiting leadfield. How do you mean "the field is smaller"? The cfg.resolution only pertains to the distance between neighbouring grid locations at which dipoles will be positioned (using the fieldtrip/private/ prepare_dipole_grid function). Then the leadfield is computed by looping over all dipole positions that are marked as being inside the brain. The "inside the brain" detection is influenced by cfg.inwardshift. If you compare LFgrid_coarse.leafield{i} and LFgrid_fine.leafield{j} for the two grids that you have constructed, where LFgrid_coarse.pos(i,:)== LFgrid_fine.pos(j,:) then you should have exactly the same leadfield. However, the number of dipole positions in the grid should be higher for the fine resolution than for the coarse resolution (the effect of cfg.resolution). If you keep the resolution constant but change cfg.inwardshift, then you will primarily see a change in the number of dipoles taht is marked inside. Note however that fieldtrip tries to keep the "box" encompassing the brain compartment as small as possible, so changing cfg.inwardshift might also affect the total number of sources (inside+outside). Perhaps you should do this to clarify it further insidevol = zeros(LFgrid.dim); insidevol(LFgrid.inside) = 1; insidevol(LFgrid.outside) = 0; for slice=1:LFgrid.dim(3) % probably you dont want this in a for loop figure; imagesc(insidevol(:,:,slice)); end You can also see that LFgrid.leadfield is empty (i.e. []) for all "outside" gridpoints (that is to save memory, since ~50% of the points will be outside the brain). > I am using data from a VSM MedTech CTF-MEG with 275 channels and > here's an excerpt of the Matlab-code to further specify my > analysis. These specifications actually deliver a leadfield, that > covers most of the anatomy, but in a poor resolution. The leadfield is usually computed on a relatively coarse grid (compared to fMRI) because of the computationat time involved, but also because the spatial resolution of MEG is not so high anyway (assuming a whole-head beamformer source reconstruction or a distributed source model). A resolution of 1cm is usually fine to get a quick first idea, and I consider a resolution of 0.7cm adequate for almost all applications. Mote that decreasing the resolution from 1 to 0.7 results in 3x so many dipoles and hence 3x longer computations. best regards, Robert PS your code looks fine to me ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Ingmar.Schneider at BIO.UNI-GIESSEN.DE Wed Apr 23 12:21:32 2008 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Wed, 23 Apr 2008 12:21:32 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolutionand cfg.inwardshift In-Reply-To: <2FE87490-AAD1-402F-B206-CA4B811C65B9@fcdonders.ru.nl> Message-ID: Hello Robert, thanks again for the quick reply! I'm sorry for the sloppy formulation. What I mean by "the field", is the visible area after source analysis. I calculated the sources two times - once with a leadfield resolution of 1cm and once with a resolution of 0.5cm - and compared the resulting sliceplots. While the 1cm resolution resulted in a source analysis covering almost the whole MRI-anatomy, the 0.5cm resolution concentrated only on the central 50% of the anatomy (Unfortunately I have no saved figures of these constellations, but I'll try to visualize it in an attached, coarse scetch). I considered these divergences to result from the underlying leadfield, but I checked the calculated leadfields as you proposed in your last mail and the dimensions appear to be just fine. Probably the original problem is not related to the leadfield at all. With best regards, Ingmar Robert Oostenveld schrieb: > Hi Ingmar > > On 22 Apr 2008, at 9:52, Ingmar Schneider wrote: >> what you say is completely right and my problem is related to the >> problem described in the FAQ. As I tried to explain in the last mail >> and as you say: A reduction of the inwardshift (i.e. to a negative >> value) results in a leadfield, that covers the whole anatomy data. >> But if I simultaneously try to improve the resolution (i.e. to 0.5cm) >> the resulting field is smaller than the one with the default >> resolution-value of 1cm. I played with some combinations, but i never >> really got a suiting leadfield. > > How do you mean "the field is smaller"? The cfg.resolution only > pertains to the distance between neighbouring grid locations at which > dipoles will be positioned (using the > fieldtrip/private/prepare_dipole_grid function). Then the leadfield is > computed by looping over all dipole positions that are marked as being > inside the brain. The "inside the brain" detection is influenced by > cfg.inwardshift. > > If you compare > LFgrid_coarse.leafield{i} > and > LFgrid_fine.leafield{j} > for the two grids that you have constructed, where > LFgrid_coarse.pos(i,:)== LFgrid_fine.pos(j,:) > then you should have exactly the same leadfield. However, the number > of dipole positions in the grid should be higher for the fine > resolution than for the coarse resolution (the effect of > cfg.resolution). If you keep the resolution constant but change > cfg.inwardshift, then you will primarily see a change in the number of > dipoles taht is marked inside. Note however that fieldtrip tries to > keep the "box" encompassing the brain compartment as small as > possible, so changing cfg.inwardshift might also affect the total > number of sources (inside+outside). > > Perhaps you should do this to clarify it further > > insidevol = zeros(LFgrid.dim); > insidevol(LFgrid.inside) = 1; > insidevol(LFgrid.outside) = 0; > > for slice=1:LFgrid.dim(3) % probably you dont want this in a for loop > figure; imagesc(insidevol(:,:,slice)); > end > > You can also see that LFgrid.leadfield is empty (i.e. []) for all > "outside" gridpoints (that is to save memory, since ~50% of the points > will be outside the brain). > >> I am using data from a VSM MedTech CTF-MEG with 275 channels and >> here's an excerpt of the Matlab-code to further specify my analysis. >> These specifications actually deliver a leadfield, that covers most >> of the anatomy, but in a poor resolution. > > The leadfield is usually computed on a relatively coarse grid > (compared to fMRI) because of the computationat time involved, but > also because the spatial resolution of MEG is not so high anyway > (assuming a whole-head beamformer source reconstruction or a > distributed source model). A resolution of 1cm is usually fine to get > a quick first idea, and I consider a resolution of 0.7cm adequate for > almost all applications. Mote that decreasing the resolution from 1 to > 0.7 results in 3x so many dipoles and hence 3x longer computations. > > best regards, > Robert > > PS your code looks fine to me > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to 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: scetch.png Type: image/png Size: 33761 bytes Desc: not available URL: From zanasilva at GMAIL.COM Sun Apr 27 00:01:13 2008 From: zanasilva at GMAIL.COM (Susana Silva) Date: Sun, 27 Apr 2008 00:01:13 +0200 Subject: eep and brainvision definetrial Message-ID: Hi I am a new and very poor fieldtrip user. I am trying to use fieldtrip for analysis of eep files (ANT, ASA). First I tried eep “read” functions (fieldtrip\private), but there were problems with the MEX file (“invalid MEX file”). This applies to .cnt as well as to .avr. Then I exported my eep files as brainvision. Now I can read the brainvision header file using the read_brainvision_vhdr, but not with read_fcdc_header; differently, I can read the brainvision trigger file with read_fcdc_event, but not with read_brainvision_vmrk. When I try to do the trial definition, something is said about the function read_fcdc_header not being OK. As I can not use this function, it sounds logical. My questions are: - In my position – someone who has eep files and brainvision files, what is the most simple option: try to use eep or brainvision (at the moment, I can use neither!) - Can you give me an example of a trial definition based upon a brainvision file, let us say s1.eeg (data), s1.vhdr , s1.vmrk, where ‘s33’ (eventvalue) is the ‘Stimulus’ (eventtype)? - In case I can not do the trial definition, how exactly should I arrange my data so that they are equivalent to the output of “definetrial”? Thank you, Susana Silva ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 28 12:30:31 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 28 Apr 2008 12:30:31 +0200 Subject: postdoc position available in Manchester Message-ID: FYI, read below for the full advert. I was told that the deadline is already very soon: 2nd of May. best regards, Robert --------------- Postdoc to study the influence of sleep upon memory consolidation Applications are invited for a 3 year postdoc to study the neuroplasticity associated with sleep-dependent memory consolidation using fMRI, MEG, and sleep monitoring with EEG. The successful candidate will be based at the University of Manchester, and will take up the post in June-August of this year. The Project It is well established that procedural skills are strengthened during post-training sleep, and that such consolidation is associated with alterations in neural circuitry. This neuroplasticity is thought to be caused by the reactivation of task-related circuitry during sleep, in combination with the electrophysiological and pharmacological characteristics of that sleep. This fellowship will focus upon sleep dependent neuroplasticity by using fMRI, MEG, and EEG first to characterise sleep-dependent changes in the activity of local brain regions and brain networks, and second to track the evolution of such changes during a night of sleep. Manchester’s neuroscience community & facilities Manchester University provides a vibrant intellectual community with a strong commitment to cognitive neuroscience. Local facilities include 3 and 1.5 Tesla Philips MR scanners at the Translational Imaging Unit http://www.mhs.manchester.ac.uk/tiu/ and a PET scanner at the Wolfson Molecular Imaging Centre http:// www.mhs.manchester.ac.uk/research/facilities/wmic/ . The appointee will join the Neuroscience and Aphasia Unit (NARU) http://www.psych- sci.manchester.ac.uk/naru/ and interact with the Cognition and Cognitive Neuroscience Unit http://www.psych-sci.manchester.ac.uk/ research/groups/cognitionandcognitive/ . MEG studies will be performed at the University of Liverpool’s MARIARC centre http:// www.liv.ac.uk/mariarc/ Collaborators & Training This post provides an exceptional opportunity to learn cutting edge techniques in fMRI, MEG, and EEG. It is part of a 3 year BBSRC grant to Dr. Penny Lewis http://www.liv.ac.uk/psychology/staff/plewis.html in conjunction with Matt Walker of the Sleep and Neuroimaging Lab at Berkeley http://www.walkerlab.com/people.html, Derk-Jan Dijk of the Surrey Sleep Research Centre http://www.surrey.ac.uk/SBMS/SSRC/, Andrej Stancak of MARIARC, and Dr. Stefan Kiebel at the Functional Imaging Laboratory http://www.fil.ion.ucl.ac.uk/. The successful candidate will travel regularly to visit these collaborators and learn cutting edge techniques for experimental design and analysis. To apply you must have a) A PhD in neuroscience, computer science, or a related field b) Experience with MEG or EEG. c) An interest in memory plasticity and or sleep research If interested, please send a CV and statement of interest to Penny Lewis . There is no formal deadline, but we encourage you to make contact as soon as possible. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 28 13:07:47 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 28 Apr 2008 13:07:47 +0200 Subject: Postdoctoral Position in Brain Imaging - MPI Frankfurt Message-ID: Postdoctoral Position in Brain Imaging A joint postdoctoral position in brain imaging is available at the Max Planck Institute for Brain Research, Department of Neurophysiology, and at the Laboratory for Neurophysiology and Neuroimaging, Department of Psychiatry, Johann Wolfgang Goethe- Universität, Frankfurt am Main. The successful applicant will work on projects examining the neurophysiology of cognitive dysfunctions in neuropsychiatric disorders (Schizophrenia, Autism, Morbus Alzheimer) with magnetoencephalography (MEG), transcranial magnetic stimulation (TMS) and functional/anatomical magnetic resonance imaging (fMRI/MRI). The ideal candidate should have a PhD in neuroimaging and expertise with a neuroimaging technique (TMS, EEG, MEG, fMRI/MRI). Excellent research opportunities are available at the nearby Brain Imaging Center. Applications from a physics or engineering background are welcome as well. Expertise in Matlab or C++ programming is desirable. The position will run for two years with a possible extension. The successful applicant will receive a stipend, depending on qualification and years of working experience. Review of applications will start ASAP and will continue until the position is filled. The University aims to increase the number of women in those areas where they are underrepresented and urges them to apply. The University is committed to employing more disabled individuals and especially encourages them to apply. Informal inquiries can be directed to Peter Uhlhaas (uhlhaas at mpih- frankfurt.mpg.de). To apply, please send curriculum vitae, letter of interest, names and contact information of two references to: Peter Uhlhaas Max Planck Institute for Brain Research Department of Neurophysiology Deutschordenstr. 46 60528 Frankfurt am Main GERMANY ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 mramirez at NKI.RFMH.ORG Tue Apr 29 06:50:56 2008 From: mramirez at NKI.RFMH.ORG (Manuel Gomez-Ramirez) Date: Tue, 29 Apr 2008 06:50:56 +0200 Subject: possible bug (scalpcurrentdensity.m file) Message-ID: Hi, So I think there's a bug in the scalpcurrentdensity.m file. If I'm not mistaken the script is currently computing the current density for only the first trial of the epochs! the script implements this code on line 186: [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); I believe that it should be corrected to: [V2, L2, L1] = splint(elec.pnt, data.trial{trlop}, [0 0 1]); good luck! Manuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 29 16:35:40 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 29 Apr 2008 16:35:40 +0200 Subject: possible bug (scalpcurrentdensity.m file) In-Reply-To: Message-ID: You are correct. I fixed it. thanks, Robert On 29 Apr 2008, at 6:50, Manuel Gomez-Ramirez wrote: > I believe that it should be corrected to: > [V2, L2, L1] = splint(elec.pnt, data.trial{trlop}, [0 0 1]); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 29 16:44:57 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 29 Apr 2008 16:44:57 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolutionand cfg.inwardshift In-Reply-To: <480F0DAC.4040902@bio.uni-giessen.de> Message-ID: On 23 Apr 2008, at 12:21, Ingmar Schneider wrote: > Probably the original problem is not related to the leadfield at all. Hi Ingmar, I indeed think that the problem is not related to the leadfields themselves. I suspect the problem to be due to either the inside/ outside detection (which is done in private/prepare_dipole_grid and which depends on cfg.inwardshift) or that the problem is related to some confusion somewhere in the code about the units (cm v.s. mm). I suggest that you investigate the problem in more detail by visualising the source reconstruction without sourceinterpolate. I.e. after sourceanalysis you get a source.dim source.avg.pow and you should be able to do vol = reshape(source.avg.pow, source.dim); That gives you a 3D array which you can immediately plot slice-by- slice, e.g. using figure; imagesc(squeeze(vol(:,:,10))); or by using the matlab montage function if I recall correctly. What you also can do is explicitely look at the voxels that were considered in the source reconstruction, by vol = zeros(source.dim); % make 3d array vol(source.inside) = 1; vol(source.outside) = 0; and then again use imagesc to look at the slices in the volume. best regards, Robert PS please check that your problem is not merely due to colorbar scaling and a large depth bias as explained on http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:beamformer#plot_the_result and downward. See figure http://www2.ru.nl/fcdonders/fieldtrip/lib/exe/ detail.php?id=fieldtrip%3Adocumentation%3Atutorial% 3Abeamformer&cache=cache&media=fieldtrip:documentation:tutorial:beamform er:beampost.png. The different resolutions you used might just result in a different colorbar and opacity scaling, which would also result in a different "amount" of source reconstruction getting visible on top of the MRI. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Apr 30 13:50:20 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Wed, 30 Apr 2008 13:50:20 +0200 Subject: Error message: *** glibc detected *** free(): invalid pointer: 0x00002aab002dadf0 *** Message-ID: Hi I get this error message every time I try to preprocess my data: *** glibc detected *** free(): invalid pointer: 0x00002aab002dadf0 *** Does anyone have a clue what this could mean? Regards, Frederic _________________________________________________________________ Windows Live Messenger: Direkter Zugriff auf Ihre E-Mails! Ohne Neuanmeldung! http://get.live.com/de-de/messenger/overview ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Apr 2 19:39:54 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 19:39:54 +0200 Subject: 2 simple questions Message-ID: Hello FTers, I have been trying to get the tutorial beamforming example to run for over a week! I have tried several matlab versions and also the spm2 R2007a updtats dll files. Also gone through previous posts on this issue in the FT and SPM archives have not helped. Still unsuccessful in doing volume segmentation! The problem is as below: ??? Cant open image file. Error in ==> spm_segment>get_affine_mapping at 240 VFS(1).pinfo(1:2,:) = VFS(1).pinfo(1:2,:)/spm_global(VFS(1)); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Anyone knows how "cant map image file" error can be rectified? Regards, Kianoush ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Apr 2 20:13:54 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 20:13:54 +0200 Subject: 2 simple questions Message-ID: Hi All, The error reported for volume segmentation actually is: ??? Error using ==> spm_slice_vol Cant open image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); Error in ==> spm_smoothto8bit at 14 VO = smoothto8bit(V,fwhm); Error in ==> spm_segment>get_affine_mapping at 233 VFS = spm_smoothto8bit(VF(1),aflags.smosrc); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Regards, Kianoush ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Apr 2 20:21:46 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 2 Apr 2008 20:21:46 +0200 Subject: 2 simple questions In-Reply-To: Message-ID: Hi Kianoush, As you probably have seen, the error occurs in an spm-function. From this point it is hard to tell, whether the error is a consequence of something going on in your spm-version, or whether it is due to a fieldtrip-related issue. Could you provide some info with respect to the MRI you use as an input to volumesegment? Yours, Jan-Mathijs On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > Hi All, > > The error reported for volume segmentation actually is: > > ??? Error using ==> spm_slice_vol > Cant open image file. > > Error in ==> spm_smoothto8bit>smoothto8bit at 51 > img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); > > Error in ==> spm_smoothto8bit at 14 > VO = smoothto8bit(V,fwhm); > > Error in ==> spm_segment>get_affine_mapping at 233 > VFS = spm_smoothto8bit(VF(1),aflags.smosrc); > > Error in ==> spm_segment>init_sp at 567 > MM = get_affine_mapping(VF,PG,flags.affreg); > > Error in ==> spm_segment at 91 > SP = init_sp(flags.estimate,VF,PG); > > Error in ==> volumesegment at 250 > spm_segment(Va,cfg.template,flags); > > > Regards, > Kianoush > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to 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 K.Nazarpour at BHAM.AC.UK Wed Apr 2 20:35:17 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 19:35:17 +0100 Subject: 2 simple questions In-Reply-To: <398EB287-FD60-4768-90DC-074A945B5E7D@psy.gla.ac.uk> Message-ID: Hi Jan-Mathijs, Thank you for your reply. I simply use Subject01 mri data in the tutorial. Kia jan-mathijs schoffelen wrote: > Hi Kianoush, > > As you probably have seen, the error occurs in an spm-function. From > this point it is hard to tell, whether the error is a consequence of > something going on in your spm-version, > or whether it is due to a fieldtrip-related issue. Could you provide > some info with respect to the MRI you use as an input to volumesegment? > > Yours, > > Jan-Mathijs > > > On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > >> Hi All, >> >> The error reported for volume segmentation actually is: >> >> ??? Error using ==> spm_slice_vol >> Cant open image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Regards, >> Kianoush >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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.capilla at PSY.GLA.AC.UK Wed Apr 2 20:42:45 2008 From: a.capilla at PSY.GLA.AC.UK (Almudena Capilla) Date: Wed, 2 Apr 2008 19:42:45 +0100 Subject: 2 simple questions In-Reply-To: <47F3D1E5.6020203@bham.ac.uk> Message-ID: Hi Kianoush, I think this kind of error occurs when the name of your output volume already exists in your working directory. Maybe it will work if you rename the "cfg.name" Hope it helps, Almu -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Kianoush Nazarpour Sent: 02 April 2008 19:35 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] 2 simple questions Hi Jan-Mathijs, Thank you for your reply. I simply use Subject01 mri data in the tutorial. Kia jan-mathijs schoffelen wrote: > Hi Kianoush, > > As you probably have seen, the error occurs in an spm-function. From > this point it is hard to tell, whether the error is a consequence of > something going on in your spm-version, > or whether it is due to a fieldtrip-related issue. Could you provide > some info with respect to the MRI you use as an input to volumesegment? > > Yours, > > Jan-Mathijs > > > On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > >> Hi All, >> >> The error reported for volume segmentation actually is: >> >> ??? Error using ==> spm_slice_vol >> Cant open image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Regards, >> Kianoush >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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 k.nazarpour at BHAM.AC.UK Thu Apr 3 12:06:34 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Thu, 3 Apr 2008 12:06:34 +0200 Subject: 2 simple questions -> spm_slice_vol Message-ID: Thank you, I tried that as well, but does not solve the problem. Then, I decided to simply do the segmentation in the SPM and then bring the segmented images into FT. Therefore, I needed to make the mri variable in order to put all in FT format. The file used was t1_icbm_normal_1mm_pn0_rf0.mnc . The segmentation was done properly by SPM while the same file could not even be read properly by mri = read_fcdc_mri('t1_icbm_normal_1mm_pn0_rf0.mnc'); The error was ??? Error using ==> spm_slice_vol Cant open image file. 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 102 img = spm_read_vols(hdr); My question is if spm_slice_vol can be executed in SPM2 in Matlab MATLAB Version 7.5.0.342 (R2007b) why I can not be run on simialr Matlab platform but through FT ?! Bests, Kia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Paul.vandenHurk at FCDONDERS.RU.NL Thu Apr 3 17:46:47 2008 From: Paul.vandenHurk at FCDONDERS.RU.NL (Paul van den Hurk) Date: Thu, 3 Apr 2008 17:46:47 +0200 Subject: No subject Message-ID: Hi all, When I use the function 'timelockstatistics' I get the following error message: ======================================================== ??? Undefined function or variable "sens". Error in ==> neighbourselection at 106 if ~isstruct(sens) Error in ==> fieldtrip\private\statistics_wrapper at 226 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> timelockstatistics at 107 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> statistics_time_locked at 36 stat = timelockstatistics(cfg,grand_avg_s12_s51,grand_avg_s14_s51); ======================================================== The code I use for calling this function is the following: ======================================================== time_of_in_st = 0.1; % input('Beginning of interval: '); time_of_in_end = 0.8; % input('End of interval: '); interval = [time_of_in_st time_of_in_end]; cfg = []; cfg.channel = {'P8'}; cfg.latency = interval; cfg.statistic = 'depsamplesT'; cfg.parameter = 'individual'; cfg.method = 'analytic'; cfg.correctm = 'no'; cfg.alpha = 0.05; Nsub = input('Type in number of subjects to be included in timelockstatistics: '); cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = timelockstatistics(cfg,grand_avg_s12_s51,grand_avg_s14_s51); ======================================================== Could anyone tell me how to fix this? Thanks a lot in advance, Kind regards, Paul ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 7 18:02:00 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Apr 2008 18:02:00 +0200 Subject: change in defaults for resampledata Message-ID: Dear fieldtrip users, I have made a change in the default configuration of resampledata that you should be aware of. Previously this function used to detrend the data by default. The motivation for this is that the data is filtered prior to resampling to avoid aliassing and detrending prevents occasional edge artifacts of the filters. Detrending is fine for removing slow drifts in data prior to frequency analysis, but detrending is not good if you subsequenlty want to look at the evoked fields. Therefore the old default value of 'yes' has been removed. You now explicitely have to specify whether you want to detrend (probably so if you want to keep your analysis compatible with previous analyses that you did), or if you do not want to detrent (recommended in most cases). If you observe edge artifacts after detrending, it is recommended to apply a baseline correction to the data. 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. From r.oostenveld at FCDONDERS.RU.NL Mon Apr 7 21:40:19 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Apr 2008 21:40:19 +0200 Subject: No subject In-Reply-To: <000701c895a1$ecfb61f0$172dae83@fcdonders.nl> Message-ID: Hi Paul On 3 Apr 2008, at 17:46, Paul van den Hurk wrote: > When I use the function ‘timelockstatistics’ I get the following > error message: > > ======================================================== > ??? Undefined function or variable "sens". > > Error in ==> neighbourselection at 106 > if ~isstruct(sens) The sensor specification (in your case the position of the EEG electrodes, for other people the position of MEG sensors) is used for spatial clustering. I suggest that you explicitely use the neighbourselection function if you are interested in using clustering. In the help of that function you can read how to specify the sensor information. However, since you write > The code I use for calling this function is the following: > ... > cfg.correctm = 'no'; > cfg.alpha = 0.05; it seems that you don't want to cluster. The default handling of the configurations here is not optimal, since the default is to try and make a neighbourhood structure (required for clustering) even if you don't need it. I think that you can get around it with cfg.neighbours = []; I will change the function so that it handles the defaults better. 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. From mramirez at NKI.RFMH.ORG Tue Apr 8 05:10:12 2008 From: mramirez at NKI.RFMH.ORG (Manuel Gomez-Ramirez) Date: Tue, 8 Apr 2008 05:10:12 +0200 Subject: scalpcurrentdensity Message-ID: Hello, I'm having problems trying to run the "scalpcurrentdensity" function in fieldtrip. I just downloaded the latest version and it is still giving me problems. the error message reads as follows: ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a\toolbox\fieldtrip-20080405\private\plgndr.dll': The specified procedure could not be found. Error in ==> fieldtrip-20080405\private\splint>gh at 170 p(k) = plgndr(k,0,x(i,j)); Error in ==> fieldtrip-20080405\private\splint at 75 [gx, hx] = gh(CosEii); Error in ==> scalpcurrentdensity at 186 [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); ---- Has anybody else run into this situation??? Gladly appreciate your help! Thanks in advance Manuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 8 12:32:56 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Tue, 8 Apr 2008 11:32:56 +0100 Subject: scalpcurrentdensity In-Reply-To: Message-ID: Hi Manuel, In FT FAQ page http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:frequently_asked_questions there are instructions for some functions under "Matlab complains about a missing or invalid MEX file, what should I do?" Hope that helps, Kianoush Manuel Gomez-Ramirez wrote: > Hello, > I'm having problems trying to run the "scalpcurrentdensity" function in > fieldtrip. > > I just downloaded the latest version and it is still giving me problems. > > the error message reads as follows: > > ??? Invalid MEX-file 'C:\Program > Files\MATLAB\R2007a\toolbox\fieldtrip-20080405\private\plgndr.dll': The > specified procedure could not be found. > > Error in ==> fieldtrip-20080405\private\splint>gh at 170 > p(k) = plgndr(k,0,x(i,j)); > > Error in ==> fieldtrip-20080405\private\splint at 75 > [gx, hx] = gh(CosEii); > > Error in ==> scalpcurrentdensity at 186 > [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); > > ---- > Has anybody else run into this situation??? > Gladly appreciate your help! > Thanks in advance > > Manuel > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 florisdelange at GMAIL.COM Thu Apr 10 16:26:11 2008 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Thu, 10 Apr 2008 16:26:11 +0200 Subject: plotting planar gradient data Message-ID: Salut Fieldtrippers, I am wondering whether there is a small bug in the routine that transforms data to planar gradient (or alternatively, I'm doing something stupid). After I have created an average ERF, using timelockanalysis, I transform my data to planar gradient using the following two commands: cfg = []; cfg.planarmethod = 'sincos'; erf_planar = megplanar(cfg,erf_axial); erf_planarcomb = combineplanar([],erf_planar); Now, several fields are gone/not compatible anymore with the plotting routines. First of all, I have to add a dimord-field: erf_planarcomb.dimord = 'chan_time'; Then, the time-field gets encapsulated in a structure, which the plotting routines don't like, so I have to specify: erf_planarcomb.time = erf_planarcomb.time{1}; And the same for the data field: erf_planarcomb.avg = erf_planarcomb.trial{1}; Is this a bug, or am I doing something wrong? If I look at the ERF-tutorial (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) all these steps don't seem necessary.. Thanks for your feedback, All the best, Floris ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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.bauer at FIL.ION.UCL.AC.UK Thu Apr 10 18:59:36 2008 From: m.bauer at FIL.ION.UCL.AC.UK (Markus Bauer) Date: Thu, 10 Apr 2008 17:59:36 +0100 Subject: plotting planar gradient data In-Reply-To: Message-ID: hey dr. floris try > cfg = []; > cfg.planarmethod = 'sincos'; > erf_planar = megplanar(cfg,erf_axial); erfplanar = raw2data(erfplanar,'chan_time'); that should do it, might depend a bit on which fieldtrip version you're using it's cause the function converts it internally into "raw data format" - I guess to make it generally usable also for freqanalysis cheers markus > Salut Fieldtrippers, > > I am wondering whether there is a small bug in the routine that transforms > data to planar gradient (or alternatively, I'm doing something stupid). > > After I have created an average ERF, using timelockanalysis, I transform my > data to planar gradient using the following two commands: > > cfg = []; > cfg.planarmethod = 'sincos'; > erf_planar = megplanar(cfg,erf_axial); > erf_planarcomb = combineplanar([],erf_planar); > > Now, several fields are gone/not compatible anymore with the plotting routines. > > First of all, I have to add a dimord-field: > erf_planarcomb.dimord = 'chan_time'; > > Then, the time-field gets encapsulated in a structure, which the plotting > routines don't like, so I have to specify: > erf_planarcomb.time = erf_planarcomb.time{1}; > > And the same for the data field: > erf_planarcomb.avg = erf_planarcomb.trial{1}; > > Is this a bug, or am I doing something wrong? > If I look at the ERF-tutorial > (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) > all these steps don't seem necessary.. > > Thanks for your feedback, > All the best, > Floris > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 marie at PSY.GLA.AC.UK Thu Apr 10 19:24:27 2008 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 10 Apr 2008 18:24:27 +0100 Subject: Hello In-Reply-To: <47FE4778.2050201@fil.ion.ucl.ac.uk> Message-ID: Hi Markus Not sure if you remember me, but i just saw your fieldtrip post from the FIL and thought i would write and say congrats for your job in London. I hope things are good with you. Marie Quoting Markus Bauer : > hey dr. floris > > try > >> cfg = []; >> cfg.planarmethod = 'sincos'; >> erf_planar = megplanar(cfg,erf_axial); > > erfplanar = raw2data(erfplanar,'chan_time'); > > that should do it, might depend a bit on which fieldtrip version you're using > it's cause the function converts it internally into "raw data format" - > I guess to make it generally usable also for freqanalysis > > cheers > markus > > >> Salut Fieldtrippers, >> >> I am wondering whether there is a small bug in the routine that transforms >> data to planar gradient (or alternatively, I'm doing something >> stupid). After I have created an average ERF, using >> timelockanalysis, I transform my >> data to planar gradient using the following two commands: >> >> cfg = []; >> cfg.planarmethod = 'sincos'; >> erf_planar = megplanar(cfg,erf_axial); >> erf_planarcomb = combineplanar([],erf_planar); >> >> Now, several fields are gone/not compatible anymore with the >> plotting routines. First of all, I have to add a dimord-field: >> erf_planarcomb.dimord = 'chan_time'; >> >> Then, the time-field gets encapsulated in a structure, which the plotting >> routines don't like, so I have to specify: >> erf_planarcomb.time = erf_planarcomb.time{1}; >> >> And the same for the data field: >> erf_planarcomb.avg = erf_planarcomb.trial{1}; >> >> Is this a bug, or am I doing something wrong? If I look at the ERF-tutorial >> (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) >> all these steps don't seem necessary.. >> >> Thanks for your feedback, >> All the best, >> Floris >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to 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 University of Glasgow, Department of Psychology WebMail system ------------------------------------------------------------------ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Apr 11 15:10:11 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 11 Apr 2008 15:10:11 +0200 Subject: BrainSync: 2 postdoc positions available Message-ID: 2 Post-doctoral positions at the Institute of Advanced Technologies in Biomedicine (ITAB), University of Chieti, to work on BrainSync, a FP7 sponsored project (see abstract below), starting immediately (www.brainsynch.org). These positions are for experiments on the mechanisms of neuronal communication in resting state networks and during visual attention in healthy volunteers with fMRI and MEG. BrainSync is a multi-center project involving the following scientists (centers): Maurizio Corbetta & Gian Luca Romani (St.Louis, Chieti), Jean-Philippe Lachaux (Lyon), Guy Orban & Wim Vanduffel (Leuven, Boston), Pascal Fries (Njimegen), Jon Driver (London), and Andreas Engel (Hamburg). BrainSync involves studies in human and non- human primates using a variety of methods including single/multi-unit/ LFP/fMRI recordings in non-human primates; fMRI/MEG/TMS measurements in healthy subjects and patients with brain diseases. ITAB is equipped with two new Phillips scanner (1.5 and 3.0T), a 165 channel MEG, integrated TMS/EEG and EEG/fMRI systems, and new 500 channels MEG system operational in the fall of 2008. Candidates should have a PhD in Physics, Engineering, Psychology, Neuroscience, or Computer Science. MDs with a strong background in Cognitive Neuroscience may also apply. Candidates should be already familiar either with MEG or fMRI methods. Quantitative skills in signal processing and time course analysis, as well as computer programming (C++, Matlab) is highly desirable. Chieti is a university town, located in central Italy, about 15 minutes from the Adriatic coast, 30 minutes from the Parco Nazionale degli Abruzzi, the largest natural reserve in Italy, great skying, hiking, and mountain or seaside activities, only 2 hours from Rome. Applications should include CV, a research statement, and 2 letters of reccomendation. Please forward the application materials to Prof. Maurizio Corbetta, mau at npg.wustl.edu, Department of Neurology, Washington University, St.Louis, Box 8111, 660 S.Euclid, St.Louis, MO 63110. BrainSync abstract FP7 program ------------------------------ The goal of this project is to understand how neuronal assemblies exchange information (functional neuronal communication), and how variability in neuronal communication explains variability in behavioural performance, both in the intact and injured brain. Neural communication involves temporal interactions between neuronal assemblies, not only locally within an area but also on a larger- scale between brain areas. We focus on large-scale interactions that arise at two distinct but potentially related temporal scales: 'slow' (~0.1 Hz) fluctuations of the blood oxygen level dependent (BOLD) signal, as readily measured with functional magnetic resonance imaging (fMRI); and 'fast' (1-150 Hz) neuronal oscillations, as can be measured at various spatial scales (e.g. multi-unit activity (MUA) and local field potentials (LFP) at fine spatial scale; electroencephalography (EEG); magnetoencephalography (MEG) at intermediate scale. We will explore how the different temporal and spatial scales relate mechanistically, and how variability in ongoing spontaneous or task-induced neuronal interactions relates to cognition and behaviour. A potentially important clinical application is the development of easy-to-use diagnostic measures of neuronal communication, and pathological changes in this, for many major brain diseases, including stroke, head injury, multiple sclerosis, and Alzheimer's disease. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 soren.r.christensen at GSK.COM Fri Apr 11 16:04:54 2008 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Fri, 11 Apr 2008 15:04:54 +0100 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 11-Apr-2008 and will not return until 13-Apr-2008. Back on Monday ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 desain at NICI.RU.NL Mon Apr 14 10:24:33 2008 From: desain at NICI.RU.NL (Peter Desain) Date: Mon, 14 Apr 2008 10:24:33 +0200 Subject: Senior position in Artificial Intelligence (AI) with a focus on Brain-Computer Interface (BCI). Message-ID: Assistant Professor of Artificial Intelligence (1,0 fte) *Faculty of Social Sciences Maximum salary: Euro 4868,- gross/month Vacancynumber: 24.13.08 Closing date: 15-05-2008 *Jobdescription A senior position in Artificial Intelligence (AI) with a focus on Brain-Computer Interface (BCI). The successful candidate is expected to cooperate with the SmartMix project BrainGain (for more detail, see www.braingain.nu), provide contributions to BCI-oriented research in Theoretical Cognitive Science and to participate in the establishment of a coherent research line with the division of Cognitive Artificial Intelligence. Teaching tasks are: - To participate in the design of BCI courses for the AI programme; the research master's programme in Cognitive Neuroscience (CNS), and the teaching of courses in AI and CNS. - To contribute to the collaboration with the Computer Science department. - Supervision of interns (BSc and MSc theses), and PhD students. Organizational tasks are: - To assist in managing the NICI's division of Cognitive Artificial Intelligence. Maximum employment: 1,0 (0,5 research; 0,5 education). Requirements You have a background in Cognitive (Neuro) Science and EEG signal analysis with orientation on Brain-Computer Interfaces (BCI) and in Theoretical Cognitive Science, more specifically, conceptual and formal analysis of computational models of cognition and/or embodied embedded cognition. You have thorough experience in conducting scientific research and writing. Furthermore, you have good teaching skills, the ability to motivate and attract students. You have good collaboration and communication skills and the ability to work in a complex organization with many partners. You attitude is pragmatic and productive. Organisation The position is located in NICI's division "Cognitive Artificial Intelligence" (research) and in the School of Psychology and Artificial Intelligence (teaching) of the Faculty of Social Sciences. Website: www.ru.nl/fsw Conditions of employment Maximum employment: 1,0 Maximum salary per month, based on fulltime employment: Euro 4868,- Salary scale: 12 Duration of contract: Temporary, with the possibility of a permanent appointment after five years. Additional conditions of employment The candidate will be appointed for a period of five years in total. Starting with 1 year. If the evaluation is positive, the contract will be extended by 4 years, with the possibility of permanent appointment after five years. Additional information Dr. P. Desain Telephone: 0031-243615885 E-mail: desain at nici.ru.nl Application You can apply for the job (mention the vacancynumber 24.13.08 before 15-05-2008 by sending your application to: RU, Faculty of Social Sciences, HR Department P.O. Box 9104 6500 HE Nijmegen E-mail:vacancies at socsci.ru.nl -- Dr. ir. Peter Desain Cognitive Artificial Intelligence NICI, Radboud University Nijmegen P.O.Box 9104 6500 HE Nijmegen Montessoriln 3 6525 HR Nijmegen The Netherlands www.nici.ru.nl/mmm www.nici.ru.nl/braingain ++31-24-3615885 tel ++31-24-3616066 fax ++31-6-51888767 cell ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 P.PRAAMSTRA at BHAM.AC.UK Mon Apr 14 11:54:08 2008 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Mon, 14 Apr 2008 10:54:08 +0100 Subject: Sliceinterp Message-ID: Dear FTers, I have a query regarding the sliceinterp function. I am trying to plot the sources of beta power changes. The source activities are the result of a comparison of left and right hand movement conditions, hence they have a mirror reversed distribution and amplitude, ranging from say -15 in one hemisphere to +15 in the opposite hemisphere. In order to clip the displayed source activities to say [-10 -15] in one hemisphere and [10 15] in the other (and create opacity maps) I thought I could use cfg.clipsym = `yes´ (and cfg.maskclipsym). For instance: cfg = []; cfg.funparameter = 'pow'; cfg.colmin = 5; cfg.colmax = 15; cfg.clipsym = 'yes'; However, this doesn´t seem to work since the clipping is performed on only one end of the scale, eliminating the mirror reversed source at the other end. Am I wrong in assuming cfg.clipsym would work here or am I using it in the wrong way? (What I´m trying to do is exactly the same as realized in Figure 3 of Medendorp et al. CerCor 2007). Any suggestions? Peter Praamstra ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 15 12:29:04 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 15 Apr 2008 12:29:04 +0200 Subject: Sliceinterp In-Reply-To: <480337D0.14728.5CE540@P.PRAAMSTRA.Bham.ac.uk> Message-ID: Dear Peter, My suggestion would be to use sourceplot, instead of sliceinterp. Sourceplot is a more modern version of sliceinterp and incorporates most (if not all) of sliceinterp's functionality (and more!). The function is quite well documented, but to give you some handles: cfg.method = 'slices'; cfg.nslices = a number but by default something like 20 cfg.funparameter = 'pow'; cfg.funcolorlim = [-15 15]; Additionally, you can specify a maskparameter, which will be used for opacity-mapping. This could be cfg.maskparameter = 'pow'. There are several options for the opacity you can play with, but when not specifying anything, I believe you are already pretty much in the right direction. Alternatively, you can create a new field in your data-structure, in which you control the opacity more explicitly, e.g. data.mask = abs(data.pow) >10; Note that when you want to plot the output of a statistics-function, there's usually a .mask-field associated with the data. I hope this helps, Yours, Jan-Mathijs On Apr 14, 2008, at 11:54 AM, Peter Praamstra wrote: > Dear FTers, > I have a query regarding the sliceinterp function. I am trying to > plot the sources of beta power changes. The source activities are > the result of a comparison of left and right hand movement > conditions, hence they have a mirror reversed distribution and > amplitude, ranging from say -15 in one hemisphere to +15 in the > opposite hemisphere. > > In order to clip the displayed source activities to say [-10 -15] > in one hemisphere and [10 15] in the other (and create opacity > maps) I thought I could use cfg.clipsym = ‘yes’ (and cfg.maskclipsym). > For instance: > cfg = []; > cfg.funparameter = 'pow'; > cfg.colmin = 5; > cfg.colmax = 15; > cfg.clipsym = 'yes'; > > However, this doesn’t seem to work since the clipping is performed > on only one end of the scale, eliminating the mirror reversed > source at the other end. > > Am I wrong in assuming cfg.clipsym would work here or am I using it > in the wrong way? > > (What I’m trying to do is exactly the same as realized in Figure 3 > of Medendorp et al. CerCor 2007). > > Any suggestions? > > Peter Praamstra > > ---------------------------------- > > The aim of this list 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.PRAAMSTRA at BHAM.AC.UK Tue Apr 15 14:28:56 2008 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Tue, 15 Apr 2008 13:28:56 +0100 Subject: Sliceinterp In-Reply-To: Message-ID: Dear Jan-Mathijs, Many thanks for your advice! Just replacing sliceinterp with sourceplot - and using default settings for opacity mapping - already did the trick. Best wishes, Peter On 15 Apr 2008 at 12:29, jan-mathijs schoffelen wrote: > > Dear Peter, > > My suggestion would be to use sourceplot, instead of sliceinterp. > Sourceplot is a more modern > version of sliceinterp and incorporates most (if not all) of > sliceinterp's functionality (and more!). > The function is quite well documented, but to give you some > handles: > > cfg.method = 'slices'; > cfg.nslices = a number but by default something like 20 > cfg.funparameter = 'pow'; > cfg.funcolorlim = [-15 15]; > > Additionally, you can specify a maskparameter, which will be used > for opacity-mapping. This could > be cfg.maskparameter = 'pow'. > There are several options for the opacity you can play with, but > when not specifying anything, I > believe you are already pretty much in the right direction. > > Alternatively, you can create a new field in your data-structure, in > which you control the opacity > more explicitly, e.g. > data.mask = abs(data.pow) >10; > Note that when you want to plot the output of a statistics-function, > there's usually a .mask-field > associated with the data. > > I hope this helps, > > Yours, > > Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From victimontes at HOTMAIL.COM Wed Apr 16 22:50:26 2008 From: victimontes at HOTMAIL.COM (Victoria Eugenia Montes Restrepo) Date: Wed, 16 Apr 2008 20:50:26 +0000 Subject: References to implemented methods Message-ID: Hi all, I'm working with the minimum norm solution for the inverse problem. There are three references inside the function minimumnormestimate: "Dale et al 2000", "Liu et al 2002" and "Lin et al 2004". I would be very grateful if you could send me these three papers. Thanks in advance, Victoria Eugenia Montes _________________________________________________________________ La vida de los famosos al desnudo en MSN Entretenimiento http://entretenimiento.es.msn.com/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 lmoranr at GMAIL.COM Thu Apr 17 19:08:18 2008 From: lmoranr at GMAIL.COM (=?ISO-8859-1?Q?Luis_Mor=E1n?=) Date: Thu, 17 Apr 2008 19:08:18 +0200 Subject: problem with volume_segment Message-ID: Hi all!! I'm working on the tutorial "Applying beamforming techniques in the frequency domain". Whe I've tried to run next lines: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca GBT\spm2\templates\T1.mnc'; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); I've got the following errors: performing the segmentation on the specified volume ??? Cant map image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); Error in ==> spm_smoothto8bit at 14 VO = smoothto8bit(V,fwhm); Error in ==> spm_segment>get_affine_mapping at 233 VFS = spm_smoothto8bit(VF(1),aflags.smosrc); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Could anyone help me?? Thank you in advance for any help you can give -- Luis Morán ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 21 16:56:47 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 21 Apr 2008 16:56:47 +0200 Subject: problem with volume_segment In-Reply-To: <52b4c8f20804171008v33961378w5af1fb835e79adcf@mail.gmail.com> Message-ID: Dear Luis, Fieldtrip makes use of SPM2 (i.e. SPM version 2) for the segmentation. The segmentation is then used to construct a volume conduction model. There are some incompatibilities between SPM2 and later versions. Please check that you have the correct version of SPM. For segmenting, a temporary file is written to disk and then SPM is called. Although I am not an expert on SPM, the error message "??? Cant map image file" seems to indicate that there is a problem with reading the temporary file. You can use the matlab debugger to stop on the line where you encounter the problem and look at the problem in more detail. best regards, Robert On 17 Apr 2008, at 19:08, Luis Morán wrote: > Hi all!! > > I'm working on the tutorial "Applying beamforming techniques in the > frequency domain". Whe I've tried to run next lines: > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca GBT > \spm2\templates\T1.mnc'; > cfg.name = 'segment'; > cfg.write = 'yes'; > cfg.coordinates = 'ctf'; > [segmentedmri] = volumesegment(cfg, mri); > > I've got the following errors: > > performing the segmentation on the specified volume > ??? Cant map image file. > > Error in ==> spm_smoothto8bit>smoothto8bit at 51 > img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); > > Error in ==> spm_smoothto8bit at 14 > VO = smoothto8bit(V,fwhm); > > Error in ==> spm_segment>get_affine_mapping at 233 > VFS = spm_smoothto8bit(VF(1),aflags.smosrc); > > Error in ==> spm_segment>init_sp at 567 > MM = get_affine_mapping(VF,PG,flags.affreg); > > Error in ==> spm_segment at 91 > SP = init_sp(flags.estimate,VF,PG); > > Error in ==> volumesegment at 250 > spm_segment(Va,cfg.template,flags); > > > Could anyone help me?? > > Thank you in advance for any help you can give > > -- > Luis Morán > ---------------------------------- > > The aim of this list 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 Mon Apr 21 17:12:17 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 21 Apr 2008 17:12:17 +0200 Subject: Problem while using prepare_leadfield with parameters cfg.resolution and cfg.inwardshift In-Reply-To: Message-ID: Hi Ingmar Although your question/problem is not completely clear to me, I suspect it to be related to http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#why_is_there_a_rim _around_the_brain_for_which_the_source_reconstruction_is_not_computed In general fieldtrip tries to make a dipole grid that is just inside the brain but as close as possible to the brain surface. Some volume conduction models are not fitted to the brain surface however, but to the skin surface. In those cases the cfg.inwardshift option tries to get an estimate of the brain surface from the skin surface, in order to achieve teh same tight fit of the dipole grid in the brain and to prevent the solution to be computed for dipoles in teh skull or skin. However, with a low resolution and a grid that fits exactly in the brain you tend to get the problem as outlined in the FAQ. Therfore it can be usefull to play with the cfg.inwardshift parameter. You can set it to a negative number, i.e. inwardshift=-2.5, which results in a 2.5cm _outwardshift_ of the source compartment boundary. I hope this helps, if not then please ask again with more specifications of your analysis (what kind of MEG, what kind of volume model, etc). best regards, Robert On 13 Feb 2008, at 15:36, Ingmar Schneider wrote: > Hello everybody, > > I am currently trying to analyze my MEG data with the DICS beamforming > technique. While preparing my leadfield grid via the > prepare_leadfield.m > function I stumbled across a problem I don't understand. Every time > I try to > decrease the inwardshift to suit the leadfield upon my anatomy data > and at > the same time increase the resolution the resulting grid is even > smaller, > than without specification. > > For example applying the following parameters reduces the size of the > resulting grid instead of increasing its volume: > cfg.inwardshift = -1.5; %Increasing the grid size to cover the anatomy > cfg.resoltion = 0.5; %[cm] > > Without the cfg.resolution parameter a reduction of cfg.inwardshift > results > in the desired bigger leadfield grid which eventually fits upon the > MRI > data. Are these factors intertwined in the calculations so that one > effects > the other in the course of calculation? > > I hope someone can help me solve this little problem and am > grateful for any > kind of hint. > > Regards, > Ingmar > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to 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 K.Nazarpour at BHAM.AC.UK Mon Apr 21 17:49:38 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Mon, 21 Apr 2008 16:49:38 +0100 Subject: problem with volume_segment In-Reply-To: Message-ID: Dear Robert, I have had similar problem for some weeks. I have checked everything and really can't figure out where the problem is. As I posted earlier, if I simply ran SPM, volume segmentation can be done in SPM. However, if through simialr MATLAB platform (dll), vol segmentation is called from FT, the error comes up. Looking forward, Kianoush Robert Oostenveld wrote: > Dear Luis, > > Fieldtrip makes use of SPM2 (i.e. SPM version 2) for the segmentation. > The segmentation is then used to construct a volume conduction model. > > There are some incompatibilities between SPM2 and later versions. Please > check that you have the correct version of SPM. > > For segmenting, a temporary file is written to disk and then SPM is > called. Although I am not an expert on SPM, the error message "??? Cant > map image file" seems to indicate that there is a problem with reading > the temporary file. You can use the matlab debugger to stop on the line > where you encounter the problem and look at the problem in more detail. > > best regards, > Robert > > > > On 17 Apr 2008, at 19:08, Luis Morán wrote: >> Hi all!! >> >> I'm working on the tutorial "Applying beamforming techniques in the >> frequency domain". Whe I've tried to run next lines: >> mri = read_fcdc_mri('Subject01.mri'); >> cfg = []; >> cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca >> GBT\spm2\templates\T1.mnc'; >> cfg.name = 'segment'; >> cfg.write = 'yes'; >> cfg.coordinates = 'ctf'; >> [segmentedmri] = volumesegment(cfg, mri); >> >> I've got the following errors: >> >> performing the segmentation on the specified volume >> ??? Cant map image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Could anyone help me?? >> >> Thank you in advance for any help you can give >> >> -- >> Luis Morán >> ---------------------------------- >> >> The aim of this list 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. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Ingmar.Schneider at BIO.UNI-GIESSEN.DE Tue Apr 22 09:52:09 2008 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Tue, 22 Apr 2008 09:52:09 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolution and cfg.inwardshift In-Reply-To: <6CA37F03-1541-4B06-81D4-B72CD8D0DD13@fcdonders.ru.nl> Message-ID: Hello again, what you say is completely right and my problem is related to the problem described in the FAQ. As I tried to explain in the last mail and as you say: A reduction of the inwardshift (i.e. to a negative value) results in a leadfield, that covers the whole anatomy data. But if I simultaneously try to improve the resolution (i.e. to 0.5cm) the resulting field is smaller than the one with the default resolution-value of 1cm. I played with some combinations, but i never really got a suiting leadfield. I am using data from a VSM MedTech CTF-MEG with 275 channels and here's an excerpt of the Matlab-code to further specify my analysis. These specifications actually deliver a leadfield, that covers most of the anatomy, but in a poor resolution. %Preparation of the head model [vol, hdmcfg]=prepare_singleshell([], segmentedmriF); % Single sphere save(MRIoutname, 'vol', 'hdmcfg', '-append', '-v7.3'); clear segmentedmriF; %Preparation of the Leadfield for a specific dataset filename = strcat(SubjectID,'_10Hz_Redef_CSDM_20HzBin.mat'); fullname = strcat(INpath, filename); load(fullname); % Load redefined data file with gradiometers etc. for leadfield generation cfg = []; cfg.grad = freqPost.grad; cfg.vol = vol; cfg.inwardshift = -1.5; cfg.resolution = 1; cfg.reducerank = 2; cfg.channel = {'MEG', '-MLP12', '-MRC14', '-MLT41', '-MRC25', '-MRP56', '-MRT21', '-MLO21', '-MRO44', '-MRT47'}; cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; cfg.zgrid = 'auto'; [LFgrid] = prepare_leadfield(cfg); I hope this helps a bit to clarify my problem and the information is useful to you. Best regards, Ingmar Robert Oostenveld schrieb: > Hi Ingmar > > Although your question/problem is not completely clear to me, I > suspect it to be related to > > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:frequently_asked_questions#why_is_there_a_rim_around_the_brain_for_which_the_source_reconstruction_is_not_computed > > > In general fieldtrip tries to make a dipole grid that is just inside > the brain but as close as possible to the brain surface. Some volume > conduction models are not fitted to the brain surface however, but to > the skin surface. In those cases the cfg.inwardshift option tries to > get an estimate of the brain surface from the skin surface, in order > to achieve teh same tight fit of the dipole grid in the brain and to > prevent the solution to be computed for dipoles in teh skull or skin. > > However, with a low resolution and a grid that fits exactly in the > brain you tend to get the problem as outlined in the FAQ. Therfore it > can be usefull to play with the cfg.inwardshift parameter. You can set > it to a negative number, i.e. inwardshift=-2.5, which results in a > 2.5cm _outwardshift_ of the source compartment boundary. > > I hope this helps, if not then please ask again with more > specifications of your analysis (what kind of MEG, what kind of volume > model, etc). > > best regards, > Robert > > > On 13 Feb 2008, at 15:36, Ingmar Schneider wrote: >> Hello everybody, >> >> I am currently trying to analyze my MEG data with the DICS beamforming >> technique. While preparing my leadfield grid via the prepare_leadfield.m >> function I stumbled across a problem I don't understand. Every time I >> try to >> decrease the inwardshift to suit the leadfield upon my anatomy data >> and at >> the same time increase the resolution the resulting grid is even >> smaller, >> than without specification. >> >> For example applying the following parameters reduces the size of the >> resulting grid instead of increasing its volume: >> cfg.inwardshift = -1.5; %Increasing the grid size to cover the anatomy >> cfg.resoltion = 0.5; %[cm] >> >> Without the cfg.resolution parameter a reduction of cfg.inwardshift >> results >> in the desired bigger leadfield grid which eventually fits upon the MRI >> data. Are these factors intertwined in the calculations so that one >> effects >> the other in the course of calculation? >> >> I hope someone can help me solve this little problem and am grateful >> for any >> kind of hint. >> >> Regards, >> Ingmar >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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 r.oostenveld at FCDONDERS.RU.NL Tue Apr 22 21:05:23 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 22 Apr 2008 21:05:23 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolution and cfg.inwardshift In-Reply-To: <480D9929.1090608@bio.uni-giessen.de> Message-ID: Hi Ingmar On 22 Apr 2008, at 9:52, Ingmar Schneider wrote: > what you say is completely right and my problem is related to the > problem described in the FAQ. As I tried to explain in the last > mail and as you say: A reduction of the inwardshift (i.e. to a > negative value) results in a leadfield, that covers the whole > anatomy data. But if I simultaneously try to improve the resolution > (i.e. to 0.5cm) the resulting field is smaller than the one with > the default resolution-value of 1cm. I played with some > combinations, but i never really got a suiting leadfield. How do you mean "the field is smaller"? The cfg.resolution only pertains to the distance between neighbouring grid locations at which dipoles will be positioned (using the fieldtrip/private/ prepare_dipole_grid function). Then the leadfield is computed by looping over all dipole positions that are marked as being inside the brain. The "inside the brain" detection is influenced by cfg.inwardshift. If you compare LFgrid_coarse.leafield{i} and LFgrid_fine.leafield{j} for the two grids that you have constructed, where LFgrid_coarse.pos(i,:)== LFgrid_fine.pos(j,:) then you should have exactly the same leadfield. However, the number of dipole positions in the grid should be higher for the fine resolution than for the coarse resolution (the effect of cfg.resolution). If you keep the resolution constant but change cfg.inwardshift, then you will primarily see a change in the number of dipoles taht is marked inside. Note however that fieldtrip tries to keep the "box" encompassing the brain compartment as small as possible, so changing cfg.inwardshift might also affect the total number of sources (inside+outside). Perhaps you should do this to clarify it further insidevol = zeros(LFgrid.dim); insidevol(LFgrid.inside) = 1; insidevol(LFgrid.outside) = 0; for slice=1:LFgrid.dim(3) % probably you dont want this in a for loop figure; imagesc(insidevol(:,:,slice)); end You can also see that LFgrid.leadfield is empty (i.e. []) for all "outside" gridpoints (that is to save memory, since ~50% of the points will be outside the brain). > I am using data from a VSM MedTech CTF-MEG with 275 channels and > here's an excerpt of the Matlab-code to further specify my > analysis. These specifications actually deliver a leadfield, that > covers most of the anatomy, but in a poor resolution. The leadfield is usually computed on a relatively coarse grid (compared to fMRI) because of the computationat time involved, but also because the spatial resolution of MEG is not so high anyway (assuming a whole-head beamformer source reconstruction or a distributed source model). A resolution of 1cm is usually fine to get a quick first idea, and I consider a resolution of 0.7cm adequate for almost all applications. Mote that decreasing the resolution from 1 to 0.7 results in 3x so many dipoles and hence 3x longer computations. best regards, Robert PS your code looks fine to me ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Ingmar.Schneider at BIO.UNI-GIESSEN.DE Wed Apr 23 12:21:32 2008 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Wed, 23 Apr 2008 12:21:32 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolutionand cfg.inwardshift In-Reply-To: <2FE87490-AAD1-402F-B206-CA4B811C65B9@fcdonders.ru.nl> Message-ID: Hello Robert, thanks again for the quick reply! I'm sorry for the sloppy formulation. What I mean by "the field", is the visible area after source analysis. I calculated the sources two times - once with a leadfield resolution of 1cm and once with a resolution of 0.5cm - and compared the resulting sliceplots. While the 1cm resolution resulted in a source analysis covering almost the whole MRI-anatomy, the 0.5cm resolution concentrated only on the central 50% of the anatomy (Unfortunately I have no saved figures of these constellations, but I'll try to visualize it in an attached, coarse scetch). I considered these divergences to result from the underlying leadfield, but I checked the calculated leadfields as you proposed in your last mail and the dimensions appear to be just fine. Probably the original problem is not related to the leadfield at all. With best regards, Ingmar Robert Oostenveld schrieb: > Hi Ingmar > > On 22 Apr 2008, at 9:52, Ingmar Schneider wrote: >> what you say is completely right and my problem is related to the >> problem described in the FAQ. As I tried to explain in the last mail >> and as you say: A reduction of the inwardshift (i.e. to a negative >> value) results in a leadfield, that covers the whole anatomy data. >> But if I simultaneously try to improve the resolution (i.e. to 0.5cm) >> the resulting field is smaller than the one with the default >> resolution-value of 1cm. I played with some combinations, but i never >> really got a suiting leadfield. > > How do you mean "the field is smaller"? The cfg.resolution only > pertains to the distance between neighbouring grid locations at which > dipoles will be positioned (using the > fieldtrip/private/prepare_dipole_grid function). Then the leadfield is > computed by looping over all dipole positions that are marked as being > inside the brain. The "inside the brain" detection is influenced by > cfg.inwardshift. > > If you compare > LFgrid_coarse.leafield{i} > and > LFgrid_fine.leafield{j} > for the two grids that you have constructed, where > LFgrid_coarse.pos(i,:)== LFgrid_fine.pos(j,:) > then you should have exactly the same leadfield. However, the number > of dipole positions in the grid should be higher for the fine > resolution than for the coarse resolution (the effect of > cfg.resolution). If you keep the resolution constant but change > cfg.inwardshift, then you will primarily see a change in the number of > dipoles taht is marked inside. Note however that fieldtrip tries to > keep the "box" encompassing the brain compartment as small as > possible, so changing cfg.inwardshift might also affect the total > number of sources (inside+outside). > > Perhaps you should do this to clarify it further > > insidevol = zeros(LFgrid.dim); > insidevol(LFgrid.inside) = 1; > insidevol(LFgrid.outside) = 0; > > for slice=1:LFgrid.dim(3) % probably you dont want this in a for loop > figure; imagesc(insidevol(:,:,slice)); > end > > You can also see that LFgrid.leadfield is empty (i.e. []) for all > "outside" gridpoints (that is to save memory, since ~50% of the points > will be outside the brain). > >> I am using data from a VSM MedTech CTF-MEG with 275 channels and >> here's an excerpt of the Matlab-code to further specify my analysis. >> These specifications actually deliver a leadfield, that covers most >> of the anatomy, but in a poor resolution. > > The leadfield is usually computed on a relatively coarse grid > (compared to fMRI) because of the computationat time involved, but > also because the spatial resolution of MEG is not so high anyway > (assuming a whole-head beamformer source reconstruction or a > distributed source model). A resolution of 1cm is usually fine to get > a quick first idea, and I consider a resolution of 0.7cm adequate for > almost all applications. Mote that decreasing the resolution from 1 to > 0.7 results in 3x so many dipoles and hence 3x longer computations. > > best regards, > Robert > > PS your code looks fine to me > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to 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: scetch.png Type: image/png Size: 33761 bytes Desc: not available URL: From zanasilva at GMAIL.COM Sun Apr 27 00:01:13 2008 From: zanasilva at GMAIL.COM (Susana Silva) Date: Sun, 27 Apr 2008 00:01:13 +0200 Subject: eep and brainvision definetrial Message-ID: Hi I am a new and very poor fieldtrip user. I am trying to use fieldtrip for analysis of eep files (ANT, ASA). First I tried eep “read” functions (fieldtrip\private), but there were problems with the MEX file (“invalid MEX file”). This applies to .cnt as well as to .avr. Then I exported my eep files as brainvision. Now I can read the brainvision header file using the read_brainvision_vhdr, but not with read_fcdc_header; differently, I can read the brainvision trigger file with read_fcdc_event, but not with read_brainvision_vmrk. When I try to do the trial definition, something is said about the function read_fcdc_header not being OK. As I can not use this function, it sounds logical. My questions are: - In my position – someone who has eep files and brainvision files, what is the most simple option: try to use eep or brainvision (at the moment, I can use neither!) - Can you give me an example of a trial definition based upon a brainvision file, let us say s1.eeg (data), s1.vhdr , s1.vmrk, where ‘s33’ (eventvalue) is the ‘Stimulus’ (eventtype)? - In case I can not do the trial definition, how exactly should I arrange my data so that they are equivalent to the output of “definetrial”? Thank you, Susana Silva ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 28 12:30:31 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 28 Apr 2008 12:30:31 +0200 Subject: postdoc position available in Manchester Message-ID: FYI, read below for the full advert. I was told that the deadline is already very soon: 2nd of May. best regards, Robert --------------- Postdoc to study the influence of sleep upon memory consolidation Applications are invited for a 3 year postdoc to study the neuroplasticity associated with sleep-dependent memory consolidation using fMRI, MEG, and sleep monitoring with EEG. The successful candidate will be based at the University of Manchester, and will take up the post in June-August of this year. The Project It is well established that procedural skills are strengthened during post-training sleep, and that such consolidation is associated with alterations in neural circuitry. This neuroplasticity is thought to be caused by the reactivation of task-related circuitry during sleep, in combination with the electrophysiological and pharmacological characteristics of that sleep. This fellowship will focus upon sleep dependent neuroplasticity by using fMRI, MEG, and EEG first to characterise sleep-dependent changes in the activity of local brain regions and brain networks, and second to track the evolution of such changes during a night of sleep. Manchester’s neuroscience community & facilities Manchester University provides a vibrant intellectual community with a strong commitment to cognitive neuroscience. Local facilities include 3 and 1.5 Tesla Philips MR scanners at the Translational Imaging Unit http://www.mhs.manchester.ac.uk/tiu/ and a PET scanner at the Wolfson Molecular Imaging Centre http:// www.mhs.manchester.ac.uk/research/facilities/wmic/ . The appointee will join the Neuroscience and Aphasia Unit (NARU) http://www.psych- sci.manchester.ac.uk/naru/ and interact with the Cognition and Cognitive Neuroscience Unit http://www.psych-sci.manchester.ac.uk/ research/groups/cognitionandcognitive/ . MEG studies will be performed at the University of Liverpool’s MARIARC centre http:// www.liv.ac.uk/mariarc/ Collaborators & Training This post provides an exceptional opportunity to learn cutting edge techniques in fMRI, MEG, and EEG. It is part of a 3 year BBSRC grant to Dr. Penny Lewis http://www.liv.ac.uk/psychology/staff/plewis.html in conjunction with Matt Walker of the Sleep and Neuroimaging Lab at Berkeley http://www.walkerlab.com/people.html, Derk-Jan Dijk of the Surrey Sleep Research Centre http://www.surrey.ac.uk/SBMS/SSRC/, Andrej Stancak of MARIARC, and Dr. Stefan Kiebel at the Functional Imaging Laboratory http://www.fil.ion.ucl.ac.uk/. The successful candidate will travel regularly to visit these collaborators and learn cutting edge techniques for experimental design and analysis. To apply you must have a) A PhD in neuroscience, computer science, or a related field b) Experience with MEG or EEG. c) An interest in memory plasticity and or sleep research If interested, please send a CV and statement of interest to Penny Lewis . There is no formal deadline, but we encourage you to make contact as soon as possible. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 28 13:07:47 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 28 Apr 2008 13:07:47 +0200 Subject: Postdoctoral Position in Brain Imaging - MPI Frankfurt Message-ID: Postdoctoral Position in Brain Imaging A joint postdoctoral position in brain imaging is available at the Max Planck Institute for Brain Research, Department of Neurophysiology, and at the Laboratory for Neurophysiology and Neuroimaging, Department of Psychiatry, Johann Wolfgang Goethe- Universität, Frankfurt am Main. The successful applicant will work on projects examining the neurophysiology of cognitive dysfunctions in neuropsychiatric disorders (Schizophrenia, Autism, Morbus Alzheimer) with magnetoencephalography (MEG), transcranial magnetic stimulation (TMS) and functional/anatomical magnetic resonance imaging (fMRI/MRI). The ideal candidate should have a PhD in neuroimaging and expertise with a neuroimaging technique (TMS, EEG, MEG, fMRI/MRI). Excellent research opportunities are available at the nearby Brain Imaging Center. Applications from a physics or engineering background are welcome as well. Expertise in Matlab or C++ programming is desirable. The position will run for two years with a possible extension. The successful applicant will receive a stipend, depending on qualification and years of working experience. Review of applications will start ASAP and will continue until the position is filled. The University aims to increase the number of women in those areas where they are underrepresented and urges them to apply. The University is committed to employing more disabled individuals and especially encourages them to apply. Informal inquiries can be directed to Peter Uhlhaas (uhlhaas at mpih- frankfurt.mpg.de). To apply, please send curriculum vitae, letter of interest, names and contact information of two references to: Peter Uhlhaas Max Planck Institute for Brain Research Department of Neurophysiology Deutschordenstr. 46 60528 Frankfurt am Main GERMANY ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 mramirez at NKI.RFMH.ORG Tue Apr 29 06:50:56 2008 From: mramirez at NKI.RFMH.ORG (Manuel Gomez-Ramirez) Date: Tue, 29 Apr 2008 06:50:56 +0200 Subject: possible bug (scalpcurrentdensity.m file) Message-ID: Hi, So I think there's a bug in the scalpcurrentdensity.m file. If I'm not mistaken the script is currently computing the current density for only the first trial of the epochs! the script implements this code on line 186: [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); I believe that it should be corrected to: [V2, L2, L1] = splint(elec.pnt, data.trial{trlop}, [0 0 1]); good luck! Manuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 29 16:35:40 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 29 Apr 2008 16:35:40 +0200 Subject: possible bug (scalpcurrentdensity.m file) In-Reply-To: Message-ID: You are correct. I fixed it. thanks, Robert On 29 Apr 2008, at 6:50, Manuel Gomez-Ramirez wrote: > I believe that it should be corrected to: > [V2, L2, L1] = splint(elec.pnt, data.trial{trlop}, [0 0 1]); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 29 16:44:57 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 29 Apr 2008 16:44:57 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolutionand cfg.inwardshift In-Reply-To: <480F0DAC.4040902@bio.uni-giessen.de> Message-ID: On 23 Apr 2008, at 12:21, Ingmar Schneider wrote: > Probably the original problem is not related to the leadfield at all. Hi Ingmar, I indeed think that the problem is not related to the leadfields themselves. I suspect the problem to be due to either the inside/ outside detection (which is done in private/prepare_dipole_grid and which depends on cfg.inwardshift) or that the problem is related to some confusion somewhere in the code about the units (cm v.s. mm). I suggest that you investigate the problem in more detail by visualising the source reconstruction without sourceinterpolate. I.e. after sourceanalysis you get a source.dim source.avg.pow and you should be able to do vol = reshape(source.avg.pow, source.dim); That gives you a 3D array which you can immediately plot slice-by- slice, e.g. using figure; imagesc(squeeze(vol(:,:,10))); or by using the matlab montage function if I recall correctly. What you also can do is explicitely look at the voxels that were considered in the source reconstruction, by vol = zeros(source.dim); % make 3d array vol(source.inside) = 1; vol(source.outside) = 0; and then again use imagesc to look at the slices in the volume. best regards, Robert PS please check that your problem is not merely due to colorbar scaling and a large depth bias as explained on http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:beamformer#plot_the_result and downward. See figure http://www2.ru.nl/fcdonders/fieldtrip/lib/exe/ detail.php?id=fieldtrip%3Adocumentation%3Atutorial% 3Abeamformer&cache=cache&media=fieldtrip:documentation:tutorial:beamform er:beampost.png. The different resolutions you used might just result in a different colorbar and opacity scaling, which would also result in a different "amount" of source reconstruction getting visible on top of the MRI. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Apr 30 13:50:20 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Wed, 30 Apr 2008 13:50:20 +0200 Subject: Error message: *** glibc detected *** free(): invalid pointer: 0x00002aab002dadf0 *** Message-ID: Hi I get this error message every time I try to preprocess my data: *** glibc detected *** free(): invalid pointer: 0x00002aab002dadf0 *** Does anyone have a clue what this could mean? Regards, Frederic _________________________________________________________________ Windows Live Messenger: Direkter Zugriff auf Ihre E-Mails! Ohne Neuanmeldung! http://get.live.com/de-de/messenger/overview ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Apr 2 19:39:54 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 19:39:54 +0200 Subject: 2 simple questions Message-ID: Hello FTers, I have been trying to get the tutorial beamforming example to run for over a week! I have tried several matlab versions and also the spm2 R2007a updtats dll files. Also gone through previous posts on this issue in the FT and SPM archives have not helped. Still unsuccessful in doing volume segmentation! The problem is as below: ??? Cant open image file. Error in ==> spm_segment>get_affine_mapping at 240 VFS(1).pinfo(1:2,:) = VFS(1).pinfo(1:2,:)/spm_global(VFS(1)); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Anyone knows how "cant map image file" error can be rectified? Regards, Kianoush ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Apr 2 20:13:54 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 20:13:54 +0200 Subject: 2 simple questions Message-ID: Hi All, The error reported for volume segmentation actually is: ??? Error using ==> spm_slice_vol Cant open image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); Error in ==> spm_smoothto8bit at 14 VO = smoothto8bit(V,fwhm); Error in ==> spm_segment>get_affine_mapping at 233 VFS = spm_smoothto8bit(VF(1),aflags.smosrc); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Regards, Kianoush ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Apr 2 20:21:46 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 2 Apr 2008 20:21:46 +0200 Subject: 2 simple questions In-Reply-To: Message-ID: Hi Kianoush, As you probably have seen, the error occurs in an spm-function. From this point it is hard to tell, whether the error is a consequence of something going on in your spm-version, or whether it is due to a fieldtrip-related issue. Could you provide some info with respect to the MRI you use as an input to volumesegment? Yours, Jan-Mathijs On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > Hi All, > > The error reported for volume segmentation actually is: > > ??? Error using ==> spm_slice_vol > Cant open image file. > > Error in ==> spm_smoothto8bit>smoothto8bit at 51 > img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); > > Error in ==> spm_smoothto8bit at 14 > VO = smoothto8bit(V,fwhm); > > Error in ==> spm_segment>get_affine_mapping at 233 > VFS = spm_smoothto8bit(VF(1),aflags.smosrc); > > Error in ==> spm_segment>init_sp at 567 > MM = get_affine_mapping(VF,PG,flags.affreg); > > Error in ==> spm_segment at 91 > SP = init_sp(flags.estimate,VF,PG); > > Error in ==> volumesegment at 250 > spm_segment(Va,cfg.template,flags); > > > Regards, > Kianoush > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to 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 K.Nazarpour at BHAM.AC.UK Wed Apr 2 20:35:17 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Wed, 2 Apr 2008 19:35:17 +0100 Subject: 2 simple questions In-Reply-To: <398EB287-FD60-4768-90DC-074A945B5E7D@psy.gla.ac.uk> Message-ID: Hi Jan-Mathijs, Thank you for your reply. I simply use Subject01 mri data in the tutorial. Kia jan-mathijs schoffelen wrote: > Hi Kianoush, > > As you probably have seen, the error occurs in an spm-function. From > this point it is hard to tell, whether the error is a consequence of > something going on in your spm-version, > or whether it is due to a fieldtrip-related issue. Could you provide > some info with respect to the MRI you use as an input to volumesegment? > > Yours, > > Jan-Mathijs > > > On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > >> Hi All, >> >> The error reported for volume segmentation actually is: >> >> ??? Error using ==> spm_slice_vol >> Cant open image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Regards, >> Kianoush >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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.capilla at PSY.GLA.AC.UK Wed Apr 2 20:42:45 2008 From: a.capilla at PSY.GLA.AC.UK (Almudena Capilla) Date: Wed, 2 Apr 2008 19:42:45 +0100 Subject: 2 simple questions In-Reply-To: <47F3D1E5.6020203@bham.ac.uk> Message-ID: Hi Kianoush, I think this kind of error occurs when the name of your output volume already exists in your working directory. Maybe it will work if you rename the "cfg.name" Hope it helps, Almu -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Kianoush Nazarpour Sent: 02 April 2008 19:35 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] 2 simple questions Hi Jan-Mathijs, Thank you for your reply. I simply use Subject01 mri data in the tutorial. Kia jan-mathijs schoffelen wrote: > Hi Kianoush, > > As you probably have seen, the error occurs in an spm-function. From > this point it is hard to tell, whether the error is a consequence of > something going on in your spm-version, > or whether it is due to a fieldtrip-related issue. Could you provide > some info with respect to the MRI you use as an input to volumesegment? > > Yours, > > Jan-Mathijs > > > On Apr 2, 2008, at 8:13 PM, Kianoush Nazarpour wrote: > >> Hi All, >> >> The error reported for volume segmentation actually is: >> >> ??? Error using ==> spm_slice_vol >> Cant open image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Regards, >> Kianoush >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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 k.nazarpour at BHAM.AC.UK Thu Apr 3 12:06:34 2008 From: k.nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Thu, 3 Apr 2008 12:06:34 +0200 Subject: 2 simple questions -> spm_slice_vol Message-ID: Thank you, I tried that as well, but does not solve the problem. Then, I decided to simply do the segmentation in the SPM and then bring the segmented images into FT. Therefore, I needed to make the mri variable in order to put all in FT format. The file used was t1_icbm_normal_1mm_pn0_rf0.mnc . The segmentation was done properly by SPM while the same file could not even be read properly by mri = read_fcdc_mri('t1_icbm_normal_1mm_pn0_rf0.mnc'); The error was ??? Error using ==> spm_slice_vol Cant open image file. 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 102 img = spm_read_vols(hdr); My question is if spm_slice_vol can be executed in SPM2 in Matlab MATLAB Version 7.5.0.342 (R2007b) why I can not be run on simialr Matlab platform but through FT ?! Bests, Kia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Paul.vandenHurk at FCDONDERS.RU.NL Thu Apr 3 17:46:47 2008 From: Paul.vandenHurk at FCDONDERS.RU.NL (Paul van den Hurk) Date: Thu, 3 Apr 2008 17:46:47 +0200 Subject: No subject Message-ID: Hi all, When I use the function 'timelockstatistics' I get the following error message: ======================================================== ??? Undefined function or variable "sens". Error in ==> neighbourselection at 106 if ~isstruct(sens) Error in ==> fieldtrip\private\statistics_wrapper at 226 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> timelockstatistics at 107 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> statistics_time_locked at 36 stat = timelockstatistics(cfg,grand_avg_s12_s51,grand_avg_s14_s51); ======================================================== The code I use for calling this function is the following: ======================================================== time_of_in_st = 0.1; % input('Beginning of interval: '); time_of_in_end = 0.8; % input('End of interval: '); interval = [time_of_in_st time_of_in_end]; cfg = []; cfg.channel = {'P8'}; cfg.latency = interval; cfg.statistic = 'depsamplesT'; cfg.parameter = 'individual'; cfg.method = 'analytic'; cfg.correctm = 'no'; cfg.alpha = 0.05; Nsub = input('Type in number of subjects to be included in timelockstatistics: '); cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number stat = timelockstatistics(cfg,grand_avg_s12_s51,grand_avg_s14_s51); ======================================================== Could anyone tell me how to fix this? Thanks a lot in advance, Kind regards, Paul ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 7 18:02:00 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Apr 2008 18:02:00 +0200 Subject: change in defaults for resampledata Message-ID: Dear fieldtrip users, I have made a change in the default configuration of resampledata that you should be aware of. Previously this function used to detrend the data by default. The motivation for this is that the data is filtered prior to resampling to avoid aliassing and detrending prevents occasional edge artifacts of the filters. Detrending is fine for removing slow drifts in data prior to frequency analysis, but detrending is not good if you subsequenlty want to look at the evoked fields. Therefore the old default value of 'yes' has been removed. You now explicitely have to specify whether you want to detrend (probably so if you want to keep your analysis compatible with previous analyses that you did), or if you do not want to detrent (recommended in most cases). If you observe edge artifacts after detrending, it is recommended to apply a baseline correction to the data. 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. From r.oostenveld at FCDONDERS.RU.NL Mon Apr 7 21:40:19 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Apr 2008 21:40:19 +0200 Subject: No subject In-Reply-To: <000701c895a1$ecfb61f0$172dae83@fcdonders.nl> Message-ID: Hi Paul On 3 Apr 2008, at 17:46, Paul van den Hurk wrote: > When I use the function ‘timelockstatistics’ I get the following > error message: > > ======================================================== > ??? Undefined function or variable "sens". > > Error in ==> neighbourselection at 106 > if ~isstruct(sens) The sensor specification (in your case the position of the EEG electrodes, for other people the position of MEG sensors) is used for spatial clustering. I suggest that you explicitely use the neighbourselection function if you are interested in using clustering. In the help of that function you can read how to specify the sensor information. However, since you write > The code I use for calling this function is the following: > ... > cfg.correctm = 'no'; > cfg.alpha = 0.05; it seems that you don't want to cluster. The default handling of the configurations here is not optimal, since the default is to try and make a neighbourhood structure (required for clustering) even if you don't need it. I think that you can get around it with cfg.neighbours = []; I will change the function so that it handles the defaults better. 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. From mramirez at NKI.RFMH.ORG Tue Apr 8 05:10:12 2008 From: mramirez at NKI.RFMH.ORG (Manuel Gomez-Ramirez) Date: Tue, 8 Apr 2008 05:10:12 +0200 Subject: scalpcurrentdensity Message-ID: Hello, I'm having problems trying to run the "scalpcurrentdensity" function in fieldtrip. I just downloaded the latest version and it is still giving me problems. the error message reads as follows: ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a\toolbox\fieldtrip-20080405\private\plgndr.dll': The specified procedure could not be found. Error in ==> fieldtrip-20080405\private\splint>gh at 170 p(k) = plgndr(k,0,x(i,j)); Error in ==> fieldtrip-20080405\private\splint at 75 [gx, hx] = gh(CosEii); Error in ==> scalpcurrentdensity at 186 [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); ---- Has anybody else run into this situation??? Gladly appreciate your help! Thanks in advance Manuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 8 12:32:56 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Tue, 8 Apr 2008 11:32:56 +0100 Subject: scalpcurrentdensity In-Reply-To: Message-ID: Hi Manuel, In FT FAQ page http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:frequently_asked_questions there are instructions for some functions under "Matlab complains about a missing or invalid MEX file, what should I do?" Hope that helps, Kianoush Manuel Gomez-Ramirez wrote: > Hello, > I'm having problems trying to run the "scalpcurrentdensity" function in > fieldtrip. > > I just downloaded the latest version and it is still giving me problems. > > the error message reads as follows: > > ??? Invalid MEX-file 'C:\Program > Files\MATLAB\R2007a\toolbox\fieldtrip-20080405\private\plgndr.dll': The > specified procedure could not be found. > > Error in ==> fieldtrip-20080405\private\splint>gh at 170 > p(k) = plgndr(k,0,x(i,j)); > > Error in ==> fieldtrip-20080405\private\splint at 75 > [gx, hx] = gh(CosEii); > > Error in ==> scalpcurrentdensity at 186 > [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); > > ---- > Has anybody else run into this situation??? > Gladly appreciate your help! > Thanks in advance > > Manuel > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 florisdelange at GMAIL.COM Thu Apr 10 16:26:11 2008 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Thu, 10 Apr 2008 16:26:11 +0200 Subject: plotting planar gradient data Message-ID: Salut Fieldtrippers, I am wondering whether there is a small bug in the routine that transforms data to planar gradient (or alternatively, I'm doing something stupid). After I have created an average ERF, using timelockanalysis, I transform my data to planar gradient using the following two commands: cfg = []; cfg.planarmethod = 'sincos'; erf_planar = megplanar(cfg,erf_axial); erf_planarcomb = combineplanar([],erf_planar); Now, several fields are gone/not compatible anymore with the plotting routines. First of all, I have to add a dimord-field: erf_planarcomb.dimord = 'chan_time'; Then, the time-field gets encapsulated in a structure, which the plotting routines don't like, so I have to specify: erf_planarcomb.time = erf_planarcomb.time{1}; And the same for the data field: erf_planarcomb.avg = erf_planarcomb.trial{1}; Is this a bug, or am I doing something wrong? If I look at the ERF-tutorial (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) all these steps don't seem necessary.. Thanks for your feedback, All the best, Floris ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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.bauer at FIL.ION.UCL.AC.UK Thu Apr 10 18:59:36 2008 From: m.bauer at FIL.ION.UCL.AC.UK (Markus Bauer) Date: Thu, 10 Apr 2008 17:59:36 +0100 Subject: plotting planar gradient data In-Reply-To: Message-ID: hey dr. floris try > cfg = []; > cfg.planarmethod = 'sincos'; > erf_planar = megplanar(cfg,erf_axial); erfplanar = raw2data(erfplanar,'chan_time'); that should do it, might depend a bit on which fieldtrip version you're using it's cause the function converts it internally into "raw data format" - I guess to make it generally usable also for freqanalysis cheers markus > Salut Fieldtrippers, > > I am wondering whether there is a small bug in the routine that transforms > data to planar gradient (or alternatively, I'm doing something stupid). > > After I have created an average ERF, using timelockanalysis, I transform my > data to planar gradient using the following two commands: > > cfg = []; > cfg.planarmethod = 'sincos'; > erf_planar = megplanar(cfg,erf_axial); > erf_planarcomb = combineplanar([],erf_planar); > > Now, several fields are gone/not compatible anymore with the plotting routines. > > First of all, I have to add a dimord-field: > erf_planarcomb.dimord = 'chan_time'; > > Then, the time-field gets encapsulated in a structure, which the plotting > routines don't like, so I have to specify: > erf_planarcomb.time = erf_planarcomb.time{1}; > > And the same for the data field: > erf_planarcomb.avg = erf_planarcomb.trial{1}; > > Is this a bug, or am I doing something wrong? > If I look at the ERF-tutorial > (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) > all these steps don't seem necessary.. > > Thanks for your feedback, > All the best, > Floris > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 marie at PSY.GLA.AC.UK Thu Apr 10 19:24:27 2008 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 10 Apr 2008 18:24:27 +0100 Subject: Hello In-Reply-To: <47FE4778.2050201@fil.ion.ucl.ac.uk> Message-ID: Hi Markus Not sure if you remember me, but i just saw your fieldtrip post from the FIL and thought i would write and say congrats for your job in London. I hope things are good with you. Marie Quoting Markus Bauer : > hey dr. floris > > try > >> cfg = []; >> cfg.planarmethod = 'sincos'; >> erf_planar = megplanar(cfg,erf_axial); > > erfplanar = raw2data(erfplanar,'chan_time'); > > that should do it, might depend a bit on which fieldtrip version you're using > it's cause the function converts it internally into "raw data format" - > I guess to make it generally usable also for freqanalysis > > cheers > markus > > >> Salut Fieldtrippers, >> >> I am wondering whether there is a small bug in the routine that transforms >> data to planar gradient (or alternatively, I'm doing something >> stupid). After I have created an average ERF, using >> timelockanalysis, I transform my >> data to planar gradient using the following two commands: >> >> cfg = []; >> cfg.planarmethod = 'sincos'; >> erf_planar = megplanar(cfg,erf_axial); >> erf_planarcomb = combineplanar([],erf_planar); >> >> Now, several fields are gone/not compatible anymore with the >> plotting routines. First of all, I have to add a dimord-field: >> erf_planarcomb.dimord = 'chan_time'; >> >> Then, the time-field gets encapsulated in a structure, which the plotting >> routines don't like, so I have to specify: >> erf_planarcomb.time = erf_planarcomb.time{1}; >> >> And the same for the data field: >> erf_planarcomb.avg = erf_planarcomb.trial{1}; >> >> Is this a bug, or am I doing something wrong? If I look at the ERF-tutorial >> (http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging) >> all these steps don't seem necessary.. >> >> Thanks for your feedback, >> All the best, >> Floris >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to 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 University of Glasgow, Department of Psychology WebMail system ------------------------------------------------------------------ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Apr 11 15:10:11 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 11 Apr 2008 15:10:11 +0200 Subject: BrainSync: 2 postdoc positions available Message-ID: 2 Post-doctoral positions at the Institute of Advanced Technologies in Biomedicine (ITAB), University of Chieti, to work on BrainSync, a FP7 sponsored project (see abstract below), starting immediately (www.brainsynch.org). These positions are for experiments on the mechanisms of neuronal communication in resting state networks and during visual attention in healthy volunteers with fMRI and MEG. BrainSync is a multi-center project involving the following scientists (centers): Maurizio Corbetta & Gian Luca Romani (St.Louis, Chieti), Jean-Philippe Lachaux (Lyon), Guy Orban & Wim Vanduffel (Leuven, Boston), Pascal Fries (Njimegen), Jon Driver (London), and Andreas Engel (Hamburg). BrainSync involves studies in human and non- human primates using a variety of methods including single/multi-unit/ LFP/fMRI recordings in non-human primates; fMRI/MEG/TMS measurements in healthy subjects and patients with brain diseases. ITAB is equipped with two new Phillips scanner (1.5 and 3.0T), a 165 channel MEG, integrated TMS/EEG and EEG/fMRI systems, and new 500 channels MEG system operational in the fall of 2008. Candidates should have a PhD in Physics, Engineering, Psychology, Neuroscience, or Computer Science. MDs with a strong background in Cognitive Neuroscience may also apply. Candidates should be already familiar either with MEG or fMRI methods. Quantitative skills in signal processing and time course analysis, as well as computer programming (C++, Matlab) is highly desirable. Chieti is a university town, located in central Italy, about 15 minutes from the Adriatic coast, 30 minutes from the Parco Nazionale degli Abruzzi, the largest natural reserve in Italy, great skying, hiking, and mountain or seaside activities, only 2 hours from Rome. Applications should include CV, a research statement, and 2 letters of reccomendation. Please forward the application materials to Prof. Maurizio Corbetta, mau at npg.wustl.edu, Department of Neurology, Washington University, St.Louis, Box 8111, 660 S.Euclid, St.Louis, MO 63110. BrainSync abstract FP7 program ------------------------------ The goal of this project is to understand how neuronal assemblies exchange information (functional neuronal communication), and how variability in neuronal communication explains variability in behavioural performance, both in the intact and injured brain. Neural communication involves temporal interactions between neuronal assemblies, not only locally within an area but also on a larger- scale between brain areas. We focus on large-scale interactions that arise at two distinct but potentially related temporal scales: 'slow' (~0.1 Hz) fluctuations of the blood oxygen level dependent (BOLD) signal, as readily measured with functional magnetic resonance imaging (fMRI); and 'fast' (1-150 Hz) neuronal oscillations, as can be measured at various spatial scales (e.g. multi-unit activity (MUA) and local field potentials (LFP) at fine spatial scale; electroencephalography (EEG); magnetoencephalography (MEG) at intermediate scale. We will explore how the different temporal and spatial scales relate mechanistically, and how variability in ongoing spontaneous or task-induced neuronal interactions relates to cognition and behaviour. A potentially important clinical application is the development of easy-to-use diagnostic measures of neuronal communication, and pathological changes in this, for many major brain diseases, including stroke, head injury, multiple sclerosis, and Alzheimer's disease. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 soren.r.christensen at GSK.COM Fri Apr 11 16:04:54 2008 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Fri, 11 Apr 2008 15:04:54 +0100 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 11-Apr-2008 and will not return until 13-Apr-2008. Back on Monday ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 desain at NICI.RU.NL Mon Apr 14 10:24:33 2008 From: desain at NICI.RU.NL (Peter Desain) Date: Mon, 14 Apr 2008 10:24:33 +0200 Subject: Senior position in Artificial Intelligence (AI) with a focus on Brain-Computer Interface (BCI). Message-ID: Assistant Professor of Artificial Intelligence (1,0 fte) *Faculty of Social Sciences Maximum salary: Euro 4868,- gross/month Vacancynumber: 24.13.08 Closing date: 15-05-2008 *Jobdescription A senior position in Artificial Intelligence (AI) with a focus on Brain-Computer Interface (BCI). The successful candidate is expected to cooperate with the SmartMix project BrainGain (for more detail, see www.braingain.nu), provide contributions to BCI-oriented research in Theoretical Cognitive Science and to participate in the establishment of a coherent research line with the division of Cognitive Artificial Intelligence. Teaching tasks are: - To participate in the design of BCI courses for the AI programme; the research master's programme in Cognitive Neuroscience (CNS), and the teaching of courses in AI and CNS. - To contribute to the collaboration with the Computer Science department. - Supervision of interns (BSc and MSc theses), and PhD students. Organizational tasks are: - To assist in managing the NICI's division of Cognitive Artificial Intelligence. Maximum employment: 1,0 (0,5 research; 0,5 education). Requirements You have a background in Cognitive (Neuro) Science and EEG signal analysis with orientation on Brain-Computer Interfaces (BCI) and in Theoretical Cognitive Science, more specifically, conceptual and formal analysis of computational models of cognition and/or embodied embedded cognition. You have thorough experience in conducting scientific research and writing. Furthermore, you have good teaching skills, the ability to motivate and attract students. You have good collaboration and communication skills and the ability to work in a complex organization with many partners. You attitude is pragmatic and productive. Organisation The position is located in NICI's division "Cognitive Artificial Intelligence" (research) and in the School of Psychology and Artificial Intelligence (teaching) of the Faculty of Social Sciences. Website: www.ru.nl/fsw Conditions of employment Maximum employment: 1,0 Maximum salary per month, based on fulltime employment: Euro 4868,- Salary scale: 12 Duration of contract: Temporary, with the possibility of a permanent appointment after five years. Additional conditions of employment The candidate will be appointed for a period of five years in total. Starting with 1 year. If the evaluation is positive, the contract will be extended by 4 years, with the possibility of permanent appointment after five years. Additional information Dr. P. Desain Telephone: 0031-243615885 E-mail: desain at nici.ru.nl Application You can apply for the job (mention the vacancynumber 24.13.08 before 15-05-2008 by sending your application to: RU, Faculty of Social Sciences, HR Department P.O. Box 9104 6500 HE Nijmegen E-mail:vacancies at socsci.ru.nl -- Dr. ir. Peter Desain Cognitive Artificial Intelligence NICI, Radboud University Nijmegen P.O.Box 9104 6500 HE Nijmegen Montessoriln 3 6525 HR Nijmegen The Netherlands www.nici.ru.nl/mmm www.nici.ru.nl/braingain ++31-24-3615885 tel ++31-24-3616066 fax ++31-6-51888767 cell ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 P.PRAAMSTRA at BHAM.AC.UK Mon Apr 14 11:54:08 2008 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Mon, 14 Apr 2008 10:54:08 +0100 Subject: Sliceinterp Message-ID: Dear FTers, I have a query regarding the sliceinterp function. I am trying to plot the sources of beta power changes. The source activities are the result of a comparison of left and right hand movement conditions, hence they have a mirror reversed distribution and amplitude, ranging from say -15 in one hemisphere to +15 in the opposite hemisphere. In order to clip the displayed source activities to say [-10 -15] in one hemisphere and [10 15] in the other (and create opacity maps) I thought I could use cfg.clipsym = `yes´ (and cfg.maskclipsym). For instance: cfg = []; cfg.funparameter = 'pow'; cfg.colmin = 5; cfg.colmax = 15; cfg.clipsym = 'yes'; However, this doesn´t seem to work since the clipping is performed on only one end of the scale, eliminating the mirror reversed source at the other end. Am I wrong in assuming cfg.clipsym would work here or am I using it in the wrong way? (What I´m trying to do is exactly the same as realized in Figure 3 of Medendorp et al. CerCor 2007). Any suggestions? Peter Praamstra ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 15 12:29:04 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 15 Apr 2008 12:29:04 +0200 Subject: Sliceinterp In-Reply-To: <480337D0.14728.5CE540@P.PRAAMSTRA.Bham.ac.uk> Message-ID: Dear Peter, My suggestion would be to use sourceplot, instead of sliceinterp. Sourceplot is a more modern version of sliceinterp and incorporates most (if not all) of sliceinterp's functionality (and more!). The function is quite well documented, but to give you some handles: cfg.method = 'slices'; cfg.nslices = a number but by default something like 20 cfg.funparameter = 'pow'; cfg.funcolorlim = [-15 15]; Additionally, you can specify a maskparameter, which will be used for opacity-mapping. This could be cfg.maskparameter = 'pow'. There are several options for the opacity you can play with, but when not specifying anything, I believe you are already pretty much in the right direction. Alternatively, you can create a new field in your data-structure, in which you control the opacity more explicitly, e.g. data.mask = abs(data.pow) >10; Note that when you want to plot the output of a statistics-function, there's usually a .mask-field associated with the data. I hope this helps, Yours, Jan-Mathijs On Apr 14, 2008, at 11:54 AM, Peter Praamstra wrote: > Dear FTers, > I have a query regarding the sliceinterp function. I am trying to > plot the sources of beta power changes. The source activities are > the result of a comparison of left and right hand movement > conditions, hence they have a mirror reversed distribution and > amplitude, ranging from say -15 in one hemisphere to +15 in the > opposite hemisphere. > > In order to clip the displayed source activities to say [-10 -15] > in one hemisphere and [10 15] in the other (and create opacity > maps) I thought I could use cfg.clipsym = ‘yes’ (and cfg.maskclipsym). > For instance: > cfg = []; > cfg.funparameter = 'pow'; > cfg.colmin = 5; > cfg.colmax = 15; > cfg.clipsym = 'yes'; > > However, this doesn’t seem to work since the clipping is performed > on only one end of the scale, eliminating the mirror reversed > source at the other end. > > Am I wrong in assuming cfg.clipsym would work here or am I using it > in the wrong way? > > (What I’m trying to do is exactly the same as realized in Figure 3 > of Medendorp et al. CerCor 2007). > > Any suggestions? > > Peter Praamstra > > ---------------------------------- > > The aim of this list 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.PRAAMSTRA at BHAM.AC.UK Tue Apr 15 14:28:56 2008 From: P.PRAAMSTRA at BHAM.AC.UK (Peter Praamstra) Date: Tue, 15 Apr 2008 13:28:56 +0100 Subject: Sliceinterp In-Reply-To: Message-ID: Dear Jan-Mathijs, Many thanks for your advice! Just replacing sliceinterp with sourceplot - and using default settings for opacity mapping - already did the trick. Best wishes, Peter On 15 Apr 2008 at 12:29, jan-mathijs schoffelen wrote: > > Dear Peter, > > My suggestion would be to use sourceplot, instead of sliceinterp. > Sourceplot is a more modern > version of sliceinterp and incorporates most (if not all) of > sliceinterp's functionality (and more!). > The function is quite well documented, but to give you some > handles: > > cfg.method = 'slices'; > cfg.nslices = a number but by default something like 20 > cfg.funparameter = 'pow'; > cfg.funcolorlim = [-15 15]; > > Additionally, you can specify a maskparameter, which will be used > for opacity-mapping. This could > be cfg.maskparameter = 'pow'. > There are several options for the opacity you can play with, but > when not specifying anything, I > believe you are already pretty much in the right direction. > > Alternatively, you can create a new field in your data-structure, in > which you control the opacity > more explicitly, e.g. > data.mask = abs(data.pow) >10; > Note that when you want to plot the output of a statistics-function, > there's usually a .mask-field > associated with the data. > > I hope this helps, > > Yours, > > Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From victimontes at HOTMAIL.COM Wed Apr 16 22:50:26 2008 From: victimontes at HOTMAIL.COM (Victoria Eugenia Montes Restrepo) Date: Wed, 16 Apr 2008 20:50:26 +0000 Subject: References to implemented methods Message-ID: Hi all, I'm working with the minimum norm solution for the inverse problem. There are three references inside the function minimumnormestimate: "Dale et al 2000", "Liu et al 2002" and "Lin et al 2004". I would be very grateful if you could send me these three papers. Thanks in advance, Victoria Eugenia Montes _________________________________________________________________ La vida de los famosos al desnudo en MSN Entretenimiento http://entretenimiento.es.msn.com/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 lmoranr at GMAIL.COM Thu Apr 17 19:08:18 2008 From: lmoranr at GMAIL.COM (=?ISO-8859-1?Q?Luis_Mor=E1n?=) Date: Thu, 17 Apr 2008 19:08:18 +0200 Subject: problem with volume_segment Message-ID: Hi all!! I'm working on the tutorial "Applying beamforming techniques in the frequency domain". Whe I've tried to run next lines: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca GBT\spm2\templates\T1.mnc'; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); I've got the following errors: performing the segmentation on the specified volume ??? Cant map image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); Error in ==> spm_smoothto8bit at 14 VO = smoothto8bit(V,fwhm); Error in ==> spm_segment>get_affine_mapping at 233 VFS = spm_smoothto8bit(VF(1),aflags.smosrc); Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 250 spm_segment(Va,cfg.template,flags); Could anyone help me?? Thank you in advance for any help you can give -- Luis Morán ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 21 16:56:47 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 21 Apr 2008 16:56:47 +0200 Subject: problem with volume_segment In-Reply-To: <52b4c8f20804171008v33961378w5af1fb835e79adcf@mail.gmail.com> Message-ID: Dear Luis, Fieldtrip makes use of SPM2 (i.e. SPM version 2) for the segmentation. The segmentation is then used to construct a volume conduction model. There are some incompatibilities between SPM2 and later versions. Please check that you have the correct version of SPM. For segmenting, a temporary file is written to disk and then SPM is called. Although I am not an expert on SPM, the error message "??? Cant map image file" seems to indicate that there is a problem with reading the temporary file. You can use the matlab debugger to stop on the line where you encounter the problem and look at the problem in more detail. best regards, Robert On 17 Apr 2008, at 19:08, Luis Morán wrote: > Hi all!! > > I'm working on the tutorial "Applying beamforming techniques in the > frequency domain". Whe I've tried to run next lines: > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca GBT > \spm2\templates\T1.mnc'; > cfg.name = 'segment'; > cfg.write = 'yes'; > cfg.coordinates = 'ctf'; > [segmentedmri] = volumesegment(cfg, mri); > > I've got the following errors: > > performing the segmentation on the specified volume > ??? Cant map image file. > > Error in ==> spm_smoothto8bit>smoothto8bit at 51 > img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); > > Error in ==> spm_smoothto8bit at 14 > VO = smoothto8bit(V,fwhm); > > Error in ==> spm_segment>get_affine_mapping at 233 > VFS = spm_smoothto8bit(VF(1),aflags.smosrc); > > Error in ==> spm_segment>init_sp at 567 > MM = get_affine_mapping(VF,PG,flags.affreg); > > Error in ==> spm_segment at 91 > SP = init_sp(flags.estimate,VF,PG); > > Error in ==> volumesegment at 250 > spm_segment(Va,cfg.template,flags); > > > Could anyone help me?? > > Thank you in advance for any help you can give > > -- > Luis Morán > ---------------------------------- > > The aim of this list 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 Mon Apr 21 17:12:17 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 21 Apr 2008 17:12:17 +0200 Subject: Problem while using prepare_leadfield with parameters cfg.resolution and cfg.inwardshift In-Reply-To: Message-ID: Hi Ingmar Although your question/problem is not completely clear to me, I suspect it to be related to http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#why_is_there_a_rim _around_the_brain_for_which_the_source_reconstruction_is_not_computed In general fieldtrip tries to make a dipole grid that is just inside the brain but as close as possible to the brain surface. Some volume conduction models are not fitted to the brain surface however, but to the skin surface. In those cases the cfg.inwardshift option tries to get an estimate of the brain surface from the skin surface, in order to achieve teh same tight fit of the dipole grid in the brain and to prevent the solution to be computed for dipoles in teh skull or skin. However, with a low resolution and a grid that fits exactly in the brain you tend to get the problem as outlined in the FAQ. Therfore it can be usefull to play with the cfg.inwardshift parameter. You can set it to a negative number, i.e. inwardshift=-2.5, which results in a 2.5cm _outwardshift_ of the source compartment boundary. I hope this helps, if not then please ask again with more specifications of your analysis (what kind of MEG, what kind of volume model, etc). best regards, Robert On 13 Feb 2008, at 15:36, Ingmar Schneider wrote: > Hello everybody, > > I am currently trying to analyze my MEG data with the DICS beamforming > technique. While preparing my leadfield grid via the > prepare_leadfield.m > function I stumbled across a problem I don't understand. Every time > I try to > decrease the inwardshift to suit the leadfield upon my anatomy data > and at > the same time increase the resolution the resulting grid is even > smaller, > than without specification. > > For example applying the following parameters reduces the size of the > resulting grid instead of increasing its volume: > cfg.inwardshift = -1.5; %Increasing the grid size to cover the anatomy > cfg.resoltion = 0.5; %[cm] > > Without the cfg.resolution parameter a reduction of cfg.inwardshift > results > in the desired bigger leadfield grid which eventually fits upon the > MRI > data. Are these factors intertwined in the calculations so that one > effects > the other in the course of calculation? > > I hope someone can help me solve this little problem and am > grateful for any > kind of hint. > > Regards, > Ingmar > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to 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 K.Nazarpour at BHAM.AC.UK Mon Apr 21 17:49:38 2008 From: K.Nazarpour at BHAM.AC.UK (Kianoush Nazarpour) Date: Mon, 21 Apr 2008 16:49:38 +0100 Subject: problem with volume_segment In-Reply-To: Message-ID: Dear Robert, I have had similar problem for some weeks. I have checked everything and really can't figure out where the problem is. As I posted earlier, if I simply ran SPM, volume segmentation can be done in SPM. However, if through simialr MATLAB platform (dll), vol segmentation is called from FT, the error comes up. Looking forward, Kianoush Robert Oostenveld wrote: > Dear Luis, > > Fieldtrip makes use of SPM2 (i.e. SPM version 2) for the segmentation. > The segmentation is then used to construct a volume conduction model. > > There are some incompatibilities between SPM2 and later versions. Please > check that you have the correct version of SPM. > > For segmenting, a temporary file is written to disk and then SPM is > called. Although I am not an expert on SPM, the error message "??? Cant > map image file" seems to indicate that there is a problem with reading > the temporary file. You can use the matlab debugger to stop on the line > where you encounter the problem and look at the problem in more detail. > > best regards, > Robert > > > > On 17 Apr 2008, at 19:08, Luis Morán wrote: >> Hi all!! >> >> I'm working on the tutorial "Applying beamforming techniques in the >> frequency domain". Whe I've tried to run next lines: >> mri = read_fcdc_mri('Subject01.mri'); >> cfg = []; >> cfg.template = 'C:\Users\Luisiyo\Documents\Teleco\Beca >> GBT\spm2\templates\T1.mnc'; >> cfg.name = 'segment'; >> cfg.write = 'yes'; >> cfg.coordinates = 'ctf'; >> [segmentedmri] = volumesegment(cfg, mri); >> >> I've got the following errors: >> >> performing the segmentation on the specified volume >> ??? Cant map image file. >> >> Error in ==> spm_smoothto8bit>smoothto8bit at 51 >> img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0); >> >> Error in ==> spm_smoothto8bit at 14 >> VO = smoothto8bit(V,fwhm); >> >> Error in ==> spm_segment>get_affine_mapping at 233 >> VFS = spm_smoothto8bit(VF(1),aflags.smosrc); >> >> Error in ==> spm_segment>init_sp at 567 >> MM = get_affine_mapping(VF,PG,flags.affreg); >> >> Error in ==> spm_segment at 91 >> SP = init_sp(flags.estimate,VF,PG); >> >> Error in ==> volumesegment at 250 >> spm_segment(Va,cfg.template,flags); >> >> >> Could anyone help me?? >> >> Thank you in advance for any help you can give >> >> -- >> Luis Morán >> ---------------------------------- >> >> The aim of this list 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. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Ingmar.Schneider at BIO.UNI-GIESSEN.DE Tue Apr 22 09:52:09 2008 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Tue, 22 Apr 2008 09:52:09 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolution and cfg.inwardshift In-Reply-To: <6CA37F03-1541-4B06-81D4-B72CD8D0DD13@fcdonders.ru.nl> Message-ID: Hello again, what you say is completely right and my problem is related to the problem described in the FAQ. As I tried to explain in the last mail and as you say: A reduction of the inwardshift (i.e. to a negative value) results in a leadfield, that covers the whole anatomy data. But if I simultaneously try to improve the resolution (i.e. to 0.5cm) the resulting field is smaller than the one with the default resolution-value of 1cm. I played with some combinations, but i never really got a suiting leadfield. I am using data from a VSM MedTech CTF-MEG with 275 channels and here's an excerpt of the Matlab-code to further specify my analysis. These specifications actually deliver a leadfield, that covers most of the anatomy, but in a poor resolution. %Preparation of the head model [vol, hdmcfg]=prepare_singleshell([], segmentedmriF); % Single sphere save(MRIoutname, 'vol', 'hdmcfg', '-append', '-v7.3'); clear segmentedmriF; %Preparation of the Leadfield for a specific dataset filename = strcat(SubjectID,'_10Hz_Redef_CSDM_20HzBin.mat'); fullname = strcat(INpath, filename); load(fullname); % Load redefined data file with gradiometers etc. for leadfield generation cfg = []; cfg.grad = freqPost.grad; cfg.vol = vol; cfg.inwardshift = -1.5; cfg.resolution = 1; cfg.reducerank = 2; cfg.channel = {'MEG', '-MLP12', '-MRC14', '-MLT41', '-MRC25', '-MRP56', '-MRT21', '-MLO21', '-MRO44', '-MRT47'}; cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; cfg.zgrid = 'auto'; [LFgrid] = prepare_leadfield(cfg); I hope this helps a bit to clarify my problem and the information is useful to you. Best regards, Ingmar Robert Oostenveld schrieb: > Hi Ingmar > > Although your question/problem is not completely clear to me, I > suspect it to be related to > > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:frequently_asked_questions#why_is_there_a_rim_around_the_brain_for_which_the_source_reconstruction_is_not_computed > > > In general fieldtrip tries to make a dipole grid that is just inside > the brain but as close as possible to the brain surface. Some volume > conduction models are not fitted to the brain surface however, but to > the skin surface. In those cases the cfg.inwardshift option tries to > get an estimate of the brain surface from the skin surface, in order > to achieve teh same tight fit of the dipole grid in the brain and to > prevent the solution to be computed for dipoles in teh skull or skin. > > However, with a low resolution and a grid that fits exactly in the > brain you tend to get the problem as outlined in the FAQ. Therfore it > can be usefull to play with the cfg.inwardshift parameter. You can set > it to a negative number, i.e. inwardshift=-2.5, which results in a > 2.5cm _outwardshift_ of the source compartment boundary. > > I hope this helps, if not then please ask again with more > specifications of your analysis (what kind of MEG, what kind of volume > model, etc). > > best regards, > Robert > > > On 13 Feb 2008, at 15:36, Ingmar Schneider wrote: >> Hello everybody, >> >> I am currently trying to analyze my MEG data with the DICS beamforming >> technique. While preparing my leadfield grid via the prepare_leadfield.m >> function I stumbled across a problem I don't understand. Every time I >> try to >> decrease the inwardshift to suit the leadfield upon my anatomy data >> and at >> the same time increase the resolution the resulting grid is even >> smaller, >> than without specification. >> >> For example applying the following parameters reduces the size of the >> resulting grid instead of increasing its volume: >> cfg.inwardshift = -1.5; %Increasing the grid size to cover the anatomy >> cfg.resoltion = 0.5; %[cm] >> >> Without the cfg.resolution parameter a reduction of cfg.inwardshift >> results >> in the desired bigger leadfield grid which eventually fits upon the MRI >> data. Are these factors intertwined in the calculations so that one >> effects >> the other in the course of calculation? >> >> I hope someone can help me solve this little problem and am grateful >> for any >> kind of hint. >> >> Regards, >> Ingmar >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to 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 r.oostenveld at FCDONDERS.RU.NL Tue Apr 22 21:05:23 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 22 Apr 2008 21:05:23 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolution and cfg.inwardshift In-Reply-To: <480D9929.1090608@bio.uni-giessen.de> Message-ID: Hi Ingmar On 22 Apr 2008, at 9:52, Ingmar Schneider wrote: > what you say is completely right and my problem is related to the > problem described in the FAQ. As I tried to explain in the last > mail and as you say: A reduction of the inwardshift (i.e. to a > negative value) results in a leadfield, that covers the whole > anatomy data. But if I simultaneously try to improve the resolution > (i.e. to 0.5cm) the resulting field is smaller than the one with > the default resolution-value of 1cm. I played with some > combinations, but i never really got a suiting leadfield. How do you mean "the field is smaller"? The cfg.resolution only pertains to the distance between neighbouring grid locations at which dipoles will be positioned (using the fieldtrip/private/ prepare_dipole_grid function). Then the leadfield is computed by looping over all dipole positions that are marked as being inside the brain. The "inside the brain" detection is influenced by cfg.inwardshift. If you compare LFgrid_coarse.leafield{i} and LFgrid_fine.leafield{j} for the two grids that you have constructed, where LFgrid_coarse.pos(i,:)== LFgrid_fine.pos(j,:) then you should have exactly the same leadfield. However, the number of dipole positions in the grid should be higher for the fine resolution than for the coarse resolution (the effect of cfg.resolution). If you keep the resolution constant but change cfg.inwardshift, then you will primarily see a change in the number of dipoles taht is marked inside. Note however that fieldtrip tries to keep the "box" encompassing the brain compartment as small as possible, so changing cfg.inwardshift might also affect the total number of sources (inside+outside). Perhaps you should do this to clarify it further insidevol = zeros(LFgrid.dim); insidevol(LFgrid.inside) = 1; insidevol(LFgrid.outside) = 0; for slice=1:LFgrid.dim(3) % probably you dont want this in a for loop figure; imagesc(insidevol(:,:,slice)); end You can also see that LFgrid.leadfield is empty (i.e. []) for all "outside" gridpoints (that is to save memory, since ~50% of the points will be outside the brain). > I am using data from a VSM MedTech CTF-MEG with 275 channels and > here's an excerpt of the Matlab-code to further specify my > analysis. These specifications actually deliver a leadfield, that > covers most of the anatomy, but in a poor resolution. The leadfield is usually computed on a relatively coarse grid (compared to fMRI) because of the computationat time involved, but also because the spatial resolution of MEG is not so high anyway (assuming a whole-head beamformer source reconstruction or a distributed source model). A resolution of 1cm is usually fine to get a quick first idea, and I consider a resolution of 0.7cm adequate for almost all applications. Mote that decreasing the resolution from 1 to 0.7 results in 3x so many dipoles and hence 3x longer computations. best regards, Robert PS your code looks fine to me ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Ingmar.Schneider at BIO.UNI-GIESSEN.DE Wed Apr 23 12:21:32 2008 From: Ingmar.Schneider at BIO.UNI-GIESSEN.DE (Ingmar Schneider) Date: Wed, 23 Apr 2008 12:21:32 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolutionand cfg.inwardshift In-Reply-To: <2FE87490-AAD1-402F-B206-CA4B811C65B9@fcdonders.ru.nl> Message-ID: Hello Robert, thanks again for the quick reply! I'm sorry for the sloppy formulation. What I mean by "the field", is the visible area after source analysis. I calculated the sources two times - once with a leadfield resolution of 1cm and once with a resolution of 0.5cm - and compared the resulting sliceplots. While the 1cm resolution resulted in a source analysis covering almost the whole MRI-anatomy, the 0.5cm resolution concentrated only on the central 50% of the anatomy (Unfortunately I have no saved figures of these constellations, but I'll try to visualize it in an attached, coarse scetch). I considered these divergences to result from the underlying leadfield, but I checked the calculated leadfields as you proposed in your last mail and the dimensions appear to be just fine. Probably the original problem is not related to the leadfield at all. With best regards, Ingmar Robert Oostenveld schrieb: > Hi Ingmar > > On 22 Apr 2008, at 9:52, Ingmar Schneider wrote: >> what you say is completely right and my problem is related to the >> problem described in the FAQ. As I tried to explain in the last mail >> and as you say: A reduction of the inwardshift (i.e. to a negative >> value) results in a leadfield, that covers the whole anatomy data. >> But if I simultaneously try to improve the resolution (i.e. to 0.5cm) >> the resulting field is smaller than the one with the default >> resolution-value of 1cm. I played with some combinations, but i never >> really got a suiting leadfield. > > How do you mean "the field is smaller"? The cfg.resolution only > pertains to the distance between neighbouring grid locations at which > dipoles will be positioned (using the > fieldtrip/private/prepare_dipole_grid function). Then the leadfield is > computed by looping over all dipole positions that are marked as being > inside the brain. The "inside the brain" detection is influenced by > cfg.inwardshift. > > If you compare > LFgrid_coarse.leafield{i} > and > LFgrid_fine.leafield{j} > for the two grids that you have constructed, where > LFgrid_coarse.pos(i,:)== LFgrid_fine.pos(j,:) > then you should have exactly the same leadfield. However, the number > of dipole positions in the grid should be higher for the fine > resolution than for the coarse resolution (the effect of > cfg.resolution). If you keep the resolution constant but change > cfg.inwardshift, then you will primarily see a change in the number of > dipoles taht is marked inside. Note however that fieldtrip tries to > keep the "box" encompassing the brain compartment as small as > possible, so changing cfg.inwardshift might also affect the total > number of sources (inside+outside). > > Perhaps you should do this to clarify it further > > insidevol = zeros(LFgrid.dim); > insidevol(LFgrid.inside) = 1; > insidevol(LFgrid.outside) = 0; > > for slice=1:LFgrid.dim(3) % probably you dont want this in a for loop > figure; imagesc(insidevol(:,:,slice)); > end > > You can also see that LFgrid.leadfield is empty (i.e. []) for all > "outside" gridpoints (that is to save memory, since ~50% of the points > will be outside the brain). > >> I am using data from a VSM MedTech CTF-MEG with 275 channels and >> here's an excerpt of the Matlab-code to further specify my analysis. >> These specifications actually deliver a leadfield, that covers most >> of the anatomy, but in a poor resolution. > > The leadfield is usually computed on a relatively coarse grid > (compared to fMRI) because of the computationat time involved, but > also because the spatial resolution of MEG is not so high anyway > (assuming a whole-head beamformer source reconstruction or a > distributed source model). A resolution of 1cm is usually fine to get > a quick first idea, and I consider a resolution of 0.7cm adequate for > almost all applications. Mote that decreasing the resolution from 1 to > 0.7 results in 3x so many dipoles and hence 3x longer computations. > > best regards, > Robert > > PS your code looks fine to me > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to 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: scetch.png Type: image/png Size: 33761 bytes Desc: not available URL: From zanasilva at GMAIL.COM Sun Apr 27 00:01:13 2008 From: zanasilva at GMAIL.COM (Susana Silva) Date: Sun, 27 Apr 2008 00:01:13 +0200 Subject: eep and brainvision definetrial Message-ID: Hi I am a new and very poor fieldtrip user. I am trying to use fieldtrip for analysis of eep files (ANT, ASA). First I tried eep “read” functions (fieldtrip\private), but there were problems with the MEX file (“invalid MEX file”). This applies to .cnt as well as to .avr. Then I exported my eep files as brainvision. Now I can read the brainvision header file using the read_brainvision_vhdr, but not with read_fcdc_header; differently, I can read the brainvision trigger file with read_fcdc_event, but not with read_brainvision_vmrk. When I try to do the trial definition, something is said about the function read_fcdc_header not being OK. As I can not use this function, it sounds logical. My questions are: - In my position – someone who has eep files and brainvision files, what is the most simple option: try to use eep or brainvision (at the moment, I can use neither!) - Can you give me an example of a trial definition based upon a brainvision file, let us say s1.eeg (data), s1.vhdr , s1.vmrk, where ‘s33’ (eventvalue) is the ‘Stimulus’ (eventtype)? - In case I can not do the trial definition, how exactly should I arrange my data so that they are equivalent to the output of “definetrial”? Thank you, Susana Silva ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 28 12:30:31 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 28 Apr 2008 12:30:31 +0200 Subject: postdoc position available in Manchester Message-ID: FYI, read below for the full advert. I was told that the deadline is already very soon: 2nd of May. best regards, Robert --------------- Postdoc to study the influence of sleep upon memory consolidation Applications are invited for a 3 year postdoc to study the neuroplasticity associated with sleep-dependent memory consolidation using fMRI, MEG, and sleep monitoring with EEG. The successful candidate will be based at the University of Manchester, and will take up the post in June-August of this year. The Project It is well established that procedural skills are strengthened during post-training sleep, and that such consolidation is associated with alterations in neural circuitry. This neuroplasticity is thought to be caused by the reactivation of task-related circuitry during sleep, in combination with the electrophysiological and pharmacological characteristics of that sleep. This fellowship will focus upon sleep dependent neuroplasticity by using fMRI, MEG, and EEG first to characterise sleep-dependent changes in the activity of local brain regions and brain networks, and second to track the evolution of such changes during a night of sleep. Manchester’s neuroscience community & facilities Manchester University provides a vibrant intellectual community with a strong commitment to cognitive neuroscience. Local facilities include 3 and 1.5 Tesla Philips MR scanners at the Translational Imaging Unit http://www.mhs.manchester.ac.uk/tiu/ and a PET scanner at the Wolfson Molecular Imaging Centre http:// www.mhs.manchester.ac.uk/research/facilities/wmic/ . The appointee will join the Neuroscience and Aphasia Unit (NARU) http://www.psych- sci.manchester.ac.uk/naru/ and interact with the Cognition and Cognitive Neuroscience Unit http://www.psych-sci.manchester.ac.uk/ research/groups/cognitionandcognitive/ . MEG studies will be performed at the University of Liverpool’s MARIARC centre http:// www.liv.ac.uk/mariarc/ Collaborators & Training This post provides an exceptional opportunity to learn cutting edge techniques in fMRI, MEG, and EEG. It is part of a 3 year BBSRC grant to Dr. Penny Lewis http://www.liv.ac.uk/psychology/staff/plewis.html in conjunction with Matt Walker of the Sleep and Neuroimaging Lab at Berkeley http://www.walkerlab.com/people.html, Derk-Jan Dijk of the Surrey Sleep Research Centre http://www.surrey.ac.uk/SBMS/SSRC/, Andrej Stancak of MARIARC, and Dr. Stefan Kiebel at the Functional Imaging Laboratory http://www.fil.ion.ucl.ac.uk/. The successful candidate will travel regularly to visit these collaborators and learn cutting edge techniques for experimental design and analysis. To apply you must have a) A PhD in neuroscience, computer science, or a related field b) Experience with MEG or EEG. c) An interest in memory plasticity and or sleep research If interested, please send a CV and statement of interest to Penny Lewis . There is no formal deadline, but we encourage you to make contact as soon as possible. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Apr 28 13:07:47 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 28 Apr 2008 13:07:47 +0200 Subject: Postdoctoral Position in Brain Imaging - MPI Frankfurt Message-ID: Postdoctoral Position in Brain Imaging A joint postdoctoral position in brain imaging is available at the Max Planck Institute for Brain Research, Department of Neurophysiology, and at the Laboratory for Neurophysiology and Neuroimaging, Department of Psychiatry, Johann Wolfgang Goethe- Universität, Frankfurt am Main. The successful applicant will work on projects examining the neurophysiology of cognitive dysfunctions in neuropsychiatric disorders (Schizophrenia, Autism, Morbus Alzheimer) with magnetoencephalography (MEG), transcranial magnetic stimulation (TMS) and functional/anatomical magnetic resonance imaging (fMRI/MRI). The ideal candidate should have a PhD in neuroimaging and expertise with a neuroimaging technique (TMS, EEG, MEG, fMRI/MRI). Excellent research opportunities are available at the nearby Brain Imaging Center. Applications from a physics or engineering background are welcome as well. Expertise in Matlab or C++ programming is desirable. The position will run for two years with a possible extension. The successful applicant will receive a stipend, depending on qualification and years of working experience. Review of applications will start ASAP and will continue until the position is filled. The University aims to increase the number of women in those areas where they are underrepresented and urges them to apply. The University is committed to employing more disabled individuals and especially encourages them to apply. Informal inquiries can be directed to Peter Uhlhaas (uhlhaas at mpih- frankfurt.mpg.de). To apply, please send curriculum vitae, letter of interest, names and contact information of two references to: Peter Uhlhaas Max Planck Institute for Brain Research Department of Neurophysiology Deutschordenstr. 46 60528 Frankfurt am Main GERMANY ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 mramirez at NKI.RFMH.ORG Tue Apr 29 06:50:56 2008 From: mramirez at NKI.RFMH.ORG (Manuel Gomez-Ramirez) Date: Tue, 29 Apr 2008 06:50:56 +0200 Subject: possible bug (scalpcurrentdensity.m file) Message-ID: Hi, So I think there's a bug in the scalpcurrentdensity.m file. If I'm not mistaken the script is currently computing the current density for only the first trial of the epochs! the script implements this code on line 186: [V2, L2, L1] = splint(elec.pnt, data.trial{1}, [0 0 1]); I believe that it should be corrected to: [V2, L2, L1] = splint(elec.pnt, data.trial{trlop}, [0 0 1]); good luck! Manuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 29 16:35:40 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 29 Apr 2008 16:35:40 +0200 Subject: possible bug (scalpcurrentdensity.m file) In-Reply-To: Message-ID: You are correct. I fixed it. thanks, Robert On 29 Apr 2008, at 6:50, Manuel Gomez-Ramirez wrote: > I believe that it should be corrected to: > [V2, L2, L1] = splint(elec.pnt, data.trial{trlop}, [0 0 1]); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Apr 29 16:44:57 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 29 Apr 2008 16:44:57 +0200 Subject: Problem while using prepare_leadfield with parameterscfg.resolutionand cfg.inwardshift In-Reply-To: <480F0DAC.4040902@bio.uni-giessen.de> Message-ID: On 23 Apr 2008, at 12:21, Ingmar Schneider wrote: > Probably the original problem is not related to the leadfield at all. Hi Ingmar, I indeed think that the problem is not related to the leadfields themselves. I suspect the problem to be due to either the inside/ outside detection (which is done in private/prepare_dipole_grid and which depends on cfg.inwardshift) or that the problem is related to some confusion somewhere in the code about the units (cm v.s. mm). I suggest that you investigate the problem in more detail by visualising the source reconstruction without sourceinterpolate. I.e. after sourceanalysis you get a source.dim source.avg.pow and you should be able to do vol = reshape(source.avg.pow, source.dim); That gives you a 3D array which you can immediately plot slice-by- slice, e.g. using figure; imagesc(squeeze(vol(:,:,10))); or by using the matlab montage function if I recall correctly. What you also can do is explicitely look at the voxels that were considered in the source reconstruction, by vol = zeros(source.dim); % make 3d array vol(source.inside) = 1; vol(source.outside) = 0; and then again use imagesc to look at the slices in the volume. best regards, Robert PS please check that your problem is not merely due to colorbar scaling and a large depth bias as explained on http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:beamformer#plot_the_result and downward. See figure http://www2.ru.nl/fcdonders/fieldtrip/lib/exe/ detail.php?id=fieldtrip%3Adocumentation%3Atutorial% 3Abeamformer&cache=cache&media=fieldtrip:documentation:tutorial:beamform er:beampost.png. The different resolutions you used might just result in a different colorbar and opacity scaling, which would also result in a different "amount" of source reconstruction getting visible on top of the MRI. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Apr 30 13:50:20 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Wed, 30 Apr 2008 13:50:20 +0200 Subject: Error message: *** glibc detected *** free(): invalid pointer: 0x00002aab002dadf0 *** Message-ID: Hi I get this error message every time I try to preprocess my data: *** glibc detected *** free(): invalid pointer: 0x00002aab002dadf0 *** Does anyone have a clue what this could mean? Regards, Frederic _________________________________________________________________ Windows Live Messenger: Direkter Zugriff auf Ihre E-Mails! Ohne Neuanmeldung! http://get.live.com/de-de/messenger/overview ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.