From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jun 1 13:29:46 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Fri, 1 Jun 2012 13:29:46 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data In-Reply-To: References: Message-ID: Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: not available URL: From aler1 at web.de Fri Jun 1 17:36:18 2012 From: aler1 at web.de (alla brodski) Date: Fri, 1 Jun 2012 17:36:18 +0200 (CEST) Subject: [FieldTrip] change in ft_sourceanalysis? Message-ID: An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jun 1 20:51:51 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Fri, 1 Jun 2012 20:51:51 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data References: Message-ID: <72E993C35FB11743B79FF9286E5B6D8B013F06BB@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: headmodel.jpg URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Sat Jun 2 11:49:29 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (van Dijk, Hanneke) Date: Sat, 02 Jun 2012 11:49:29 +0200 Subject: [FieldTrip] [ FieldTrip] creating mni-normalised headmodels of neuromag data Message-ID: -------- Oorspronkelijk bericht -------- Onderwerp:Fwd: creating mni-normalised headmodels of neuromag data Van:Hanneke van Dijk Aan:"van Dijk, Hanneke" Cc: Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg                      = []; cfg.coordsys         = 'neuromag'; cfg.method           = 'singleshell'; cfg.sourceunits     = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg                  = []; cfg.grid.warpmni     = 'yes'; cfg.grid.template   = template_grid; cfg.grid.nonlinear  = 'yes'; % use non-linear normalization cfg.coordsys        = 'neuromag'; cfg.sourceunits     = 'm';  % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri                 = mri; cfg.vol                  = vol; grid                     = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html  Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: not available URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 4 09:11:15 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Mon, 4 Jun 2012 09:11:15 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data References: Message-ID: <72E993C35FB11743B79FF9286E5B6D8B013F06BD@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: headmodel.jpg URL: From ith at deakin.edu.au Tue Jun 5 05:32:07 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 5 Jun 2012 03:32:07 +0000 Subject: [FieldTrip] Creating a MRI based headmodel Message-ID: <5A1787011651BC42A4D41856DBC2E06038227A5A@mbox-f-3.du.deakin.edu.au> Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From tsauvigny at googlemail.com Tue Jun 5 22:32:04 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Tue, 5 Jun 2012 22:32:04 +0200 Subject: [FieldTrip] colorbar In-Reply-To: References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <006901cd435a$46078cf0$d216a6d0$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Cheers! Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From ith at deakin.edu.au Wed Jun 6 10:48:30 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Wed, 6 Jun 2012 08:48:30 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes Message-ID: <5A1787011651BC42A4D41856DBC2E0603E0395C7@mbox-f-3.du.deakin.edu.au> Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali ________________________________ From: IMALI THANUJA HETTIARACHCHI Sent: Tuesday, 5 June 2012 1:32 PM To: fieldtrip at science.ru.nl Subject: Creating a MRI based headmodel Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: m_file.txt URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: innerSkull.mat Type: application/octet-stream Size: 141056 bytes Desc: innerSkull.mat URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: outerSkull.mat Type: application/octet-stream Size: 98624 bytes Desc: outerSkull.mat URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: skin.mat Type: application/octet-stream Size: 100160 bytes Desc: skin.mat URL: From tsauvigny at googlemail.com Wed Jun 6 11:19:40 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Wed, 6 Jun 2012 11:19:40 +0200 Subject: [FieldTrip] colorbar Message-ID: <001d01cd43c5$81966d70$84c34850$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Cheers! Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From marcel.heers at googlemail.com Wed Jun 6 11:25:10 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Wed, 6 Jun 2012 11:25:10 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting the individual brain to creat a BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be the chance to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel From marcel.heers at googlemail.com Wed Jun 6 11:29:09 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Wed, 6 Jun 2012 11:29:09 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting the individual brain to creat a BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be the chance to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel From r.oostenveld at donders.ru.nl Wed Jun 6 17:08:25 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 6 Jun 2012 17:08:25 +0200 Subject: [FieldTrip] fieldtrip/multivariate directory has moved Message-ID: <954B1630-700E-4ACD-A112-5B9E42CAFC7E@donders.ru.nl> Dear FieldTrip users, Marcel van Gerven has decided to move on with the development of the multivariate classification methods in a slightly different manner. Consequently the functions in the directory fieldtrip/multivariate (and all subdirectories) have moved to the directory fieldtrip/external/dmlt. If you are using the multivariate analysis functions, e.g. though the cfg.method='crossvalidate' option in T_TIMELOCKSTATISTICS, T_FREQSTATISTICS or FT_SOURCESTATISTICS or the other methods explained on http://fieldtrip.fcdonders.nl/tutorial/multivariateanalysis, you should already have gotten used to addpath(genpath('fieldtrip/multivariate')). From now on you just have to update your path settings to point to external/dmlt instead of multivariate. In the FieldTrip versions from this evening onward the code will not be present in the old location any more. best regards, Robert From r.oostenveld at donders.ru.nl Wed Jun 6 17:34:28 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 6 Jun 2012 17:34:28 +0200 Subject: [FieldTrip] problems with mailing list Message-ID: <9091F14C-A2B0-4A84-B28E-96049DDA1B9D@donders.ru.nl> Dear fieldtrip users, Recently we have had some problems with the fieldtrip email discussion list due to changes on the mailman server by the hosting ICT department. Of course the email list is very important for the community and support. Let me summarise: Intially the mailing list was always on the address fieldtrip at donders.ru.nl >From 25 May onward the automatic reply to address has changed to fieldtrip at science.ru.nl. This caused me (and probably others) that the email filters would not sort the messages in the proper email box, but all mails still came through. >From 1 June (last Friday) onward something else seems to have changed, resulting in myself and some other colleagues in Nijmegen (as I learnt today) did not receive any messages. From the http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html online archive it is clear that the list has not been silent over the last days, but somehow the messages did not get through to all people. I want to ask you a special favour: could you for this time (and this time only!) contact me directly replying whether you recently have received the recent mails. Please do NOT REPLY TO THIS EMAIL DIRECTLY, but change the reply address to r.oostenveld_at_donders.ru.nl. Please reply with extending the subject line of the email with either one of Re: problems with mailing list -> none Re: problems with mailing list -> some Re: problems with mailing list -> yes so that I can easily sort out the problematic ones. If you have more information, you can pass that to me in the body of the email. Note that I will not be responding to the individual emails. With your input I will be able to make the case to our own ICT department and to the hosting (science faculty) ICT department on what precisely the problems are and consequently needs to be fixed/reverted to the old situation. best regards, Robert PS please be sure that you do not reply to this email to the whole fieldtrip email list, only to me!!! From r.oostenveld at donders.ru.nl Thu Jun 7 11:33:30 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:33:30 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: this is a test email to fieldtrip at donders From r.oostenveld at donders.ru.nl Thu Jun 7 11:34:03 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:34:03 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: <0BCEDDB3-000A-431E-9550-86223506A682@donders.ru.nl> this is a test email to fieldtrip at science From r.oostenveld at donders.ru.nl Thu Jun 7 11:55:28 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:55:28 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: <4B5B0C91-1660-40A1-8900-37536FD336BD@donders.ru.nl> this is another test email to the fieldtrip at donders mailing list. I just changed the host_name in the mailmain admin interface. From r.oostenveld at donders.ru.nl Thu Jun 7 12:19:46 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 12:19:46 +0200 Subject: [FieldTrip] problems with the email discussion list Message-ID: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> Dear FieldTrip community Over the last few days we have encountered some problems with the email discussion list, which started around 23 May due to some configuration changes on the mailman server that hosts our list. Over the last few days, starting June 1, no messages got through at all. As of now (7 June) I hope that mails get through again. The emails that were sent to the mailing list the last week, but that were not passed on, have been archived at http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html Please have a look there to see whether those mails are of relevance for you. For the original posters: you might want to reconsider posting the email again. There are still some smaller configuration issues that need to be resolved, the most important that it now appears as if the mailing list is at fieldtrip at science.ru.nl instead of the proper address at fieldtrip at donders.ru.nl. We are working with the ICT team to get these sorted out as well. Sorry for the inconvenience this might have caused. I am looking forward to a continuation of the fruitful and positive atmosphere discussions. best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- From r.oostenveld at donders.ru.nl Thu Jun 7 22:40:00 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 22:40:00 +0200 Subject: [FieldTrip] problems with the email discussion list -> resolved In-Reply-To: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> Message-ID: <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> Dear all I believe the problems have been resolved. You can start posting questions and of course also your replies and insights. best regards, Robert On 7 Jun 2012, at 12:19, Robert Oostenveld wrote: > Dear FieldTrip community > > Over the last few days we have encountered some problems with the email discussion list, which started around 23 May due to some configuration changes on the mailman server that hosts our list. Over the last few days, starting June 1, no messages got through at all. As of now (7 June) I hope that mails get through again. > > The emails that were sent to the mailing list the last week, but that were not passed on, have been archived at http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html > > Please have a look there to see whether those mails are of relevance for you. For the original posters: you might want to reconsider posting the email again. > > There are still some smaller configuration issues that need to be resolved, the most important that it now appears as if the mailing list is at fieldtrip at science.ru.nl instead of the proper address at fieldtrip at donders.ru.nl. We are working with the ICT team to get these sorted out as well. > > Sorry for the inconvenience this might have caused. I am looking forward to a continuation of the fruitful and positive atmosphere discussions. > > best regards, > Robert > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher & MEG Physicist > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tsauvigny at googlemail.com Thu Jun 7 22:46:08 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Thu, 7 Jun 2012 22:46:08 +0200 Subject: [FieldTrip] colorbar In-Reply-To: <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> Message-ID: <003d01cd44ee$922c89b0$b6859d10$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Thank you! Cheers! Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From ljbj_2009 at yahoo.com Thu Jun 7 23:08:20 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Thu, 7 Jun 2012 14:08:20 -0700 (PDT) Subject: [FieldTrip] TMSI realtime buffer and tmsidriver Message-ID: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> Dear All, Is there a demo available to show us how to use the Fieldtrip real time buffer? The hardware is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. Using Fieldtrip and tmsidriver, I was able collect data using the function ft_read_data via Fieldtrip real time buffer. I used  ft_read_data(C:\work\fieldtrip-20120604\fileio), this function returns a 2-D matrix of size Nchans*Nsamples for continuous data. The values are 8189887,-394150....  I want to know how to calculate the voltage from the data collected from fieldtrip buffer. Thanks for your help,   Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Fri Jun 8 03:05:00 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Fri, 8 Jun 2012 01:05:00 +0000 Subject: [FieldTrip] Creating a MRI based headmodel Message-ID: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From jm.horschig at donders.ru.nl Fri Jun 8 09:34:48 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jun 2012 09:34:48 +0200 Subject: [FieldTrip] colorbar In-Reply-To: <003d01cd44ee$922c89b0$b6859d10$@com> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> <003d01cd44ee$922c89b0$b6859d10$@com> Message-ID: <4FD1AB18.4020509@donders.ru.nl> Hi Thomas, the values refer to your statistical test, e.g. it might be t-values or z-score or whatever statistic you are basing your cluster based test on. Best, Jörn On 6/7/2012 10:46 PM, Thomas Sauvigny wrote: > Dear FieldTripers! > > I have a question regarding clusterplots. > I'm using the ft_clusterplot-function to plot my statistic results of a > cluster-based permutation test on event related fields (within-subjects > design). > What is the unit of the colorbar and what is the interpretation of the > references to colour? (see attached jpeg-file) > > Thank you! > > Cheers! > Thomas > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 8 10:48:00 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jun 2012 10:48:00 +0200 Subject: [FieldTrip] Help improving "Getting started with BrainVision data" on the wiki Message-ID: <4FD1BC40.3000509@donders.ru.nl> Dear FieldTrip list, As you know, there are several getting started sections on our wiki-page: http://fieldtrip.fcdonders.nl/getting_started Unfortunately, however, we (the FieldTrip development team) are no expert for all different dataformats, mainly because at the Donders Institute, we do not work with all those data formats. You, on the other hand, might be an expert. In order to provide good documentation, we therefore rely on your input as well and would like to ask your help. First, we want to get started with BrainVision data. 1) What would you like to see in the Getting Started guide? 2) What explanation would you like to see there that is specific to BrainVision data? 3) Is there any particular example code that you would like to be shown there? 4) Are there particular problems you encountered (and solved) with reading in and working with BrainVision data in FieldTrip? What are these problems and what are the solutions? 5) Are there questions you always asked yourself about using BrainVision data with FieldTrip? It would be great if you share this information with us. Feel free to write whatever you want, any information is useful (preferably of course some elaborations and explanation so that we can put this information there). If you are working with other data, feel free to also answer this mail on a more general note, but we will ask separately for other data formats in near future. On behalf of the FieldTrip development team, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From r.oostenveld at donders.ru.nl Fri Jun 8 10:51:29 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 8 Jun 2012 10:51:29 +0200 Subject: [FieldTrip] Creating a MRI based headmodel In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> Message-ID: Dear Imali One problem might be that the surfaces are intersecting, but with this clean template MRI I consider that unlikely. If it were the case, then we should revise the segmentation procedure for skull and skin. An alternative for the problem is that it is due to the surfaces being incorrectly oriented (e.g. inside out). So the problem you are descibing suggests that there is an error (or imperfection) in the code. I have filed it as a bug on http://bugzilla.fcdonders.nl/show_bug.cgi?id=1510 under your name. The bug tracking system will automatically keep you posted on the updates. best regards, Robert On 8 Jun 2012, at 3:05, IMALI THANUJA HETTIARACHCHI wrote: > Dear All, > > I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code > > load standard_mri.mat > mri_orig=mri; > > % Realign the data to the CTF system > > cfg = []; > cfg.method = 'interactive'; > % use n,l,r fudicials > mri_realign = ft_volumerealign(cfg, mri_orig); > > cfg = []; > cfg.resolution = 1; % mm > cfg.dim = mri_orig.dim; > mri_reslice = ft_volumereslice(cfg, mri_realign); > > %% Segmenting the data > > cfg = []; > cfg.output= {'scalp','skull','brain'}; > cfg.coordinates = 'ctf'; > cfg.keepintermediate = 'no'; > [mri_segment] = ft_volumesegment(cfg, mri_reslice); > mri_combine = mri_reslice; > mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; > mri_combine.mask = (mri_combine.seg)>0; > > %% Plot data > > cfg = []; > cfg.interactive = 'no'; > cfg.method='slice'; > cfg.funparameter = 'seg'; > cfg.funcolormap = 'jet'; > cfg.funcolorlim = [0 7]; > cfg.opacitylim = [0 1.5]; > cfg.maskparameter = 'mask'; > figure , ft_sourceplot(cfg,mri_combine); > > %% Generating the mesh > > cfg=[]; > cfg.tissue=[1 2 3]; > cfg.numvertices=[5000 3000 800]; > cfg.sourceunits=mri_segment.unit; > scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); > skull=2*(mri_segment.skull); > brain=3*(mri_segment.brain); > > mri_segment.seg= scalp+skull+brain; > bnd = ft_prepare_mesh(cfg, mri_segment); > > %% View meshes a transparent plot > > figure (2) > tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); > tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); > tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); > trisurf(tr1,'facealpha',0.1); hold on > trisurf(tr2,'facealpha',0.2); hold on > trisurf(tr3) > > > %% BEM Computation-calculating the related electromagnetic model > > Cskin_surface= 0.33; %scalp > Couter_skull_surface=0.0042; %skull > Cinner_skull_surface=0.33; %brain > vol=[]; > for i=1:3 > vol.bnd(i).tri=bnd(i).tri; > vol.bnd(i).pnt=bnd(i).pnt; > end > vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; > cfg=[]; > cfg.method = 'openmeeg'; > vol = ft_prepare_headmodel(cfg, vol); > > When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; > ??? Error using ==> surface_nesting at 24 > the compartment nesting cannot be determined > > Error in ==> ft_headmodel_bem_openmeeg at 96 > order = surface_nesting(vol.bnd, 'insidefirst'); > > With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. > > I would really appreciate any guidance and any suggestions given to make this work. > > Many thanks in advance. > > Kind regards > Imali > > Imali Thanuja Hettiarachchi > PhD Candidate > Centre for Intelligent Systems research > Deakin University, Geelong 3217, Australia. > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From b.reuderink at donders.ru.nl Fri Jun 8 12:16:25 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Fri, 8 Jun 2012 12:16:25 +0200 Subject: [FieldTrip] TMSI realtime buffer and tmsidriver In-Reply-To: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> References: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> Message-ID: Dear Jie, There is a number of examples of real-time processing with FieldTrip. Perhaps the best starting point is the real-time section on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/development/realtime#, which contains pointers to example scripts. But, the range of the values you get with ft_read_data is a bit unexpected, I would expect uV units. Could you test with one of the example scripts if that persists, and if the signals are sensible despite the scale? Best, Boris Reuderink On Thu, Jun 7, 2012 at 11:08 PM, jie liu wrote: > Dear All, > > Is there a demo available to show us how to use the Fieldtrip real time > buffer? > The hardware is TMSI refa 128 working with usb (driver is fusbi version > 6.0.0.76.) windows xp+service pack3. > > Using Fieldtrip and tmsidriver, I was able collect data using the function > ft_read_data via Fieldtrip real time buffer. I used > ft_read_data(C:\work\fieldtrip-20120604\fileio), this function returns a 2-D > matrix of size Nchans*Nsamples for continuous data. The values are > 8189887,-394150.... > >  I want to know how to calculate the voltage from the data collected from > fieldtrip buffer. > > > > Thanks for your help, > > > > Jie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- twitter.com/#!/breuderink | github.com/breuderink | borisreuderink.nl From vlad_chiriacescu at yahoo.com Mon Jun 11 03:40:42 2012 From: vlad_chiriacescu at yahoo.com (Vlad Chiriacescu) Date: Sun, 10 Jun 2012 18:40:42 -0700 (PDT) Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Message-ID: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com>   Hello,   I am working on a school project related to the Biomag 2012 analysis competition.   I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/.   I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2).   I was able to load the 2 mat files into Matlab workspace.   I was also able to use FieldTrip functions on tutorial code.   However, when I try to use ft_preprocessing on one of the mat files I get an error.   Here is the code I wrote:   cfg1.dataset = 'ltmcla_S08.mat'   data_org = ft_preprocessing(cfg1)   And the error is:   ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344   hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);   I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair.   However, I do not have a .dat file, I have a .mat file.   Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim.   How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest?   Thanks a lot,   Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.heers at googlemail.com Mon Jun 11 08:39:58 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Mon, 11 Jun 2012 08:39:58 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting individual brains to creat BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be a way to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel -- Dr. Marcel Heers, M.D. Fischenbergstr. 10 D-58455 Witten phone: +49-2302-2034057 fax: +49-2302-2033528 From jan.schoffelen at donders.ru.nl Mon Jun 11 08:57:24 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 11 Jun 2012 08:57:24 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip References: Message-ID: <40D2886E-BF14-42CF-9FCE-B74BB8AB0472@donders.ru.nl> Hi Marcel, You can read in gifti-files with ft_read_headshape. Best, Jan-Mathijs On Jun 11, 2012, at 8:39 AM, Marcel Heers wrote: > Dear Fieldtip experts, > > I am having a many problems segmenting individual brains to creat > BEM for EEG source localization with the spm methods implemented in > fieldtrip no matter which thresholds and smoothing factors I am using. > So I was wondering wether there would be a way to directly import > the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' > and 'scalp.surf.gii' into fieldtrip to use them for further > processing. > Thank you for your comments! > > Best regards, > > Marcel > > -- > Dr. Marcel Heers, M.D. > Fischenbergstr. 10 > D-58455 Witten > phone: +49-2302-2034057 > fax: +49-2302-2033528 > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 11 09:20:46 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 11 Jun 2012 09:20:46 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: <4FD59C4E.5060208@donders.ru.nl> Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using />> load ltmcla_S08.mat/ This should result in some variable, most likely /data/ in your workspace. You can then call ft_preprocessing like this: />> ft_preprocessing(cfg, data) /I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at /data.cfg /Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn // On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: > Hello, > > I am working on a school project related to the Biomag 2012 analysis > competition. > > I have downloaded a .zip file from > ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second > objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files > I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, > which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jun 11 09:21:25 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 11 Jun 2012 09:21:25 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Dear Vlad, The Biomag 2012 data competition is not part of the FieldTrip project. Of course you should be able to use FieldTrip for parts (or all) of the analysis, but it might be that the data is provided in a file format that is not directly compatible with FieldTrip (see http://fieldtrip.fcdonders.nl/dataformat). The specific error that you get suggests that the data that is distributed was already preprocessed and is in MATLAB format and that you should just do "load ". Note that the content you might find in the mat-file could very well be formatted in a way that FieldTrip is not directly able to process it further. On http://www.biomag2012.org/content/data-analysis-competition at the bottom is an email address that is specific to the competition, I suggest you contact that with your questions that are specific to the the competition. best regards, Robert On 11 Jun 2012, at 3:40, Vlad Chiriacescu wrote: > Hello, > > I am working on a school project related to the Biomag 2012 analysis competition. > > I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Mon Jun 11 09:27:28 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 11 Jun 2012 09:27:28 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Hi Vlad, If you have the data already in Matlab, it is quite straightforward to convert it to a FieldTrip-compatible data structure. See http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined#raw_data for an explanation of how raw data structures look, in general. Now I see Jörn's e-mail on the same subject. His explanation is the right one, if the data you have is already in FieldTrip format. However, from your explanation, I assume you still need to do a little bit of tweaking to get your data to be FT-compatible. Hope this helps, Eelke On 11 June 2012 03:40, Vlad Chiriacescu wrote: >   Hello, > >   I am working on a school project related to the Biomag 2012 analysis > competition. > >   I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > >   I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > >   I was able to load the 2 mat files into Matlab workspace. > >   I was also able to use FieldTrip functions on tutorial code. > >   However, when I try to use ft_preprocessing on one of the mat files I get > an error. > >   Here is the code I wrote: > >   cfg1.dataset = 'ltmcla_S08.mat' >   data_org = ft_preprocessing(cfg1) > >   And the error is: >   ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 >   hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > >   I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > >   However, I do not have a .dat file, I have a .mat file. > >   Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > >   How could I use FieldTrip on this data? If there are more ways, which one > would be the fastest/easiest? > >   Thanks a lot, > >   Vlad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From smoratti at psi.ucm.es Mon Jun 11 09:39:43 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 11 Jun 2012 09:39:43 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Dear Vlad, It seems that the matlab structure already contains the data in fieldtrip format. This structure normally is created when you read raw data from some compatible data format. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 11/06/2012, a las 03:40, Vlad Chiriacescu escribió: > Hello, > > I am working on a school project related to the Biomag 2012 analysis competition. > > I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindenberger at mpib-berlin.mpg.de Mon Jun 11 10:10:36 2012 From: lindenberger at mpib-berlin.mpg.de (Lindenberger, Ulman) Date: Mon, 11 Jun 2012 08:10:36 +0000 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <4FD59C4E.5060208@donders.ru.nl> Message-ID: <4ADF66FEA083904FA4A12CBD5A303E5B6F668B68@MaxMail03.mpib-berlin.mpg.de> Sent by Blackberry Von: "Jörn M. Horschig" [mailto:jm.horschig at donders.ru.nl] Gesendet: Monday, June 11, 2012 09:20 AM An: FieldTrip discussion list Betreff: Re: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using >> load ltmcla_S08.mat This should result in some variable, most likely data in your workspace. You can then call ft_preprocessing like this: >> ft_preprocessing(cfg, data) I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at data.cfg Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: Hello, I am working on a school project related to the Biomag 2012 analysis competition. I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2). I was able to load the 2 mat files into Matlab workspace. I was also able to use FieldTrip functions on tutorial code. However, when I try to use ft_preprocessing on one of the mat files I get an error. Here is the code I wrote: cfg1.dataset = 'ltmcla_S08.mat' data_org = ft_preprocessing(cfg1) And the error is: ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair. However, I do not have a .dat file, I have a .mat file. Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim. How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? Thanks a lot, Vlad _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindenberger at mpib-berlin.mpg.de Mon Jun 11 10:15:44 2012 From: lindenberger at mpib-berlin.mpg.de (Lindenberger, Ulman) Date: Mon, 11 Jun 2012 08:15:44 +0000 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <4FD59C4E.5060208@donders.ru.nl> Message-ID: <4ADF66FEA083904FA4A12CBD5A303E5B6F668B79@MaxMail03.mpib-berlin.mpg.de> Sent by Blackberry Von: "Jörn M. Horschig" [mailto:jm.horschig at donders.ru.nl] Gesendet: Monday, June 11, 2012 09:20 AM An: FieldTrip discussion list Betreff: Re: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using >> load ltmcla_S08.mat This should result in some variable, most likely data in your workspace. You can then call ft_preprocessing like this: >> ft_preprocessing(cfg, data) I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at data.cfg Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: Hello, I am working on a school project related to the Biomag 2012 analysis competition. I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2). I was able to load the 2 mat files into Matlab workspace. I was also able to use FieldTrip functions on tutorial code. However, when I try to use ft_preprocessing on one of the mat files I get an error. Here is the code I wrote: cfg1.dataset = 'ltmcla_S08.mat' data_org = ft_preprocessing(cfg1) And the error is: ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair. However, I do not have a .dat file, I have a .mat file. Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim. How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? Thanks a lot, Vlad _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Tue Jun 12 02:25:47 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 12 Jun 2012 00:25:47 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes Message-ID: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NeuroScan meshes.zip Type: application/x-zip-compressed Size: 157689 bytes Desc: NeuroScan meshes.zip URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: m_file.txt URL: From alexandre.gramfort at inria.fr Tue Jun 12 08:10:58 2012 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 12 Jun 2012 09:10:58 +0300 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> Message-ID: hi Imali, your meshes had indeed tiny problems. To fixed it I just smoothed a tiny bit the meshes. In matlab: >> load innerSkull >> om_save_tri('innerSkull.tri', curryloc', currytri'); then : $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert $ om_mesh_info -i innerSkull_sm_flip.tri om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 load_tri : innerSkull_sm_flip.tri Mesh Info : # points : 2934 # triangles : 5864 Euler characteristic : 2 Min Area : 6.55783 Max Area : 28.9211 Mesh orientation correct (valid for closed mesh). this should fix the problem. Note that you can surely also smooth the meshes in matlab. Alex -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team, NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://alexandre.gramfort.net On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI < ith at deakin.edu.au> wrote: > ** ** > > Dear FieldTrip users,**** > > **** > > As I have faced problems in creating a head model with MRI's, so I thought > to try the MNI head for creating the meshes. I used the NeuroScan software > to create the surface meshes and exported them to Matlab. Then tried to > crate the head model using ft_prepare_headmodel function. however the > 'om_minverser' stops working and the program terminates.**** > > **** > > When I plot the meshes they seem fine to me so I assume that there is no > segmenting issues. But Now I get an error as attached in the 'log.txt' from > the Matlab workspace, which says about self intersecting meshes. I have > attached the Neuroscan exported meshes > (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function > (m_file.txt) that I used in creating the head model.**** > > **** > > I really want to generate some simulated EEG data but cannot make anything > work. If someone can give a guidance on where I am going wrong in the > procedure , that will be highly appreciated.**** > > **** > > Many thanks.**** > > **** > > Kind regards**** > > Imali**** > > ** ** > > *Imali Thanuja Hettiarachchi* > > PhD Candidate**** > > Centre for Intelligent Systems research**** > > Deakin University, Geelong 3217, Australia.**** > > ** ** > > Mobile : +61430321972**** > > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr**** > > ** ** > > [image: Description: Description: Description: > cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au]**** > > ** ** > > > > **** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Tue Jun 12 10:08:32 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 12 Jun 2012 08:08:32 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au>, Message-ID: <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> Deal Alex, Thank you so much for the quick reply, I managed to do what you suggested then got stuck at loading the '_sm_flip.tri' files to MATLAB. This may be a very naive question, but hope you can give me some help on this please. Many thanks Kind regards Imali ________________________________ From: alexandre.gramfort at gmail.com [alexandre.gramfort at gmail.com] on behalf of Alexandre Gramfort [alexandre.gramfort at inria.fr] Sent: Tuesday, 12 June 2012 4:10 PM To: FieldTrip discussion list; IMALI THANUJA HETTIARACHCHI Subject: Re: [FieldTrip] Headmodel with NeuroScan meshes hi Imali, your meshes had indeed tiny problems. To fixed it I just smoothed a tiny bit the meshes. In matlab: >> load innerSkull >> om_save_tri('innerSkull.tri', curryloc', currytri'); then : $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert $ om_mesh_info -i innerSkull_sm_flip.tri om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 load_tri : innerSkull_sm_flip.tri Mesh Info : # points : 2934 # triangles : 5864 Euler characteristic : 2 Min Area : 6.55783 Max Area : 28.9211 Mesh orientation correct (valid for closed mesh). this should fix the problem. Note that you can surely also smooth the meshes in matlab. Alex -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team, NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://alexandre.gramfort.net On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI > wrote: Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Tue Jun 12 10:17:01 2012 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 12 Jun 2012 11:17:01 +0300 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> Message-ID: Here is a tiny function that should help https://github.com/agramfort/matlab_mesh_toolbox/blob/master/load_tri.m Alex On Tue, Jun 12, 2012 at 11:08 AM, IMALI THANUJA HETTIARACHCHI < ith at deakin.edu.au> wrote: > Deal Alex, > > > > Thank you so much for the quick reply, I managed to do what you suggested > then got stuck at loading the '_sm_flip.tri' files to MATLAB. > > > > This may be a very naive question, but hope you can give me some help on > this please. > > > > Many thanks > > > > Kind regards > > Imali > ------------------------------ > *From:* alexandre.gramfort at gmail.com [alexandre.gramfort at gmail.com] on > behalf of Alexandre Gramfort [alexandre.gramfort at inria.fr] > *Sent:* Tuesday, 12 June 2012 4:10 PM > *To:* FieldTrip discussion list; IMALI THANUJA HETTIARACHCHI > *Subject:* Re: [FieldTrip] Headmodel with NeuroScan meshes > > hi Imali, > > your meshes had indeed tiny problems. To fixed it I just smoothed a tiny > bit the meshes. > > In matlab: > > >> load innerSkull > >> om_save_tri('innerSkull.tri', curryloc', currytri'); > > then : > > $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 > $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert > $ om_mesh_info -i innerSkull_sm_flip.tri > om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 > > load_tri : innerSkull_sm_flip.tri > Mesh Info : > # points : 2934 > # triangles : 5864 > Euler characteristic : 2 > Min Area : 6.55783 > Max Area : 28.9211 > Mesh orientation correct (valid for closed mesh). > > this should fix the problem. Note that you can surely also smooth the > meshes in matlab. > > Alex > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team, NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://alexandre.gramfort.net > > On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI < > ith at deakin.edu.au> wrote: > >> **** >> >> Dear FieldTrip users,**** >> >> **** >> >> As I have faced problems in creating a head model with MRI's, so I >> thought to try the MNI head for creating the meshes. I used the NeuroScansoftware to create the surface meshes and exported them to Matlab. >> Then tried to crate the head model using ft_prepare_headmodel function. >> however the 'om_minverser' stops working and the program terminates.**** >> >> **** >> >> When I plot the meshes they seem fine to me so I assume that there is no >> segmenting issues. But Now I get an error as attached in the 'log.txt' >> from the Matlab workspace, which says about self intersecting meshes. I >> have attached the Neuroscan exported meshes >> (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function >> (m_file.txt) that I used in creating the head model.**** >> >> **** >> >> I really want to generate some simulated EEG data but cannot make >> anything work. If someone can give a guidance on where I am going wrong in >> the procedure , that will be highly appreciated.**** >> >> **** >> >> Many thanks.**** >> >> **** >> >> Kind regards**** >> >> ***Imali* >> >> **** >> >> *Imali Thanuja Hettiarachchi* >> >> PhD Candidate**** >> >> Centre for Intelligent Systems research**** >> >> Deakin University, Geelong 3217, Australia.**** >> >> **** >> >> Mobile : +61430321972**** >> >> Email: ith at deakin.edu.au >> www.deakin.edu.au/cisr**** >> >> **** >> >> [image: Description: Description: Description: >> cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] **** >> >> **** >> >> >> >> **** >> >> **** >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it >> is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners >> Compliance HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you >> in error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> >> > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team @ NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nuria.donamayor at neuro.uni-luebeck.de Wed Jun 13 19:21:56 2012 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Wed, 13 Jun 2012 19:21:56 +0200 Subject: [FieldTrip] sourceanalysis on neuromag data Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F2398@solaris.neuro.uni-luebeck.de> Dear fieldtrippers, I am doing source localization on some neuromag 306-channel data and I have a couple of questions for which I haven't been able to flind answers in the community. I have performed timelockanalysis on magnetometers and planar gradiometers separately, and combined the planar gradiometers. Should I perform sourceanalysis using just one type of sensor, or can I input both in the algorithm? In the case of the gradiometers: should I used the combined or the individual gradients? If using the combined gradients, what sensor positions/channel names do I input when calculating the leadfield? Thanks so much for your help, Nuria From tim.curran at Colorado.EDU Wed Jun 13 21:01:28 2012 From: tim.curran at Colorado.EDU (Tim Curran) Date: Wed, 13 Jun 2012 13:01:28 -0600 Subject: [FieldTrip] skewed classes for pattern classification Message-ID: I am trying some pattern classification in fieldtrip. Mostly using: cfg.method = 'crossvalidate'; cfg.mva = {dml.standardizer dml.glmnet('family','binomial')}; I am trying to predict task accuracy (0,1) in cases where accuracy is often around 80%, so the frequency of the correct class is much greater than the frequency of the incorrect class. dml.crossvalidate can handle this as follows: % In order to balance the occurrence of different classes one may set % 'resample' equal to true (default: false). Resample will upsample less % occurring classes during training and downsample often occurring % classes during testing. … but this requires tossing a lot of data in the downsampling process. Has anybody tried other approaches for dealing with skewed classes that do not involve downsampling? Like this for example: Loss functions allowing for unbalanced classes The classification performance is always evaluated by some loss function, see the section Estimation of the generalization error. Typical examples are the 0/1-loss (i.e., average number of misclassified samples) and the area under the receiver operator characteristic (ROC) curve (Fawcett, 2006). When using misclassification rate, it must be assured that the classes have approximately the same number of samples. Otherwise, the employed performance measure has to consider the different class prior probabilities. For instance, in oddball paradigms the task is to discriminate brain responses to an attended rare stimulus from responses to a frequent stimulus. A typical ratio of frequent-to-rare stimuli is 85:15. In such a setting, an uninformative classifier which always predicts the majority class would obtain an accuracy of 85%. Accordingly, a different loss function needs to be employed. Denoting the number of samples in class i by ni, the normalized error can be calculated as weighted average, where errors committed on samples of class i are weighted by N/ni with N =Σk nk: From S. Lemm, B. Blankertz, T. Dickhaus, K. R. Müller, Introduction to machine learning for brain imaging NeuroImage, 56:387-399, 2011 http://doc.ml.tu-berlin.de/bbci/publications/LemBlaDicMue11.pdf Not being a very good programmer, I got lost in the code before I could find the relevant cost function to apply normalization. Any advice on these issues would be much appreciated. thanks Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Wed Jun 13 23:35:22 2012 From: lihqih at gmail.com (qi li) Date: Wed, 13 Jun 2012 17:35:22 -0400 Subject: [FieldTrip] instantaneous phase and phase locking value Message-ID: Hi there, I am wondering whether fieldtrip has a function to compute the instantaneous phase and phase locking value. Thanks! Qi From asaygin at ucsd.edu Thu Jun 14 02:43:16 2012 From: asaygin at ucsd.edu (Ayse Pinar Saygin) Date: Wed, 13 Jun 2012 17:43:16 -0700 Subject: [FieldTrip] Postdoctoral position in cognitive neuroscience at UCSD: Human perception of humanoid robots Message-ID: Postdoctoral position in cognitive neuroscience at UCSD: Human perception of humanoid robots We are seeking a motivated and creative postdoctoral research associate to join the Cognitive Neuroscience and Neuropsychology Lab at the University of California, San Diego (http://www.sayginlab.org). Our lab studies the perception of socially-relevant stimuli such as bodies, actions, and biological motion using psychophysical, neuroimaging, neuropsychological and brain stimulation studies. The current position is part of an interdisciplinary research program exploring the perception of body movements of not only humans, but also of humanoid robots. The position requires experience with EEG, including both ERP and time/frequency approaches, as well as strong analytical and programming abilities. The ideal candidate will have a PhD in cognitive science, neuroscience, computer science, psychology, engineering or related discipline, and a strong interest in the research foci of the lab. Substantial experience with EEG is essential, and experience with Brain-Computer Interfaces (BCI) is highly desirable. Proficiency in programming (preferably but not necessarily in Matlab) is essential; experience with machine learning is highly desirable. Interest in and experience with other methods our lab uses (e.g., structural and functional neuroimaging, brain stimulation) is desirable but not required. Candidates should have excellent written and oral communication skills and a commitment to efficient publication of research results. San Diego is home to an outstanding cognitive science and neuroscience community, which includes UCSD, Salk Institute, Institute for Neural Computation (INC), Swartz Center for Computational Neuroscience (SCCN), Center for Research in Language (CRL), and Kavli Institute for Brain and Mind (KIBM). The successful candidate will work with a lively and interdisciplinary group of researchers and students. EEG collaborators include Prof. Marta Kutas, INC, SCCN, and local industry partners; robotics collaborator is Prof. Ishiguro from Osaka University. More information can be found on our website at http://www.sayginlab.org The position is initially available for two years, the second year contingent on satisfactory progress. Extension beyond two years may be possible. The target start date is Summer 2012 or possibly early Fall. Interested candidates, please email Ayse P. Saygin at asaygin at ucsd.edu, with a cover letter describing past research experience and current interests, a CV including list of publications (in pdf format), and names and contact information for 3 individuals who can provide a recommendation letter. Please also indicate US citizenship/residence status in your letter. A.P. Saygin http://www.sayginlab.org From ith at deakin.edu.au Thu Jun 14 05:53:14 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Thu, 14 Jun 2012 03:53:14 +0000 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file Message-ID: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> Dear fieldtrip users, I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, elec = ft_read_sens('mydirectory\standard_1020.elc'); The I used the function, [vol, sens] = ft_prepare_vol_sens(vol, elec); However this give as error, ??? Reference to non-existent field 'mat'. Error in ==> ft_prepare_vol_sens at 419 if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) Error in ==> curry_leadField at 15 [vol, sens] = ft_prepare_vol_sens(vol, elec); The vol created with the OPENMEEG only contains the following fields, vol = bnd: [1x3 struct] cond: [0.3300 0.0042 0.3300] skin_surface: 1 source: 3 type: 'openmeeg' unit: 'mm' cfg: [1x1 struct] Can someone please help me with this error, any advice and comment will be highly appreciated. Thank you very much! Regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From tzvetan.popov at uni-konstanz.de Thu Jun 14 09:17:58 2012 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 14 Jun 2012 09:17:58 +0200 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> Message-ID: Hi Imali, in this case your meshes probably touch somewhere so that om doesn't created the bem model at all and as a consequence didn't wrote the mat file. You should go back in the segmentation procedure and play around with the option "cfg.threshold", plot the meshes and make sure they do not touch. Good luck tzvetan > > Dear fieldtrip users, > > I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, > elec = ft_read_sens('mydirectory\standard_1020.elc'); > > The I used the function, > > [vol, sens] = ft_prepare_vol_sens(vol, elec); > However this give as error, > > ??? Reference to non-existent field 'mat'. > > Error in ==> ft_prepare_vol_sens at 419 > if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) > > Error in ==> curry_leadField at 15 > [vol, sens] = ft_prepare_vol_sens(vol, elec); > > The vol created with the OPENMEEG only contains the following fields, > vol = > > bnd: [1x3 struct] > cond: [0.3300 0.0042 0.3300] > skin_surface: 1 > source: 3 > type: 'openmeeg' > unit: 'mm' > cfg: [1x1 struct] > > Can someone please help me with this error, any advice and comment will be highly appreciated. > Thank you very much! > > Regards > Imali > > Imali Thanuja Hettiarachchi > PhD Candidate > Centre for Intelligent Systems research > Deakin University, Geelong 3217, Australia. > > Mobile : +61430321972 > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Thu Jun 14 10:56:49 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Thu, 14 Jun 2012 08:56:49 +0000 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file In-Reply-To: References: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au>, Message-ID: <5A1787011651BC42A4D41856DBC2E0603E03CC6D@mbox-f-3.du.deakin.edu.au> Hi Tzvetan, Thank you very much for your reply. I am using the MNI surface meshes from the NeuroScan Curry Software as I had trouble in generating the MRI based headmodels. I had trouble with the MNI surface meshes as well but as Alex suggested earlier in the "Headmodel with NeuroScan meshes" discussion thread I managed to overcome the problems after smoothing them. When I ran the ft_prepare_headmodel with the new smoothed meshes the program ran without explicitly giving me any errors(including om_minverser), but now with your comment I understand that om has not run succesfully to create the mat file. I am attaching the figure with the smoothed meshes to have a look whether you observe an intersecting mesh. Please let me know if you have any comments on my procedure. Many Thanks. Regards Imali ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tzvetan Popov [tzvetan.popov at uni-konstanz.de] Sent: Thursday, 14 June 2012 5:17 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_prepare_vol_sens-missing .mat file Hi Imali, in this case your meshes probably touch somewhere so that om doesn't created the bem model at all and as a consequence didn't wrote the mat file. You should go back in the segmentation procedure and play around with the option "cfg.threshold", plot the meshes and make sure they do not touch. Good luck tzvetan Dear fieldtrip users, I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, elec = ft_read_sens('mydirectory\standard_1020.elc'); The I used the function, [vol, sens] = ft_prepare_vol_sens(vol, elec); However this give as error, ??? Reference to non-existent field 'mat'. Error in ==> ft_prepare_vol_sens at 419 if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) Error in ==> curry_leadField at 15 [vol, sens] = ft_prepare_vol_sens(vol, elec); The vol created with the OPENMEEG only contains the following fields, vol = bnd: [1x3 struct] cond: [0.3300 0.0042 0.3300] skin_surface: 1 source: 3 type: 'openmeeg' unit: 'mm' cfg: [1x1 struct] Can someone please help me with this error, any advice and comment will be highly appreciated. Thank you very much! Regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Surface meshes.zip Type: application/x-zip-compressed Size: 215061 bytes Desc: Surface meshes.zip URL: From b.reuderink at donders.ru.nl Thu Jun 14 11:40:55 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 14 Jun 2012 11:40:55 +0200 Subject: [FieldTrip] skewed classes for pattern classification In-Reply-To: References: Message-ID: Dear Tim, You pose a very interesting question, that is not asked enough in my opinion :). There are indeed various approaches to classification and evaluation of ill-balanced data. One option is indeed resampling, which is a way to fake a per-instance importance weight. Some classifiers implement this instance weight directly, such as libsvm. I am not familiar enough with the DMLT methods in FieldTrip to know if similar options exist. BTW, I am not sure that resampling is needed for testing, and if it is, it can perhaps be performed in the performance metric. This might reduce the amount of 'tossing data'. Another option is to use a performance metric that is insensitive to class imbalance, such as the AUC-ROC or mutual information. Note that this only solves your evaluation problem; if the classifiers objective is to minimize a form of loss that *is* sensitive to imbalance, you probably would still get constant prediction of the most frequent class. Best regards, Boris On Wed, Jun 13, 2012 at 9:01 PM, Tim Curran wrote: > I am trying some pattern classification in fieldtrip. > > Mostly using: > cfg.method = 'crossvalidate'; > cfg.mva = {dml.standardizer dml.glmnet('family','binomial')}; > > I am trying to predict task accuracy (0,1) in cases where accuracy is often > around 80%, so the frequency of the correct class is much greater than the > frequency of the incorrect class. > > > dml.crossvalidate can handle this as follows: > %   In order to balance the occurrence of different classes one may set > %   'resample' equal to true (default: false). Resample will upsample less > %   occurring classes during training and downsample often occurring > %   classes during testing. > > … but this requires tossing a lot of data in the downsampling process. > > > Has anybody tried other approaches for dealing with skewed classes that do > not involve downsampling?  Like this for example: > > Loss functions allowing for unbalanced classes > The classification performance is always evaluated by some loss > function, see the section Estimation of the generalization > error. Typical examples are the 0/1-loss (i.e., average number of > misclassified samples) and the area under the receiver operator > characteristic (ROC) curve (Fawcett, 2006). When using misclassification > rate, it must be assured that the classes have approximately > the same number of samples. Otherwise, the employed performance > measure has to consider the different class prior probabilities. > For instance, in oddball paradigms the task is to discriminate > brain responses to an attended rare stimulus from responses to a > frequent stimulus. A typical ratio of frequent-to-rare stimuli is > 85:15. In such a setting, an uninformative classifier which > always predicts the majority class would obtain an accuracy of 85%. > Accordingly, a different loss function needs to be employed. Denoting > the number of samples in class i by ni, the normalized error can be > calculated as weighted average, where errors committed on samples > of class i are weighted by N/ni with N =Σk nk: > > From > S. Lemm, B. Blankertz, T. Dickhaus, K. R. Müller, > Introduction to machine learning for brain imaging > NeuroImage, 56:387-399, 2011 > http://doc.ml.tu-berlin.de/bbci/publications/LemBlaDicMue11.pdf > > > Not being a very good programmer, I got lost in the code before I could find > the relevant cost function to apply normalization. > > Any advice on these issues would be much appreciated. > > thanks > Tim > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- twitter.com/#!/breuderink | github.com/breuderink | borisreuderink.nl From anette.giani at tuebingen.mpg.de Thu Jun 14 11:49:50 2012 From: anette.giani at tuebingen.mpg.de (Anette Giani) Date: Thu, 14 Jun 2012 11:49:50 +0200 Subject: [FieldTrip] LCMV beamformer analysis: uncertainties Message-ID: <000201cd4a13$0ab328c0$20197a40$@tuebingen.mpg.de> Dear Fieldtrip users, I am currently trying to localize averaged time courses of condion1 and condition2 in 20 subjects using LCMV beamformer and to compare source activity of both conditions statistically. However, results look suspicious to me and I am wondering if I am doing things correctly. It will be of great help if you could comment on some issues and check the parameters I am using. Things I am wondering about: (1) doing cluster statistics I get 1 big cluster that is highly significant (clusterstat: 6.5829e+006, prob: 0.0020) and includes all!! (but one) voxels that are labeled as "inside". I tried to decrease the alpha level to 0.01, but it didn't really help. (2) How can I check the quality of alignment of the individual anatomicals? So far I am just using ft_volumenormalise, hoping that alignment works well. However, I am getting suspicious by the warning: 1377485 voxels are inside the brain of all subjects 2557673 voxels are inside the brain of some, but not all subjects 4551464 voxels are outside the brain of all subjects Warning: marking only voxels inside the brain of all subjects as 'inside' If MRI's would be aligned, why aren't inside voxels of all subjects identical? How does the fact that voxels are not exactly aligned affect my analysis? Any comments & and ideas are welcome Thank you so much for your help!! Anette -- PARAMETERS %% Calculating the cross spectral density matrix cfg = []; cfg.covariance = 'yes'; cfg.channel = 'MEG'; cfg.removemean = 'no'; cfg.trials = cond1; cfg.covariancewindow = [0.15 0.25]; tlckav_cond1 = ft_timelockanalysis(cfg, OrigSPMdata); cfg.trials = cond2; cfg.covariancewindow = [0.15 0.25]; tlckav_cond2 = ft_timelockanalysis(cfg, OrigSPMdata); cfg.trials = [cond1 cond2]; cfg.covariancewindow = [0.15 0.25]; tlckav_combined = ft_timelockanalysis(cfg, OrigSPMdata); %% lcmv beamformer using common filters cfg = []; cfg.method = 'lcmv'; cfg.lambda = '5%'; cfg.grid = grid; cfg.grad = grad; cfg.vol = vol; cfg.lcmv.projectnoise = 'yes'; % necessary? cfg.lcmv.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; cfg.lcmv.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, tlckav_combined) cfg.grid.filter = sourceAll.avg.filter; source_cond1 = ft_sourceanalysis(cfg, tlckav_cond1); source_cond2 = ft_sourceanalysis(cfg, tlckav_cond2); %% reslice mri_re = ft_volumereslice([], mri2); source_cond1.anatomy = mri_re.anatomy; source_cond2.anatomy = mri_re.anatomy; % interpolate cfg = []; cfg.units = 'mm'; cfg.downsample = 2; % taken from tutorial cfg.parameter = 'avg.pow'; source_cond1_Int = ft_sourceinterpolate(cfg, source_cond1 , mri_re); source_cond2_Int = ft_sourceinterpolate(cfg, source_cond2 , mri_re); % normalise cfg = []; cfg.coordsys = 'ctf'; cfg.nonlinear = 'no'; source_cond1_Int_Norm = ft_volumenormalise(cfg, source_cond1_Int); source_cond2_Int_Norm = ft_volumenormalise(cfg, source_cond2_Int); --------------------------- STATISTICS -------------------------------------------------------------------------- % merge all subject's data cfg = []; cfg.keepindividual = 'yes'; grandavg_cond1 = ft_sourcegrandaverage(cfg, sSub6_cond1, sSub8_cond1, . tbc grandavg_cond2 = ft_sourcegrandaverage(cfg, sSub6_cond2, sSub8_cond2, . tbc % ------------------------------------------------------------------------- % run statistics over subjects cfg = []; cfg.dim = grandavg_cond1.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 500; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.correcttail = 'alpha'; nsubj=length(grandavg_cond1.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandavg_cond1, grandavg_cond2); -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Thu Jun 14 12:47:01 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Thu, 14 Jun 2012 12:47:01 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data Message-ID: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) First I realign the mri with the fiducials I get out of mri-lab (in voxels). The 'vol' structure is created like this: Cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.mri = mri; %the realigned mri grid = ft_prepare_sourcemodel(cfg); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke p.s. I also filed this in bugzilla, for more information see there: http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: grid_vol.png Type: image/png Size: 324339 bytes Desc: grid_vol.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grid_vol2.jpg Type: image/jpeg Size: 139682 bytes Desc: grid_vol2.jpg URL: From jan.schoffelen at donders.ru.nl Thu Jun 14 13:13:43 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 14 Jun 2012 13:13:43 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> Message-ID: <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> Hi Hanneke, You could try the following: mri=ft_convert_units(mri, 'mm'), prior to calling ft_prepare_sourcemodel? (and then do ft_convert_units(grid,'m') on the output) Also, what happens if you do cfg.grid.nonlinear = 'no'? I also saw that you already created a bug on our bugzilla-site. Thanks for doing so; we were already aware of your problem and it's on our list to look into it in more detail as soon as our time resources allow. At the moment I suspect a metric unit issue to be the problem when doing the inverse (non-linear) warp. Best, Jan-Mathijs On Jun 14, 2012, at 12:47 PM, wrote: > Dear all, > > I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > > First I realign the mri with the fiducials I get out of mri-lab (in voxels). > > The 'vol' structure is created like this: > > Cfg = []; > cfg.coordsys = 'neuromag'; > cfg.method = 'singleshell'; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > the 'grid' like this: > > load(strcat(basepath,'templates/template_grid.mat')); > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.coordsys = 'neuromag'; > cfg.mri = mri; %the realigned mri > grid = ft_prepare_sourcemodel(cfg); > > Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? > The results are plotted and attached to this e-mail. > > Thanks in advance, > > Hanneke > > p.s. I also filed this in bugzilla, for more information see there: > > http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com > > > __________________________________________ > > Hanneke van Dijk, PhD > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.p.van.dijk at gmail.com Thu Jun 14 13:21:11 2012 From: hanneke.p.van.dijk at gmail.com (Hanneke van Dijk) Date: Thu, 14 Jun 2012 13:21:11 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data In-Reply-To: <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> Message-ID: Hi Jan-Mathijs, The converting units before ft_prepare_sourcemodel solved it! I suspected the same, but didn't know at which step it went wrong, and wasn't aware of the function ft_convert_units... I will also report it in bugzilla so you have the solution at hand! Thanks so much! Hanneke On Thu, Jun 14, 2012 at 1:13 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Hanneke, > > You could try the following: > > mri=ft_convert_units(mri, 'mm'), prior to calling ft_prepare_sourcemodel? > (and then do ft_convert_units(grid,'m') on the output) > > Also, what happens if you do cfg.grid.nonlinear = 'no'? > > I also saw that you already created a bug on our bugzilla-site. Thanks for > doing so; we were already aware of your problem and it's on our list to > look into it in more detail as soon as our time resources allow. At the > moment I suspect a metric unit issue to be the problem when doing the > inverse (non-linear) warp. > > Best, > > Jan-Mathijs > > > On Jun 14, 2012, at 12:47 PM, < > Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > > Dear all, > > I am creating headmodels of neuromag data (Using FT version 20123105 and > the example script > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > > > First I realign the mri with the fiducials I get out of mri-lab (in > voxels). > > The 'vol' structure is created like this: > > Cfg = []; > cfg.coordsys = 'neuromag'; > cfg.method = 'singleshell'; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > the 'grid' like this: > > load(strcat(basepath,'templates/template_grid.mat')); > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.coordsys = 'neuromag'; > cfg.mri = mri; %the realigned mri > grid = ft_prepare_sourcemodel(cfg); > > Everything works well, untill I plot and see that the sizes/ origins (or > units) are completely different for the vol and grid. At the moment I > cannot find a solution. Does anyone have an idea? > The results are plotted and attached to this e-mail. > > Thanks in advance, > > Hanneke > > p.s. I also filed this in bugzilla, for more information see there: > > > http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com > > > __________________________________________ > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html< > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html> > > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 14 14:34:52 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 14 Jun 2012 14:34:52 +0200 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi Qi, There are several options in FT for estimating instantaneous phase. You could use a sliding time window FFT in ft_freqanalysis, where you choose to get complex Fourier spectra as output, and specify to get an estimate at each sample, as in: cfg = []; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.taper = 'hanning'; % in general, dpss here does not make sense if you're interested in instantaneous phase cfg.toi = data.time{1}; % assuming your trials are of equal length cfg.foi = 10; % or whatever frequency you want estimated (can of course be a vector) cfg.t_ftimwin = 5./cfg.foi; % use e.g. 5 cycles to estimate the phase cfg.output = 'fourier'; freq = ft_freqanalysis(cfg, data); The output freq.fourierspctrm will be a nTrials X nChannels X nFreqs X nSamples complex-valued matrix, from which you can get instantaneous phase by using angle(). An alternative approach would be to first filter your data, and then apply a Hilbert transform. This can be done in ft_preprocessing: cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = [7 14]; cfg.bpfilttype = 'fir'; % or 'firls' (slower), but avoid the default 'but' (= not well-suited for hilbert phase estimate) cfg.hilbert = 'angle'; % this gives you just the phase, you can specify 'complex' to get both phase and amplitude datPhase = ft_preprocessing(cfg, data); where datPhase will be just a FT raw data structure containing phase information (or complex phase/amplitude information, depending on your choice). Concerning the phase-locking value, you might want to take a look at ft_connectivityanalysis with cfg.method='plv', but I have no experience on this. Best, Eelke On 13 June 2012 23:35, qi li wrote: > Hi there, > > I am wondering whether fieldtrip has a function to compute the > instantaneous phase and phase locking value. Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From poil.simonshlomo at gmail.com Thu Jun 14 17:16:10 2012 From: poil.simonshlomo at gmail.com (Simon-Shlomo Poil) Date: Thu, 14 Jun 2012 17:16:10 +0200 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi Qi, I also don't know how to calculate the phase locking value in Fieldtrip. But you can do it in the Neurophysiological Biomarker Toolbox http://www.nbtwiki.net/doku.php?id=tutorial:phase_locking_value It's a toolbox for EEGLAB, but it should be possible to either use the functions directly on you fieldtrip signal, or simply convert the signal to eeglab format.. Good luck! :) Simon-Shlomo Poil 2012/6/13 qi li : > Hi there, > > I am wondering whether fieldtrip has a function to compute the > instantaneous phase and phase locking value. Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- -- Simon-Shlomo Poil Center of MR-Research University Children’s Hospital Zurich Mobile number: +41 (0)76 399 5809 Office number: +41 (0)44 266 3129 Skype: poil.simonshlomo Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html From Lilla.Magyari at mpi.nl Fri Jun 15 14:33:00 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 15 Jun 2012 14:33:00 +0200 Subject: [FieldTrip] ft_sourcemovie In-Reply-To: <4FD1BC40.3000509@donders.ru.nl> References: <4FD1BC40.3000509@donders.ru.nl> Message-ID: <4FDB2B7C.9010505@mpi.nl> hi Jorn, I am wondering if you have been the one who was trying to develop further the ft_sourcemovie function. If yes, I would like to ask some questions. Let me know. thanks. cheers, Lilla From Lilla.Magyari at mpi.nl Fri Jun 15 14:35:50 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 15 Jun 2012 14:35:50 +0200 Subject: [FieldTrip] ft_sourcemovie - ignore earlier email with this subject In-Reply-To: <4FD1BC40.3000509@donders.ru.nl> References: <4FD1BC40.3000509@donders.ru.nl> Message-ID: <4FDB2C26.8000006@mpi.nl> Dear all, sorry for my latest email. It went totally to the wrong address. Best, Lilla Jörn M. Horschig wrote: > Dear FieldTrip list, > > As you know, there are several getting started sections on our wiki-page: > http://fieldtrip.fcdonders.nl/getting_started > Unfortunately, however, we (the FieldTrip development team) are no > expert for all different dataformats, mainly because at the Donders > Institute, we do not work with all those data formats. You, on the other > hand, might be an expert. In order to provide good documentation, we > therefore rely on your input as well and would like to ask your help. > First, we want to get started with BrainVision data. > > 1) What would you like to see in the Getting Started guide? > 2) What explanation would you like to see there that is specific to > BrainVision data? > 3) Is there any particular example code that you would like to be shown > there? > 4) Are there particular problems you encountered (and solved) with > reading in and working with BrainVision data in FieldTrip? What are > these problems and what are the solutions? > 5) Are there questions you always asked yourself about using BrainVision > data with FieldTrip? > > It would be great if you share this information with us. Feel free to > write whatever you want, any information is useful (preferably of course > some elaborations and explanation so that we can put this information > there). If you are working with other data, feel free to also answer > this mail on a more general note, but we will ask separately for other > data formats in near future. > > On behalf of the FieldTrip development team, > Jörn > From ljbj_2009 at yahoo.com Fri Jun 15 19:35:05 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Fri, 15 Jun 2012 10:35:05 -0700 (PDT) Subject: [FieldTrip] TMSI2FiledTrip real time buffer Message-ID: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> Hi All,   The hardware I used is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. I was using TMSi-to-Fieldtrip interface from TMSi  to export data to the Fieldtrip buffer I tried the ft_realtime_signalviewer function to get the data as  suggested. The code I was using: cfg                = []; cfg.blocksize      = 1;                            % seconds cfg.dataset        = 'buffer://localhost:1972';    % where to read the data ft_realtime_signalviewer(cfg) I got some errors: Warning: could not read header from buffer://localhost:1972, retrying in 1 second > In ft_read_header at 894   In ft_realtime_signalviewer at 72   In test_Buffer_draw at 6 My question is that do I need to open the FieldTrip buffer server before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to do some kinds of initialization in FieldTrip? I would appreciate very much if you could give me a guide or step by step instruction on how to use real time buffer in FieldTrip with TMSi. Thank you all for the time and help! Best wishes   Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Fri Jun 15 22:44:50 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Fri, 15 Jun 2012 13:44:50 -0700 (PDT) Subject: [FieldTrip] configuration file for TMSi Message-ID: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> Hi All, Did  any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI.   Many thanks in advance for any insight. Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Jun 18 10:53:53 2012 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 18 Jun 2012 10:53:53 +0200 Subject: [FieldTrip] configuration file for TMSi In-Reply-To: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> References: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> Hi Jie I'm using the tmsi2ft buffer in my experiments with a refa72 amplifier. Below you can find a copy of the config file that I use (put it in a .txt file). When the tmsi2ft is correctly started you should see all the channels with some extra information below in the cmd window. You could also try starting the bufferviewer (in realtime/utilities/viewer) to see if data is comming in after you have started the tmsi2ft buffer. Best, Marianne # Write n=label to select hardware channel number n (starting from 1) # and attach a label to it. This will show up in the Fieldtrip buffer # and the GDF file. # Currently, there is no check for double inclusion of channels. # That is, if you define 1=FOO and 1=BAR, the first hardware channel # will show up twice, with different names. # Channels listed before the first [save] or [stream] line will be added # to both saving and streaming selections. Write [select] to enable # selection for both saving and streaming. [select] 1=Fp1 2=Fpz 3=Fp2 4=F7 5=F3 6=Fz 7=F4 8=F8 9=FC5 10=FC1 11=FC2 12=FC6 13=M1 14=T7 15=C3 16=Cz 17=C4 18=T8 19=M2 20=CP5 21=CP1 22=CP2 23=CP6 24=P7 25=P3 26=Pz 27=P4 28=P8 29=POz 30=O1 31=Oz 32=O2 33=AF7 34=AF3 35=AF4 36=AF8 37=F5 38=F1 39=F2 40=F6 41=FC3 42=FCz 43=FC4 44=C5 45=C1 46=C2 47=C6 48=CP3 49=CPz 50=CP4 51=P5 52=P1 53=P2 54=P6 55=PO5 56=PO3 57=PO4 58=PO6 59=FT7 60=FT8 61=TP7 62=TP8 63=PO7 64=PO8 65=BIP1 66=BIP2 67=BIP3 68=BIP4 69=AUX1 70=AUX2 71=AUX3 72=AUX4 73=Digi # Please take note that the channels will be written out in the order specified here, # that is, they will not be sorted according to the hardware channel number! # Write "downsample X" with a positive number X to set the downsampling # factor for streaming. The GDF file will receive full-rate data. # Assuming the sampling rate of the TMSI device is 5Khz, downsample to # 1 KHz (5x) with a 4-th order Butterworth lowpass @ 250 Hz # downsample=5 # bandwidth=250 # bworder=4 # Adjust sample rate samplerate=500 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] On Behalf Of jie liu [ljbj_2009 at yahoo.com] Sent: Friday, June 15, 2012 10:44 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] configuration file for TMSi Hi All, Did any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI. Many thanks in advance for any insight. Jie Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From jm.horschig at donders.ru.nl Mon Jun 18 15:58:58 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 18 Jun 2012 15:58:58 +0200 Subject: [FieldTrip] TMSI2FiledTrip real time buffer In-Reply-To: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> References: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> Message-ID: <4FDF3422.8070905@donders.ru.nl> Dear Jie, I'm afraid I cannot really help you with your particular problem, but some basics that you should generally be covered and may thus help nonetheless: - when using cfg.dataset = '(...) localhost (...) ' make sure that the shared memory/buffer is running locally, i.e. on the same computer. This involves starting tmsi2ft on that computer. - if it is running on a different computer, be sure to not use localhost but the corresponding computer's name or ip - make sure that the port (here 1972) is open (i.e. not blocked by some firewall or in use by another program) and that the buffer accesses it - maybe you could try to 'ping' the ip where the buffer is supposed to run to check whether everything is set up correctly (not sure if this actually works) I guess you already saw this page (but I thought it'd be wise to point to it nonetheless): http://fieldtrip.fcdonders.nl/development/realtime/tmsi?s[]=tmsi I hope that one of these comments help. Best, Jörn On 6/15/2012 7:35 PM, jie liu wrote: > Hi All, > The hardware I used is TMSI refa 128 working with usb (driver is fusbi > version 6.0.0.76.) windows xp+service pack3. > I was using TMSi-to-Fieldtrip interface from TMSito export data to the > Fieldtrip buffer > I tried the ft_realtime_signalviewer function to get the data assuggested. > The code I was using: > cfg= []; > cfg.blocksize= 1;% seconds > cfg.dataset= 'buffer://localhost:1972';% where to read the data > ft_realtime_signalviewer(cfg) > I got some errors: > Warning: could not read header from > buffer://localhost:1972, retrying in 1 > second > > In ft_read_header at 894 > In ft_realtime_signalviewer at 72 > In test_Buffer_draw at 6 > My question is that do I need to open the FieldTrip buffer server > before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to > do some kinds of initialization in FieldTrip? > I would appreciate very much if you could give me a guide or step by > step instruction on how to use real time buffer in FieldTrip with TMSi. > Thank you all for the time and help! > Best wishes > Jie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Mon Jun 18 16:32:13 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Mon, 18 Jun 2012 07:32:13 -0700 (PDT) Subject: [FieldTrip] configuration file for TMSi In-Reply-To: <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> References: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> Message-ID: <1340029933.69547.YahooMailNeo@web160403.mail.bf1.yahoo.com>   Hi Marianne, I am glad to get your suggestions and comments. Thank you!     The original values from Refa need to be converted to voltage in vu, how did you get the scale based on the gain and offset for each channel?   I really appreciated your time and help. Thank you again!   Best regards Jie ________________________________ From: "Severens, Marianne" To: FieldTrip discussion list Sent: Monday, June 18, 2012 3:53 AM Subject: Re: [FieldTrip] configuration file for TMSi Hi Jie I'm using the tmsi2ft buffer in my experiments with a refa72 amplifier. Below you can find a copy of the config file that I use (put it in a .txt file). When the tmsi2ft is correctly started you should see all the channels with some extra information below in the cmd window. You could also try starting the bufferviewer (in realtime/utilities/viewer) to see if data is comming in after you have started the tmsi2ft buffer. Best, Marianne # Write n=label to select hardware channel number n (starting from 1) # and attach a label to it. This will show up in the Fieldtrip buffer # and the GDF file. # Currently, there is no check for double inclusion of channels. # That is, if you define 1=FOO and 1=BAR, the first hardware channel # will show up twice, with different names. # Channels listed before the first [save] or [stream] line will be added # to both saving and streaming selections. Write [select] to enable # selection for both saving and streaming. [select] 1=Fp1 2=Fpz 3=Fp2 4=F7 5=F3 6=Fz 7=F4 8=F8 9=FC5 10=FC1 11=FC2 12=FC6 13=M1 14=T7 15=C3 16=Cz 17=C4 18=T8 19=M2 20=CP5 21=CP1 22=CP2 23=CP6 24=P7 25=P3 26=Pz 27=P4 28=P8 29=POz 30=O1 31=Oz 32=O2 33=AF7 34=AF3 35=AF4 36=AF8 37=F5 38=F1 39=F2 40=F6 41=FC3 42=FCz 43=FC4 44=C5 45=C1 46=C2 47=C6 48=CP3 49=CPz 50=CP4 51=P5 52=P1 53=P2 54=P6 55=PO5 56=PO3 57=PO4 58=PO6 59=FT7 60=FT8 61=TP7 62=TP8 63=PO7 64=PO8 65=BIP1 66=BIP2 67=BIP3 68=BIP4 69=AUX1 70=AUX2 71=AUX3 72=AUX4 73=Digi # Please take note that the channels will be written out in the order specified here, # that is, they will not be sorted according to the hardware channel number! # Write "downsample X" with a positive number X to set the downsampling # factor for streaming. The GDF file will receive full-rate data. # Assuming the sampling rate of the TMSI device is 5Khz, downsample to # 1 KHz (5x) with a 4-th order Butterworth lowpass @ 250 Hz # downsample=5 # bandwidth=250 # bworder=4 # Adjust sample rate samplerate=500 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] On Behalf Of jie liu [ljbj_2009 at yahoo.com] Sent: Friday, June 15, 2012 10:44 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] configuration file for TMSi Hi All, Did  any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI. Many thanks in advance for any insight. Jie Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Mon Jun 18 17:05:13 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Mon, 18 Jun 2012 08:05:13 -0700 (PDT) Subject: [FieldTrip] TMSI2FiledTrip real time buffer In-Reply-To: <4FDF3422.8070905@donders.ru.nl> References: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> <4FDF3422.8070905@donders.ru.nl> Message-ID: <1340031913.62103.YahooMailNeo@web160406.mail.bf1.yahoo.com> Hi Jörn, I am glad to get your suggestions and comments. I tested on the same PC and the port was open. still the same problem I really appreciated your time and help. Thank you again! best regards Jie ________________________________ From: ""Jörn M. Horschig"" To: FieldTrip discussion list Sent: Monday, June 18, 2012 8:58 AM Subject: Re: [FieldTrip] TMSI2FiledTrip real time buffer Dear Jie, I'm afraid I cannot really help you with your particular problem, but some basics that you should generally be covered and may thus help nonetheless:  - when using cfg.dataset = '(...) localhost (...) ' make sure that the shared memory/buffer is running locally, i.e. on the same computer. This involves starting tmsi2ft on that computer.  - if it is running on a different computer, be sure to not use localhost but the corresponding computer's name or ip  - make sure that the port (here 1972) is open (i.e. not blocked by some firewall or in use by another program) and that the buffer accesses it  - maybe you could try to 'ping' the ip where the buffer is supposed to run to check whether everything is set up correctly (not sure if this actually works) I guess you already saw this page (but I thought it'd be wise to point to it nonetheless): http://fieldtrip.fcdonders.nl/development/realtime/tmsi?s[]=tmsi I hope that one of these comments help. Best, Jörn On 6/15/2012 7:35 PM, jie liu wrote: Hi All, >  >The hardware I used is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. >I was using TMSi-to-Fieldtrip interface from TMSi  to export data to the Fieldtrip buffer >I tried the ft_realtime_signalviewer function to get the data as  suggested. >The code I was using: >cfg                = []; >cfg.blocksize      = 1;                            % seconds >cfg.dataset        = 'buffer://localhost:1972';    % where to read the data >ft_realtime_signalviewer(cfg) >I got some errors: >Warning: could not read header from >buffer://localhost:1972, retrying in 1 >second >> In ft_read_header at 894 >  In ft_realtime_signalviewer at 72 >  In test_Buffer_draw at 6 >My question is that do I need to open the FieldTrip buffer server before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to do some kinds of initialization in FieldTrip? >I would appreciate very much if you could give me a guide or step by step instruction on how to use real time buffer in FieldTrip with TMSi. >Thank you all for the time and help! >Best wishes >  >Jie > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From PGOODIN at groupwise.swin.edu.au Tue Jun 19 01:51:11 2012 From: PGOODIN at groupwise.swin.edu.au (Peter Goodin) Date: Tue, 19 Jun 2012 09:51:11 +1000 Subject: [FieldTrip] Difference wave calculation Message-ID: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Hi Fieldtrip list, I'm quite new to using Fieldtrip for analysis and can't find any information on how to create difference waves, for example to examine MMN activity. Currently I've just been making a new structure and adding items from the ft_timelockedanalysis function, subtracting the standard from the deviant for the .avg and .var fields while keeping the rest intact. Are there any tutorials available that can show me the recommended way to go about this? Alternatively, can anyone working with difference waves give an example of how they calculate them? Thanks, Peter. Peter Goodin Ph.D Candidate Brain and Psychological Research Centre (BPsyC) Swinburne University of Technology 400 Burwood Road, Hawthorn, VIC 3122 Monash Alfred Psychiatric Research Centre (MAPrc) Alfred Hospital Level 1, Old Baker Building, Vic 3008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 19 09:06:37 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 19 Jun 2012 09:06:37 +0200 Subject: [FieldTrip] Difference wave calculation In-Reply-To: <4FE04B8F0200004100011613@groupwise.swin.edu.au> References: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Message-ID: Hi Peter, In that case, welcome to the Fieldtrip list :) Actually, I think your approach of calculating a difference between event-related activities is pretty much the recommended standard way. So: cfg = []; tl1 = ft_timelockanalysis(cfg, data1); tl2 = ft_timelockanalysis(cfg, data2); tlDiff = tl1; tlDiff.avg = tl1.avg - tl2.avg; Of course, this is assuming all trials have the same time axis. And also, if needed, you can change the configuration to whatever is appropriate for your data. One note of caution: while the above is perfectly valid for the averages, you cannot simply subtract the variances from eachother, and expect to end up with the variance of your difference wave. I had to refresh my memory, but wikipedia tells me that the variance of two random variables subtracted from each other is equal to the variances added, minus twice the covariance between them. Best, Eelke On 19 June 2012 01:51, Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any information > on how to create difference waves, for example to examine MMN activity. > Currently I've just been making a new structure and adding items from the > ft_timelockedanalysis function, subtracting the standard from the deviant > for the .avg and .var fields while keeping the rest intact. > > Are there any tutorials available that can show me the recommended way to go > about this? Alternatively, can anyone working with difference waves give an > example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From PGOODIN at groupwise.swin.edu.au Tue Jun 19 13:17:24 2012 From: PGOODIN at groupwise.swin.edu.au (Peter Goodin) Date: Tue, 19 Jun 2012 21:17:24 +1000 Subject: [FieldTrip] Difference wave calculation Message-ID: <4FE0EC640200004100023C9E@groupwise.swin.edu.au> Hi Eelke, Thanks for the kind welcome! Also, thanks for telling me what the .var field contains... :D Peter. >>> Eelke Spaak 19/06/12 5:23 PM >>> Hi Peter, In that case, welcome to the Fieldtrip list :) Actually, I think your approach of calculating a difference between event-related activities is pretty much the recommended standard way. So: cfg = []; tl1 = ft_timelockanalysis(cfg, data1); tl2 = ft_timelockanalysis(cfg, data2); tlDiff = tl1; tlDiff.avg = tl1.avg - tl2.avg; Of course, this is assuming all trials have the same time axis. And also, if needed, you can change the configuration to whatever is appropriate for your data. One note of caution: while the above is perfectly valid for the averages, you cannot simply subtract the variances from eachother, and expect to end up with the variance of your difference wave. I had to refresh my memory, but wikipedia tells me that the variance of two random variables subtracted from each other is equal to the variances added, minus twice the covariance between them. Best, Eelke On 19 June 2012 01:51, Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any information > on how to create difference waves, for example to examine MMN activity. > Currently I've just been making a new structure and adding items from the > ft_timelockedanalysis function, subtracting the standard from the deviant > for the .avg and .var fields while keeping the rest intact. > > Are there any tutorials available that can show me the recommended way to go > about this? Alternatively, can anyone working with difference waves give an > example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Lilla.Magyari at mpi.nl Tue Jun 19 13:50:08 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Tue, 19 Jun 2012 13:50:08 +0200 Subject: [FieldTrip] Difference wave calculation In-Reply-To: <4FE04B8F0200004100011613@groupwise.swin.edu.au> References: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Message-ID: <4FE06770.90501@mpi.nl> hi Peter, You can find in this tutorial site: http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock under "Plotting the results" how condition differences are calculated for visualization purposes. It is probably the same that you have done already. Best, Lilla Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any > information on how to create difference waves, for example to examine > MMN activity. Currently I've just been making a new structure and adding > items from the ft_timelockedanalysis function, subtracting the standard > from the deviant for the .avg and .var fields while keeping the rest > intact. > > Are there any tutorials available that can show me the recommended way > to go about this? Alternatively, can anyone working with difference > waves give an example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From markus.siegel at uni-tuebingen.de Tue Jun 19 14:11:58 2012 From: markus.siegel at uni-tuebingen.de (Markus Siegel) Date: Tue, 19 Jun 2012 14:11:58 +0200 Subject: [FieldTrip] PhD Position - Centre for Integrative Neuroscience (CIN), Tuebingen Message-ID: <2C8E3217-CF4C-473B-AF53-A73DBBF6C06A@uni-tuebingen.de> The laboratory of Markus Siegel at the Centre for Integrative Neuroscience (CIN), Tuebingen (http://www.cin.uni-tuebingen.de/) is seeking candidates for a PhD position to study large-scale neuronal interactions in humans. The project will combine psychophysics, MEG, EEG, and non-invasive stimulation techniques to investigate large-scale neuronal interactions underlying visuomotor decision-making. The ideal candidate is highly motivated with a strong interest in interdisciplinary research. Candidates must have an MA (or equivalent) in neuroscience, psychology, physics, or related fields. Fluency in Matlab is required. Experience in electrophysiology and/or EEG/MEG is highly valued. Applications should include a detailed CV, statement of research interests, and names of at least two referees. Please email applications in PDF format to Markus Siegel (markus.siegel at uni-tuebingen.de) before July 10th, 2012. -- Dr. Markus Siegel Principal Investigator, Centre for Integrative Neuroscience (CIN), Tübingen From A.C.Schouten at tudelft.nl Wed Jun 20 10:02:32 2012 From: A.C.Schouten at tudelft.nl (Alfred Schouten - 3ME) Date: Wed, 20 Jun 2012 08:02:32 +0000 Subject: [FieldTrip] PhD positions - TU Delft Message-ID: The Department of Biomechanical Engineering is seeking three PhD students for the ERC Research Project "4D-EEG: A new tool to investigate the spatial and temporal activity patterns in the brain". 4D-EEG is a highly prestigious project to develop a novel method for investigating brain activity in healthy subjects and humans. The first goal of the project is to develop a new tool to determine brain activity at a high temporal and spatial resolution, with the focus on motor control. The method combines high density EEG and EEG source localisation with advanced robot manipulators to impose precise perturbations to the joints. Using system identification, the dynamic response of brain areas to the perturbation will be assessed, leading to a functional interpretation of the EEG with time. 4D-EEG will provide a direct measure of the neural activity in the brain related to motor control tasks. The second goal is to generate and validate new hypotheses about the longitudinal relationship between motor learning and neuroplasticity in patients suffering from a stroke. The non-invasive 4D-EEG technique combined with haptic robots will open a window into what and how patients (re)learn when showing motor recovery after stroke, in order to develop more effective patient-tailored therapies in neuro-rehabilitation. A further aim is to link these functional results with structural measurements, like Diffusion Tensor Imaging (e.g. DTI). The project consists of five subprojects, each requiring specific expertise. At this moment we are looking for three candidates for three subproject involving 1) EEG source localization, 2) Diffusion Tensor Imaging, 3) Neuromuscular modelling. You should have experience in one or more of the following fields: data acquisition and processing of electrophysiological and biomechanical signals, neuroimaging and EEG source localisation. You should have an affinity for experiments in human subjects and have extensive programming skills (e.g. Matlab or C++). You should have an MSc in (Bio)Mechanical or Electrical Engineering or in (applied) Mathematics or Physics. Excellent knowledge of English is a prerequisite. The successful candidates will be employed by Delft University of Technology for a fixed period of four years, within which he/she is expected to write a doctoral thesis. TU Delft offers an attractive benefits package, including a flexible work week, free high-speed Internet access from home (with contracts of two years or longer), and the option of assembling a customised compensation and benefits package (the 'IKA'). Salary and benefits are in accordance with the Collective Labour Agreement for Dutch Universities. For more information about this position, please contact Dr. A.C. Schouten, e-mail: a.c.schouten at tudelft.nl. To apply, please e-mail a detailed CV along with a letter of application by 1 July 2012 to M.J.B. Kole, application-3mE at tudelft.nl. When applying for this position, please refer to vacancy number 3ME12-20 and the specific subproject (- 1, - 2, or - 3). ------------------------------------------------------------------------------------ Alfred C. Schouten, PhD associate professor Neuromuscular Control Delft University of Technology, Faculty 3mE Biomechanical Engineering, room 5A-1-15 +31-(0)-152785247, http://www.3me.tudelft.nl/nmc University of Twente, Faculty CTW Biomechanical Engineering, room W210 +31-(0)-534892446, http://www.bw.ctw.utwente.nl/research/neuromechanics/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jun 20 17:26:37 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 17:26:37 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface Message-ID: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Dear Fieldtrip users and developpers, I would like to project and visualise time-frequency power values computed on planar gradient data at the sensors level onto the brain surface segmentated from the anatomial MRI of the subject. Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the scripts ? Does anyone see any inconvenient to this visualisation ? Thanks a lot for you help. Andrea -- NEW EMAIL: andrea.brovelli at univ-amu.fr From eelke.spaak at donders.ru.nl Wed Jun 20 18:03:36 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 20 Jun 2012 18:03:36 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: Dear Andrea, If I understand your question correctly, you just want to *visualise* sensor space activity on a brain surface, without doing source reconstruction first? I would advise against this. Time-frequency power values of your planar gradient data reflect the spectral characteristics of the magnetic gradient at the location of your sensors. These sensors are not located at the surface of the brain, but quite some centimeters away from it. Therefore, visualising the data as if it were actually recorded on the brain surface, without doing a proper transformation, is potentially misleading. It is true that people tend to display all sorts of data in a 'topoplot' fashion, but in that case it is clear to the audience that you are looking at a representation in sensor-space. Have a look at ft_topoplotTFR for this approach, if you're not already familiar with it. If you want to display your time-frequency activity on a cortical surface (which is of course a perfectly valid thing to want to do), you first should map the sensor activity to source space. This mapping is non-trivial and can be done by e.g. beamforming. See http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on this. That tutorial ends with a surface plot. Hope this helps! Best, Eelke On 20 June 2012 17:26, andrea brovelli wrote: > > Dear Fieldtrip users and developpers, > > I would like to project and visualise time-frequency power values computed > on planar gradient data at the sensors level onto the brain surface > segmentated from the anatomial MRI of the subject. > > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the > scripts ? > > Does anyone see any inconvenient to this visualisation ? > > Thanks a lot for you help. > > Andrea > > > > -- > >  NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Wed Jun 20 18:22:48 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 20 Jun 2012 18:22:48 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: Dear Andrea, I would like to further clarify the options for this question. Perhaps could you suggest which inverse algorithm you had in mind? For example, it is possible to use beamforming limited only to voxels defined as lying on the cortical sheet (i.e. restrict .inside to be only the gray matter). This is possible, but you might miss out on the spatial peak of the source lying just 5mm away to the inside a bit. Thus, it would be better to do as Eelke suggested and apply beamforming to the whole inside of the brain, and then project those values to the surface for visualisation (which is easily done with the cfg.method='surface' option in ft_sourceplot). Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA or MNE) which are commonly used to reconstruct onto cortical surface voxels only. This works because the min-norm algorithms force all activity to lie in the region over which you select to reconstruct. Thus, a source 5mm inside of the surface will automatically get projected to the surface. I also agree with Eelke you should not just project sensors to surface without doing a specific type of inverse method. Cheers, Johanna 2012/6/20 Eelke Spaak > Dear Andrea, > > If I understand your question correctly, you just want to *visualise* > sensor space activity on a brain surface, without doing source > reconstruction first? I would advise against this. Time-frequency > power values of your planar gradient data reflect the spectral > characteristics of the magnetic gradient at the location of your > sensors. These sensors are not located at the surface of the brain, > but quite some centimeters away from it. Therefore, visualising the > data as if it were actually recorded on the brain surface, without > doing a proper transformation, is potentially misleading. It is true > that people tend to display all sorts of data in a 'topoplot' fashion, > but in that case it is clear to the audience that you are looking at a > representation in sensor-space. Have a look at ft_topoplotTFR for this > approach, if you're not already familiar with it. > > If you want to display your time-frequency activity on a cortical > surface (which is of course a perfectly valid thing to want to do), > you first should map the sensor activity to source space. This mapping > is non-trivial and can be done by e.g. beamforming. See > http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on > this. That tutorial ends with a surface plot. > > Hope this helps! > > Best, > Eelke > > On 20 June 2012 17:26, andrea brovelli > wrote: > > > > Dear Fieldtrip users and developpers, > > > > I would like to project and visualise time-frequency power values > computed > > on planar gradient data at the sensors level onto the brain surface > > segmentated from the anatomial MRI of the subject. > > > > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the > > scripts ? > > > > Does anyone see any inconvenient to this visualisation ? > > > > Thanks a lot for you help. > > > > Andrea > > > > > > > > -- > > > > NEW EMAIL: andrea.brovelli at univ-amu.fr > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jun 20 18:56:58 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 18:56:58 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> Thank you very much for your quick reply, Eelke and Johanna. Yes, I would like only to visualise the data on a cortical surface and I am aware of the potential misinterpretation of such visualisation. I would like to use it as an intermediate step between the ft_topoplot on 2D layout and proper source localisation. It would serve as an exploratory tool to decide at which frequency, say, I would do a beamforming and to have a very rough idea of the number and location of cortical sources. However, it is not very clear to me how I could do this using the example in the beamforming tutorial. Could you be a bit more explicit ? Should I need to do source reconstruction for visualisation ? Thanks a lot Andrea ----- Messaggio da johanna.zumer at donders.ru.nl --------- Data: Wed, 20 Jun 2012 18:22:48 +0200 Da: Johanna Zumer Rispondi-A: FieldTrip discussion list Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface A: FieldTrip discussion list > Dear Andrea, > > I would like to further clarify the options for this question. Perhaps > could you suggest which inverse algorithm you had in mind? > > For example, it is possible to use beamforming limited only to voxels > defined as lying on the cortical sheet (i.e. restrict .inside to be only > the gray matter). This is possible, but you might miss out on the spatial > peak of the source lying just 5mm away to the inside a bit. Thus, it > would be better to do as Eelke suggested and apply beamforming to the whole > inside of the brain, and then project those values to the surface for > visualisation (which is easily done with the cfg.method='surface' option in > ft_sourceplot). > > Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA > or MNE) which are commonly used to reconstruct onto cortical surface voxels > only. This works because the min-norm algorithms force all activity to lie > in the region over which you select to reconstruct. Thus, a source 5mm > inside of the surface will automatically get projected to the surface. > > I also agree with Eelke you should not just project sensors to surface > without doing a specific type of inverse method. > > Cheers, > Johanna > > 2012/6/20 Eelke Spaak > >> Dear Andrea, >> >> If I understand your question correctly, you just want to *visualise* >> sensor space activity on a brain surface, without doing source >> reconstruction first? I would advise against this. Time-frequency >> power values of your planar gradient data reflect the spectral >> characteristics of the magnetic gradient at the location of your >> sensors. These sensors are not located at the surface of the brain, >> but quite some centimeters away from it. Therefore, visualising the >> data as if it were actually recorded on the brain surface, without >> doing a proper transformation, is potentially misleading. It is true >> that people tend to display all sorts of data in a 'topoplot' fashion, >> but in that case it is clear to the audience that you are looking at a >> representation in sensor-space. Have a look at ft_topoplotTFR for this >> approach, if you're not already familiar with it. >> >> If you want to display your time-frequency activity on a cortical >> surface (which is of course a perfectly valid thing to want to do), >> you first should map the sensor activity to source space. This mapping >> is non-trivial and can be done by e.g. beamforming. See >> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >> this. That tutorial ends with a surface plot. >> >> Hope this helps! >> >> Best, >> Eelke >> >> On 20 June 2012 17:26, andrea brovelli >> wrote: >> > >> > Dear Fieldtrip users and developpers, >> > >> > I would like to project and visualise time-frequency power values >> computed >> > on planar gradient data at the sensors level onto the brain surface >> > segmentated from the anatomial MRI of the subject. >> > >> > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >> > scripts ? >> > >> > Does anyone see any inconvenient to this visualisation ? >> > >> > Thanks a lot for you help. >> > >> > Andrea >> > >> > >> > >> > -- >> > >> > NEW EMAIL: andrea.brovelli at univ-amu.fr >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From narayan.ps at tut.fi Wed Jun 20 19:08:40 2012 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Wed, 20 Jun 2012 20:08:40 +0300 Subject: [FieldTrip] EEG data as Matlab matrix Message-ID: <20120620200840.00005cf3@unknown> Hello all, I have EEG data in the format of matrix in Matlab (samples X channels). How can I import this into fieldtrip for further analysis ? I read that fieldtrip supports only standard EEG formats. Any help will be appreciated by this novice field trip user! -- Best Regards Narayan Puthanmadam Subramaniyam, M.Sc PhD student/researcher Department of Biomedical Engineering, Tampere University of Technology Finn Medi 1, 4th Floor, Room 203 FI 33520, Finland From Lilla.Magyari at mpi.nl Wed Jun 20 19:40:02 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 20 Jun 2012 19:40:02 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <20120620200840.00005cf3@unknown> References: <20120620200840.00005cf3@unknown> Message-ID: <4FE20AF2.4060502@mpi.nl> Hi, this FAQ describes how you can make your data compatible with FieldTrip: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat I hope this helps. Best, Lilla Narayan Puthanmadam Subramaniyam wrote: > Hello all, > > I have EEG data in the format of matrix in Matlab (samples X channels). > How can I import this into fieldtrip for further analysis ? I read that > fieldtrip supports only standard EEG formats. > > Any help will be appreciated by this novice field trip user! > > From andrea.brovelli at univ-amu.fr Wed Jun 20 20:44:37 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 20:44:37 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> Message-ID: <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> Otherwise, to make things easier: is there a simple way to visualise a given topography in 3D (rather than in a 2D layout as done with ft_topoplotTFR) together with different segmented surfaces such as the skin or the brain meshes ? Thanks Andrea ----- Messaggio da andrea.brovelli at univ-amu.fr --------- Data: Wed, 20 Jun 2012 18:56:58 +0200 Da: andrea brovelli Rispondi-A: FieldTrip discussion list Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface A: FieldTrip discussion list > Thank you very much for your quick reply, Eelke and Johanna. > > Yes, I would like only to visualise the data on a cortical surface > and I am aware of the potential misinterpretation of such > visualisation. > > I would like to use it as an intermediate step between the > ft_topoplot on 2D layout and proper source localisation. It would > serve as an exploratory tool to decide at which frequency, say, I > would do a beamforming and to have a very rough idea of the number > and location of cortical sources. > > However, it is not very clear to me how I could do this using the > example in the beamforming tutorial. Could you be a bit more > explicit ? Should I need to do source reconstruction for > visualisation ? > > Thanks a lot > > Andrea > > > ----- Messaggio da johanna.zumer at donders.ru.nl --------- > Data: Wed, 20 Jun 2012 18:22:48 +0200 > Da: Johanna Zumer > Rispondi-A: FieldTrip discussion list > Oggetto: Re: [FieldTrip] Projection from sensors space to segmented > brain surface > A: FieldTrip discussion list > > >> Dear Andrea, >> >> I would like to further clarify the options for this question. Perhaps >> could you suggest which inverse algorithm you had in mind? >> >> For example, it is possible to use beamforming limited only to voxels >> defined as lying on the cortical sheet (i.e. restrict .inside to be only >> the gray matter). This is possible, but you might miss out on the spatial >> peak of the source lying just 5mm away to the inside a bit. Thus, it >> would be better to do as Eelke suggested and apply beamforming to the whole >> inside of the brain, and then project those values to the surface for >> visualisation (which is easily done with the cfg.method='surface' option in >> ft_sourceplot). >> >> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >> or MNE) which are commonly used to reconstruct onto cortical surface voxels >> only. This works because the min-norm algorithms force all activity to lie >> in the region over which you select to reconstruct. Thus, a source 5mm >> inside of the surface will automatically get projected to the surface. >> >> I also agree with Eelke you should not just project sensors to surface >> without doing a specific type of inverse method. >> >> Cheers, >> Johanna >> >> 2012/6/20 Eelke Spaak >> >>> Dear Andrea, >>> >>> If I understand your question correctly, you just want to *visualise* >>> sensor space activity on a brain surface, without doing source >>> reconstruction first? I would advise against this. Time-frequency >>> power values of your planar gradient data reflect the spectral >>> characteristics of the magnetic gradient at the location of your >>> sensors. These sensors are not located at the surface of the brain, >>> but quite some centimeters away from it. Therefore, visualising the >>> data as if it were actually recorded on the brain surface, without >>> doing a proper transformation, is potentially misleading. It is true >>> that people tend to display all sorts of data in a 'topoplot' fashion, >>> but in that case it is clear to the audience that you are looking at a >>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>> approach, if you're not already familiar with it. >>> >>> If you want to display your time-frequency activity on a cortical >>> surface (which is of course a perfectly valid thing to want to do), >>> you first should map the sensor activity to source space. This mapping >>> is non-trivial and can be done by e.g. beamforming. See >>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>> this. That tutorial ends with a surface plot. >>> >>> Hope this helps! >>> >>> Best, >>> Eelke >>> >>> On 20 June 2012 17:26, andrea brovelli >>> wrote: >>>> >>>> Dear Fieldtrip users and developpers, >>>> >>>> I would like to project and visualise time-frequency power values >>> computed >>>> on planar gradient data at the sensors level onto the brain surface >>>> segmentated from the anatomial MRI of the subject. >>>> >>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>> scripts ? >>>> >>>> Does anyone see any inconvenient to this visualisation ? >>>> >>>> Thanks a lot for you help. >>>> >>>> Andrea >>>> >>>> >>>> >>>> -- >>>> >>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> > > > ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- > > > -- > > NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From explena at gmail.com Thu Jun 21 06:19:06 2012 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 21 Jun 2012 12:19:06 +0800 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi, Although this might be a late reply, I would like to contribute my two cents and also would be glad to hear any comment. To calculate PLV 1. get and real and imaginary part of of Fourier coefficents for each trial for each sensor cfg.method = 'wavelet'; % 'mtmfft' works as well although I do not really look into the differences between the two cfg.keeptrials = 'yes'; cfg.output = 'fourier'; fourier_coefficent = ft_freqanalysis(cfg, data); 2. calculate the phase phase = arctangent of the imaginary Fourier coefficient divided by the real one. 3. calculate the phase difference between two sensors, i and j (Melloni et al. Journal of neuroscience 2007, 27:2858) phaseij = the phase of the sensor i multiplied by the complex conjugate of the second sensor j 4. calculate the PLV PLVij = the absolute value of the mean of the phaseij across all the trials On Thu, Jun 14, 2012 at 11:16 PM, Simon-Shlomo Poil < poil.simonshlomo at gmail.com> wrote: > Hi Qi, > > I also don't know how to calculate the phase locking value in > Fieldtrip. But you can do it in the Neurophysiological Biomarker > Toolbox http://www.nbtwiki.net/doku.php?id=tutorial:phase_locking_value > > It's a toolbox for EEGLAB, but it should be possible to either use the > functions directly on you fieldtrip signal, or simply convert the > signal to eeglab format.. > > Good luck! :) > Simon-Shlomo Poil > > 2012/6/13 qi li : > > Hi there, > > > > I am wondering whether fieldtrip has a function to compute the > > instantaneous phase and phase locking value. Thanks! > > > > Qi > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > -- > -- > Simon-Shlomo Poil > > Center of MR-Research > University Children’s Hospital Zurich > > Mobile number: +41 (0)76 399 5809 > Office number: +41 (0)44 266 3129 > Skype: poil.simonshlomo > Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and > http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From narayan.ps at tut.fi Thu Jun 21 11:55:13 2012 From: narayan.ps at tut.fi (Narayan) Date: Thu, 21 Jun 2012 12:55:13 +0300 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <4FE20AF2.4060502@mpi.nl> References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> Message-ID: <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Hi Thanks for the reply. I created the data structure as explained in the link using matlab data matrix. I am interested in preprocessing the EEG data ( filtering, artifact removal etc). How can I use this data structure to pass on to the functions that do preprocessing. When I use the ft_preprocessing function with cfg and data as input parameters, I get the following error ??? Error using ==> ft_checkdata at 265 This function requires raw data as input. Error in ==> ft_preprocessing at 281 data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); -- Best Regards, Narayan Quoting "Magyari, Lilla" : > Hi, > > this FAQ describes how you can make your data compatible with FieldTrip: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat > > I hope this helps. > > Best, > Lilla > > Narayan Puthanmadam Subramaniyam wrote: >> Hello all, >> >> I have EEG data in the format of matrix in Matlab (samples X channels). >> How can I import this into fieldtrip for further analysis ? I read that >> fieldtrip supports only standard EEG formats. >> >> Any help will be appreciated by this novice field trip user! >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From eelke.spaak at donders.ru.nl Thu Jun 21 12:04:56 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 21 Jun 2012 12:04:56 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <20120621125513.147062r16nk3qr8c@webmail.tut.fi> References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: Hi Narayan, How does your data structure look after you import it? I.e. what do you get when you type >> data into matlab? (Assuming your structure is called 'data'.) Most likely, you did not convert your data 100% correctly, since ft_checkdata does not recognize it as proper fieldtrip data. Post the details, and we can probably help. Best, Eelke On 21 June 2012 11:55, Narayan wrote: > Hi > > Thanks for the reply. I created the data structure as explained in the link > using matlab data matrix. I am interested in preprocessing the EEG data ( > filtering, artifact removal etc). > > How can I use this data structure to pass on to the functions that do > preprocessing. When I use the ft_preprocessing function with cfg and data as > input parameters, I get the following error > > ??? Error using ==> ft_checkdata at 265 > This function requires raw data as input. > > Error in ==> ft_preprocessing at 281 >  data = ft_checkdata(data, 'datatype', 'raw', >  'hassampleinfo', 'yes'); > > > -- > Best Regards, > Narayan > > > > > Quoting "Magyari, Lilla" : > >> Hi, >> >> this FAQ describes how  you can make your data compatible with FieldTrip: >> >> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat >> >> I hope this helps. >> >> Best, >> Lilla >> >> Narayan Puthanmadam Subramaniyam wrote: >>> >>> Hello all, >>> >>> I have EEG data in the format of matrix in Matlab (samples X channels). >>> How can I import this into fieldtrip for further analysis ? I read that >>> fieldtrip supports only standard EEG formats. >>> >>> Any help will be appreciated by this novice field trip user! >>> >>> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From narayan.ps at tut.fi Thu Jun 21 13:00:32 2012 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Thu, 21 Jun 2012 14:00:32 +0300 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: <20120621140032.00000c8d@unknown> On Thu, 21 Jun 2012 12:04:56 +0200 Eelke Spaak wrote: > Hi Narayan, > > How does your data structure look after you import it? I.e. what do > you get when you type > > >> data > > into matlab? (Assuming your structure is called 'data'.) Most likely, > you did not convert your data 100% correctly, since ft_checkdata does > not recognize it as proper fieldtrip data. Post the details, and we > can probably help. > > Best, > Eelke > > On 21 June 2012 11:55, Narayan wrote: > > Hi > > > > Thanks for the reply. I created the data structure as explained in > > the link using matlab data matrix. I am interested in preprocessing > > the EEG data ( filtering, artifact removal etc). > > > > How can I use this data structure to pass on to the functions that > > do preprocessing. When I use the ft_preprocessing function with cfg > > and data as input parameters, I get the following error > > > > ??? Error using ==> ft_checkdata at 265 > > This function requires raw data as input. > > > > Error in ==> ft_preprocessing at 281 > >  data = ft_checkdata(data, 'datatype', 'raw', > >  'hassampleinfo', 'yes'); > > > > > > -- > > Best Regards, > > Narayan > > > > > > > > > > Quoting "Magyari, Lilla" : > > > >> Hi, > >> > >> this FAQ describes how  you can make your data compatible with > >> FieldTrip: > >> > >> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat > >> > >> I hope this helps. > >> > >> Best, > >> Lilla > >> > >> Narayan Puthanmadam Subramaniyam wrote: > >>> > >>> Hello all, > >>> > >>> I have EEG data in the format of matrix in Matlab (samples X > >>> channels). How can I import this into fieldtrip for further > >>> analysis ? I read that fieldtrip supports only standard EEG > >>> formats. > >>> > >>> Any help will be appreciated by this novice field trip user! > >>> > >>> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Hi I realized the mistake now. Instead of data.label, i had typed data.labels and hence the condition isfield(data, 'label') && isfield(data, 'time') && isa(data.time, 'cell') && isfield(data, 'trial') && isa(data.trial, 'cell') was getting violated. Thanks for the help! It works now! Now my data gives type as raw when I run the ft_datatype function. -- Best Regards Narayan Puthanmadam Subramaniyam, M.Sc PhD student/researcher Department of Biomedical Engineering, Tampere University of Technology Finn Medi 1, 4th Floor, Room 203 FI 33520, Finland From jan.schoffelen at donders.ru.nl Thu Jun 21 13:35:42 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 21 Jun 2012 13:35:42 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> Message-ID: <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> Caro Andrea, You might want to use ft_plot_topo3d for this purpose. This will plot the functional data onto the positions of the channels in 3D, but you need to create the to-be-plotted data as a single vector, and you will need the channel positions in 3D (which you'll get for free when working with MEG data, but which are generally not represented in EEG data). If you concurrently have a cortical reconstruction defined in the same coordinate system as the channels (and in the same metric units (otherwise use ft_convert_units first)), you can do a 'hold on' and use ft_plot_mesh for the visualization of the cortex. I guess that the ft_plot_topo3D has some functionality for transparency. Ciao, JM On Jun 20, 2012, at 8:44 PM, andrea brovelli wrote: > Otherwise, to make things easier: is there a simple way to visualise a given topography in 3D (rather than in a 2D layout as done with ft_topoplotTFR) together with different segmented surfaces such as the skin or the brain meshes ? > > Thanks > > Andrea > > > ----- Messaggio da andrea.brovelli at univ-amu.fr --------- > Data: Wed, 20 Jun 2012 18:56:58 +0200 > Da: andrea brovelli > Rispondi-A: FieldTrip discussion list > Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface > A: FieldTrip discussion list > > >> Thank you very much for your quick reply, Eelke and Johanna. >> >> Yes, I would like only to visualise the data on a cortical surface and I am aware of the potential misinterpretation of such visualisation. >> >> I would like to use it as an intermediate step between the ft_topoplot on 2D layout and proper source localisation. It would serve as an exploratory tool to decide at which frequency, say, I would do a beamforming and to have a very rough idea of the number and location of cortical sources. >> >> However, it is not very clear to me how I could do this using the example in the beamforming tutorial. Could you be a bit more explicit ? Should I need to do source reconstruction for visualisation ? >> >> Thanks a lot >> >> Andrea >> >> >> ----- Messaggio da johanna.zumer at donders.ru.nl --------- >> Data: Wed, 20 Jun 2012 18:22:48 +0200 >> Da: Johanna Zumer >> Rispondi-A: FieldTrip discussion list >> Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface >> A: FieldTrip discussion list >> >> >>> Dear Andrea, >>> >>> I would like to further clarify the options for this question. Perhaps >>> could you suggest which inverse algorithm you had in mind? >>> >>> For example, it is possible to use beamforming limited only to voxels >>> defined as lying on the cortical sheet (i.e. restrict .inside to be only >>> the gray matter). This is possible, but you might miss out on the spatial >>> peak of the source lying just 5mm away to the inside a bit. Thus, it >>> would be better to do as Eelke suggested and apply beamforming to the whole >>> inside of the brain, and then project those values to the surface for >>> visualisation (which is easily done with the cfg.method='surface' option in >>> ft_sourceplot). >>> >>> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >>> or MNE) which are commonly used to reconstruct onto cortical surface voxels >>> only. This works because the min-norm algorithms force all activity to lie >>> in the region over which you select to reconstruct. Thus, a source 5mm >>> inside of the surface will automatically get projected to the surface. >>> >>> I also agree with Eelke you should not just project sensors to surface >>> without doing a specific type of inverse method. >>> >>> Cheers, >>> Johanna >>> >>> 2012/6/20 Eelke Spaak >>> >>>> Dear Andrea, >>>> >>>> If I understand your question correctly, you just want to *visualise* >>>> sensor space activity on a brain surface, without doing source >>>> reconstruction first? I would advise against this. Time-frequency >>>> power values of your planar gradient data reflect the spectral >>>> characteristics of the magnetic gradient at the location of your >>>> sensors. These sensors are not located at the surface of the brain, >>>> but quite some centimeters away from it. Therefore, visualising the >>>> data as if it were actually recorded on the brain surface, without >>>> doing a proper transformation, is potentially misleading. It is true >>>> that people tend to display all sorts of data in a 'topoplot' fashion, >>>> but in that case it is clear to the audience that you are looking at a >>>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>>> approach, if you're not already familiar with it. >>>> >>>> If you want to display your time-frequency activity on a cortical >>>> surface (which is of course a perfectly valid thing to want to do), >>>> you first should map the sensor activity to source space. This mapping >>>> is non-trivial and can be done by e.g. beamforming. See >>>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>>> this. That tutorial ends with a surface plot. >>>> >>>> Hope this helps! >>>> >>>> Best, >>>> Eelke >>>> >>>> On 20 June 2012 17:26, andrea brovelli >>>> wrote: >>>>> >>>>> Dear Fieldtrip users and developpers, >>>>> >>>>> I would like to project and visualise time-frequency power values >>>> computed >>>>> on planar gradient data at the sensors level onto the brain surface >>>>> segmentated from the anatomial MRI of the subject. >>>>> >>>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>>> scripts ? >>>>> >>>>> Does anyone see any inconvenient to this visualisation ? >>>>> >>>>> Thanks a lot for you help. >>>>> >>>>> Andrea >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >> >> >> ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- >> >> >> -- >> >> NEW EMAIL: andrea.brovelli at univ-amu.fr >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- > > > -- > > NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Thu Jun 21 13:46:12 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Thu, 21 Jun 2012 13:46:12 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> Message-ID: <20120621134612.19545qotqy10d75s@wmelperso1.univmed.fr> Thank you all for your help. Andrea ----- Message de jan.schoffelen at donders.ru.nl --------- Date : Thu, 21 Jun 2012 13:35:42 +0200 De : jan-mathijs schoffelen Répondre à : FieldTrip discussion list Objet : Re: [FieldTrip] Projection from sensors space to segmented brain surface À : FieldTrip discussion list > Caro Andrea, > > You might want to use ft_plot_topo3d for this purpose. This will > plot the functional data onto the positions of the channels in 3D, > but you need to create the to-be-plotted data as a single vector, > and you will need the channel positions in 3D (which you'll get for > free when working with MEG data, but which are generally not > represented in EEG data). If you concurrently have a cortical > reconstruction defined in the same coordinate system as the channels > (and in the same metric units (otherwise use ft_convert_units > first)), you can do a 'hold on' and use ft_plot_mesh for the > visualization of the cortex. I guess that the ft_plot_topo3D has > some functionality for transparency. > > Ciao, > > JM > > > > On Jun 20, 2012, at 8:44 PM, andrea brovelli wrote: > >> Otherwise, to make things easier: is there a simple way to >> visualise a given topography in 3D (rather than in a 2D layout as >> done with ft_topoplotTFR) together with different segmented >> surfaces such as the skin or the brain meshes ? >> >> Thanks >> >> Andrea >> >> >> ----- Messaggio da andrea.brovelli at univ-amu.fr --------- >> Data: Wed, 20 Jun 2012 18:56:58 +0200 >> Da: andrea brovelli >> Rispondi-A: FieldTrip discussion list >> Oggetto: Re: [FieldTrip] Projection from sensors space to segmented >> brain surface >> A: FieldTrip discussion list >> >> >>> Thank you very much for your quick reply, Eelke and Johanna. >>> >>> Yes, I would like only to visualise the data on a cortical surface >>> and I am aware of the potential misinterpretation of such >>> visualisation. >>> >>> I would like to use it as an intermediate step between the >>> ft_topoplot on 2D layout and proper source localisation. It would >>> serve as an exploratory tool to decide at which frequency, say, I >>> would do a beamforming and to have a very rough idea of the number >>> and location of cortical sources. >>> >>> However, it is not very clear to me how I could do this using the >>> example in the beamforming tutorial. Could you be a bit more >>> explicit ? Should I need to do source reconstruction for >>> visualisation ? >>> >>> Thanks a lot >>> >>> Andrea >>> >>> >>> ----- Messaggio da johanna.zumer at donders.ru.nl --------- >>> Data: Wed, 20 Jun 2012 18:22:48 +0200 >>> Da: Johanna Zumer >>> Rispondi-A: FieldTrip discussion list >>> Oggetto: Re: [FieldTrip] Projection from sensors space to >>> segmented brain surface >>> A: FieldTrip discussion list >>> >>> >>>> Dear Andrea, >>>> >>>> I would like to further clarify the options for this question. Perhaps >>>> could you suggest which inverse algorithm you had in mind? >>>> >>>> For example, it is possible to use beamforming limited only to voxels >>>> defined as lying on the cortical sheet (i.e. restrict .inside to be only >>>> the gray matter). This is possible, but you might miss out on >>>> the spatial >>>> peak of the source lying just 5mm away to the inside a bit. Thus, it >>>> would be better to do as Eelke suggested and apply beamforming to >>>> the whole >>>> inside of the brain, and then project those values to the surface for >>>> visualisation (which is easily done with the cfg.method='surface' >>>> option in >>>> ft_sourceplot). >>>> >>>> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >>>> or MNE) which are commonly used to reconstruct onto cortical >>>> surface voxels >>>> only. This works because the min-norm algorithms force all >>>> activity to lie >>>> in the region over which you select to reconstruct. Thus, a source 5mm >>>> inside of the surface will automatically get projected to the surface. >>>> >>>> I also agree with Eelke you should not just project sensors to surface >>>> without doing a specific type of inverse method. >>>> >>>> Cheers, >>>> Johanna >>>> >>>> 2012/6/20 Eelke Spaak >>>> >>>>> Dear Andrea, >>>>> >>>>> If I understand your question correctly, you just want to *visualise* >>>>> sensor space activity on a brain surface, without doing source >>>>> reconstruction first? I would advise against this. Time-frequency >>>>> power values of your planar gradient data reflect the spectral >>>>> characteristics of the magnetic gradient at the location of your >>>>> sensors. These sensors are not located at the surface of the brain, >>>>> but quite some centimeters away from it. Therefore, visualising the >>>>> data as if it were actually recorded on the brain surface, without >>>>> doing a proper transformation, is potentially misleading. It is true >>>>> that people tend to display all sorts of data in a 'topoplot' fashion, >>>>> but in that case it is clear to the audience that you are looking at a >>>>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>>>> approach, if you're not already familiar with it. >>>>> >>>>> If you want to display your time-frequency activity on a cortical >>>>> surface (which is of course a perfectly valid thing to want to do), >>>>> you first should map the sensor activity to source space. This mapping >>>>> is non-trivial and can be done by e.g. beamforming. See >>>>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>>>> this. That tutorial ends with a surface plot. >>>>> >>>>> Hope this helps! >>>>> >>>>> Best, >>>>> Eelke >>>>> >>>>> On 20 June 2012 17:26, andrea brovelli >>>>> wrote: >>>>>> >>>>>> Dear Fieldtrip users and developpers, >>>>>> >>>>>> I would like to project and visualise time-frequency power values >>>>> computed >>>>>> on planar gradient data at the sensors level onto the brain surface >>>>>> segmentated from the anatomial MRI of the subject. >>>>>> >>>>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>>>> scripts ? >>>>>> >>>>>> Does anyone see any inconvenient to this visualisation ? >>>>>> >>>>>> Thanks a lot for you help. >>>>>> >>>>>> Andrea >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>> >>> >>> ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- >>> >>> >>> -- >>> >>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- >> >> >> -- >> >> NEW EMAIL: andrea.brovelli at univ-amu.fr >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > ----- Fin du message de jan.schoffelen at donders.ru.nl ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From a.maye at uke.de Thu Jun 21 14:04:16 2012 From: a.maye at uke.de (Alexander Maye) Date: Thu, 21 Jun 2012 14:04:16 +0200 Subject: [FieldTrip] PhD Position in BCI, Univ. Medical Center Hamburg Message-ID: <223382712.sbGkH5R71O@mars.neurophys.uke.uni-hamburg.de> *PhD Student Position in Brain-Computer Interfaces* The International Research Training Group Hamburg – Beijing/China (Internationales Graduierten­kolleg) on Cross-modal Interaction in Natural and Artificial Cognitive Systems (CINACS) is seeking a highly qualified and motivated candidate for a doctoral position in Brain-Computer Interfaces (BCI). The training group is funded by the German Research Foundation (DFG), the State of Ham­burg, and the Ministry of Education of the People’s Republic of China. The candidate will also collaborate with the project “MULTISENSE – The merging of the senses: understanding multisensory experience”, funded by an ERC Advanced Investigators Grant. The major goal of this project is the investigation of dynamic, large-scale neural interactions and the characterization of functional networks during multisensory processing in the human brain, using techniques such as MEG, EEG, TMS, tACS and eye tracking. The dissertation project will be carried out at the Dept. of Neurophysiology and Pathophysiology of the University Medical Center Hamburg-Eppendorf (UKE). The UKE is the largest hospital in Hamburg, comprising 14 centers with 80 clinical and research departments. The Dept. of Neuro­physiology and Pathophysiology is headed by Prof. Dr. Andreas K. Engel. The research of Prof. Engel’s group focuses on cognitive and sensorimotor functions, which are studied in humans and animal models using neurophysiological and neuroimaging techniques. The project will build on strong interactions with the Dept. of Biomedical Engineering at the Tsinghua University in Beijing, China. Tsinghua University is among China's top universities, and the Dept. of Biomedical Engin­eering hosts one of the world's leading BCI research teams. The project will be focused on the integration of different modalities (e.g., vision, audition, and touch) into a unified BCI system. Using several modalities allows to employ proven BCI paradigms to increase the number of control channels. Research questions will be the possibility of gaining ad­ ditional information from switching attention between modalities, and the emergence of immersive control of the system after training with such a multimodal BCI system. Potential applications of the system to be developed are not only in classical BCI application fields like rehabilitation and prosthetics, but rather envisaged in everyday usage for computer control or in computer games. Applicants should have a master in computer science, physics or engineering, and excellent programming skills, as well as expertise in methods in signal processing, pattern recognition and classification. Experience in human electrophysiology would be an asset, but is not required. The position will be funded for up to three years, beginning Oct. 2012 or later. Applicants can have any nationality, female applicants are particularly welcome. Informal inquiries can be directed to Dr. Alexander Maye (a.maye at uke.de). Applicants should send their curriculum vitae, a statement of research interests, as well as names of two referees to Prof. Dr. Andreas K. Engel, Institut für Neurophysiologie und Pathophysiologie, Universitätsklinikum Ham­burg-Eppendorf, Martinistr. 52, 20246 Hamburg, Germany. Web ressources: www.cinacs.org www.tsinghua.edu.cn www.uke.de/neurophysiologie www.multisense.org www.40Hz.de -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- A non-text attachment was scrubbed... Name: BCI_PhD_position_UKE.pdf Type: application/pdf Size: 67604 bytes Desc: not available URL: From Lilla.Magyari at mpi.nl Thu Jun 21 14:19:33 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Thu, 21 Jun 2012 14:19:33 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: <4FE31155.5070105@mpi.nl> hi, and probably it would be also good to know how your cfg structure looks like that you input to ft_preprocessing. Lilla Eelke Spaak wrote: > Hi Narayan, > > How does your data structure look after you import it? I.e. what do > you get when you type > >>> data > > into matlab? (Assuming your structure is called 'data'.) Most likely, > you did not convert your data 100% correctly, since ft_checkdata does > not recognize it as proper fieldtrip data. Post the details, and we > can probably help. > > Best, > Eelke > > On 21 June 2012 11:55, Narayan wrote: >> Hi >> >> Thanks for the reply. I created the data structure as explained in the link >> using matlab data matrix. I am interested in preprocessing the EEG data ( >> filtering, artifact removal etc). >> >> How can I use this data structure to pass on to the functions that do >> preprocessing. When I use the ft_preprocessing function with cfg and data as >> input parameters, I get the following error >> >> ??? Error using ==> ft_checkdata at 265 >> This function requires raw data as input. >> >> Error in ==> ft_preprocessing at 281 >> data = ft_checkdata(data, 'datatype', 'raw', >> 'hassampleinfo', 'yes'); >> >> >> -- >> Best Regards, >> Narayan >> >> >> >> >> Quoting "Magyari, Lilla" : >> >>> Hi, >>> >>> this FAQ describes how you can make your data compatible with FieldTrip: >>> >>> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat >>> >>> I hope this helps. >>> >>> Best, >>> Lilla >>> >>> Narayan Puthanmadam Subramaniyam wrote: >>>> Hello all, >>>> >>>> I have EEG data in the format of matrix in Matlab (samples X channels). >>>> How can I import this into fieldtrip for further analysis ? I read that >>>> fieldtrip supports only standard EEG formats. >>>> >>>> Any help will be appreciated by this novice field trip user! >>>> >>>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From cornabel at googlemail.com Fri Jun 22 14:38:17 2012 From: cornabel at googlemail.com (cornelius abel) Date: Fri, 22 Jun 2012 14:38:17 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error Message-ID: <4FE46739.7010804@googlemail.com> Dear Fieldtrip list, i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. As a next step I tried to calculate a grand average using ft_sourcegrandaverage: cfg=[]; cfg.keepindividual='no'; cfg.parameter='avg.pow'; GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); giving me the following structure: GACont = pos: [3570x3 double] dim: [17 14 15] avg: [1x1 struct] var: [1x1 struct] dimord: 'voxel' inside: [1846x1 double] outside: [1724x1 double] df: [3570x1 double] cfg: [1x1 struct] but interpolating this onto an anatomy always gives me an error: cfg = []; cfg.downsample= 2; cfg.parameter = 'avg.avg.pow'; sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); /??? Error using ==> interpn at 155/ ///Wrong number of input arguments or some dimension of V is less than 2./ ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ ///Error in ==> ft_sourceinterpolate at 368/ ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ however interpolating a single subject source data works just fine... cfg = []; cfg.downsample= 2; cfg.parameter = 'avg.pow'; sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); What am i doing wrong here, any ideas? Greetings, Cornelius From jan.schoffelen at donders.ru.nl Sat Jun 23 08:19:14 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 23 Jun 2012 08:19:14 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <4FE46739.7010804@googlemail.com> References: <4FE46739.7010804@googlemail.com> Message-ID: Hi Cornelius, Could it be that the parameter 'avg.avg.pow' does not work? Best, JM On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > Dear Fieldtrip list, > > i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. > As a next step I tried to calculate a grand average using ft_sourcegrandaverage: > > cfg=[]; > cfg.keepindividual='no'; > cfg.parameter='avg.pow'; > GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); > > giving me the following structure: > > GACont = > pos: [3570x3 double] > dim: [17 14 15] > avg: [1x1 struct] > var: [1x1 struct] > dimord: 'voxel' > inside: [1846x1 double] > outside: [1724x1 double] > df: [3570x1 double] > cfg: [1x1 struct] > > but interpolating this onto an anatomy always gives me an error: > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); > > /??? Error using ==> interpn at 155/ > ///Wrong number of input arguments or some dimension of V is less than 2./ > ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ > ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ > ///Error in ==> ft_sourceinterpolate at 368/ > ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ > > however interpolating a single subject source data works just fine... > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); > > > What am i doing wrong here, any ideas? > > > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Sat Jun 23 16:05:37 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Sat, 23 Jun 2012 16:05:37 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: References: <4FE46739.7010804@googlemail.com> Message-ID: I have the same Problem. I can plot my LCMV-Beamformer results on an anatomy. And I can plot the results of the normalize script. But I can't plot the GrandAVG or the Stats results on that anatomy. The interpolate function doesn' work. Without anatomy it works just fine. Any hint? Thanks, Martin On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Cornelius, > > Could it be that the parameter 'avg.avg.pow' does not work? > > Best, > > JM > > On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > > Dear Fieldtrip list, > > i successfully beamformed some steady state activity and the sourceplots > per subject are looking very nice. > As a next step I tried to calculate a grand average using > ft_sourcegrandaverage: > > cfg=[]; > cfg.keepindividual='no'; > cfg.parameter='avg.pow'; > GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); > > giving me the following structure: > > GACont = > pos: [3570x3 double] > dim: [17 14 15] > avg: [1x1 struct] > var: [1x1 struct] > dimord: 'voxel' > inside: [1846x1 double] > outside: [1724x1 double] > df: [3570x1 double] > cfg: [1x1 struct] > > but interpolating this onto an anatomy always gives me an error: > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); > > /??? Error using ==> interpn at 155/ > ///Wrong number of input arguments or some dimension of V is less than 2./ > ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ > ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ > ///Error in ==> ft_sourceinterpolate at 368/ > ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, > cfg.feedback);/ > > however interpolating a single subject source data works just fine... > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); > > > What am i doing wrong here, any ideas? > > > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Jun 23 22:01:54 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 23 Jun 2012 22:01:54 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: References: <4FE46739.7010804@googlemail.com> Message-ID: <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> Hi Martin, In general, the more info you can provide us with, the more likely it is that anybody can help you. The problem you sketch is too vague to even try start giving hints. It would be best if you could provide us with some detailed error messages to begin with. Even better would be if you create an account on our bugzilla-website, where you can also upload a script and some (small) data structure that would allow us to reproduce the problem. Best wishes, Jan-Mathijs PS: http://bugzilla.fcdonders.nl On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: > I have the same Problem. I can plot my LCMV-Beamformer results on an anatomy. And I can plot the results of the normalize script. But I can't plot the GrandAVG or the Stats results on that anatomy. The interpolate function doesn' work. Without anatomy it works just fine. > > Any hint? > > Thanks, Martin > > On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen wrote: > Hi Cornelius, > > Could it be that the parameter 'avg.avg.pow' does not work? > > Best, > > JM > > On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > >> Dear Fieldtrip list, >> >> i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. >> As a next step I tried to calculate a grand average using ft_sourcegrandaverage: >> >> cfg=[]; >> cfg.keepindividual='no'; >> cfg.parameter='avg.pow'; >> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >> >> giving me the following structure: >> >> GACont = >> pos: [3570x3 double] >> dim: [17 14 15] >> avg: [1x1 struct] >> var: [1x1 struct] >> dimord: 'voxel' >> inside: [1846x1 double] >> outside: [1724x1 double] >> df: [3570x1 double] >> cfg: [1x1 struct] >> >> but interpolating this onto an anatomy always gives me an error: >> >> cfg = []; >> cfg.downsample= 2; >> cfg.parameter = 'avg.avg.pow'; >> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >> >> /??? Error using ==> interpn at 155/ >> ///Wrong number of input arguments or some dimension of V is less than 2./ >> ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ >> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >> ///Error in ==> ft_sourceinterpolate at 368/ >> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ >> >> however interpolating a single subject source data works just fine... >> >> cfg = []; >> cfg.downsample= 2; >> cfg.parameter = 'avg.pow'; >> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >> >> >> What am i doing wrong here, any ideas? >> >> >> >> Greetings, Cornelius >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarang.hahm at gmail.com Mon Jun 25 04:57:51 2012 From: jarang.hahm at gmail.com (Jarang Hahm) Date: Mon, 25 Jun 2012 11:57:51 +0900 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) Message-ID: Dear FieldTrip user. Hi, I'm processing MEG data of Neuromag 306 system after removing some bad channels using fieldtrip-20120620 toolbox. To repair the bad channels with its neighbours, I firstly found the neighbor of all channel based on distance using 'ft_prepare_neighbours'. However, the outcome of neighbour was far more than default distance, 4cm, from a target channel. So, I checked thoroughly the code 'ft_prepare_neighbours', finding it used information of channel label and position from data’s hdr.grad to find neighbour of the target. The problem is channel label and position in hdr.grad are arranged differently. As far as I found, both information come from different source: the channel label was from code 'fiff_read_meas_info', while the channel position was from ‘channelposition’ in 'ft_datatype_sens'. And the channel label is sorted into the sensor location, e. g. MEG 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is arranged along the sensor type (magnetometer and gradiometer) according to its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. Thus, the label and position of channel in hdr.grad were mismatched so that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. It should be matched correctly to find the proper neighbour and ensure the result of repair as well. In fact, the code 'channelposition' in 'ft_datatype_sens' yield the channel label as well as the channel position. It might help to solve this problem. Is there any other way to solve this problem? Best, Jarang Hahm -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 10:44:59 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Mon, 25 Jun 2012 10:44:59 +0200 Subject: [FieldTrip] source analysis: common filter Message-ID: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> Dear all, Currently I am analyzing data of an experiment in which subjects perform two conditions in two sessions. They have been out of the MEG system between the sessions. For sourceanalysis I am using mni-normalized headmodels and grids. This because in the two sessions the subjects are probably seated slightly differently in the MEG system. (Thus I have separate headmodels and grids for the two sessions). Currently I am using a common filter for analyzing the two conditions within a session. I am wondering however if it would be (even) possible and if yes, more, or less correct to use a common filter over all conditions/sessions. Best Regards, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 11:01:22 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Mon, 25 Jun 2012 11:01:22 +0200 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Dear Jarang, Coincidentily I have been working on the same problem a few weeks ago. First of all you should take care that you repair a horizontal gradiometer with neighbouring horizontal gradiometers and vertical ones with vertical ones. This is not built into fieldtrip yet. I have have made a partial fix, which works with the 'layout' option but not with the 'grad' method. I have attached the function I addapted from Fieldtrip, and the layout files that seperatly name the different gradiometers (made by Elisabeth May ;-) ) I hope it somehow helps you! Best regards, Hanneke van Dijk ________________________________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: > Dear FieldTrip user. > > > > Hi, I'm processing MEG data of Neuromag 306 system after removing some bad > channels using fieldtrip-20120620 toolbox. > > > > To repair the bad channels with its neighbours, I firstly found the > neighbor of all channel based on distance using 'ft_prepare_neighbours'. > > However, the outcome of neighbour was far more than default distance, 4cm, > from a target channel. > > So, I checked thoroughly the code 'ft_prepare_neighbours', finding it used > information of channel label and position from data’s hdr.grad to find > neighbour of the target. > > > > The problem is channel label and position in hdr.grad are arranged > differently. > > As far as I found, both information come from different source: the > channel label was from code 'fiff_read_meas_info', while the channel > position was from ‘channelposition’ in 'ft_datatype_sens'. > > And the channel label is sorted into the sensor location, e. g. MEG 0113, > MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is > arranged along the sensor type (magnetometer and gradiometer) according to > its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., > MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. > > Thus, the label and position of channel in hdr.grad were mismatched so > that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. > > > It should be matched correctly to find the proper neighbour and ensure the > result of repair as well. > > In fact, the code 'channelposition' in 'ft_datatype_sens' yield the > channel label as well as the channel position. It might help to solve this > problem. > > > > Is there any other way to solve this problem? > > > > > Best, > > > Jarang Hahm > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neuromag_prepare_neighbours.m Type: application/octet-stream Size: 1823 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306hor.lay Type: application/octet-stream Size: 5238 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306ver.lay Type: application/octet-stream Size: 5235 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: batch_channel_repair.m Type: application/octet-stream Size: 410 bytes Desc: not available URL: From stan.vanpelt at fcdonders.ru.nl Mon Jun 25 13:10:00 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Mon, 25 Jun 2012 13:10:00 +0200 (CEST) Subject: [FieldTrip] source analysis: common filter In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> Message-ID: <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> Hi Hanneke, If my understanding is correct, you cannot use common filters over all sessions, exactly because of the reason you mention (different spatial relation between sensors and the head/brain). Using common filters within a session is ok of course (to look at effect of condition on a source's activity). What you could do as an alternative is compute virtual sensor time courses for the source-of-interest, separately for both sessions, and subsequently append these (source-level) data afterwards (and then your contrasts/statistics). Hope this helps. Stan -- Stan van Pelt, PhD Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstr. 46 60528 Frankfurt, Germany Website: www.esi-frankfurt.de E-mail: stan.vanpelt at esi-frankfurt.de Tel: +49 (0)69 96769 519 Fax: +49 (0)69 96769 555 ----- Oorspronkelijk bericht ----- > Van: "Hanneke vanDijk" > Aan: fieldtrip at donders.ru.nl > Verzonden: Maandag 25 juni 2012 10:44:59 > Onderwerp: [FieldTrip] source analysis: common filter > Dear all, > Currently I am analyzing data of an experiment in which subjects > perform two conditions in two sessions. They have been out of the MEG > system between the sessions. > For sourceanalysis I am using mni-normalized headmodels and grids. > This because in the two sessions the subjects are probably seated > slightly differently in the MEG system. (Thus I have separate > headmodels and grids for the two sessions). > Currently I am using a common filter for analyzing the two conditions > within a session. I am wondering however if it would be (even) > possible and if yes, more, or less correct to use a common filter over > all conditions/sessions. > Best Regards, > Hanneke > __________________________________________ > Hanneke van Dijk, PhD > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > Institute for Clinical Neuroscience, > Heinrich Heine Universit ä t D ü sseldorf, Germany > Hanneke.vanDijk at med.uni-duesseldorf.de > Tel. +49 (0) 211 81 13074 > __________________________________________ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 -------------- next part -------------- An HTML attachment was scrubbed... URL: From anette.giani at tuebingen.mpg.de Mon Jun 25 14:23:40 2012 From: anette.giani at tuebingen.mpg.de (Anette Giani) Date: Mon, 25 Jun 2012 14:23:40 +0200 Subject: [FieldTrip] Alignment problem in tutorial: Create MNI-aligned grids in individual head-space Message-ID: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> Dear fieldtrip users, I am running the tutorial: "Create MNI-aligned grids in individual head-space" (CASE 1). When using the template mri provided on the homepage (i.e. Subject01.mri), it seems like the grid, the resulting vol and the anatomy are not aligned. And even worse: besides the misalignment there seems to be a scaling. Note however, that I am using the exact same parameter as specified on the homepage. For a better understanding see page 1 of Alignment.pdf attached to this mail. I found out that things improve when I use the segmentation procedure specified in the tutorial: "Build a geometrical description of the volume conduction model of the head" (CASE 2). See page 2 of Alignment.pdf. In particular, in CASE 1 I do: cfg = []; cfg.downsample = 2; cfg.coordsys = 'ctf'; seg_MNItutorial = ft_volumesegment(cfg, mri); % plotting case 1 seg_MNItutorial.transform = mri.transform; seg_MNItutorial.anatomy = mri.anatomy; figure cfg.funparameter = 'gray'; ft_sourceplot(cfg,seg_MNItutorial); %segmented gray matter on top While, in CASE 2 I do: cfg = []; cfg.write = 'no'; cfg.coordsys = 'ctf'; cfg.output = {'scalp','skull','brain'}; seg_headmodelTutorial = ft_volumesegment(cfg, mri); % plotting case 2 mri_combine = mri; mri_combine.seg = seg_headmodelTutorial.scalp + 3*seg_headmodelTutorial.skull + 6*seg_headmodelTutorial.brain; mri_combine.mask = (mri_combine.seg)>0; cfg = []; cfg.interactive = 'yes'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure, ft_sourceplot(cfg,mri_combine); I am confused, why CASE 2 works, while CASE 1 does not. Could anyone explain the differences to me? Is doing it like in CASE 2 correct at all? Thanks a lot in advance! Anette -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Alignment.pdf Type: application/pdf Size: 474703 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Jun 25 14:40:46 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 25 Jun 2012 14:40:46 +0200 Subject: [FieldTrip] Alignment problem in tutorial: Create MNI-aligned grids in individual head-space In-Reply-To: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> References: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> Message-ID: <934CD08F-75B4-40F1-A20C-D399EDE30ACA@donders.ru.nl> Hi Anette, Case 1 does not look good because you are overlaying a low resolution image with a high resolution image. This is due to the cfg.downsample=2 before you call ft_volumesegment. (mri.anatomy is just 2^3 as big as the segmented images. Ft_sourceplot assumes all the to-be-plotted data to have the same physical size. Note that you replace the transformation matrix in the seg_MNItutorial variable with the transformation matrix from the mri-variable. This is incorrect, because the original mri has 1-mm resolution, whereas the segmented has 2-mm resolution. Best, Jan-Mathijs On Jun 25, 2012, at 2:23 PM, Anette Giani wrote: > Dear fieldtrip users, > > I am running the tutorial: “Create MNI-aligned grids in individual head-space” (CASE 1). When using the template mri provided on the homepage (i.e. Subject01.mri), it seems like the grid, the resulting vol and the anatomy are not aligned. And even worse: besides the misalignment there seems to be a scaling. Note however, that I am using the exact same parameter as specified on the homepage. For a better understanding see page 1 of Alignment.pdf attached to this mail. > > I found out that things improve when I use the segmentation procedure specified in the tutorial: “Build a geometrical description of the volume conduction model of the head” (CASE 2). See page 2 of Alignment.pdf. > > > In particular, in CASE 1 I do: > > cfg = []; > cfg.downsample = 2; > cfg.coordsys = 'ctf'; > seg_MNItutorial = ft_volumesegment(cfg, mri); > > % plotting case 1 > seg_MNItutorial.transform = mri.transform; > seg_MNItutorial.anatomy = mri.anatomy; > figure > cfg.funparameter = 'gray'; > ft_sourceplot(cfg,seg_MNItutorial); %segmented gray matter on top > > > > While, in CASE 2 I do: > > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'ctf'; > cfg.output = {'scalp','skull','brain'}; > seg_headmodelTutorial = ft_volumesegment(cfg, mri); > > % plotting case 2 > mri_combine = mri; > mri_combine.seg = seg_headmodelTutorial.scalp + 3*seg_headmodelTutorial.skull + 6*seg_headmodelTutorial.brain; > mri_combine.mask = (mri_combine.seg)>0; > cfg = []; > cfg.interactive = 'yes'; > cfg.funparameter = 'seg'; > cfg.funcolormap = 'jet'; > cfg.funcolorlim = [0 7]; > cfg.opacitylim = [0 1.5]; > cfg.maskparameter = 'mask'; > figure, ft_sourceplot(cfg,mri_combine); > > > I am confused, why CASE 2 works, while CASE 1 does not. Could anyone explain the differences to me? Is doing it like in CASE 2 correct at all? > > Thanks a lot in advance! > Anette > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 14:50:17 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Mon, 25 Jun 2012 14:50:17 +0200 Subject: [FieldTrip] source analysis: common filter In-Reply-To: <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Stan, Thanks for your reply! Virtual channel analysis will be a step in my analysis as well! I hope I will get something sensible out of the whole head analysis though, that's (also) why I decided to use these mni_normalized grids. So to first do sourceanalysis for all sessions and conditions (--> all gridpoints are at the same positions for all subjects and sessions) and then compare the 'whole head' sources would also be valid I suppose. I then just have to live with the fact that I use different filters for the two sessions... Groetjes! Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ On Mon, Jun 25, 2012 at 1:10 PM, Stan van Pelt wrote: > Hi Hanneke, > > If my understanding is correct, you cannot use common filters over all > sessions, exactly because of the reason you mention (different spatial > relation between sensors and the head/brain). Using common filters within a > session is ok of course (to look at effect of condition on a source's > activity). > What you could do as an alternative is compute virtual sensor time courses > for the source-of-interest, separately for both sessions, and subsequently append > these (source-level) data afterwards (and then your contrasts/statistics). > > Hope this helps. > > Stan > > -- **** > > Stan van Pelt, PhD**** > > ** ** > > Ernst Strüngmann Institute (ESI)**** > > for Neuroscience in Cooperation with Max Planck Society **** > > Deutschordenstr. 46**** > > 60528 Frankfurt, Germany**** > > Website: www.esi-frankfurt.de**** > > E-mail: stan.vanpelt at esi-frankfurt.de**** > > Tel: +49 (0)69 96769 519**** > > Fax: +49 (0)69 96769 555**** > > ------------------------------ > > *Van: *"Hanneke vanDijk" > *Aan: *fieldtrip at donders.ru.nl > *Verzonden: *Maandag 25 juni 2012 10:44:59 > *Onderwerp: *[FieldTrip] source analysis: common filter > > > Dear all, > > > > Currently I am analyzing data of an experiment in which subjects perform > two conditions in two sessions. They have been out of the MEG system > between the sessions. > > > > For sourceanalysis I am using mni-normalized headmodels and grids. This > because in the two sessions the subjects are probably seated slightly > differently in the MEG system. (Thus I have separate headmodels and grids > for the two sessions). > > > > Currently I am using a common filter for analyzing the two conditions *within > *a session. I am wondering however if it would be (even) possible and if > yes, more, or less correct to use a common filter over all > conditions/sessions. > > > > Best Regards, > > > > Hanneke > > > > __________________________________________ > > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Stan van Pelt > > Donders Institute for Brain, Cognition and Behaviour, Radboud University > Nijmegen > Kapittelweg 29, 6525 EN Nijmegen, Netherlands > E-mail: stan.vanpelt at donders.ru.nl > Website: www.ru.nl/donders/ > Phone: (+31) (0)24 36 10981 > Fax: (+31) (0)24 36 10989 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Mon Jun 25 16:23:29 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Mon, 25 Jun 2012 16:23:29 +0200 Subject: [FieldTrip] ROI based analysis using ft_sourcestatistics Message-ID: Dear all, can anyone provide me some info on how to run a ROI based analysis with ft_sourcestatistics. On the mailing list I found a post from Jan 2011 by Marc Recasens, who reported the same problem that I have. Unfortunately, his post never seemded to be answered by anyone. Like Marc I use the following options: cfg.atlas = 'pathname/wfu_pickatlas/MNI_atlas/templates/TD_lobe.img' cfg.inputcoord = 'mni'; cfg.roi = ROI(8).Nom_C; and when I run ft_sourceanalysis the returned volume is empty. Any help or suggestions on how to run this correctly would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Mon Jun 25 16:23:54 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Mon, 25 Jun 2012 16:23:54 +0200 (CEST) Subject: [FieldTrip] source analysis: common filter In-Reply-To: Message-ID: <61733510.755171.1340634234691.JavaMail.root@sculptor.zimbra.ru.nl> Comparing the 'whole head'-sources like this sounds ok to me! Bets, Stan ----- Oorspronkelijk bericht ----- > Van: "Hanneke van Dijk" > Aan: "FieldTrip discussion list" > Verzonden: Maandag 25 juni 2012 14:50:17 > Onderwerp: Re: [FieldTrip] source analysis: common filter > Hi Stan, > Thanks for your reply! > Virtual channel analysis will be a step in my analysis as well! > I hope I will get something sensible out of the whole head analysis > though, that's (also) why I decided to use these mni_normalized grids. > So to first do sourceanalysis for all sessions and conditions (--> all > gridpoints are at the same positions for all subjects and sessions) > and then compare the 'whole head' sources would also be valid I > suppose. I then just have to live with the fact that I use different > filters for the two sessions... > Groetjes! > Hanneke > __________________________________________ > Hanneke van Dijk, PhD > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > Institute for Clinical Neuroscience, > Heinrich Heine Universit ä t D ü sseldorf, Germany > Hanneke.vanDijk at med.uni-duesseldorf.de > Tel. +49 (0) 211 81 13074 > __________________________________________ > On Mon, Jun 25, 2012 at 1:10 PM, Stan van Pelt < > stan.vanpelt at fcdonders.ru.nl > wrote: > > Hi Hanneke, > > If my understanding is correct, you cannot use common filters over > > all > > sessions, exactly because of the reason you mention (different > > spatial > > relation between sensors and the head/brain). Using common filters > > within a session is ok of course (to look at effect of condition on > > a > > source's activity). > > What you could do as an alternative is compute virtual sensor time > > courses for the source-of-interest, separately for both sessions, > > and > > subsequently append these (source-level) data afterwards (and then > > your contrasts/statistics). > > Hope this helps. > > Stan > > -- > > Stan van Pelt, PhD > > Ernst Strüngmann Institute (ESI) > > for Neuroscience in Cooperation with Max Planck Society > > Deutschordenstr. 46 > > 60528 Frankfurt, Germany > > Website: www.esi-frankfurt.de > > E-mail: stan.vanpelt at esi-frankfurt.de > > Tel: +49 (0)69 96769 519 > > Fax: +49 (0)69 96769 555 > > > Van: "Hanneke vanDijk" < Hanneke.vanDijk at med.uni-duesseldorf.de > > > > Aan: fieldtrip at donders.ru.nl > > > Verzonden: Maandag 25 juni 2012 10:44:59 > > > Onderwerp: [FieldTrip] source analysis: common filter > > > Dear all, > > > Currently I am analyzing data of an experiment in which subjects > > > perform two conditions in two sessions. They have been out of the > > > MEG > > > system between the sessions. > > > For sourceanalysis I am using mni-normalized headmodels and grids. > > > This because in the two sessions the subjects are probably seated > > > slightly differently in the MEG system. (Thus I have separate > > > headmodels and grids for the two sessions). > > > Currently I am using a common filter for analyzing the two > > > conditions > > > within a session. I am wondering however if it would be (even) > > > possible and if yes, more, or less correct to use a common filter > > > over > > > all conditions/sessions. > > > Best Regards, > > > Hanneke > > > __________________________________________ > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > > Institute for Clinical Neuroscience, > > > Heinrich Heine Universit ä t D ü sseldorf, Germany > > > Hanneke.vanDijk at med.uni-duesseldorf.de > > > Tel. +49 (0) 211 81 13074 > > > __________________________________________ > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > Stan van Pelt > > Donders Institute for Brain, Cognition and Behaviour, Radboud > > University Nijmegen > > Kapittelweg 29, 6525 EN Nijmegen, Netherlands > > E-mail: stan.vanpelt at donders.ru.nl > > Website: www.ru.nl/donders/ > > Phone: (+31) (0)24 36 10981 > > Fax: (+31) (0)24 36 10989 > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardoschenberg at gmail.com Mon Jun 25 17:09:35 2012 From: eduardoschenberg at gmail.com (Eduardo Schenberg) Date: Mon, 25 Jun 2012 12:09:35 -0300 Subject: [FieldTrip] EEG reference Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC@gmail.com> Hello all, I am new to this list, as I just started ding EEG experiments. I did some pilot tests with a BrainProducts/Brain Vision with an Acticap and I am doing some preliminary analysis using EEGLab/fieldtrip. I am now planning to buy my own EEG form Brain Products, but I am bothered by the fact that in most cap configs they sell, the reference is near Cz, usually FCz. As far as my knowledge goes, if I want to study power spectrum alterations and coherence in different frequencies between different electrodes, a reference in the head can be a problem, specially if some of the regions of interest are synchronous with the reference itself in the given frequency Can anyone point me to some good review or chapter about these issues so I can study them better and buy the best config available? Many many thanks for all eduardo schenberg From marcel.heers at googlemail.com Tue Jun 26 11:31:32 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Tue, 26 Jun 2012 11:31:32 +0200 Subject: [FieldTrip] Source localization using DICS for EEG data from combined MEG/EEG recordings Message-ID: Dear all, I am trying to perform source localization in the frequency domain from EEG data using DICS. The data were recorded combined with MEG (Neuromag data format). The volume conductor is a 3 shell realistic head model created with bemcp. When running DICS with the following settings cfg = []; cfg.method = 'dics'; cfg.grad = elec; cfg.frequency = 14; cfg.vol = vol_eeg; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 5; source = ft_sourceanalysis(cfg, freq); I am am getting the following error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 568 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 314 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 584 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); and I am not sure what might be the cause. Maybe anyone can help me! Thank you in advance! Marcel From politzerahless at gmail.com Tue Jun 26 13:23:47 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 26 Jun 2012 19:23:47 +0800 Subject: [FieldTrip] EEG reference Message-ID: Eduardo, Steve Luck's (2005) book *An Introduction to the Event-Related Potentials Method* has a chapter discussing reference methods. If you search the archives of the EEGLAB mailing list there are also many recent discussions (including references) about this issue. I am not personally experienced with spectral analyses, but in general, the online reference you use during the recording does not matter very much, since you can re-calculate the data to any other reference offline. For example, in both labs where I have done experiments, we use various online references but always re-reference to the average of both mastoids during the offline analysis; this is a common procedure, if you want to do that all you need to do is make sure to buy a cap that includes mastoid electrodes. Another common procedure is to use the average reference (see Luck (2005) or the EEGLAB online wiki for detailed discussion about average reference); for that, the most important thing is for the cap to have sufficient electrodes, evenly covering enough of the head. Of course, there are also many other referencing procedures available. Best, Steve Politzer-Ahles > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 25 Jun 2012 12:09:35 -0300 > From: Eduardo Schenberg > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] EEG reference > Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hello all, > > I am new to this list, as I just started ding EEG experiments. I did some > pilot tests with a BrainProducts/Brain Vision with an Acticap and I am > doing some preliminary analysis using EEGLab/fieldtrip. I am now planning > to buy my own EEG form Brain Products, but I am bothered by the fact that > in most cap configs they sell, the reference is near Cz, usually FCz. As > far as my knowledge goes, if I want to study power spectrum alterations and > coherence in different frequencies between different electrodes, a > reference in the head can be a problem, specially if some of the regions of > interest are synchronous with the reference itself in the given frequency > > Can anyone point me to some good review or chapter about these issues so I > can study them better and buy the best config available? > > Many many thanks for all > > eduardo schenberg > > > > > > ------------------------------ > > Message: 2 > Date: Tue, 26 Jun 2012 11:31:32 +0200 > From: Marcel Heers > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Source localization using DICS for EEG data from > combined MEG/EEG recordings > Message-ID: > > > Content-Type: text/plain; charset=ISO-8859-1 > > Dear all, > > I am trying to perform source localization in the frequency domain > from EEG data using DICS. The data were recorded combined with MEG > (Neuromag data format). The volume conductor is a 3 shell realistic > head model created with bemcp. > When running DICS with the following settings > > cfg = []; > cfg.method = 'dics'; > cfg.grad = elec; > cfg.frequency = 14; > cfg.vol = vol_eeg; > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = 5; > source = ft_sourceanalysis(cfg, freq); > > > I am am getting the following error message: > > ??? Error using ==> svd > Input to SVD must not contain NaN or Inf. > > Error in ==> beamformer_dics>pinv at 568 > [U,S,V] = svd(A,0); > > Error in ==> beamformer_dics at 314 > filt = pinv(lf' * invCf * lf) * lf' * invCf; % > Gross eqn. 3, use > PINV/SVD to cover rank deficient leadfield > > Error in ==> ft_sourceanalysis at 584 > dip(i) = beamformer_dics(grid, sens, vol, [], > squeeze(Cf(i,:,:)), optarg{:}); > > > and I am not sure what might be the cause. > > Maybe anyone can help me! Thank you in advance! > > Marcel > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 19, Issue 42 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Tue Jun 26 15:15:31 2012 From: cornabel at googlemail.com (cornelius abel) Date: Tue, 26 Jun 2012 15:15:31 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> References: <4FE46739.7010804@googlemail.com> <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> Message-ID: <4FE9B5F3.3080402@googlemail.com> Here is a workaround: It seems that it works if you copy the functional data from "GrandAVG .avg.avg.pow" to "GrandAVG .avg.pow" prior to interpolation (and then using cfg.parameter='avg.pow'). I posted it to the bugzilla system. Cornelius Am 23.06.2012 22:01, schrieb jan-mathijs schoffelen: > Hi Martin, > > In general, the more info you can provide us with, the more likely it > is that anybody can help you. The problem you sketch is too vague to > even try start giving hints. It would be best if you could provide us > with some detailed error messages to begin with. Even better would be > if you create an account on our bugzilla-website, where you can also > upload a script and some (small) data structure that would allow us to > reproduce the problem. > > Best wishes, > > Jan-Mathijs > > PS: http://bugzilla.fcdonders.nl > > > On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: > >> I have the same Problem. I can plot my LCMV-Beamformer results on an >> anatomy. And I can plot the results of the normalize script. But I >> can't plot the GrandAVG or the Stats results on that anatomy. The >> interpolate function doesn' work. Without anatomy it works just fine. >> >> Any hint? >> >> Thanks, Martin >> >> On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen >> > >> wrote: >> >> Hi Cornelius, >> >> Could it be that the parameter 'avg.avg.pow' does not work? >> >> Best, >> >> JM >> >> On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: >> >>> Dear Fieldtrip list, >>> >>> i successfully beamformed some steady state activity and the >>> sourceplots per subject are looking very nice. >>> As a next step I tried to calculate a grand average using >>> ft_sourcegrandaverage: >>> >>> cfg=[]; >>> cfg.keepindividual='no'; >>> cfg.parameter='avg.pow'; >>> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >>> >>> giving me the following structure: >>> >>> GACont = >>> pos: [3570x3 double] >>> dim: [17 14 15] >>> avg: [1x1 struct] >>> var: [1x1 struct] >>> dimord: 'voxel' >>> inside: [1846x1 double] >>> outside: [1724x1 double] >>> df: [3570x1 double] >>> cfg: [1x1 struct] >>> >>> but interpolating this onto an anatomy always gives me an error: >>> >>> cfg = []; >>> cfg.downsample= 2; >>> cfg.parameter = 'avg.avg.pow'; >>> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >>> >>> /??? Error using ==> interpn at 155/ >>> ///Wrong number of input arguments or some dimension of V is >>> less than 2./ >>> ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ >>> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >>> ///Error in ==> ft_sourceinterpolate at 368/ >>> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), >>> cfg.interpmethod, cfg.feedback);/ >>> >>> however interpolating a single subject source data works just >>> fine... >>> >>> cfg = []; >>> cfg.downsample= 2; >>> cfg.parameter = 'avg.pow'; >>> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >>> >>> >>> What am i doing wrong here, any ideas? >>> >>> >>> >>> Greetings, Cornelius >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.urai.11 at ucl.ac.uk Tue Jun 26 16:00:37 2012 From: a.urai.11 at ucl.ac.uk (Anne Urai) Date: Tue, 26 Jun 2012 15:00:37 +0100 Subject: [FieldTrip] Cluster statistics - WCM Message-ID: When specifying the configuration of clusterstatistic, there are the options 'maxsum', 'max', 'maxsize' and 'wcm'. There seems to be no explanation of the 'wcm' option in the documentation that I can find, except that the option needs an extra cfg.wcm_weight. I am assuming that wcm means weights cluster means, and that the cfg.wcm_weight is used to specify priors about sensors/time/frequencies of interest. However, it is not clear what this cfg.wcm_weight should look like, which dimensions it should have and how the ft_freqstatistics treats those weights. It would be great if anyone could clarify this weighted cluster means. Assuming that I'm looking for effects in the data that might be quite focal in the time-frequency dimensions, would a weighting of ones (so equal weighting for all time and frequency points) pick up more clusters even if they are not very big in the time-frequency space? Thanks for your help! Anne Urai MSc Brain and Mind Sciences Institute of Neurology, University College London 07428392105 anne.urai -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Tue Jun 26 17:03:43 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Tue, 26 Jun 2012 08:03:43 -0700 (PDT) Subject: [FieldTrip] TMSi fieldtrip data collection Message-ID: <1340723023.89313.YahooMailNeo@web160403.mail.bf1.yahoo.com> Dear All, I tried to collect data using TMSI refa and real-time buffer from FieldTrip, did some tests. using ft_realtime_signalviewer,but failed, could you guys please give me some comments or clues? if someone did experiment using TMSi system with fieldtrip, please show me some basic script for data collection using ft_read_data and convert the data to voltage using gain and offset. Any information would be greatly appreciated!Thank you! Jie cfg=[]; figure; ft_realtime_signalviewer(cfg) got such errors. errors: Invalid name for channel 1. Skipping the rest. ??? Error using ==> cell.unique at 47 Input must be a cell array of strings. Error in ==> ft_channelselection at 83 if length(datachannel)~=length(unique(datachannel)) Error in ==> ft_realtime_signalviewer at 75 cfg.channel = ft_channelselection(cfg.channel, hdr.label); Error in ==> test_Buffer_draw at 7 ft_realtime_signalviewer(cfg) -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Tue Jun 26 17:20:07 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Tue, 26 Jun 2012 11:20:07 -0400 Subject: [FieldTrip] EEG reference In-Reply-To: References: Message-ID: NeuroBoludo!! welcome! this is (I think) a book you have to read if you are working in EEG (at least some chapters). It's from Paul Nunez Electric Fields of the Brain: The Neurophysics of EEGIf you need more info about authors, just write me an email. Good to know about you! a big hug! Y On Tue, Jun 26, 2012 at 7:23 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Eduardo, > > Steve Luck's (2005) book *An Introduction to the Event-Related Potentials > Method* has a chapter discussing reference methods. If you search the > archives of the EEGLAB mailing list there are also many recent discussions > (including references) about this issue. > > I am not personally experienced with spectral analyses, but in general, > the online reference you use during the recording does not matter very > much, since you can re-calculate the data to any other reference offline. > For example, in both labs where I have done experiments, we use various > online references but always re-reference to the average of both mastoids > during the offline analysis; this is a common procedure, if you want to do > that all you need to do is make sure to buy a cap that includes mastoid > electrodes. Another common procedure is to use the average reference (see > Luck (2005) or the EEGLAB online wiki for detailed discussion about average > reference); for that, the most important thing is for the cap to have > sufficient electrodes, evenly covering enough of the head. Of course, there > are also many other referencing procedures available. > > Best, > Steve Politzer-Ahles > > >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Mon, 25 Jun 2012 12:09:35 -0300 >> From: Eduardo Schenberg >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] EEG reference >> Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC at gmail.com> >> Content-Type: text/plain; charset=us-ascii >> >> >> Hello all, >> >> I am new to this list, as I just started ding EEG experiments. I did some >> pilot tests with a BrainProducts/Brain Vision with an Acticap and I am >> doing some preliminary analysis using EEGLab/fieldtrip. I am now planning >> to buy my own EEG form Brain Products, but I am bothered by the fact that >> in most cap configs they sell, the reference is near Cz, usually FCz. As >> far as my knowledge goes, if I want to study power spectrum alterations and >> coherence in different frequencies between different electrodes, a >> reference in the head can be a problem, specially if some of the regions of >> interest are synchronous with the reference itself in the given frequency >> >> Can anyone point me to some good review or chapter about these issues so >> I can study them better and buy the best config available? >> >> Many many thanks for all >> >> eduardo schenberg >> >> >> >> >> >> ------------------------------ >> >> Message: 2 >> Date: Tue, 26 Jun 2012 11:31:32 +0200 >> From: Marcel Heers >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] Source localization using DICS for EEG data from >> combined MEG/EEG recordings >> Message-ID: >> > xNecrA at mail.gmail.com> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> Dear all, >> >> I am trying to perform source localization in the frequency domain >> from EEG data using DICS. The data were recorded combined with MEG >> (Neuromag data format). The volume conductor is a 3 shell realistic >> head model created with bemcp. >> When running DICS with the following settings >> >> cfg = []; >> cfg.method = 'dics'; >> cfg.grad = elec; >> cfg.frequency = 14; >> cfg.vol = vol_eeg; >> cfg.dics.projectnoise = 'yes'; >> cfg.dics.lambda = 5; >> source = ft_sourceanalysis(cfg, freq); >> >> >> I am am getting the following error message: >> >> ??? Error using ==> svd >> Input to SVD must not contain NaN or Inf. >> >> Error in ==> beamformer_dics>pinv at 568 >> [U,S,V] = svd(A,0); >> >> Error in ==> beamformer_dics at 314 >> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use >> PINV/SVD to cover rank deficient leadfield >> >> Error in ==> ft_sourceanalysis at 584 >> dip(i) = beamformer_dics(grid, sens, vol, [], >> squeeze(Cf(i,:,:)), optarg{:}); >> >> >> and I am not sure what might be the cause. >> >> Maybe anyone can help me! Thank you in advance! >> >> Marcel >> >> >> ------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 19, Issue 42 >> ***************************************** >> > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Tue Jun 26 17:41:15 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Tue, 26 Jun 2012 17:41:15 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <4FE9B5F3.3080402@googlemail.com> References: <4FE46739.7010804@googlemail.com> <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> <4FE9B5F3.3080402@googlemail.com> Message-ID: i will try that, thank you very very much! On Tue, Jun 26, 2012 at 3:15 PM, cornelius abel wrote: > Here is a workaround: > It seems that it works if you copy the functional data from "GrandAVG > .avg.avg.pow" to "GrandAVG .avg.pow" prior to interpolation (and then using > cfg.parameter='avg.pow'). > > I posted it to the bugzilla system. > > Cornelius > > Am 23.06.2012 22:01, schrieb jan-mathijs schoffelen: > >> Hi Martin, >> >> In general, the more info you can provide us with, the more likely it is >> that anybody can help you. The problem you sketch is too vague to even try >> start giving hints. It would be best if you could provide us with some >> detailed error messages to begin with. Even better would be if you create >> an account on our bugzilla-website, where you can also upload a script and >> some (small) data structure that would allow us to reproduce the problem. >> >> Best wishes, >> >> Jan-Mathijs >> >> PS: http://bugzilla.fcdonders.nl >> >> >> On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: >> >> I have the same Problem. I can plot my LCMV-Beamformer results on an >>> anatomy. And I can plot the results of the normalize script. But I can't >>> plot the GrandAVG or the Stats results on that anatomy. The interpolate >>> function doesn' work. Without anatomy it works just fine. >>> >>> Any hint? >>> >>> Thanks, Martin >>> >>> On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen < >>> jan.schoffelen at donders.ru.nl >> >>> wrote: >>> >>> Hi Cornelius, >>> >>> Could it be that the parameter 'avg.avg.pow' does not work? >>> >>> Best, >>> >>> JM >>> >>> On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: >>> >>> Dear Fieldtrip list, >>>> >>>> i successfully beamformed some steady state activity and the >>>> sourceplots per subject are looking very nice. >>>> As a next step I tried to calculate a grand average using >>>> ft_sourcegrandaverage: >>>> >>>> cfg=[]; >>>> cfg.keepindividual='no'; >>>> cfg.parameter='avg.pow'; >>>> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >>>> >>>> giving me the following structure: >>>> >>>> GACont = >>>> pos: [3570x3 double] >>>> dim: [17 14 15] >>>> avg: [1x1 struct] >>>> var: [1x1 struct] >>>> dimord: 'voxel' >>>> inside: [1846x1 double] >>>> outside: [1724x1 double] >>>> df: [3570x1 double] >>>> cfg: [1x1 struct] >>>> >>>> but interpolating this onto an anatomy always gives me an error: >>>> >>>> cfg = []; >>>> cfg.downsample= 2; >>>> cfg.parameter = 'avg.avg.pow'; >>>> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >>>> >>>> /??? Error using ==> interpn at 155/ >>>> ///Wrong number of input arguments or some dimension of V is >>>> less than 2./ >>>> ///Error in ==> ft_sourceinterpolate>my_**interpn at 464/ >>>> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >>>> ///Error in ==> ft_sourceinterpolate at 368/ >>>> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), >>>> cfg.interpmethod, cfg.feedback);/ >>>> >>>> however interpolating a single subject source data works just >>>> fine... >>>> >>>> cfg = []; >>>> cfg.downsample= 2; >>>> cfg.parameter = 'avg.pow'; >>>> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >>>> >>>> >>>> What am i doing wrong here, any ideas? >>>> >>>> >>>> >>>> Greetings, Cornelius >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> > >>> Telephone: +31-24-3614793 >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> > >> >> Telephone: +31-24-3614793 >> >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From silvia.pagano at unitn.it Tue Jun 26 18:04:15 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Tue, 26 Jun 2012 18:04:15 +0200 Subject: [FieldTrip] multitaper and NaN Message-ID: Dear list subscribers, I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. Here's what I did following the tutorial: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4*cfg.foi; cfg.toi = -1.1:0.02:0.1; cfg.pad = 'maxperlen'; TFRmult = ft_freqanalysis(cfg, data); Does anyone have a clue on this? Thank you very much Silvia -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From conrado.bosman at gmail.com Tue Jun 26 18:41:46 2012 From: conrado.bosman at gmail.com (Conrado Bosman) Date: Tue, 26 Jun 2012 18:41:46 +0200 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Dear Silvia, The cfg.t_ftimwin parameter sets your current windows of analysis. In your actual configuration, you are using a pretty much similar wavelet approach in which your time window changes according to the frequency increase. Then your first time window is 5/2 = 2.5 sec which is bigger than your actual trial length (1.2 sec). Thats the reason why you get only NaNs in your low-frequency analyses and also a boundary of NaNs in the subsequent analyses. It is recommended to use in case of lower frequencies just one taper approach, unless you have several seconds of signal to analyze. Reading carefully, the Gould et al. suggestion goes in that direction. They said that they're using a .5 s window Ther (Rayleigh) frequency of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely what they described. So,according to this, I suggest you to use the following parameters: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; numfoi = length(cfg.foi) cfg.timwin = ones(1,numfoi).*0.5; cfg.tapsmofrq = ones(1,numfoi).*2; cfg.taper = 'hanning'; Best, Conrado On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > Dear list subscribers, > > I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) > > I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. > > Here's what I did following the tutorial: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = 5./cfg.foi; > cfg.tapsmofrq = 0.4*cfg.foi; > cfg.toi = -1.1:0.02:0.1; > cfg.pad = 'maxperlen'; > TFRmult = ft_freqanalysis(cfg, data); > > > Does anyone have a clue on this? > > > Thank you very much > > Silvia > -- > __________________________________ > > Silvia Pagano PhD student > CIMeC - Center for Mind/Brain Science > Corso Bettini, 31 38068 Rovereto (TN) > Tel. +39 0464 808709 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From inieuwenhuis at berkeley.edu Tue Jun 26 18:43:10 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Tue, 26 Jun 2012 09:43:10 -0700 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: <4FE9E69E.4050302@berkeley.edu> Hi Silvia, Also see here: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_contain_nans good luck, Ingrid On 6/26/2012 9:41 AM, Conrado Bosman wrote: > Dear Silvia, > > The cfg.t_ftimwin parameter sets your current windows of analysis. In your actual configuration, you are using a pretty much similar wavelet approach in which your time window changes according to the frequency increase. Then your first time window is 5/2 = 2.5 sec which is bigger than your actual trial length (1.2 sec). Thats the reason why you get only NaNs in your low-frequency analyses and also a boundary of NaNs in the subsequent analyses. > It is recommended to use in case of lower frequencies just one taper approach, unless you have several seconds of signal to analyze. Reading carefully, the Gould et al. suggestion goes in that direction. They said that they're using a .5 s window Ther (Rayleigh) frequency of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely what they described. So,according to this, I suggest you to use the following parameters: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > numfoi = length(cfg.foi) > cfg.timwin = ones(1,numfoi).*0.5; > cfg.tapsmofrq = ones(1,numfoi).*2; > cfg.taper = 'hanning'; > > Best, > Conrado > > > On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > >> Dear list subscribers, >> >> I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on >> all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) >> >> I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. >> >> Here's what I did following the tutorial: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = 'EEG'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 2:2:30; >> cfg.t_ftimwin = 5./cfg.foi; >> cfg.tapsmofrq = 0.4*cfg.foi; >> cfg.toi = -1.1:0.02:0.1; >> cfg.pad = 'maxperlen'; >> TFRmult = ft_freqanalysis(cfg, data); >> >> >> Does anyone have a clue on this? >> >> >> Thank you very much >> >> Silvia >> -- >> __________________________________ >> >> Silvia Pagano PhD student >> CIMeC - Center for Mind/Brain Science >> Corso Bettini, 31 38068 Rovereto (TN) >> Tel. +39 0464 808709 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 From rmontefusco at med.uchile.cl Tue Jun 26 18:49:52 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Tue, 26 Jun 2012 12:49:52 -0400 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Hi Silvia, As I see in your config, you are using 5 cycles per frequency (cfg.t_ftimwin = 5./cfg.foi;), that means that for 2 Hz you need at least 500ms * 5 = 2.5 secs epochs to resolve that frequency. 1.- you can try with longer epochs...(eg 5 secs) 2.- using less cycles per freq. please someone correct me if I'm wrong cheers Y On Tue, Jun 26, 2012 at 12:04 PM, Silvia Pagano wrote: > Dear list subscribers, > > I am an ERPer looking for the first time into the world of time-frequency > analysis. I am trying to perform some multitaper analysis on a data set. > Ideally I would like to perform similar analysis as described in a paper by > Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words > "Time-frequency analysis was performed on > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms > temporal smoothing window, 2-Hz frequency resolution)" ) > > I have epochs from -1100 ms to 100 time locked to the stimulus onset and I > am trying to replicate the analysis they did. The problem is that I got > boundary effects on all my conditions, namely I obtain NaN in the extreme > 100 ms of the time window for all frequencies and for very low frequencies > (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time > windows large enough to avoid boundary effects, however there must be > something I am missing in my code. > > Here's what I did following the tutorial: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = 5./cfg.foi; > cfg.tapsmofrq = 0.4*cfg.foi; > cfg.toi = -1.1:0.02:0.1; > cfg.pad = 'maxperlen'; > TFRmult = ft_freqanalysis(cfg, data); > > > Does anyone have a clue on this? > > > Thank you very much > > Silvia > -- > __________________________________ > > Silvia Pagano PhD student > CIMeC - Center for Mind/Brain Science > Corso Bettini, 31 38068 Rovereto (TN) > Tel. +39 0464 808709 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Tue Jun 26 19:29:02 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 26 Jun 2012 12:29:02 -0500 Subject: [FieldTrip] cfg.bandwidth field missing Message-ID: Hello, I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. cfg = []; cfg.method = 'psi'; psi = ft_connectivityanalysis(cfg, freq); selection fourierspctrm along dimension 2 averaging crsspctrm over rpt removing dimension rpt from crsspctrm Reference to non-existent field 'bandwidth'. Error in ft_connectivityanalysis (line 719) nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1; -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Tue Jun 26 19:36:44 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 26 Jun 2012 12:36:44 -0500 Subject: [FieldTrip] resend: missing cfg.bandwidth field Message-ID: Hello, Apologies for the double email. I sent the previous one without finishing. I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. I don't find the bandwidth field to be output in any of the ft_freqanalysis functions. Is it simply the foi/some smoothing amount? *cfg = [];* *cfg.method = 'psi';* *psi = ft_connectivityanalysis(cfg, freq);* * * *selection fourierspctrm along dimension 2* *averaging crsspctrm over rpt* *removing dimension rpt from crsspctrm* *Reference to non-existent field 'bandwidth'.* * * *Error in ft_connectivityanalysis (line 719)* * nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1;* * * * * *freq was computed with the following:* * * *cfg = [];* *cfg.channel = chans; %{'MEG', '-A41','-A71'};* *cfg.channelcmb = chancmb;* *cfg.method = 'mtmconvol';* *cfg.output = 'fourier';* *cfg.keeptrials = 'yes';* *cfg.foi = band(1):band(2); %8:12Hz* *cfg.toi = 1.8:0.01:3.0;* *cfg.t_ftimwin = 5./cfg.foi;* *cfg.taper = 'hanning';* * * *freq = ft_freqanalysis(cfg, data);* * * * * * * Thanks you, Karl Doron, phd UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 26 20:14:25 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 26 Jun 2012 20:14:25 +0200 Subject: [FieldTrip] resend: missing cfg.bandwidth field In-Reply-To: References: Message-ID: Hi Karl, Just check the original paper: the bandwidth is a required parameter for the thing to be computed in the first place, because the metric is computed by integrating over a specified frequency band. You as a user should specify it; and even more so, the value is up to you ;-). JM On Jun 26, 2012, at 7:36 PM, Karl Doron wrote: > Hello, > > Apologies for the double email. I sent the previous one without finishing. > > I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. I don't find the bandwidth field to be output in any of the ft_freqanalysis functions. Is it simply the foi/some smoothing amount? > > cfg = []; > cfg.method = 'psi'; > psi = ft_connectivityanalysis(cfg, freq); > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Reference to non-existent field 'bandwidth'. > > Error in ft_connectivityanalysis (line 719) > nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1; > > > freq was computed with the following: > > cfg = []; > cfg.channel = chans; %{'MEG', '-A41','-A71'}; > cfg.channelcmb = chancmb; > cfg.method = 'mtmconvol'; > cfg.output = 'fourier'; > cfg.keeptrials = 'yes'; > cfg.foi = band(1):band(2); %8:12Hz > cfg.toi = 1.8:0.01:3.0; > cfg.t_ftimwin = 5./cfg.foi; > cfg.taper = 'hanning'; > > freq = ft_freqanalysis(cfg, data); > > > > Thanks you, > > Karl Doron, phd > UC, Santa Barbara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Wed Jun 27 09:03:48 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Wed, 27 Jun 2012 09:03:48 +0200 (CEST) Subject: [FieldTrip] multitaper and NaN In-Reply-To: Message-ID: <1215816663.779368.1340780628381.JavaMail.root@sculptor.zimbra.ru.nl> Dear Sylvia, If you want to keep the settings even more similar to Gould et al, you should set the cfg.foi to: cfg.foi=2:0.5:30 which corresponds to the 0.5 Hz steps. You have to keep in mind though that since your frequency resolution is actually 2Hz (as follows from the 500ms time window you put in), smaller steps than that (such as the 0.5 Hz steps I put in here) gives you redundant information. See also the tutorial at http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis. Best, Stan ----- Oorspronkelijk bericht ----- > Van: "Conrado Bosman" > Aan: "FieldTrip discussion list" > Verzonden: Dinsdag 26 juni 2012 18:41:46 > Onderwerp: Re: [FieldTrip] multitaper and NaN > Dear Silvia, > > The cfg.t_ftimwin parameter sets your current windows of analysis. In > your actual configuration, you are using a pretty much similar wavelet > approach in which your time window changes according to the frequency > increase. Then your first time window is 5/2 = 2.5 sec which is bigger > than your actual trial length (1.2 sec). Thats the reason why you get > only NaNs in your low-frequency analyses and also a boundary of NaNs > in the subsequent analyses. > It is recommended to use in case of lower frequencies just one taper > approach, unless you have several seconds of signal to analyze. > Reading carefully, the Gould et al. suggestion goes in that direction. > They said that they're using a .5 s window Ther (Rayleigh) frequency > of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely > what they described. So,according to this, I suggest you to use the > following parameters: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > numfoi = length(cfg.foi) > cfg.timwin = ones(1,numfoi).*0.5; > cfg.tapsmofrq = ones(1,numfoi).*2; > cfg.taper = 'hanning'; > > Best, > Conrado > > > On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > > > Dear list subscribers, > > > > I am an ERPer looking for the first time into the world of > > time-frequency analysis. I am trying to perform some multitaper > > analysis on a data set. Ideally I would like to perform similar > > analysis as described in a paper by Gould et al (2011) on Journal of > > Neurophysiology. (i.e. in their own words "Time-frequency analysis > > was performed on > > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, > > 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) > > > > I have epochs from -1100 ms to 100 time locked to the stimulus onset > > and I am trying to replicate the analysis they did. The problem is > > that I got boundary effects on all my conditions, namely I obtain > > NaN in the extreme 100 ms of the time window for all frequencies and > > for very low frequencies (e.g. 2-4Hz) I have no data in the whole > > time window. I thought I had time windows large enough to avoid > > boundary effects, however there must be something I am missing in my > > code. > > > > Here's what I did following the tutorial: > > > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = 'EEG'; > > cfg.method = 'mtmconvol'; > > cfg.foi = 2:2:30; > > cfg.t_ftimwin = 5./cfg.foi; > > cfg.tapsmofrq = 0.4*cfg.foi; > > cfg.toi = -1.1:0.02:0.1; > > cfg.pad = 'maxperlen'; > > TFRmult = ft_freqanalysis(cfg, data); > > > > > > Does anyone have a clue on this? > > > > > > Thank you very much > > > > Silvia > > -- > > __________________________________ > > > > Silvia Pagano PhD student > > CIMeC - Center for Mind/Brain Science > > Corso Bettini, 31 38068 Rovereto (TN) > > Tel. +39 0464 808709 > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 From silvia.pagano at unitn.it Wed Jun 27 09:26:52 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Wed, 27 Jun 2012 09:26:52 +0200 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Hi all, thank you a lot for your suggestions. The thing that was not clear to me was the parameter that expresses Raleigh frequency in Fieldtrip. Now it makes much more sense. Thanks again, I will try with your suggestions and see what happens Cheers Silvia On Tue, Jun 26, 2012 at 6:49 PM, Rodrigo Montefusco < rmontefusco at med.uchile.cl> wrote: > Hi Silvia, > > As I see in your config, you are using 5 cycles per frequency > (cfg.t_ftimwin = 5./cfg.foi;), that means that for 2 Hz you need at least > 500ms * 5 = 2.5 secs epochs to resolve that frequency. > 1.- you can try with longer epochs...(eg 5 secs) > 2.- using less cycles per freq. > > please someone correct me if I'm wrong > > cheers > > Y > > On Tue, Jun 26, 2012 at 12:04 PM, Silvia Pagano wrote: > >> Dear list subscribers, >> >> I am an ERPer looking for the first time into the world of time-frequency >> analysis. I am trying to perform some multitaper analysis on a data set. >> Ideally I would like to perform similar analysis as described in a paper by >> Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words >> "Time-frequency analysis was performed on >> all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms >> temporal smoothing window, 2-Hz frequency resolution)" ) >> >> I have epochs from -1100 ms to 100 time locked to the stimulus onset and >> I am trying to replicate the analysis they did. The problem is that I got >> boundary effects on all my conditions, namely I obtain NaN in the extreme >> 100 ms of the time window for all frequencies and for very low frequencies >> (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time >> windows large enough to avoid boundary effects, however there must be >> something I am missing in my code. >> >> Here's what I did following the tutorial: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = 'EEG'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 2:2:30; >> cfg.t_ftimwin = 5./cfg.foi; >> cfg.tapsmofrq = 0.4*cfg.foi; >> cfg.toi = -1.1:0.02:0.1; >> cfg.pad = 'maxperlen'; >> TFRmult = ft_freqanalysis(cfg, data); >> >> >> Does anyone have a clue on this? >> >> >> Thank you very much >> >> Silvia >> -- >> __________________________________ >> >> Silvia Pagano PhD student >> CIMeC - Center for Mind/Brain Science >> Corso Bettini, 31 38068 Rovereto (TN) >> Tel. +39 0464 808709 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From silvia.pagano at unitn.it Wed Jun 27 09:35:12 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Wed, 27 Jun 2012 09:35:12 +0200 Subject: [FieldTrip] Fwd: FW: multitaper and NaN In-Reply-To: References: Message-ID: Hi all, Ian Gould, the author of the paper I cited in my previous mail, also replied to me. He kindly asked me to post his reply on the mailing list. Thanks again for your help Silvia ---------- Forwarded message ---------- From: Ian Gould Date: Tue, Jun 26, 2012 at 6:57 PM Subject: FW: [FieldTrip] multitaper and NaN To: "Pagano, Silvia" Hi Silvia, Although I'm not subscribed to it at the moment, a friend of mine monitors the field trip email list and forwarded your question to me. The boundary effects you are talking about occur because oscillatory signals have to be computed over a time window. The time window width is specified for each frequency you are analysing in cfg.t_ftimwin, and is centred on the time point you are trying to compute power at. So, if the half-width of the window is greater than the distance from a time point to the edge of your data, field trip will not be able to compute power at that frequency. The solution to this is to (1) use a shorter time window, and/or (2) calculate data over longer epochs so the boundary effect doesn't affect the time points you are interested in. In the code you posted, the time window varies with frequency, unlike the fixed window we used in our JNeurophys paper. Your missing data at lower frequencies are explained by this. For example, you'd need 2.5s of data to estimate power at 2Hz with your settings. To get 500ms smoothing you could use: cfg.t_ftimwin = 0.5 *ones(1,length(cfg.foi)); Similarly, for 2Hz smoothing you'd want something like: cfg.tapsmofrq = 2*ones(1,length(cfg.foi)); Finally, for 50ms steps you'd want: cfg.toi = -1.1:0.05:0.1; Hope that helps. Let me know if any other questions. Also, could you please post this to the list on my behalf, so others know that your question has been answered. Kind Regards, Ian From: Andre Cravo Date: Tuesday, 26 June 2012 17:11 To: Ian Gould , "ian.gould at merton.ox.ac.uk" < ian.gould at merton.ox.ac.uk> Subject: Fwd: [FieldTrip] multitaper and NaN Hello Ian, How are you? I hope all is well. I'm pretty sure you get fieldtrip emails, but I saw this one and thought you might like to give a help. Cheers Andre ---------- Forwarded message ---------- From: Silvia Pagano Date: 26 June 2012 13:04 Subject: [FieldTrip] multitaper and NaN To: fieldtrip at science.ru.nl Dear list subscribers, I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. Here's what I did following the tutorial: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4*cfg.foi; cfg.toi = -1.1:0.02:0.1; cfg.pad = 'maxperlen'; TFRmult = ft_freqanalysis(cfg, data); Does anyone have a clue on this? Thank you very much Silvia -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andre M. Cravo Postdoctoral Researcher University of Sao Paulo-Brazil -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From acorneyllie at olfac.univ-lyon1.fr Wed Jun 27 10:38:03 2012 From: acorneyllie at olfac.univ-lyon1.fr (acorneyllie at olfac.univ-lyon1.fr) Date: Wed, 27 Jun 2012 10:38:03 +0200 (CEST) Subject: [FieldTrip] help about Fieldtrip Multivariate Module Message-ID: <4850ff08aa0483a2cd3bc77e5ad6157d.squirrel@olfac.univ-lyon1.fr> Dear all, I'm starting to use fieldtrip to analyse EEG data : I would like to select channels and extract representative features of 18 cognitive tasks. The signal comes from a 96ch brain product system. To begin, I made the anlysis offline. Using the tutorial, I had imported, rereferenced and preprocessed the data (find the good layout, extract trials, remove artifacts,..) and made some first analysis using the toolbox. (pca, time frequency representation, average spectrum over trials and subjects,..). (By the way, the fieldtrip toolbox is brilliant) I'm really interested on using the FieldTrip Multivariate Module but I'm having difficulties to get started. Is there an usage example ? My data (after preprocessing) are organized, for each subject, on a structure of 18 stuctures (one for each task) each corresponding to the output of ft_preprocessing. I also get the same organization for the spectral corresponding values. Do you think it's a good way to process ? Feel free to ask me more details or give advices. Thanks for your implication, Best, Alexandra Corneyllie CAP engineer team CNRS UMR5292 - INSERM U1028 Lyon Neuroscience Research Center CRNL Phone + 33 04.37.28.74.90 From jarang.hahm at gmail.com Wed Jun 27 13:00:07 2012 From: jarang.hahm at gmail.com (Jarang Hahm) Date: Wed, 27 Jun 2012 20:00:07 +0900 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Dear Hanneke, Thanks to you, I properly found neighbours. :-) And I confirmed it by plotting the neighbours. To do this, I modified a code 'ft_plotneighbours' for correcting a mismatch between the channel position and label. You also probably need this code, so I have attatched what I modified. :-) Thanks! Best, Jarang Hahm On Mon, Jun 25, 2012 at 6:01 PM, Hanneke van Dijk < Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > Dear Jarang, > > Coincidentily I have been working on the same problem a few weeks ago. > > First of all you should take care that you repair a horizontal gradiometer > with neighbouring horizontal gradiometers and vertical ones with vertical > ones. This is not built into fieldtrip yet. > > I have have made a partial fix, which works with the 'layout' option but > not with the 'grad' method. I have attached the function I addapted from > Fieldtrip, and the layout files that seperatly name the different > gradiometers (made by Elisabeth May ;-) ) > > I hope it somehow helps you! > > Best regards, > > Hanneke van Dijk > > ________________________________________________________________ > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: > >> Dear FieldTrip user. >> >> >> >> Hi, I'm processing MEG data of Neuromag 306 system after removing some >> bad channels using fieldtrip-20120620 toolbox. >> >> >> >> To repair the bad channels with its neighbours, I firstly found the >> neighbor of all channel based on distance using 'ft_prepare_neighbours'. >> >> However, the outcome of neighbour was far more than default distance, >> 4cm, from a target channel. >> >> So, I checked thoroughly the code 'ft_prepare_neighbours', finding it >> used information of channel label and position from data’s hdr.grad to find >> neighbour of the target. >> >> >> >> The problem is channel label and position in hdr.grad are arranged >> differently. >> >> As far as I found, both information come from different source: the >> channel label was from code 'fiff_read_meas_info', while the channel >> position was from ‘channelposition’ in 'ft_datatype_sens'. >> >> And the channel label is sorted into the sensor location, e. g. MEG >> 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is >> arranged along the sensor type (magnetometer and gradiometer) according to >> its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., >> MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. >> >> Thus, the label and position of channel in hdr.grad were mismatched so >> that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. >> >> >> It should be matched correctly to find the proper neighbour and ensure >> the result of repair as well. >> >> In fact, the code 'channelposition' in 'ft_datatype_sens' yield the >> channel label as well as the channel position. It might help to solve this >> problem. >> >> >> >> Is there any other way to solve this problem? >> >> >> >> >> Best, >> >> >> Jarang Hahm >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- 함자랑 드림. Jarang Hahm Interdisciplinary Program in Cognitive Science Seoul National University Seoul, Korea, Republic of. +82-10-9079-3121 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neuromag_neighbourplot.m Type: application/octet-stream Size: 7578 bytes Desc: not available URL: From hanneke.p.van.dijk at gmail.com Wed Jun 27 13:04:36 2012 From: hanneke.p.van.dijk at gmail.com (Hanneke van Dijk) Date: Wed, 27 Jun 2012 13:04:36 +0200 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Hi Jarang, Thanks for the code! I'm happy I could help you! Best, Hanneke Op 27 jun. 2012 13:00 schreef "Jarang Hahm" het volgende: > Dear Hanneke, > > > Thanks to you, I properly found neighbours. :-) > > And I confirmed it by plotting the neighbours. To do this, I modified a > code 'ft_plotneighbours' for correcting a mismatch between the channel > position and label. > > You also probably need this code, so I have attatched what I modified. :-) > > > Thanks! > > > Best, > > > Jarang Hahm > > > On Mon, Jun 25, 2012 at 6:01 PM, Hanneke van Dijk < > Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > >> Dear Jarang, >> >> Coincidentily I have been working on the same problem a few weeks ago. >> >> First of all you should take care that you repair a horizontal >> gradiometer with neighbouring horizontal gradiometers and vertical ones >> with vertical ones. This is not built into fieldtrip yet. >> >> I have have made a partial fix, which works with the 'layout' option but >> not with the 'grad' method. I have attached the function I addapted from >> Fieldtrip, and the layout files that seperatly name the different >> gradiometers (made by Elisabeth May ;-) ) >> >> I hope it somehow helps you! >> >> Best regards, >> >> Hanneke van Dijk >> >> ________________________________________________________________ >> >> >> Hanneke van Dijk, PhD >> >> >> http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html >> >> Institute for Clinical Neuroscience, >> >> Heinrich Heine Universität Düsseldorf, Germany >> >> Hanneke.vanDijk at med.uni-duesseldorf.de >> >> Tel. +49 (0) 211 81 13074 >> >> __________________________________________ >> >> >> On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: >> >>> Dear FieldTrip user. >>> >>> >>> >>> Hi, I'm processing MEG data of Neuromag 306 system after removing some >>> bad channels using fieldtrip-20120620 toolbox. >>> >>> >>> >>> To repair the bad channels with its neighbours, I firstly found the >>> neighbor of all channel based on distance using 'ft_prepare_neighbours'. >>> >>> However, the outcome of neighbour was far more than default distance, >>> 4cm, from a target channel. >>> >>> So, I checked thoroughly the code 'ft_prepare_neighbours', finding it >>> used information of channel label and position from data’s hdr.grad to find >>> neighbour of the target. >>> >>> >>> >>> The problem is channel label and position in hdr.grad are arranged >>> differently. >>> >>> As far as I found, both information come from different source: the >>> channel label was from code 'fiff_read_meas_info', while the channel >>> position was from ‘channelposition’ in 'ft_datatype_sens'. >>> >>> And the channel label is sorted into the sensor location, e. g. MEG >>> 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is >>> arranged along the sensor type (magnetometer and gradiometer) according to >>> its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., >>> MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. >>> >>> Thus, the label and position of channel in hdr.grad were mismatched so >>> that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. >>> >>> >>> It should be matched correctly to find the proper neighbour and ensure >>> the result of repair as well. >>> >>> In fact, the code 'channelposition' in 'ft_datatype_sens' yield the >>> channel label as well as the channel position. It might help to solve this >>> problem. >>> >>> >>> >>> Is there any other way to solve this problem? >>> >>> >>> >>> >>> Best, >>> >>> >>> Jarang Hahm >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > 함자랑 드림. > > Jarang Hahm > > Interdisciplinary Program in Cognitive Science > Seoul National University > Seoul, Korea, Republic of. > +82-10-9079-3121 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaveh.manshaei at googlemail.com Wed Jun 27 13:13:29 2012 From: kaveh.manshaei at googlemail.com (kaveh manshaei) Date: Wed, 27 Jun 2012 13:13:29 +0200 Subject: [FieldTrip] Merging files and speeding up Message-ID: Hi all I have 3 blocks for each patient in my experiment and there are separately header , marker and dat file for each of them! I would like to merge these files together and generate one header and one dat and one marker file for each patient! Is it possible in fieldtrip or you know the other way around? Thanks in advance Kaveh -------------- next part -------------- An HTML attachment was scrubbed... URL: From philipp.hintze at uni-muenster.de Wed Jun 27 15:30:42 2012 From: philipp.hintze at uni-muenster.de (Philipp Hintze) Date: Wed, 27 Jun 2012 15:30:42 +0200 (CEST) Subject: [FieldTrip] Questions on High pass and Dft filtering Message-ID: Dear mailing list members, I continue to run into errors during my first FieldTrip analysis: I would like to use a high pass filter on my data prior to the segmentation into trials, the reason being that the trial duration is ~900 ms and I would like to filter low frequencies. The continuous data set is 900 seconds long. Simply using cfg.continuous = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.1; filteredContinuousData = ft_preprocessing(cfg); as my first run of preprocessing, I am confronted with an error stating Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff frequency or a different type/order of filter. How can I avoid this? Another problem I have concernes the line noise filtering. I would like to use the dft filter to get rid of the line noise. Using it on the segmented trials, I still notice residual 50 Hz noise, despite using cfg.padding = 10. A combination of the dft filter and a band stop filter using cfg.bsfreq = [49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of the line noise. The problem I have concerns the order of the filtering steps: I would like to use the high pass filter described above, given it works, on the continuous data. If I use the dft filter on the continuous data set, there is no effect on the averaged trials. Is this trivial or is there a mistake on my part? However, I can hardly use the dft filter on data that was preprocessed as continuous and than segmented using ft_redefinetrial, because I can not set any filter padding (because the data is not read from the dataset). Is there something I am overlooking or doing wrong or has someone used a different approach to a similar problem? Thank you in advance for your time and effort, Philipp From caspervanheck at gmail.com Wed Jun 27 15:34:11 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 27 Jun 2012 15:34:11 +0200 Subject: [FieldTrip] Merging files and speeding up In-Reply-To: References: Message-ID: Kaveh, 'ft_appenddata ' can combine data from separate files into one datafile with a single command: data = ft_appenddata(cfg,data1,data2,data3) If you want to save it as a brainvision datafile, the funcion 'ft_write_data' should come in handy. Its use is explained on the page 'How can I convert one dataformat into an other '. Good luck, Casper On Wed, Jun 27, 2012 at 1:13 PM, kaveh manshaei < kaveh.manshaei at googlemail.com> wrote: > Hi all > > I have 3 blocks for each patient in my experiment and there are separately > header , marker and dat file for each of them! I would like to merge these > files together and generate one header and one dat and one marker file for > each patient! Is it possible in fieldtrip or you know the other way around? > > Thanks in advance > Kaveh > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Wed Jun 27 17:26:24 2012 From: cornabel at googlemail.com (cornelius abel) Date: Wed, 27 Jun 2012 17:26:24 +0200 Subject: [FieldTrip] reverse source interpolate? Message-ID: <4FEB2620.3050505@googlemail.com> Hello, does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. I tried to get the position by applying the inverse transformation matrix of the used anatomy like: pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); but that did not give usefull results :( Any ideas how it could be done? Greetings, Cornelius From jan.schoffelen at donders.ru.nl Wed Jun 27 18:27:16 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 27 Jun 2012 18:27:16 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: <4FEB2620.3050505@googlemail.com> References: <4FEB2620.3050505@googlemail.com> Message-ID: Hi Cornelius, There is no need to 'uninterpolate' because the coordinates are already expressed in the correct coordinate system. What you probably want is to find the index to the voxel in the original source-structure closest to your 'hotspot' in the interpolated image. This can be achieved by something like this: write down the coordinates of your favourite position in the interpolated image (in world coordinates, here I assume that you are still in MEG coordinate system and have not normalized to MNI space), call this pos pos = pos./10 (from mm to cm) dpos = source.pos - repmat(pos, size(source.pos,1),1); [m,ind] = min(sum(dpos.^2,2)); source is the original source structure. ind is the index you are looking for. If you have interpolate to the MNI-template grid you need to replace the source.pos with the set of grid positions from your template grid (i.e. expressed in MNI coordinates). Cheers, JM On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > Hello, > > does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. > In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. > > I tried to get the position by applying the inverse transformation matrix of the used anatomy like: > pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); > > but that did not give usefull results :( > > Any ideas how it could be done? > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 28 09:00:52 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 28 Jun 2012 09:00:52 +0200 Subject: [FieldTrip] MEG BTI reading problems References: <539a5a71329ed45a4f4e76b8c52236e7.squirrel@neuro2.med.uni-magdeburg.de> Message-ID: Dear Sascha, I am forwarding this e-mail to the list because many brains know more than one... I do not exactly recall whether this problem was solved in the end. The error you get seems a pretty low level one, but I am not sure whether this is caused by the operating system, or by an old version of MATLAB. What version of matlab are you using? Apparently, your version of fseek (which is a built-in matlab function) does not support int32 as input class. I have never encountered this problem, nor on Linux, MacOS or Windows. You could try to do the following: change fseek(fid, nbytes2, ... into fseek(fid, double(nbytes2), ...)? If this works we know where to find the solution to the problem. With best wishes, Jan-Mathijs Begin forwarded message: > From: styll at med.ovgu.de > Date: June 27, 2012 3:14:42 PM GMT+02:00 > To: jan.schoffelen at donders.ru.nl > Subject: MEG BTI reading problems > > Hi Jan, > > I have read your conversation with Mehmet in the field trip mailing list > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-March/003599.html). > Unfortunately he sends no feedback whether he has solved his problem, > because I have the same problem. > > I am using a windows machine (32bit) and the newest fieldtrip version from > 06/25/2012. > Whenever I try to read the raw data as suggested in the description of the > field trip homepage (hdr = ft_read_header('c,rfDC')) I getting the > following error. > > ?? Error using ==> fseek > Offset must be of class double. > > Error in ==> fileio\private\read_4d_hdr at 185 > fseek(fid, nbytes2 - 32, 'cof'); > > Error in ==> ft_read_header at 153 > orig = read_4d_hdr(datafile); > > > Maybe you can help me. > > Many thanks > > Sascha > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Jun 28 09:14:45 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 28 Jun 2012 15:14:45 +0800 Subject: [FieldTrip] Merging files and speeding up Message-ID: Kaveh, In addition to Casper's comment, I just wanted to add: depending on what data processing you plan to do and what is the nature of your three different data sets per subject, it may be important to *not* merge the datasets right away. For example, if the reason you have three recordings for each participant is that they were recorded in three separate sessions (with the cap taken off and re-applied in between) and if you are planning on running an ICA algorithm, you should keep the datasets separate and run ICA separately on each one before merging them; there might be other procedures I'm not aware of that also have this caveat. I'm not sure what sort of data processing you have in mind so I'm not sure if this issue will apply to you, I just wanted to mention it. Best, Steve > > Message: 3 > Date: Wed, 27 Jun 2012 15:34:11 +0200 > From: Casper van Heck > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Merging files and speeding up > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Kaveh, > > 'ft_appenddata ' > can > combine data from separate files into one datafile with a single command: > data = ft_appenddata(cfg,data1,data2,data3) > > If you want to save it as a brainvision datafile, the funcion > 'ft_write_data' > should come in handy. Its use is explained on the page 'How can I convert > one dataformat into an > other< > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_one_dataformat_into_an_other?s[]=brainvision > > > '. > > Good luck, > > Casper > > > > On Wed, Jun 27, 2012 at 1:13 PM, kaveh manshaei < > kaveh.manshaei at googlemail.com> wrote: > > > Hi all > > > > I have 3 blocks for each patient in my experiment and there are > separately > > header , marker and dat file for each of them! I would like to merge > these > > files together and generate one header and one dat and one marker file > for > > each patient! Is it possible in fieldtrip or you know the other way > around? > > > > Thanks in advance > > Kaveh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Thu Jun 28 11:19:55 2012 From: cornabel at googlemail.com (Cornelius Abel) Date: Thu, 28 Jun 2012 11:19:55 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: References: <4FEB2620.3050505@googlemail.com> Message-ID: Hi jan mathijs, hello mailing list, thanks for your answer. I think i got your idea with finding the minimum in this squared differences. This should the work with positions of any scaling, right? However it gives me strange results when trying to get voxel indices in the "raw" source using voxel indices aquired from interpolated source. But even using the ctf coordinates in mm doesn't work. Here is a short script showing what i did, i also attached the necessary mat files. greetings, Cornelius clear all; load testdata.mat; % Interpolate source on anatomy cfg = []; cfg.parameter = 'avg.itc'; cfg.interpmethod = 'linear'; sourceInt = ft_sourceinterpolate(cfg, source,mri); % Find position of max voxel in interpolated source [maxval, maxindx] = max(sourceInt.avg.itc(:)); [x,y,z]=ind2sub(size(sourceInt.avg.itc),maxindx); pos=[x y z]; % plot this position in interpolated source figure; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.itc'; cfg.locationcoordinates = 'voxel'; cfg.location = pos; ft_sourceplot(cfg, sourceInt); % Calculate respective position in 'raw' source struct dpos = source.pos - repmat(pos, size(source.pos,1),1); [m,ind] = min(sum(dpos.^2,2)); spos=source.pos(ind,:); % Plot position in 'raw' source. % This gives not the position of max activity!!! figure; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.itc'; cfg.locationcoordinates = 'voxel'; cfg.location = spos; ft_sourceplot(cfg, source); 2012/6/27 jan-mathijs schoffelen > Hi Cornelius, > > There is no need to 'uninterpolate' because the coordinates are already > expressed in the correct coordinate system. What you probably want is to > find the index to the voxel in the original source-structure closest to > your 'hotspot' in the interpolated image. > This can be achieved by something like this: > > write down the coordinates of your favourite position in the interpolated > image (in world coordinates, here I assume that you are still in MEG > coordinate system and have not normalized to MNI space), call this pos > > pos = pos./10 (from mm to cm) > > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > > source is the original source structure. > ind is the index you are looking for. > > If you have interpolate to the MNI-template grid you need to replace the > source.pos with the set of grid positions from your template grid (i.e. > expressed in MNI coordinates). > > > Cheers, > > JM > > > On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > > Hello, > > does anybody know how to get the uninterpolated source position giving the > coordinates aquired after interpolation with an anatomy. > In principle i want to get an individual source time course at the > position i picked from the interpolated grand average source plot. Therfore > i need the corresponding filter and its position in the source structure. > > I tried to get the position by applying the inverse transformation matrix > of the used anatomy like: > pos_before_interpolation=warp_apply(inv(anatomy.transform), > position_after_interpolation); > > but that did not give usefull results :( > > Any ideas how it could be done? > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jun 28 11:40:19 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 28 Jun 2012 11:40:19 +0200 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: References: Message-ID: <4FEC2683.5030503@donders.ru.nl> Dear Philipp, we are quite aware that the filter sometimes results in unstable solutions, see also here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=780 How to avoid this, however, is already explained in the error message. Just try to change the order of the filter or increase the cut-off frequency. The order/cutoff frequency needed is something I cannot tell you from the top of my head, to just try some values (for the order, look at the default, which is around 4 or so and then increase/decrease by one stepwise). The dft-filter basically works by fitting a 50Hz sine wave to substract the line noise, thereby leaving a residual when the amplitude is not constant. In contrast a bandstop filter removes activity in a specified frequency band. This is explained in more details in our FAQ on the webpage: http://fieldtrip.fcdonders.nl/faq/why_is_there_a_residual_50hz_line-noise_component_after_applying_a_dft_filter The dftfilter therefore also does not really require any padding (imho it would be even counter productive). I don't quite get with what you mean by saying that there is no effect on the continuous data set, can you give an example (e.g. explain with what cfg options you call ft_preprocessing). Your problem concerning filter padding with data in memory will be handled soon, by implementing additional options for padding, see here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1318 But as I said, I don't see the point in using padding for a dftfilter. Hope that helps! Best, Jörn On 6/27/2012 3:30 PM, Philipp Hintze wrote: > Dear mailing list members, > > I continue to run into errors during my first FieldTrip analysis: > I would like to use a high pass filter on my data prior to the segmentation > into trials, the reason being that the trial duration is ~900 ms and I would > like to filter low frequencies. The continuous data set is 900 seconds long. > Simply using > cfg.continuous = 'yes'; > > cfg.hpfilter = 'yes'; > cfg.hpfreq = 0.1; > filteredContinuousData = ft_preprocessing(cfg); > > as my first run of preprocessing, I am confronted with an error stating > > Calculated filter coefficients have poles on or outside the unit circle and > will not be stable. Try a higher cutoff frequency or a different > type/order of filter. > > How can I avoid this? > > Another problem I have concernes the line noise filtering. I would like to use > the dft filter to get rid of the line noise. Using it on the segmented trials, > I still notice residual 50 Hz noise, despite using cfg.padding = 10. A > combination of the dft filter and a band stop filter using cfg.bsfreq = > [49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of the line > noise. > > The problem I have concerns the order of the filtering steps: I would like to > use the high pass filter described above, given it works, on the continuous > data. If I use the dft filter on the continuous data set, there is no effect > on the averaged trials. Is this trivial or is there a mistake on my part? > However, I can hardly use the dft filter on data that was preprocessed as > continuous and than segmented using ft_redefinetrial, because I can not set > any filter padding (because the data is not read from the dataset). > Is there something I am overlooking or doing wrong or has someone used a > different approach to a similar problem? > > Thank you in advance for your time and effort, > > Philipp > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jan.schoffelen at donders.ru.nl Thu Jun 28 14:29:40 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 28 Jun 2012 14:29:40 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: References: <4FEB2620.3050505@googlemail.com> Message-ID: <36BAC777-CD99-4F3E-95D1-A133F5CC2372@donders.ru.nl> Hi Cornelius, Probably you should use: cfg.locationcoordinates to be 'head'. Best, JM On Jun 28, 2012, at 11:19 AM, Cornelius Abel wrote: > Hi jan mathijs, hello mailing list, > > thanks for your answer. I think i got your idea with finding the minimum in this squared differences. This should the work with positions of any scaling, right? > However it gives me strange results when trying to get voxel indices in the "raw" source using voxel indices aquired from interpolated source. > But even using the ctf coordinates in mm doesn't work. > > Here is a short script showing what i did, i also attached the necessary mat files. > > greetings, Cornelius > > > clear all; > load testdata.mat; > > % Interpolate source on anatomy > cfg = []; > cfg.parameter = 'avg.itc'; > cfg.interpmethod = 'linear'; > sourceInt = ft_sourceinterpolate(cfg, source,mri); > > % Find position of max voxel in interpolated source > [maxval, maxindx] = max(sourceInt.avg.itc(:)); > [x,y,z]=ind2sub(size(sourceInt.avg.itc),maxindx); > pos=[x y z]; > > % plot this position in interpolated source > figure; > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.itc'; > cfg.locationcoordinates = 'voxel'; > cfg.location = pos; > ft_sourceplot(cfg, sourceInt); > > % Calculate respective position in 'raw' source struct > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > spos=source.pos(ind,:); > > % Plot position in 'raw' source. > % This gives not the position of max activity!!! > figure; > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.itc'; > cfg.locationcoordinates = 'voxel'; > cfg.location = spos; > ft_sourceplot(cfg, source); > > > > 2012/6/27 jan-mathijs schoffelen > Hi Cornelius, > > There is no need to 'uninterpolate' because the coordinates are already expressed in the correct coordinate system. What you probably want is to find the index to the voxel in the original source-structure closest to your 'hotspot' in the interpolated image. > This can be achieved by something like this: > > write down the coordinates of your favourite position in the interpolated image (in world coordinates, here I assume that you are still in MEG coordinate system and have not normalized to MNI space), call this pos > > pos = pos./10 (from mm to cm) > > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > > source is the original source structure. > ind is the index you are looking for. > > If you have interpolate to the MNI-template grid you need to replace the source.pos with the set of grid positions from your template grid (i.e. expressed in MNI coordinates). > > > Cheers, > > JM > > > On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > >> Hello, >> >> does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. >> In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. >> >> I tried to get the position by applying the inverse transformation matrix of the used anatomy like: >> pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); >> >> but that did not give usefull results :( >> >> Any ideas how it could be done? >> >> Greetings, Cornelius >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From philipp.hintze at uni-muenster.de Thu Jun 28 15:13:16 2012 From: philipp.hintze at uni-muenster.de (Philipp Hintze) Date: Thu, 28 Jun 2012 15:13:16 +0200 (CEST) Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: <4FEC2683.5030503@donders.ru.nl> Message-ID: Dear Jörn, thank you for your fast response. > Just try to change the order of the filter or increase the cut-off > frequency. I did that and found a stable solution for the 0.1 Hz filter at an order of 5. > The dftfilter therefore also does not really require any padding > (imho > it would be even counter productive). I read in the tutorials and in other discussions on this mailing list, that the padding is required. The FAQ (http://fieldtrip.fcdonders.nl/faq/what_kind_of_filters_can_i_apply_to_my_data) states: "To make this dft filter very sharp, you have to pad the data to a large amount (cfg.padding), e.g. to 5 or 10 seconds." Rober Oostenveld wrote: "...in preprocessing with cfg.dftfilter=yes, optionally cfg.dftfreq (default is [50 100 150]), and what we do is cfg.padding=10 to pad the data up to 10 seconds before subtracting the 50Hz sine wave. The padding ensures that we only filter out a narrow 1/10 Hz wide frequency bin. After sufficient mutitapering in the frequency domain, you won't notice the narrow 50Hz notch any more. If you don't filterpad, and e.g. have 0.5 s trials, you will put a wider 1/0.5=2Hz notch in your power spectrum." I tried using the filter without padding and the results are still acceptable, yet there is more residual noise than if it is applied with padding. The issue with the continuous data is the following: I tried using cfg = []; cfg.channel = {'EEG'}; cfg.datafile = dataset; cfg.headerfile = dataset; cfg.dataset = dataset; cfg.continuous = 'yes'; (cfg.padding = 10;) cfg.dftfilter = 'yes'; filteredContinuousData = ft_preprocessing(cfg); but looking at averaged timelocked data for the subject, the data looks identical to the result I get using no filter at all, i.e., contaminated by strong line noise. Including padding makes no difference either, therefore the brackets. Best regards, Philipp "Jörn M. Horschig" schrieb am 2012-06-28: > Dear Philipp, > we are quite aware that the filter sometimes results in unstable > solutions, see also here: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=780 > How to avoid this, however, is already explained in the error > message. > Just try to change the order of the filter or increase the cut-off > frequency. The order/cutoff frequency needed is something I cannot > tell > you from the top of my head, to just try some values (for the order, > look at the default, which is around 4 or so and then > increase/decrease > by one stepwise). > The dft-filter basically works by fitting a 50Hz sine wave to > substract > the line noise, thereby leaving a residual when the amplitude is not > constant. In contrast a bandstop filter removes activity in a > specified > frequency band. This is explained in more details in our FAQ on the > webpage: > http://fieldtrip.fcdonders.nl/faq/why_is_there_a_residual_50hz_line-n > oise_component_after_applying_a_dft_filter > The dftfilter therefore also does not really require any padding > (imho > it would be even counter productive). > I don't quite get with what you mean by saying that there is no > effect > on the continuous data set, can you give an example (e.g. explain > with > what cfg options you call ft_preprocessing). > Your problem concerning filter padding with data in memory will be > handled soon, by implementing additional options for padding, see > here: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1318 > But as I said, I don't see the point in using padding for a > dftfilter. > Hope that helps! > Best, > Jörn > On 6/27/2012 3:30 PM, Philipp Hintze wrote: > >Dear mailing list members, > >I continue to run into errors during my first FieldTrip analysis: > >I would like to use a high pass filter on my data prior to the > >segmentation > >into trials, the reason being that the trial duration is ~900 ms > >and I would > >like to filter low frequencies. The continuous data set is 900 > >seconds long. > >Simply using > > cfg.continuous = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfreq = 0.1; > > filteredContinuousData = ft_preprocessing(cfg); > >as my first run of preprocessing, I am confronted with an error > >stating > >Calculated filter coefficients have poles on or outside the unit > >circle and > >will not be stable. Try a higher cutoff frequency or a different > >type/order of filter. > >How can I avoid this? > >Another problem I have concernes the line noise filtering. I would > >like to use > >the dft filter to get rid of the line noise. Using it on the > >segmented trials, > >I still notice residual 50 Hz noise, despite using cfg.padding = > >10. A > >combination of the dft filter and a band stop filter using > >cfg.bsfreq = > >[49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of > >the line > >noise. > >The problem I have concerns the order of the filtering steps: I > >would like to > >use the high pass filter described above, given it works, on the > >continuous > >data. If I use the dft filter on the continuous data set, there is > >no effect > >on the averaged trials. Is this trivial or is there a mistake on my > >part? > >However, I can hardly use the dft filter on data that was > >preprocessed as > >continuous and than segmented using ft_redefinetrial, because I can > >not set > >any filter padding (because the data is not read from the dataset). > >Is there something I am overlooking or doing wrong or has someone > >used a > >different approach to a similar problem? > >Thank you in advance for your time and effort, > >Philipp > >_______________________________________________ > >fieldtrip mailing list > >fieldtrip at donders.ru.nl > >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 28 16:45:54 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 28 Jun 2012 16:45:54 +0200 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: References: Message-ID: <4FEC6E22.1040707@donders.ru.nl> Hi Philipp, > The padding ensures that we only filter out a narrow 1/10 Hz wide > frequency bin. sure, I didn't think about that - that's a pretty good reason to use padding :) However, the estimation of the 50Hz noise will be biased by the padded samples. I don't like the dftfilter anyway, and I am not filtering either (the reason for me is that 50Hz noise should be invariant to the experimental effects. I mostly investigate TFRs). > but looking at averaged timelocked data for the subject, the data looks > identical to the result I get using no filter at all, i.e., contaminated by > strong line noise. I'm gonna look into this to see whether it is a bug or not. I'll let you know soon. Best, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From akiko.ikkai at gmail.com Thu Jun 28 20:30:50 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 28 Jun 2012 14:30:50 -0400 Subject: [FieldTrip] suspiciously high plv Message-ID: Dear FieldTrippers, I've been trying to calculate chan-chan plv, based on the connectivity tutorial ( http://fieldtrip.fcdonders.nl/tutorial/connectivity?s[]=connectivity) and on past mailing-list posts. However, when I plot these plv, some plv are really high, in .8-.9 range sometimes all the way into gamma range. It is especially suspicious when channels that are in the opposite hemispheres, separated in anterior-posterior axis show such high values. Does anyone have any suggestions what might be going wrong? My script is pasted below. I'm using Waveguard cap with 128 channels in Duke layout, sampled at 512 Hz, and average-referenced, and data are analyzed using fieldtrip-20120103 version. Thanks in advance, Akiko %%%% first define variables chans = {'RD7','LL11','RA2','LC3'}; % let's try with these first... testTime = [.8 2.5]; %%%% % choose time range cfg = []; cfg.toilim = testTime; % extract delay period ft_data = ft_redefinetrial(cfg, ft_data); % fourier transform cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.tapsmofrq = 2; cfg.channel = chans; freq = ft_freqanalysis(cfg, ft_data); % plv calc cfg = []; cfg.method = 'plv'; plv = ft_connectivityanalysis(cfg, freq); -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wilsch at cbs.mpg.de Fri Jun 29 11:10:51 2012 From: wilsch at cbs.mpg.de (Anna Wilsch) Date: Fri, 29 Jun 2012 11:10:51 +0200 (CEST) Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: <1376177301.1612.1340961039830.JavaMail.root@zimbra> Message-ID: <1659120385.1619.1340961051346.JavaMail.root@zimbra> Dear Fieldtrippers, I'm trying to beamform my MEG data by building a common filter including three conditions and a baseline for each condition. The baseline intervals have a duration of 500 ms. I was wondering if it is ok if the post-baseline data are longer than that (1000 - 2000 ms). Does it have any negative impact on the cross-spectral-density matrix and/or the common filter? Would that still be a valid operation to do or is it necessary that baseline and post baseline data have the same length? Thank you for your comments. Cheers, Anna Anna Wilsch, Dipl.-Psych. Auditory Cognition Research Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a - Leipzig, Germany (p) +49 (0)341 9940 2641 (e) wilsch at cbs.mpg.de From m_wink10 at uni-muenster.de Fri Jun 29 14:09:47 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Fri, 29 Jun 2012 14:09:47 +0200 Subject: [FieldTrip] GrandAVG and Stats can't be plottet on anatomy or be interpolated on an MRI Message-ID: Hello, I got a kind of big problem as follows. *I can easly normalize, interpolate and plot my LCMV-Beamformer results on an MRI and plot with that anatomy:* template = '/media/sonja1/MatlabAnalysis/ Martin/WFU_PickAtlas/spm8/canonical/single_subj_T1.nii'; template_mri = ft_read_mri(template); cfg = []; % cfg.coordsys = 'spm'; cfg.method = 'fiducial'; %'interactive'; cfg.fiducial.nas = [45 106 17]; %position of nasion cfg.fiducial.lpa = [88 49 11]; %position of LPA cfg.fiducial.rpa = [3 49 11]; %position of RPA mri = ft_volumerealign(cfg, template_mri); load(sourcesOutFile); cfg = []; cfg.downsample = 1; cfg.parameter = {'avg.pow', 'avg.logpowDiff'}; sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri); Works without any problem! And can be plotted afterwords kind of nicely on an anatomy. * Now what doesn't work:* %Load functional data load(['/media/sonja1/Patienten/Parkinson/grandAVG_SourceDiff_OHNEdysphagie__beta.mat']); %avg.avg.pow to avg.pow powtemp = grandavg.avg.avg.pow; grandavg = rmfield(grandavg, 'avg'); grandavg.avg.pow = powtemp; %Load template MRI template = '/media/sonja1/MatlabAnalysis/Martin/WFU_PickAtlas/spm8/canonical/single_subj_T1.nii'; template_mri = ft_read_mri(template); %Segment and Interpolate MRI cfg = []; cfg.method = 'fiducial'; %'interactive'; cfg.fiducial.nas = [45 106 17]; %position of nasion cfg.fiducial.lpa = [88 49 11]; %position of LPA cfg.fiducial.rpa = [3 49 11]; %position of RPA mri_realign = ft_volumerealign(cfg, template_mri); % match up volumetric source result matrix with anatomical volume cfg = []; cfg.downsample = 1; cfg.parameter = 'avg.pow'; sourceDiff_int = ft_sourceinterpolate(cfg, grandavg , mri_realign); %Plot MRI cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; figure; ft_sourceplot(cfg, grandavg); - it starts to interpolate over hours and hours... and the results are worng at the end. *I tried also this way (this worked with another experiment where we got individual MRI's for each subject):* %load GAVG-Results load(['/media/sonja1/Patienten/Parkinson/grandAVG_SourceDiff_OHNEdysphagie__beta.mat']); %Remove the avg.avg field powtemp = grandavg.avg.avg.pow; grandavg = rmfield(grandavg, 'avg'); grandavg.avg.pow = powtemp; %Load an anatomy from the normalized subjects which have been interpolated load(['/media/sonja1/Patienten/Parkinson/P0390/P0390-vol-f.ds/sourceDiffNormalized.mat']); %Plot with anatomy from normalized subject cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; grandavg.anatomy = sourceDiffIntNorm_beta.anatomy; figure; ft_sourceplot(cfg, grandavg); That prints the following error: ??? Attempted to access dim(3); index out of bounds because numel(dim)=2. Error in ==> ft_plot_slice at 207 if all(ori==[0 1 0]), xplane = 1:dim(1); yplane = loc(2); zplane = 1:dim(3); end Error in ==> ft_plot_ortho at 119 hx = ft_plot_slice(dat, varargin{:}); Error in ==> ft_sourceplot at 781 ft_plot_ortho(ana, 'transform', eye(4), 'location', ijk, 'style', 'subplot', 'parents', [h1 h2 h3].*update, 'doscale', false); Error in ==> mw_ft_plot_GrandAVGa at 19 figure; ft_sourceplot(cfg, grandavg); I also upladed the data here: http://www.sendspace.com/file/zkbgqz Does anybody have any suggestions? (I send this to the Email-System and the Bug-System maybe I'm just doing something wrong and somebody faced the same problem some time ago) Thanks, Martin Winkels Universität Münster -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Sat Jun 30 03:09:22 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Fri, 29 Jun 2012 18:09:22 -0700 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: <4FEC6E22.1040707@donders.ru.nl> References: <4FEC6E22.1040707@donders.ru.nl> Message-ID: <4FEE51C2.5070304@berkeley.edu> Hi Phillipp and Jörn, I'm pretty sure that the padding for filtering is data padding not zero padding, so this does make sense and should not bias the estimation of the 50Hz noise. My experience with the dft filter is that it works very will when the line noise is stable in amplitude, it sharply (the longer the data/padding the sharper the filter) filters out specifically the line noise. It can do this because the frequency of the line noise is so stable. However, when the amplitude of the line noise varies (which it did in my data), this results in creating noise in frequencies outside 50Hz (if your interested in why, this piece of the FieldTrip wiki sheds some light on that), and the dft filter fails. I'm using a band stop around the line noise frequency and harmonics. I'd recommend plying with the values, and plotting to see which settings are appropriate for your specific circumstances. Below you can find a snipped of code I used to determine my settings. Good luck, Ingrid ------- code snippet ------- widths = [0.5 1 1.5 2 3 5 10]; orders = [2:6]; for iWidth = 1:length(widths) for iOrd = 1:length(orders) width = widths(iWidth); %preprocess data cfg = []; %cfg.event = event; cfg.dataset = [cur_path_MFF, 'NS_EMR_', subjStr, '_', stages{iStage}]; cfg.channel = {'EOG*', 'EMG', 'EEG', '-E1', '-E9', '-E32', '-E8', '-E25', '-E129'}; cfg.demean = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.3; cfg.hpfiltord = 1; cfg.bsfilter = 'yes'; cfg.bsfiltord = orders(iOrd); cfg.bsfreq = [60-width 60+width; 120-width 120+width; 180-width 180+width]; %note I'm in the US so have 60Hz line noise, you might have 50Hz cfg.pad = 0.5; cfg.trl = trl(1:100,:); data_S1_clean = ft_preprocessing(cfg); %do freqanalysis cfg = []; cfg.channel = ['EEG' BadChan]; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [30 200]; freq_S1_clean = ft_freqanalysis(cfg, data_S1_clean); %plot figure; plot(freq_S1_clean.freq,freq_S1_clean.powspctrm(:,:)) print(gcf, '-dpng', '-r300', [cur_path_fig, subjStr, '_', stages{iStage}, '_W', num2str(width*10),'_O', num2str(orders(iOrd))]); close %zoom in around 60 hz; figure; plot(freq_S1_clean.freq(22:41),freq_S1_clean.powspctrm(:,22:41)) print(gcf, '-dpng', '-r300', [cur_path_fig, subjStr, 'zoomed_', stages{iStage}, '_W', num2str(width*10),'_O', num2str(orders(iOrd))]); close end end On 6/28/2012 7:45 AM, "Jörn M. Horschig" wrote: > Hi Philipp, > >> The padding ensures that we only filter out a narrow 1/10 Hz wide >> frequency bin. > > sure, I didn't think about that - that's a pretty good reason to use > padding :) However, the estimation of the 50Hz noise will be biased by > the padded samples. I don't like the dftfilter anyway, and I am not > filtering either (the reason for me is that 50Hz noise should be > invariant to the experimental effects. I mostly investigate TFRs). > >> but looking at averaged timelocked data for the subject, the data >> looks >> identical to the result I get using no filter at all, i.e., >> contaminated by >> strong line noise. > > I'm gonna look into this to see whether it is a bug or not. I'll let > you know soon. > > Best, > Jörn > > > > > -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jun 1 13:29:46 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Fri, 1 Jun 2012 13:29:46 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data In-Reply-To: References: Message-ID: Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: not available URL: From aler1 at web.de Fri Jun 1 17:36:18 2012 From: aler1 at web.de (alla brodski) Date: Fri, 1 Jun 2012 17:36:18 +0200 (CEST) Subject: [FieldTrip] change in ft_sourceanalysis? Message-ID: An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jun 1 20:51:51 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Fri, 1 Jun 2012 20:51:51 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data References: Message-ID: <72E993C35FB11743B79FF9286E5B6D8B013F06BB@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: headmodel.jpg URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Sat Jun 2 11:49:29 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (van Dijk, Hanneke) Date: Sat, 02 Jun 2012 11:49:29 +0200 Subject: [FieldTrip] [ FieldTrip] creating mni-normalised headmodels of neuromag data Message-ID: -------- Oorspronkelijk bericht -------- Onderwerp:Fwd: creating mni-normalised headmodels of neuromag data Van:Hanneke van Dijk Aan:"van Dijk, Hanneke" Cc: Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg                      = []; cfg.coordsys         = 'neuromag'; cfg.method           = 'singleshell'; cfg.sourceunits     = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg                  = []; cfg.grid.warpmni     = 'yes'; cfg.grid.template   = template_grid; cfg.grid.nonlinear  = 'yes'; % use non-linear normalization cfg.coordsys        = 'neuromag'; cfg.sourceunits     = 'm';  % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri                 = mri; cfg.vol                  = vol; grid                     = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html  Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: not available URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 4 09:11:15 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Mon, 4 Jun 2012 09:11:15 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data References: Message-ID: <72E993C35FB11743B79FF9286E5B6D8B013F06BD@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: headmodel.jpg URL: From ith at deakin.edu.au Tue Jun 5 05:32:07 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 5 Jun 2012 03:32:07 +0000 Subject: [FieldTrip] Creating a MRI based headmodel Message-ID: <5A1787011651BC42A4D41856DBC2E06038227A5A@mbox-f-3.du.deakin.edu.au> Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From tsauvigny at googlemail.com Tue Jun 5 22:32:04 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Tue, 5 Jun 2012 22:32:04 +0200 Subject: [FieldTrip] colorbar In-Reply-To: References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <006901cd435a$46078cf0$d216a6d0$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Cheers! Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From ith at deakin.edu.au Wed Jun 6 10:48:30 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Wed, 6 Jun 2012 08:48:30 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes Message-ID: <5A1787011651BC42A4D41856DBC2E0603E0395C7@mbox-f-3.du.deakin.edu.au> Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali ________________________________ From: IMALI THANUJA HETTIARACHCHI Sent: Tuesday, 5 June 2012 1:32 PM To: fieldtrip at science.ru.nl Subject: Creating a MRI based headmodel Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: m_file.txt URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: innerSkull.mat Type: application/octet-stream Size: 141056 bytes Desc: innerSkull.mat URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: outerSkull.mat Type: application/octet-stream Size: 98624 bytes Desc: outerSkull.mat URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: skin.mat Type: application/octet-stream Size: 100160 bytes Desc: skin.mat URL: From tsauvigny at googlemail.com Wed Jun 6 11:19:40 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Wed, 6 Jun 2012 11:19:40 +0200 Subject: [FieldTrip] colorbar Message-ID: <001d01cd43c5$81966d70$84c34850$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Cheers! Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From marcel.heers at googlemail.com Wed Jun 6 11:25:10 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Wed, 6 Jun 2012 11:25:10 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting the individual brain to creat a BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be the chance to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel From marcel.heers at googlemail.com Wed Jun 6 11:29:09 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Wed, 6 Jun 2012 11:29:09 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting the individual brain to creat a BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be the chance to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel From r.oostenveld at donders.ru.nl Wed Jun 6 17:08:25 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 6 Jun 2012 17:08:25 +0200 Subject: [FieldTrip] fieldtrip/multivariate directory has moved Message-ID: <954B1630-700E-4ACD-A112-5B9E42CAFC7E@donders.ru.nl> Dear FieldTrip users, Marcel van Gerven has decided to move on with the development of the multivariate classification methods in a slightly different manner. Consequently the functions in the directory fieldtrip/multivariate (and all subdirectories) have moved to the directory fieldtrip/external/dmlt. If you are using the multivariate analysis functions, e.g. though the cfg.method='crossvalidate' option in T_TIMELOCKSTATISTICS, T_FREQSTATISTICS or FT_SOURCESTATISTICS or the other methods explained on http://fieldtrip.fcdonders.nl/tutorial/multivariateanalysis, you should already have gotten used to addpath(genpath('fieldtrip/multivariate')). From now on you just have to update your path settings to point to external/dmlt instead of multivariate. In the FieldTrip versions from this evening onward the code will not be present in the old location any more. best regards, Robert From r.oostenveld at donders.ru.nl Wed Jun 6 17:34:28 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 6 Jun 2012 17:34:28 +0200 Subject: [FieldTrip] problems with mailing list Message-ID: <9091F14C-A2B0-4A84-B28E-96049DDA1B9D@donders.ru.nl> Dear fieldtrip users, Recently we have had some problems with the fieldtrip email discussion list due to changes on the mailman server by the hosting ICT department. Of course the email list is very important for the community and support. Let me summarise: Intially the mailing list was always on the address fieldtrip at donders.ru.nl >From 25 May onward the automatic reply to address has changed to fieldtrip at science.ru.nl. This caused me (and probably others) that the email filters would not sort the messages in the proper email box, but all mails still came through. >From 1 June (last Friday) onward something else seems to have changed, resulting in myself and some other colleagues in Nijmegen (as I learnt today) did not receive any messages. From the http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html online archive it is clear that the list has not been silent over the last days, but somehow the messages did not get through to all people. I want to ask you a special favour: could you for this time (and this time only!) contact me directly replying whether you recently have received the recent mails. Please do NOT REPLY TO THIS EMAIL DIRECTLY, but change the reply address to r.oostenveld_at_donders.ru.nl. Please reply with extending the subject line of the email with either one of Re: problems with mailing list -> none Re: problems with mailing list -> some Re: problems with mailing list -> yes so that I can easily sort out the problematic ones. If you have more information, you can pass that to me in the body of the email. Note that I will not be responding to the individual emails. With your input I will be able to make the case to our own ICT department and to the hosting (science faculty) ICT department on what precisely the problems are and consequently needs to be fixed/reverted to the old situation. best regards, Robert PS please be sure that you do not reply to this email to the whole fieldtrip email list, only to me!!! From r.oostenveld at donders.ru.nl Thu Jun 7 11:33:30 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:33:30 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: this is a test email to fieldtrip at donders From r.oostenveld at donders.ru.nl Thu Jun 7 11:34:03 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:34:03 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: <0BCEDDB3-000A-431E-9550-86223506A682@donders.ru.nl> this is a test email to fieldtrip at science From r.oostenveld at donders.ru.nl Thu Jun 7 11:55:28 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:55:28 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: <4B5B0C91-1660-40A1-8900-37536FD336BD@donders.ru.nl> this is another test email to the fieldtrip at donders mailing list. I just changed the host_name in the mailmain admin interface. From r.oostenveld at donders.ru.nl Thu Jun 7 12:19:46 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 12:19:46 +0200 Subject: [FieldTrip] problems with the email discussion list Message-ID: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> Dear FieldTrip community Over the last few days we have encountered some problems with the email discussion list, which started around 23 May due to some configuration changes on the mailman server that hosts our list. Over the last few days, starting June 1, no messages got through at all. As of now (7 June) I hope that mails get through again. The emails that were sent to the mailing list the last week, but that were not passed on, have been archived at http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html Please have a look there to see whether those mails are of relevance for you. For the original posters: you might want to reconsider posting the email again. There are still some smaller configuration issues that need to be resolved, the most important that it now appears as if the mailing list is at fieldtrip at science.ru.nl instead of the proper address at fieldtrip at donders.ru.nl. We are working with the ICT team to get these sorted out as well. Sorry for the inconvenience this might have caused. I am looking forward to a continuation of the fruitful and positive atmosphere discussions. best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- From r.oostenveld at donders.ru.nl Thu Jun 7 22:40:00 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 22:40:00 +0200 Subject: [FieldTrip] problems with the email discussion list -> resolved In-Reply-To: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> Message-ID: <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> Dear all I believe the problems have been resolved. You can start posting questions and of course also your replies and insights. best regards, Robert On 7 Jun 2012, at 12:19, Robert Oostenveld wrote: > Dear FieldTrip community > > Over the last few days we have encountered some problems with the email discussion list, which started around 23 May due to some configuration changes on the mailman server that hosts our list. Over the last few days, starting June 1, no messages got through at all. As of now (7 June) I hope that mails get through again. > > The emails that were sent to the mailing list the last week, but that were not passed on, have been archived at http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html > > Please have a look there to see whether those mails are of relevance for you. For the original posters: you might want to reconsider posting the email again. > > There are still some smaller configuration issues that need to be resolved, the most important that it now appears as if the mailing list is at fieldtrip at science.ru.nl instead of the proper address at fieldtrip at donders.ru.nl. We are working with the ICT team to get these sorted out as well. > > Sorry for the inconvenience this might have caused. I am looking forward to a continuation of the fruitful and positive atmosphere discussions. > > best regards, > Robert > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher & MEG Physicist > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tsauvigny at googlemail.com Thu Jun 7 22:46:08 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Thu, 7 Jun 2012 22:46:08 +0200 Subject: [FieldTrip] colorbar In-Reply-To: <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> Message-ID: <003d01cd44ee$922c89b0$b6859d10$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Thank you! Cheers! Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From ljbj_2009 at yahoo.com Thu Jun 7 23:08:20 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Thu, 7 Jun 2012 14:08:20 -0700 (PDT) Subject: [FieldTrip] TMSI realtime buffer and tmsidriver Message-ID: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> Dear All, Is there a demo available to show us how to use the Fieldtrip real time buffer? The hardware is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. Using Fieldtrip and tmsidriver, I was able collect data using the function ft_read_data via Fieldtrip real time buffer. I used  ft_read_data(C:\work\fieldtrip-20120604\fileio), this function returns a 2-D matrix of size Nchans*Nsamples for continuous data. The values are 8189887,-394150....  I want to know how to calculate the voltage from the data collected from fieldtrip buffer. Thanks for your help,   Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Fri Jun 8 03:05:00 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Fri, 8 Jun 2012 01:05:00 +0000 Subject: [FieldTrip] Creating a MRI based headmodel Message-ID: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From jm.horschig at donders.ru.nl Fri Jun 8 09:34:48 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jun 2012 09:34:48 +0200 Subject: [FieldTrip] colorbar In-Reply-To: <003d01cd44ee$922c89b0$b6859d10$@com> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> <003d01cd44ee$922c89b0$b6859d10$@com> Message-ID: <4FD1AB18.4020509@donders.ru.nl> Hi Thomas, the values refer to your statistical test, e.g. it might be t-values or z-score or whatever statistic you are basing your cluster based test on. Best, Jörn On 6/7/2012 10:46 PM, Thomas Sauvigny wrote: > Dear FieldTripers! > > I have a question regarding clusterplots. > I'm using the ft_clusterplot-function to plot my statistic results of a > cluster-based permutation test on event related fields (within-subjects > design). > What is the unit of the colorbar and what is the interpretation of the > references to colour? (see attached jpeg-file) > > Thank you! > > Cheers! > Thomas > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 8 10:48:00 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jun 2012 10:48:00 +0200 Subject: [FieldTrip] Help improving "Getting started with BrainVision data" on the wiki Message-ID: <4FD1BC40.3000509@donders.ru.nl> Dear FieldTrip list, As you know, there are several getting started sections on our wiki-page: http://fieldtrip.fcdonders.nl/getting_started Unfortunately, however, we (the FieldTrip development team) are no expert for all different dataformats, mainly because at the Donders Institute, we do not work with all those data formats. You, on the other hand, might be an expert. In order to provide good documentation, we therefore rely on your input as well and would like to ask your help. First, we want to get started with BrainVision data. 1) What would you like to see in the Getting Started guide? 2) What explanation would you like to see there that is specific to BrainVision data? 3) Is there any particular example code that you would like to be shown there? 4) Are there particular problems you encountered (and solved) with reading in and working with BrainVision data in FieldTrip? What are these problems and what are the solutions? 5) Are there questions you always asked yourself about using BrainVision data with FieldTrip? It would be great if you share this information with us. Feel free to write whatever you want, any information is useful (preferably of course some elaborations and explanation so that we can put this information there). If you are working with other data, feel free to also answer this mail on a more general note, but we will ask separately for other data formats in near future. On behalf of the FieldTrip development team, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From r.oostenveld at donders.ru.nl Fri Jun 8 10:51:29 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 8 Jun 2012 10:51:29 +0200 Subject: [FieldTrip] Creating a MRI based headmodel In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> Message-ID: Dear Imali One problem might be that the surfaces are intersecting, but with this clean template MRI I consider that unlikely. If it were the case, then we should revise the segmentation procedure for skull and skin. An alternative for the problem is that it is due to the surfaces being incorrectly oriented (e.g. inside out). So the problem you are descibing suggests that there is an error (or imperfection) in the code. I have filed it as a bug on http://bugzilla.fcdonders.nl/show_bug.cgi?id=1510 under your name. The bug tracking system will automatically keep you posted on the updates. best regards, Robert On 8 Jun 2012, at 3:05, IMALI THANUJA HETTIARACHCHI wrote: > Dear All, > > I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code > > load standard_mri.mat > mri_orig=mri; > > % Realign the data to the CTF system > > cfg = []; > cfg.method = 'interactive'; > % use n,l,r fudicials > mri_realign = ft_volumerealign(cfg, mri_orig); > > cfg = []; > cfg.resolution = 1; % mm > cfg.dim = mri_orig.dim; > mri_reslice = ft_volumereslice(cfg, mri_realign); > > %% Segmenting the data > > cfg = []; > cfg.output= {'scalp','skull','brain'}; > cfg.coordinates = 'ctf'; > cfg.keepintermediate = 'no'; > [mri_segment] = ft_volumesegment(cfg, mri_reslice); > mri_combine = mri_reslice; > mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; > mri_combine.mask = (mri_combine.seg)>0; > > %% Plot data > > cfg = []; > cfg.interactive = 'no'; > cfg.method='slice'; > cfg.funparameter = 'seg'; > cfg.funcolormap = 'jet'; > cfg.funcolorlim = [0 7]; > cfg.opacitylim = [0 1.5]; > cfg.maskparameter = 'mask'; > figure , ft_sourceplot(cfg,mri_combine); > > %% Generating the mesh > > cfg=[]; > cfg.tissue=[1 2 3]; > cfg.numvertices=[5000 3000 800]; > cfg.sourceunits=mri_segment.unit; > scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); > skull=2*(mri_segment.skull); > brain=3*(mri_segment.brain); > > mri_segment.seg= scalp+skull+brain; > bnd = ft_prepare_mesh(cfg, mri_segment); > > %% View meshes a transparent plot > > figure (2) > tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); > tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); > tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); > trisurf(tr1,'facealpha',0.1); hold on > trisurf(tr2,'facealpha',0.2); hold on > trisurf(tr3) > > > %% BEM Computation-calculating the related electromagnetic model > > Cskin_surface= 0.33; %scalp > Couter_skull_surface=0.0042; %skull > Cinner_skull_surface=0.33; %brain > vol=[]; > for i=1:3 > vol.bnd(i).tri=bnd(i).tri; > vol.bnd(i).pnt=bnd(i).pnt; > end > vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; > cfg=[]; > cfg.method = 'openmeeg'; > vol = ft_prepare_headmodel(cfg, vol); > > When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; > ??? Error using ==> surface_nesting at 24 > the compartment nesting cannot be determined > > Error in ==> ft_headmodel_bem_openmeeg at 96 > order = surface_nesting(vol.bnd, 'insidefirst'); > > With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. > > I would really appreciate any guidance and any suggestions given to make this work. > > Many thanks in advance. > > Kind regards > Imali > > Imali Thanuja Hettiarachchi > PhD Candidate > Centre for Intelligent Systems research > Deakin University, Geelong 3217, Australia. > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From b.reuderink at donders.ru.nl Fri Jun 8 12:16:25 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Fri, 8 Jun 2012 12:16:25 +0200 Subject: [FieldTrip] TMSI realtime buffer and tmsidriver In-Reply-To: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> References: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> Message-ID: Dear Jie, There is a number of examples of real-time processing with FieldTrip. Perhaps the best starting point is the real-time section on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/development/realtime#, which contains pointers to example scripts. But, the range of the values you get with ft_read_data is a bit unexpected, I would expect uV units. Could you test with one of the example scripts if that persists, and if the signals are sensible despite the scale? Best, Boris Reuderink On Thu, Jun 7, 2012 at 11:08 PM, jie liu wrote: > Dear All, > > Is there a demo available to show us how to use the Fieldtrip real time > buffer? > The hardware is TMSI refa 128 working with usb (driver is fusbi version > 6.0.0.76.) windows xp+service pack3. > > Using Fieldtrip and tmsidriver, I was able collect data using the function > ft_read_data via Fieldtrip real time buffer. I used > ft_read_data(C:\work\fieldtrip-20120604\fileio), this function returns a 2-D > matrix of size Nchans*Nsamples for continuous data. The values are > 8189887,-394150.... > >  I want to know how to calculate the voltage from the data collected from > fieldtrip buffer. > > > > Thanks for your help, > > > > Jie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- twitter.com/#!/breuderink | github.com/breuderink | borisreuderink.nl From vlad_chiriacescu at yahoo.com Mon Jun 11 03:40:42 2012 From: vlad_chiriacescu at yahoo.com (Vlad Chiriacescu) Date: Sun, 10 Jun 2012 18:40:42 -0700 (PDT) Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Message-ID: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com>   Hello,   I am working on a school project related to the Biomag 2012 analysis competition.   I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/.   I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2).   I was able to load the 2 mat files into Matlab workspace.   I was also able to use FieldTrip functions on tutorial code.   However, when I try to use ft_preprocessing on one of the mat files I get an error.   Here is the code I wrote:   cfg1.dataset = 'ltmcla_S08.mat'   data_org = ft_preprocessing(cfg1)   And the error is:   ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344   hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);   I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair.   However, I do not have a .dat file, I have a .mat file.   Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim.   How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest?   Thanks a lot,   Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.heers at googlemail.com Mon Jun 11 08:39:58 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Mon, 11 Jun 2012 08:39:58 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting individual brains to creat BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be a way to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel -- Dr. Marcel Heers, M.D. Fischenbergstr. 10 D-58455 Witten phone: +49-2302-2034057 fax: +49-2302-2033528 From jan.schoffelen at donders.ru.nl Mon Jun 11 08:57:24 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 11 Jun 2012 08:57:24 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip References: Message-ID: <40D2886E-BF14-42CF-9FCE-B74BB8AB0472@donders.ru.nl> Hi Marcel, You can read in gifti-files with ft_read_headshape. Best, Jan-Mathijs On Jun 11, 2012, at 8:39 AM, Marcel Heers wrote: > Dear Fieldtip experts, > > I am having a many problems segmenting individual brains to creat > BEM for EEG source localization with the spm methods implemented in > fieldtrip no matter which thresholds and smoothing factors I am using. > So I was wondering wether there would be a way to directly import > the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' > and 'scalp.surf.gii' into fieldtrip to use them for further > processing. > Thank you for your comments! > > Best regards, > > Marcel > > -- > Dr. Marcel Heers, M.D. > Fischenbergstr. 10 > D-58455 Witten > phone: +49-2302-2034057 > fax: +49-2302-2033528 > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 11 09:20:46 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 11 Jun 2012 09:20:46 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: <4FD59C4E.5060208@donders.ru.nl> Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using />> load ltmcla_S08.mat/ This should result in some variable, most likely /data/ in your workspace. You can then call ft_preprocessing like this: />> ft_preprocessing(cfg, data) /I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at /data.cfg /Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn // On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: > Hello, > > I am working on a school project related to the Biomag 2012 analysis > competition. > > I have downloaded a .zip file from > ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second > objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files > I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, > which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jun 11 09:21:25 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 11 Jun 2012 09:21:25 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Dear Vlad, The Biomag 2012 data competition is not part of the FieldTrip project. Of course you should be able to use FieldTrip for parts (or all) of the analysis, but it might be that the data is provided in a file format that is not directly compatible with FieldTrip (see http://fieldtrip.fcdonders.nl/dataformat). The specific error that you get suggests that the data that is distributed was already preprocessed and is in MATLAB format and that you should just do "load ". Note that the content you might find in the mat-file could very well be formatted in a way that FieldTrip is not directly able to process it further. On http://www.biomag2012.org/content/data-analysis-competition at the bottom is an email address that is specific to the competition, I suggest you contact that with your questions that are specific to the the competition. best regards, Robert On 11 Jun 2012, at 3:40, Vlad Chiriacescu wrote: > Hello, > > I am working on a school project related to the Biomag 2012 analysis competition. > > I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Mon Jun 11 09:27:28 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 11 Jun 2012 09:27:28 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Hi Vlad, If you have the data already in Matlab, it is quite straightforward to convert it to a FieldTrip-compatible data structure. See http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined#raw_data for an explanation of how raw data structures look, in general. Now I see Jörn's e-mail on the same subject. His explanation is the right one, if the data you have is already in FieldTrip format. However, from your explanation, I assume you still need to do a little bit of tweaking to get your data to be FT-compatible. Hope this helps, Eelke On 11 June 2012 03:40, Vlad Chiriacescu wrote: >   Hello, > >   I am working on a school project related to the Biomag 2012 analysis > competition. > >   I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > >   I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > >   I was able to load the 2 mat files into Matlab workspace. > >   I was also able to use FieldTrip functions on tutorial code. > >   However, when I try to use ft_preprocessing on one of the mat files I get > an error. > >   Here is the code I wrote: > >   cfg1.dataset = 'ltmcla_S08.mat' >   data_org = ft_preprocessing(cfg1) > >   And the error is: >   ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 >   hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > >   I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > >   However, I do not have a .dat file, I have a .mat file. > >   Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > >   How could I use FieldTrip on this data? If there are more ways, which one > would be the fastest/easiest? > >   Thanks a lot, > >   Vlad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From smoratti at psi.ucm.es Mon Jun 11 09:39:43 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 11 Jun 2012 09:39:43 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Dear Vlad, It seems that the matlab structure already contains the data in fieldtrip format. This structure normally is created when you read raw data from some compatible data format. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 11/06/2012, a las 03:40, Vlad Chiriacescu escribió: > Hello, > > I am working on a school project related to the Biomag 2012 analysis competition. > > I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindenberger at mpib-berlin.mpg.de Mon Jun 11 10:10:36 2012 From: lindenberger at mpib-berlin.mpg.de (Lindenberger, Ulman) Date: Mon, 11 Jun 2012 08:10:36 +0000 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <4FD59C4E.5060208@donders.ru.nl> Message-ID: <4ADF66FEA083904FA4A12CBD5A303E5B6F668B68@MaxMail03.mpib-berlin.mpg.de> Sent by Blackberry Von: "Jörn M. Horschig" [mailto:jm.horschig at donders.ru.nl] Gesendet: Monday, June 11, 2012 09:20 AM An: FieldTrip discussion list Betreff: Re: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using >> load ltmcla_S08.mat This should result in some variable, most likely data in your workspace. You can then call ft_preprocessing like this: >> ft_preprocessing(cfg, data) I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at data.cfg Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: Hello, I am working on a school project related to the Biomag 2012 analysis competition. I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2). I was able to load the 2 mat files into Matlab workspace. I was also able to use FieldTrip functions on tutorial code. However, when I try to use ft_preprocessing on one of the mat files I get an error. Here is the code I wrote: cfg1.dataset = 'ltmcla_S08.mat' data_org = ft_preprocessing(cfg1) And the error is: ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair. However, I do not have a .dat file, I have a .mat file. Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim. How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? Thanks a lot, Vlad _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindenberger at mpib-berlin.mpg.de Mon Jun 11 10:15:44 2012 From: lindenberger at mpib-berlin.mpg.de (Lindenberger, Ulman) Date: Mon, 11 Jun 2012 08:15:44 +0000 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <4FD59C4E.5060208@donders.ru.nl> Message-ID: <4ADF66FEA083904FA4A12CBD5A303E5B6F668B79@MaxMail03.mpib-berlin.mpg.de> Sent by Blackberry Von: "Jörn M. Horschig" [mailto:jm.horschig at donders.ru.nl] Gesendet: Monday, June 11, 2012 09:20 AM An: FieldTrip discussion list Betreff: Re: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using >> load ltmcla_S08.mat This should result in some variable, most likely data in your workspace. You can then call ft_preprocessing like this: >> ft_preprocessing(cfg, data) I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at data.cfg Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: Hello, I am working on a school project related to the Biomag 2012 analysis competition. I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2). I was able to load the 2 mat files into Matlab workspace. I was also able to use FieldTrip functions on tutorial code. However, when I try to use ft_preprocessing on one of the mat files I get an error. Here is the code I wrote: cfg1.dataset = 'ltmcla_S08.mat' data_org = ft_preprocessing(cfg1) And the error is: ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair. However, I do not have a .dat file, I have a .mat file. Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim. How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? Thanks a lot, Vlad _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Tue Jun 12 02:25:47 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 12 Jun 2012 00:25:47 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes Message-ID: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NeuroScan meshes.zip Type: application/x-zip-compressed Size: 157689 bytes Desc: NeuroScan meshes.zip URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: m_file.txt URL: From alexandre.gramfort at inria.fr Tue Jun 12 08:10:58 2012 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 12 Jun 2012 09:10:58 +0300 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> Message-ID: hi Imali, your meshes had indeed tiny problems. To fixed it I just smoothed a tiny bit the meshes. In matlab: >> load innerSkull >> om_save_tri('innerSkull.tri', curryloc', currytri'); then : $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert $ om_mesh_info -i innerSkull_sm_flip.tri om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 load_tri : innerSkull_sm_flip.tri Mesh Info : # points : 2934 # triangles : 5864 Euler characteristic : 2 Min Area : 6.55783 Max Area : 28.9211 Mesh orientation correct (valid for closed mesh). this should fix the problem. Note that you can surely also smooth the meshes in matlab. Alex -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team, NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://alexandre.gramfort.net On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI < ith at deakin.edu.au> wrote: > ** ** > > Dear FieldTrip users,**** > > **** > > As I have faced problems in creating a head model with MRI's, so I thought > to try the MNI head for creating the meshes. I used the NeuroScan software > to create the surface meshes and exported them to Matlab. Then tried to > crate the head model using ft_prepare_headmodel function. however the > 'om_minverser' stops working and the program terminates.**** > > **** > > When I plot the meshes they seem fine to me so I assume that there is no > segmenting issues. But Now I get an error as attached in the 'log.txt' from > the Matlab workspace, which says about self intersecting meshes. I have > attached the Neuroscan exported meshes > (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function > (m_file.txt) that I used in creating the head model.**** > > **** > > I really want to generate some simulated EEG data but cannot make anything > work. If someone can give a guidance on where I am going wrong in the > procedure , that will be highly appreciated.**** > > **** > > Many thanks.**** > > **** > > Kind regards**** > > Imali**** > > ** ** > > *Imali Thanuja Hettiarachchi* > > PhD Candidate**** > > Centre for Intelligent Systems research**** > > Deakin University, Geelong 3217, Australia.**** > > ** ** > > Mobile : +61430321972**** > > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr**** > > ** ** > > [image: Description: Description: Description: > cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au]**** > > ** ** > > > > **** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Tue Jun 12 10:08:32 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 12 Jun 2012 08:08:32 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au>, Message-ID: <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> Deal Alex, Thank you so much for the quick reply, I managed to do what you suggested then got stuck at loading the '_sm_flip.tri' files to MATLAB. This may be a very naive question, but hope you can give me some help on this please. Many thanks Kind regards Imali ________________________________ From: alexandre.gramfort at gmail.com [alexandre.gramfort at gmail.com] on behalf of Alexandre Gramfort [alexandre.gramfort at inria.fr] Sent: Tuesday, 12 June 2012 4:10 PM To: FieldTrip discussion list; IMALI THANUJA HETTIARACHCHI Subject: Re: [FieldTrip] Headmodel with NeuroScan meshes hi Imali, your meshes had indeed tiny problems. To fixed it I just smoothed a tiny bit the meshes. In matlab: >> load innerSkull >> om_save_tri('innerSkull.tri', curryloc', currytri'); then : $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert $ om_mesh_info -i innerSkull_sm_flip.tri om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 load_tri : innerSkull_sm_flip.tri Mesh Info : # points : 2934 # triangles : 5864 Euler characteristic : 2 Min Area : 6.55783 Max Area : 28.9211 Mesh orientation correct (valid for closed mesh). this should fix the problem. Note that you can surely also smooth the meshes in matlab. Alex -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team, NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://alexandre.gramfort.net On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI > wrote: Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Tue Jun 12 10:17:01 2012 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 12 Jun 2012 11:17:01 +0300 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> Message-ID: Here is a tiny function that should help https://github.com/agramfort/matlab_mesh_toolbox/blob/master/load_tri.m Alex On Tue, Jun 12, 2012 at 11:08 AM, IMALI THANUJA HETTIARACHCHI < ith at deakin.edu.au> wrote: > Deal Alex, > > > > Thank you so much for the quick reply, I managed to do what you suggested > then got stuck at loading the '_sm_flip.tri' files to MATLAB. > > > > This may be a very naive question, but hope you can give me some help on > this please. > > > > Many thanks > > > > Kind regards > > Imali > ------------------------------ > *From:* alexandre.gramfort at gmail.com [alexandre.gramfort at gmail.com] on > behalf of Alexandre Gramfort [alexandre.gramfort at inria.fr] > *Sent:* Tuesday, 12 June 2012 4:10 PM > *To:* FieldTrip discussion list; IMALI THANUJA HETTIARACHCHI > *Subject:* Re: [FieldTrip] Headmodel with NeuroScan meshes > > hi Imali, > > your meshes had indeed tiny problems. To fixed it I just smoothed a tiny > bit the meshes. > > In matlab: > > >> load innerSkull > >> om_save_tri('innerSkull.tri', curryloc', currytri'); > > then : > > $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 > $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert > $ om_mesh_info -i innerSkull_sm_flip.tri > om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 > > load_tri : innerSkull_sm_flip.tri > Mesh Info : > # points : 2934 > # triangles : 5864 > Euler characteristic : 2 > Min Area : 6.55783 > Max Area : 28.9211 > Mesh orientation correct (valid for closed mesh). > > this should fix the problem. Note that you can surely also smooth the > meshes in matlab. > > Alex > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team, NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://alexandre.gramfort.net > > On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI < > ith at deakin.edu.au> wrote: > >> **** >> >> Dear FieldTrip users,**** >> >> **** >> >> As I have faced problems in creating a head model with MRI's, so I >> thought to try the MNI head for creating the meshes. I used the NeuroScansoftware to create the surface meshes and exported them to Matlab. >> Then tried to crate the head model using ft_prepare_headmodel function. >> however the 'om_minverser' stops working and the program terminates.**** >> >> **** >> >> When I plot the meshes they seem fine to me so I assume that there is no >> segmenting issues. But Now I get an error as attached in the 'log.txt' >> from the Matlab workspace, which says about self intersecting meshes. I >> have attached the Neuroscan exported meshes >> (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function >> (m_file.txt) that I used in creating the head model.**** >> >> **** >> >> I really want to generate some simulated EEG data but cannot make >> anything work. If someone can give a guidance on where I am going wrong in >> the procedure , that will be highly appreciated.**** >> >> **** >> >> Many thanks.**** >> >> **** >> >> Kind regards**** >> >> ***Imali* >> >> **** >> >> *Imali Thanuja Hettiarachchi* >> >> PhD Candidate**** >> >> Centre for Intelligent Systems research**** >> >> Deakin University, Geelong 3217, Australia.**** >> >> **** >> >> Mobile : +61430321972**** >> >> Email: ith at deakin.edu.au >> www.deakin.edu.au/cisr**** >> >> **** >> >> [image: Description: Description: Description: >> cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] **** >> >> **** >> >> >> >> **** >> >> **** >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it >> is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners >> Compliance HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you >> in error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> >> > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team @ NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nuria.donamayor at neuro.uni-luebeck.de Wed Jun 13 19:21:56 2012 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Wed, 13 Jun 2012 19:21:56 +0200 Subject: [FieldTrip] sourceanalysis on neuromag data Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F2398@solaris.neuro.uni-luebeck.de> Dear fieldtrippers, I am doing source localization on some neuromag 306-channel data and I have a couple of questions for which I haven't been able to flind answers in the community. I have performed timelockanalysis on magnetometers and planar gradiometers separately, and combined the planar gradiometers. Should I perform sourceanalysis using just one type of sensor, or can I input both in the algorithm? In the case of the gradiometers: should I used the combined or the individual gradients? If using the combined gradients, what sensor positions/channel names do I input when calculating the leadfield? Thanks so much for your help, Nuria From tim.curran at Colorado.EDU Wed Jun 13 21:01:28 2012 From: tim.curran at Colorado.EDU (Tim Curran) Date: Wed, 13 Jun 2012 13:01:28 -0600 Subject: [FieldTrip] skewed classes for pattern classification Message-ID: I am trying some pattern classification in fieldtrip. Mostly using: cfg.method = 'crossvalidate'; cfg.mva = {dml.standardizer dml.glmnet('family','binomial')}; I am trying to predict task accuracy (0,1) in cases where accuracy is often around 80%, so the frequency of the correct class is much greater than the frequency of the incorrect class. dml.crossvalidate can handle this as follows: % In order to balance the occurrence of different classes one may set % 'resample' equal to true (default: false). Resample will upsample less % occurring classes during training and downsample often occurring % classes during testing. … but this requires tossing a lot of data in the downsampling process. Has anybody tried other approaches for dealing with skewed classes that do not involve downsampling? Like this for example: Loss functions allowing for unbalanced classes The classification performance is always evaluated by some loss function, see the section Estimation of the generalization error. Typical examples are the 0/1-loss (i.e., average number of misclassified samples) and the area under the receiver operator characteristic (ROC) curve (Fawcett, 2006). When using misclassification rate, it must be assured that the classes have approximately the same number of samples. Otherwise, the employed performance measure has to consider the different class prior probabilities. For instance, in oddball paradigms the task is to discriminate brain responses to an attended rare stimulus from responses to a frequent stimulus. A typical ratio of frequent-to-rare stimuli is 85:15. In such a setting, an uninformative classifier which always predicts the majority class would obtain an accuracy of 85%. Accordingly, a different loss function needs to be employed. Denoting the number of samples in class i by ni, the normalized error can be calculated as weighted average, where errors committed on samples of class i are weighted by N/ni with N =Σk nk: From S. Lemm, B. Blankertz, T. Dickhaus, K. R. Müller, Introduction to machine learning for brain imaging NeuroImage, 56:387-399, 2011 http://doc.ml.tu-berlin.de/bbci/publications/LemBlaDicMue11.pdf Not being a very good programmer, I got lost in the code before I could find the relevant cost function to apply normalization. Any advice on these issues would be much appreciated. thanks Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Wed Jun 13 23:35:22 2012 From: lihqih at gmail.com (qi li) Date: Wed, 13 Jun 2012 17:35:22 -0400 Subject: [FieldTrip] instantaneous phase and phase locking value Message-ID: Hi there, I am wondering whether fieldtrip has a function to compute the instantaneous phase and phase locking value. Thanks! Qi From asaygin at ucsd.edu Thu Jun 14 02:43:16 2012 From: asaygin at ucsd.edu (Ayse Pinar Saygin) Date: Wed, 13 Jun 2012 17:43:16 -0700 Subject: [FieldTrip] Postdoctoral position in cognitive neuroscience at UCSD: Human perception of humanoid robots Message-ID: Postdoctoral position in cognitive neuroscience at UCSD: Human perception of humanoid robots We are seeking a motivated and creative postdoctoral research associate to join the Cognitive Neuroscience and Neuropsychology Lab at the University of California, San Diego (http://www.sayginlab.org). Our lab studies the perception of socially-relevant stimuli such as bodies, actions, and biological motion using psychophysical, neuroimaging, neuropsychological and brain stimulation studies. The current position is part of an interdisciplinary research program exploring the perception of body movements of not only humans, but also of humanoid robots. The position requires experience with EEG, including both ERP and time/frequency approaches, as well as strong analytical and programming abilities. The ideal candidate will have a PhD in cognitive science, neuroscience, computer science, psychology, engineering or related discipline, and a strong interest in the research foci of the lab. Substantial experience with EEG is essential, and experience with Brain-Computer Interfaces (BCI) is highly desirable. Proficiency in programming (preferably but not necessarily in Matlab) is essential; experience with machine learning is highly desirable. Interest in and experience with other methods our lab uses (e.g., structural and functional neuroimaging, brain stimulation) is desirable but not required. Candidates should have excellent written and oral communication skills and a commitment to efficient publication of research results. San Diego is home to an outstanding cognitive science and neuroscience community, which includes UCSD, Salk Institute, Institute for Neural Computation (INC), Swartz Center for Computational Neuroscience (SCCN), Center for Research in Language (CRL), and Kavli Institute for Brain and Mind (KIBM). The successful candidate will work with a lively and interdisciplinary group of researchers and students. EEG collaborators include Prof. Marta Kutas, INC, SCCN, and local industry partners; robotics collaborator is Prof. Ishiguro from Osaka University. More information can be found on our website at http://www.sayginlab.org The position is initially available for two years, the second year contingent on satisfactory progress. Extension beyond two years may be possible. The target start date is Summer 2012 or possibly early Fall. Interested candidates, please email Ayse P. Saygin at asaygin at ucsd.edu, with a cover letter describing past research experience and current interests, a CV including list of publications (in pdf format), and names and contact information for 3 individuals who can provide a recommendation letter. Please also indicate US citizenship/residence status in your letter. A.P. Saygin http://www.sayginlab.org From ith at deakin.edu.au Thu Jun 14 05:53:14 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Thu, 14 Jun 2012 03:53:14 +0000 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file Message-ID: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> Dear fieldtrip users, I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, elec = ft_read_sens('mydirectory\standard_1020.elc'); The I used the function, [vol, sens] = ft_prepare_vol_sens(vol, elec); However this give as error, ??? Reference to non-existent field 'mat'. Error in ==> ft_prepare_vol_sens at 419 if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) Error in ==> curry_leadField at 15 [vol, sens] = ft_prepare_vol_sens(vol, elec); The vol created with the OPENMEEG only contains the following fields, vol = bnd: [1x3 struct] cond: [0.3300 0.0042 0.3300] skin_surface: 1 source: 3 type: 'openmeeg' unit: 'mm' cfg: [1x1 struct] Can someone please help me with this error, any advice and comment will be highly appreciated. Thank you very much! Regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From tzvetan.popov at uni-konstanz.de Thu Jun 14 09:17:58 2012 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 14 Jun 2012 09:17:58 +0200 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> Message-ID: Hi Imali, in this case your meshes probably touch somewhere so that om doesn't created the bem model at all and as a consequence didn't wrote the mat file. You should go back in the segmentation procedure and play around with the option "cfg.threshold", plot the meshes and make sure they do not touch. Good luck tzvetan > > Dear fieldtrip users, > > I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, > elec = ft_read_sens('mydirectory\standard_1020.elc'); > > The I used the function, > > [vol, sens] = ft_prepare_vol_sens(vol, elec); > However this give as error, > > ??? Reference to non-existent field 'mat'. > > Error in ==> ft_prepare_vol_sens at 419 > if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) > > Error in ==> curry_leadField at 15 > [vol, sens] = ft_prepare_vol_sens(vol, elec); > > The vol created with the OPENMEEG only contains the following fields, > vol = > > bnd: [1x3 struct] > cond: [0.3300 0.0042 0.3300] > skin_surface: 1 > source: 3 > type: 'openmeeg' > unit: 'mm' > cfg: [1x1 struct] > > Can someone please help me with this error, any advice and comment will be highly appreciated. > Thank you very much! > > Regards > Imali > > Imali Thanuja Hettiarachchi > PhD Candidate > Centre for Intelligent Systems research > Deakin University, Geelong 3217, Australia. > > Mobile : +61430321972 > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Thu Jun 14 10:56:49 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Thu, 14 Jun 2012 08:56:49 +0000 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file In-Reply-To: References: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au>, Message-ID: <5A1787011651BC42A4D41856DBC2E0603E03CC6D@mbox-f-3.du.deakin.edu.au> Hi Tzvetan, Thank you very much for your reply. I am using the MNI surface meshes from the NeuroScan Curry Software as I had trouble in generating the MRI based headmodels. I had trouble with the MNI surface meshes as well but as Alex suggested earlier in the "Headmodel with NeuroScan meshes" discussion thread I managed to overcome the problems after smoothing them. When I ran the ft_prepare_headmodel with the new smoothed meshes the program ran without explicitly giving me any errors(including om_minverser), but now with your comment I understand that om has not run succesfully to create the mat file. I am attaching the figure with the smoothed meshes to have a look whether you observe an intersecting mesh. Please let me know if you have any comments on my procedure. Many Thanks. Regards Imali ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tzvetan Popov [tzvetan.popov at uni-konstanz.de] Sent: Thursday, 14 June 2012 5:17 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_prepare_vol_sens-missing .mat file Hi Imali, in this case your meshes probably touch somewhere so that om doesn't created the bem model at all and as a consequence didn't wrote the mat file. You should go back in the segmentation procedure and play around with the option "cfg.threshold", plot the meshes and make sure they do not touch. Good luck tzvetan Dear fieldtrip users, I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, elec = ft_read_sens('mydirectory\standard_1020.elc'); The I used the function, [vol, sens] = ft_prepare_vol_sens(vol, elec); However this give as error, ??? Reference to non-existent field 'mat'. Error in ==> ft_prepare_vol_sens at 419 if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) Error in ==> curry_leadField at 15 [vol, sens] = ft_prepare_vol_sens(vol, elec); The vol created with the OPENMEEG only contains the following fields, vol = bnd: [1x3 struct] cond: [0.3300 0.0042 0.3300] skin_surface: 1 source: 3 type: 'openmeeg' unit: 'mm' cfg: [1x1 struct] Can someone please help me with this error, any advice and comment will be highly appreciated. Thank you very much! Regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Surface meshes.zip Type: application/x-zip-compressed Size: 215061 bytes Desc: Surface meshes.zip URL: From b.reuderink at donders.ru.nl Thu Jun 14 11:40:55 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 14 Jun 2012 11:40:55 +0200 Subject: [FieldTrip] skewed classes for pattern classification In-Reply-To: References: Message-ID: Dear Tim, You pose a very interesting question, that is not asked enough in my opinion :). There are indeed various approaches to classification and evaluation of ill-balanced data. One option is indeed resampling, which is a way to fake a per-instance importance weight. Some classifiers implement this instance weight directly, such as libsvm. I am not familiar enough with the DMLT methods in FieldTrip to know if similar options exist. BTW, I am not sure that resampling is needed for testing, and if it is, it can perhaps be performed in the performance metric. This might reduce the amount of 'tossing data'. Another option is to use a performance metric that is insensitive to class imbalance, such as the AUC-ROC or mutual information. Note that this only solves your evaluation problem; if the classifiers objective is to minimize a form of loss that *is* sensitive to imbalance, you probably would still get constant prediction of the most frequent class. Best regards, Boris On Wed, Jun 13, 2012 at 9:01 PM, Tim Curran wrote: > I am trying some pattern classification in fieldtrip. > > Mostly using: > cfg.method = 'crossvalidate'; > cfg.mva = {dml.standardizer dml.glmnet('family','binomial')}; > > I am trying to predict task accuracy (0,1) in cases where accuracy is often > around 80%, so the frequency of the correct class is much greater than the > frequency of the incorrect class. > > > dml.crossvalidate can handle this as follows: > %   In order to balance the occurrence of different classes one may set > %   'resample' equal to true (default: false). Resample will upsample less > %   occurring classes during training and downsample often occurring > %   classes during testing. > > … but this requires tossing a lot of data in the downsampling process. > > > Has anybody tried other approaches for dealing with skewed classes that do > not involve downsampling?  Like this for example: > > Loss functions allowing for unbalanced classes > The classification performance is always evaluated by some loss > function, see the section Estimation of the generalization > error. Typical examples are the 0/1-loss (i.e., average number of > misclassified samples) and the area under the receiver operator > characteristic (ROC) curve (Fawcett, 2006). When using misclassification > rate, it must be assured that the classes have approximately > the same number of samples. Otherwise, the employed performance > measure has to consider the different class prior probabilities. > For instance, in oddball paradigms the task is to discriminate > brain responses to an attended rare stimulus from responses to a > frequent stimulus. A typical ratio of frequent-to-rare stimuli is > 85:15. In such a setting, an uninformative classifier which > always predicts the majority class would obtain an accuracy of 85%. > Accordingly, a different loss function needs to be employed. Denoting > the number of samples in class i by ni, the normalized error can be > calculated as weighted average, where errors committed on samples > of class i are weighted by N/ni with N =Σk nk: > > From > S. Lemm, B. Blankertz, T. Dickhaus, K. R. Müller, > Introduction to machine learning for brain imaging > NeuroImage, 56:387-399, 2011 > http://doc.ml.tu-berlin.de/bbci/publications/LemBlaDicMue11.pdf > > > Not being a very good programmer, I got lost in the code before I could find > the relevant cost function to apply normalization. > > Any advice on these issues would be much appreciated. > > thanks > Tim > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- twitter.com/#!/breuderink | github.com/breuderink | borisreuderink.nl From anette.giani at tuebingen.mpg.de Thu Jun 14 11:49:50 2012 From: anette.giani at tuebingen.mpg.de (Anette Giani) Date: Thu, 14 Jun 2012 11:49:50 +0200 Subject: [FieldTrip] LCMV beamformer analysis: uncertainties Message-ID: <000201cd4a13$0ab328c0$20197a40$@tuebingen.mpg.de> Dear Fieldtrip users, I am currently trying to localize averaged time courses of condion1 and condition2 in 20 subjects using LCMV beamformer and to compare source activity of both conditions statistically. However, results look suspicious to me and I am wondering if I am doing things correctly. It will be of great help if you could comment on some issues and check the parameters I am using. Things I am wondering about: (1) doing cluster statistics I get 1 big cluster that is highly significant (clusterstat: 6.5829e+006, prob: 0.0020) and includes all!! (but one) voxels that are labeled as "inside". I tried to decrease the alpha level to 0.01, but it didn't really help. (2) How can I check the quality of alignment of the individual anatomicals? So far I am just using ft_volumenormalise, hoping that alignment works well. However, I am getting suspicious by the warning: 1377485 voxels are inside the brain of all subjects 2557673 voxels are inside the brain of some, but not all subjects 4551464 voxels are outside the brain of all subjects Warning: marking only voxels inside the brain of all subjects as 'inside' If MRI's would be aligned, why aren't inside voxels of all subjects identical? How does the fact that voxels are not exactly aligned affect my analysis? Any comments & and ideas are welcome Thank you so much for your help!! Anette -- PARAMETERS %% Calculating the cross spectral density matrix cfg = []; cfg.covariance = 'yes'; cfg.channel = 'MEG'; cfg.removemean = 'no'; cfg.trials = cond1; cfg.covariancewindow = [0.15 0.25]; tlckav_cond1 = ft_timelockanalysis(cfg, OrigSPMdata); cfg.trials = cond2; cfg.covariancewindow = [0.15 0.25]; tlckav_cond2 = ft_timelockanalysis(cfg, OrigSPMdata); cfg.trials = [cond1 cond2]; cfg.covariancewindow = [0.15 0.25]; tlckav_combined = ft_timelockanalysis(cfg, OrigSPMdata); %% lcmv beamformer using common filters cfg = []; cfg.method = 'lcmv'; cfg.lambda = '5%'; cfg.grid = grid; cfg.grad = grad; cfg.vol = vol; cfg.lcmv.projectnoise = 'yes'; % necessary? cfg.lcmv.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; cfg.lcmv.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, tlckav_combined) cfg.grid.filter = sourceAll.avg.filter; source_cond1 = ft_sourceanalysis(cfg, tlckav_cond1); source_cond2 = ft_sourceanalysis(cfg, tlckav_cond2); %% reslice mri_re = ft_volumereslice([], mri2); source_cond1.anatomy = mri_re.anatomy; source_cond2.anatomy = mri_re.anatomy; % interpolate cfg = []; cfg.units = 'mm'; cfg.downsample = 2; % taken from tutorial cfg.parameter = 'avg.pow'; source_cond1_Int = ft_sourceinterpolate(cfg, source_cond1 , mri_re); source_cond2_Int = ft_sourceinterpolate(cfg, source_cond2 , mri_re); % normalise cfg = []; cfg.coordsys = 'ctf'; cfg.nonlinear = 'no'; source_cond1_Int_Norm = ft_volumenormalise(cfg, source_cond1_Int); source_cond2_Int_Norm = ft_volumenormalise(cfg, source_cond2_Int); --------------------------- STATISTICS -------------------------------------------------------------------------- % merge all subject's data cfg = []; cfg.keepindividual = 'yes'; grandavg_cond1 = ft_sourcegrandaverage(cfg, sSub6_cond1, sSub8_cond1, . tbc grandavg_cond2 = ft_sourcegrandaverage(cfg, sSub6_cond2, sSub8_cond2, . tbc % ------------------------------------------------------------------------- % run statistics over subjects cfg = []; cfg.dim = grandavg_cond1.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 500; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.correcttail = 'alpha'; nsubj=length(grandavg_cond1.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandavg_cond1, grandavg_cond2); -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Thu Jun 14 12:47:01 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Thu, 14 Jun 2012 12:47:01 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data Message-ID: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) First I realign the mri with the fiducials I get out of mri-lab (in voxels). The 'vol' structure is created like this: Cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.mri = mri; %the realigned mri grid = ft_prepare_sourcemodel(cfg); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke p.s. I also filed this in bugzilla, for more information see there: http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: grid_vol.png Type: image/png Size: 324339 bytes Desc: grid_vol.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grid_vol2.jpg Type: image/jpeg Size: 139682 bytes Desc: grid_vol2.jpg URL: From jan.schoffelen at donders.ru.nl Thu Jun 14 13:13:43 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 14 Jun 2012 13:13:43 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> Message-ID: <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> Hi Hanneke, You could try the following: mri=ft_convert_units(mri, 'mm'), prior to calling ft_prepare_sourcemodel? (and then do ft_convert_units(grid,'m') on the output) Also, what happens if you do cfg.grid.nonlinear = 'no'? I also saw that you already created a bug on our bugzilla-site. Thanks for doing so; we were already aware of your problem and it's on our list to look into it in more detail as soon as our time resources allow. At the moment I suspect a metric unit issue to be the problem when doing the inverse (non-linear) warp. Best, Jan-Mathijs On Jun 14, 2012, at 12:47 PM, wrote: > Dear all, > > I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > > First I realign the mri with the fiducials I get out of mri-lab (in voxels). > > The 'vol' structure is created like this: > > Cfg = []; > cfg.coordsys = 'neuromag'; > cfg.method = 'singleshell'; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > the 'grid' like this: > > load(strcat(basepath,'templates/template_grid.mat')); > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.coordsys = 'neuromag'; > cfg.mri = mri; %the realigned mri > grid = ft_prepare_sourcemodel(cfg); > > Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? > The results are plotted and attached to this e-mail. > > Thanks in advance, > > Hanneke > > p.s. I also filed this in bugzilla, for more information see there: > > http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com > > > __________________________________________ > > Hanneke van Dijk, PhD > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.p.van.dijk at gmail.com Thu Jun 14 13:21:11 2012 From: hanneke.p.van.dijk at gmail.com (Hanneke van Dijk) Date: Thu, 14 Jun 2012 13:21:11 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data In-Reply-To: <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> Message-ID: Hi Jan-Mathijs, The converting units before ft_prepare_sourcemodel solved it! I suspected the same, but didn't know at which step it went wrong, and wasn't aware of the function ft_convert_units... I will also report it in bugzilla so you have the solution at hand! Thanks so much! Hanneke On Thu, Jun 14, 2012 at 1:13 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Hanneke, > > You could try the following: > > mri=ft_convert_units(mri, 'mm'), prior to calling ft_prepare_sourcemodel? > (and then do ft_convert_units(grid,'m') on the output) > > Also, what happens if you do cfg.grid.nonlinear = 'no'? > > I also saw that you already created a bug on our bugzilla-site. Thanks for > doing so; we were already aware of your problem and it's on our list to > look into it in more detail as soon as our time resources allow. At the > moment I suspect a metric unit issue to be the problem when doing the > inverse (non-linear) warp. > > Best, > > Jan-Mathijs > > > On Jun 14, 2012, at 12:47 PM, < > Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > > Dear all, > > I am creating headmodels of neuromag data (Using FT version 20123105 and > the example script > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > > > First I realign the mri with the fiducials I get out of mri-lab (in > voxels). > > The 'vol' structure is created like this: > > Cfg = []; > cfg.coordsys = 'neuromag'; > cfg.method = 'singleshell'; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > the 'grid' like this: > > load(strcat(basepath,'templates/template_grid.mat')); > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.coordsys = 'neuromag'; > cfg.mri = mri; %the realigned mri > grid = ft_prepare_sourcemodel(cfg); > > Everything works well, untill I plot and see that the sizes/ origins (or > units) are completely different for the vol and grid. At the moment I > cannot find a solution. Does anyone have an idea? > The results are plotted and attached to this e-mail. > > Thanks in advance, > > Hanneke > > p.s. I also filed this in bugzilla, for more information see there: > > > http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com > > > __________________________________________ > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html< > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html> > > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 14 14:34:52 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 14 Jun 2012 14:34:52 +0200 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi Qi, There are several options in FT for estimating instantaneous phase. You could use a sliding time window FFT in ft_freqanalysis, where you choose to get complex Fourier spectra as output, and specify to get an estimate at each sample, as in: cfg = []; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.taper = 'hanning'; % in general, dpss here does not make sense if you're interested in instantaneous phase cfg.toi = data.time{1}; % assuming your trials are of equal length cfg.foi = 10; % or whatever frequency you want estimated (can of course be a vector) cfg.t_ftimwin = 5./cfg.foi; % use e.g. 5 cycles to estimate the phase cfg.output = 'fourier'; freq = ft_freqanalysis(cfg, data); The output freq.fourierspctrm will be a nTrials X nChannels X nFreqs X nSamples complex-valued matrix, from which you can get instantaneous phase by using angle(). An alternative approach would be to first filter your data, and then apply a Hilbert transform. This can be done in ft_preprocessing: cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = [7 14]; cfg.bpfilttype = 'fir'; % or 'firls' (slower), but avoid the default 'but' (= not well-suited for hilbert phase estimate) cfg.hilbert = 'angle'; % this gives you just the phase, you can specify 'complex' to get both phase and amplitude datPhase = ft_preprocessing(cfg, data); where datPhase will be just a FT raw data structure containing phase information (or complex phase/amplitude information, depending on your choice). Concerning the phase-locking value, you might want to take a look at ft_connectivityanalysis with cfg.method='plv', but I have no experience on this. Best, Eelke On 13 June 2012 23:35, qi li wrote: > Hi there, > > I am wondering whether fieldtrip has a function to compute the > instantaneous phase and phase locking value. Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From poil.simonshlomo at gmail.com Thu Jun 14 17:16:10 2012 From: poil.simonshlomo at gmail.com (Simon-Shlomo Poil) Date: Thu, 14 Jun 2012 17:16:10 +0200 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi Qi, I also don't know how to calculate the phase locking value in Fieldtrip. But you can do it in the Neurophysiological Biomarker Toolbox http://www.nbtwiki.net/doku.php?id=tutorial:phase_locking_value It's a toolbox for EEGLAB, but it should be possible to either use the functions directly on you fieldtrip signal, or simply convert the signal to eeglab format.. Good luck! :) Simon-Shlomo Poil 2012/6/13 qi li : > Hi there, > > I am wondering whether fieldtrip has a function to compute the > instantaneous phase and phase locking value. Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- -- Simon-Shlomo Poil Center of MR-Research University Children’s Hospital Zurich Mobile number: +41 (0)76 399 5809 Office number: +41 (0)44 266 3129 Skype: poil.simonshlomo Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html From Lilla.Magyari at mpi.nl Fri Jun 15 14:33:00 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 15 Jun 2012 14:33:00 +0200 Subject: [FieldTrip] ft_sourcemovie In-Reply-To: <4FD1BC40.3000509@donders.ru.nl> References: <4FD1BC40.3000509@donders.ru.nl> Message-ID: <4FDB2B7C.9010505@mpi.nl> hi Jorn, I am wondering if you have been the one who was trying to develop further the ft_sourcemovie function. If yes, I would like to ask some questions. Let me know. thanks. cheers, Lilla From Lilla.Magyari at mpi.nl Fri Jun 15 14:35:50 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 15 Jun 2012 14:35:50 +0200 Subject: [FieldTrip] ft_sourcemovie - ignore earlier email with this subject In-Reply-To: <4FD1BC40.3000509@donders.ru.nl> References: <4FD1BC40.3000509@donders.ru.nl> Message-ID: <4FDB2C26.8000006@mpi.nl> Dear all, sorry for my latest email. It went totally to the wrong address. Best, Lilla Jörn M. Horschig wrote: > Dear FieldTrip list, > > As you know, there are several getting started sections on our wiki-page: > http://fieldtrip.fcdonders.nl/getting_started > Unfortunately, however, we (the FieldTrip development team) are no > expert for all different dataformats, mainly because at the Donders > Institute, we do not work with all those data formats. You, on the other > hand, might be an expert. In order to provide good documentation, we > therefore rely on your input as well and would like to ask your help. > First, we want to get started with BrainVision data. > > 1) What would you like to see in the Getting Started guide? > 2) What explanation would you like to see there that is specific to > BrainVision data? > 3) Is there any particular example code that you would like to be shown > there? > 4) Are there particular problems you encountered (and solved) with > reading in and working with BrainVision data in FieldTrip? What are > these problems and what are the solutions? > 5) Are there questions you always asked yourself about using BrainVision > data with FieldTrip? > > It would be great if you share this information with us. Feel free to > write whatever you want, any information is useful (preferably of course > some elaborations and explanation so that we can put this information > there). If you are working with other data, feel free to also answer > this mail on a more general note, but we will ask separately for other > data formats in near future. > > On behalf of the FieldTrip development team, > Jörn > From ljbj_2009 at yahoo.com Fri Jun 15 19:35:05 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Fri, 15 Jun 2012 10:35:05 -0700 (PDT) Subject: [FieldTrip] TMSI2FiledTrip real time buffer Message-ID: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> Hi All,   The hardware I used is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. I was using TMSi-to-Fieldtrip interface from TMSi  to export data to the Fieldtrip buffer I tried the ft_realtime_signalviewer function to get the data as  suggested. The code I was using: cfg                = []; cfg.blocksize      = 1;                            % seconds cfg.dataset        = 'buffer://localhost:1972';    % where to read the data ft_realtime_signalviewer(cfg) I got some errors: Warning: could not read header from buffer://localhost:1972, retrying in 1 second > In ft_read_header at 894   In ft_realtime_signalviewer at 72   In test_Buffer_draw at 6 My question is that do I need to open the FieldTrip buffer server before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to do some kinds of initialization in FieldTrip? I would appreciate very much if you could give me a guide or step by step instruction on how to use real time buffer in FieldTrip with TMSi. Thank you all for the time and help! Best wishes   Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Fri Jun 15 22:44:50 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Fri, 15 Jun 2012 13:44:50 -0700 (PDT) Subject: [FieldTrip] configuration file for TMSi Message-ID: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> Hi All, Did  any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI.   Many thanks in advance for any insight. Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Jun 18 10:53:53 2012 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 18 Jun 2012 10:53:53 +0200 Subject: [FieldTrip] configuration file for TMSi In-Reply-To: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> References: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> Hi Jie I'm using the tmsi2ft buffer in my experiments with a refa72 amplifier. Below you can find a copy of the config file that I use (put it in a .txt file). When the tmsi2ft is correctly started you should see all the channels with some extra information below in the cmd window. You could also try starting the bufferviewer (in realtime/utilities/viewer) to see if data is comming in after you have started the tmsi2ft buffer. Best, Marianne # Write n=label to select hardware channel number n (starting from 1) # and attach a label to it. This will show up in the Fieldtrip buffer # and the GDF file. # Currently, there is no check for double inclusion of channels. # That is, if you define 1=FOO and 1=BAR, the first hardware channel # will show up twice, with different names. # Channels listed before the first [save] or [stream] line will be added # to both saving and streaming selections. Write [select] to enable # selection for both saving and streaming. [select] 1=Fp1 2=Fpz 3=Fp2 4=F7 5=F3 6=Fz 7=F4 8=F8 9=FC5 10=FC1 11=FC2 12=FC6 13=M1 14=T7 15=C3 16=Cz 17=C4 18=T8 19=M2 20=CP5 21=CP1 22=CP2 23=CP6 24=P7 25=P3 26=Pz 27=P4 28=P8 29=POz 30=O1 31=Oz 32=O2 33=AF7 34=AF3 35=AF4 36=AF8 37=F5 38=F1 39=F2 40=F6 41=FC3 42=FCz 43=FC4 44=C5 45=C1 46=C2 47=C6 48=CP3 49=CPz 50=CP4 51=P5 52=P1 53=P2 54=P6 55=PO5 56=PO3 57=PO4 58=PO6 59=FT7 60=FT8 61=TP7 62=TP8 63=PO7 64=PO8 65=BIP1 66=BIP2 67=BIP3 68=BIP4 69=AUX1 70=AUX2 71=AUX3 72=AUX4 73=Digi # Please take note that the channels will be written out in the order specified here, # that is, they will not be sorted according to the hardware channel number! # Write "downsample X" with a positive number X to set the downsampling # factor for streaming. The GDF file will receive full-rate data. # Assuming the sampling rate of the TMSI device is 5Khz, downsample to # 1 KHz (5x) with a 4-th order Butterworth lowpass @ 250 Hz # downsample=5 # bandwidth=250 # bworder=4 # Adjust sample rate samplerate=500 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] On Behalf Of jie liu [ljbj_2009 at yahoo.com] Sent: Friday, June 15, 2012 10:44 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] configuration file for TMSi Hi All, Did any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI. Many thanks in advance for any insight. Jie Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From jm.horschig at donders.ru.nl Mon Jun 18 15:58:58 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 18 Jun 2012 15:58:58 +0200 Subject: [FieldTrip] TMSI2FiledTrip real time buffer In-Reply-To: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> References: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> Message-ID: <4FDF3422.8070905@donders.ru.nl> Dear Jie, I'm afraid I cannot really help you with your particular problem, but some basics that you should generally be covered and may thus help nonetheless: - when using cfg.dataset = '(...) localhost (...) ' make sure that the shared memory/buffer is running locally, i.e. on the same computer. This involves starting tmsi2ft on that computer. - if it is running on a different computer, be sure to not use localhost but the corresponding computer's name or ip - make sure that the port (here 1972) is open (i.e. not blocked by some firewall or in use by another program) and that the buffer accesses it - maybe you could try to 'ping' the ip where the buffer is supposed to run to check whether everything is set up correctly (not sure if this actually works) I guess you already saw this page (but I thought it'd be wise to point to it nonetheless): http://fieldtrip.fcdonders.nl/development/realtime/tmsi?s[]=tmsi I hope that one of these comments help. Best, Jörn On 6/15/2012 7:35 PM, jie liu wrote: > Hi All, > The hardware I used is TMSI refa 128 working with usb (driver is fusbi > version 6.0.0.76.) windows xp+service pack3. > I was using TMSi-to-Fieldtrip interface from TMSito export data to the > Fieldtrip buffer > I tried the ft_realtime_signalviewer function to get the data assuggested. > The code I was using: > cfg= []; > cfg.blocksize= 1;% seconds > cfg.dataset= 'buffer://localhost:1972';% where to read the data > ft_realtime_signalviewer(cfg) > I got some errors: > Warning: could not read header from > buffer://localhost:1972, retrying in 1 > second > > In ft_read_header at 894 > In ft_realtime_signalviewer at 72 > In test_Buffer_draw at 6 > My question is that do I need to open the FieldTrip buffer server > before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to > do some kinds of initialization in FieldTrip? > I would appreciate very much if you could give me a guide or step by > step instruction on how to use real time buffer in FieldTrip with TMSi. > Thank you all for the time and help! > Best wishes > Jie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Mon Jun 18 16:32:13 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Mon, 18 Jun 2012 07:32:13 -0700 (PDT) Subject: [FieldTrip] configuration file for TMSi In-Reply-To: <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> References: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> Message-ID: <1340029933.69547.YahooMailNeo@web160403.mail.bf1.yahoo.com>   Hi Marianne, I am glad to get your suggestions and comments. Thank you!     The original values from Refa need to be converted to voltage in vu, how did you get the scale based on the gain and offset for each channel?   I really appreciated your time and help. Thank you again!   Best regards Jie ________________________________ From: "Severens, Marianne" To: FieldTrip discussion list Sent: Monday, June 18, 2012 3:53 AM Subject: Re: [FieldTrip] configuration file for TMSi Hi Jie I'm using the tmsi2ft buffer in my experiments with a refa72 amplifier. Below you can find a copy of the config file that I use (put it in a .txt file). When the tmsi2ft is correctly started you should see all the channels with some extra information below in the cmd window. You could also try starting the bufferviewer (in realtime/utilities/viewer) to see if data is comming in after you have started the tmsi2ft buffer. Best, Marianne # Write n=label to select hardware channel number n (starting from 1) # and attach a label to it. This will show up in the Fieldtrip buffer # and the GDF file. # Currently, there is no check for double inclusion of channels. # That is, if you define 1=FOO and 1=BAR, the first hardware channel # will show up twice, with different names. # Channels listed before the first [save] or [stream] line will be added # to both saving and streaming selections. Write [select] to enable # selection for both saving and streaming. [select] 1=Fp1 2=Fpz 3=Fp2 4=F7 5=F3 6=Fz 7=F4 8=F8 9=FC5 10=FC1 11=FC2 12=FC6 13=M1 14=T7 15=C3 16=Cz 17=C4 18=T8 19=M2 20=CP5 21=CP1 22=CP2 23=CP6 24=P7 25=P3 26=Pz 27=P4 28=P8 29=POz 30=O1 31=Oz 32=O2 33=AF7 34=AF3 35=AF4 36=AF8 37=F5 38=F1 39=F2 40=F6 41=FC3 42=FCz 43=FC4 44=C5 45=C1 46=C2 47=C6 48=CP3 49=CPz 50=CP4 51=P5 52=P1 53=P2 54=P6 55=PO5 56=PO3 57=PO4 58=PO6 59=FT7 60=FT8 61=TP7 62=TP8 63=PO7 64=PO8 65=BIP1 66=BIP2 67=BIP3 68=BIP4 69=AUX1 70=AUX2 71=AUX3 72=AUX4 73=Digi # Please take note that the channels will be written out in the order specified here, # that is, they will not be sorted according to the hardware channel number! # Write "downsample X" with a positive number X to set the downsampling # factor for streaming. The GDF file will receive full-rate data. # Assuming the sampling rate of the TMSI device is 5Khz, downsample to # 1 KHz (5x) with a 4-th order Butterworth lowpass @ 250 Hz # downsample=5 # bandwidth=250 # bworder=4 # Adjust sample rate samplerate=500 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] On Behalf Of jie liu [ljbj_2009 at yahoo.com] Sent: Friday, June 15, 2012 10:44 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] configuration file for TMSi Hi All, Did  any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI. Many thanks in advance for any insight. Jie Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Mon Jun 18 17:05:13 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Mon, 18 Jun 2012 08:05:13 -0700 (PDT) Subject: [FieldTrip] TMSI2FiledTrip real time buffer In-Reply-To: <4FDF3422.8070905@donders.ru.nl> References: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> <4FDF3422.8070905@donders.ru.nl> Message-ID: <1340031913.62103.YahooMailNeo@web160406.mail.bf1.yahoo.com> Hi Jörn, I am glad to get your suggestions and comments. I tested on the same PC and the port was open. still the same problem I really appreciated your time and help. Thank you again! best regards Jie ________________________________ From: ""Jörn M. Horschig"" To: FieldTrip discussion list Sent: Monday, June 18, 2012 8:58 AM Subject: Re: [FieldTrip] TMSI2FiledTrip real time buffer Dear Jie, I'm afraid I cannot really help you with your particular problem, but some basics that you should generally be covered and may thus help nonetheless:  - when using cfg.dataset = '(...) localhost (...) ' make sure that the shared memory/buffer is running locally, i.e. on the same computer. This involves starting tmsi2ft on that computer.  - if it is running on a different computer, be sure to not use localhost but the corresponding computer's name or ip  - make sure that the port (here 1972) is open (i.e. not blocked by some firewall or in use by another program) and that the buffer accesses it  - maybe you could try to 'ping' the ip where the buffer is supposed to run to check whether everything is set up correctly (not sure if this actually works) I guess you already saw this page (but I thought it'd be wise to point to it nonetheless): http://fieldtrip.fcdonders.nl/development/realtime/tmsi?s[]=tmsi I hope that one of these comments help. Best, Jörn On 6/15/2012 7:35 PM, jie liu wrote: Hi All, >  >The hardware I used is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. >I was using TMSi-to-Fieldtrip interface from TMSi  to export data to the Fieldtrip buffer >I tried the ft_realtime_signalviewer function to get the data as  suggested. >The code I was using: >cfg                = []; >cfg.blocksize      = 1;                            % seconds >cfg.dataset        = 'buffer://localhost:1972';    % where to read the data >ft_realtime_signalviewer(cfg) >I got some errors: >Warning: could not read header from >buffer://localhost:1972, retrying in 1 >second >> In ft_read_header at 894 >  In ft_realtime_signalviewer at 72 >  In test_Buffer_draw at 6 >My question is that do I need to open the FieldTrip buffer server before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to do some kinds of initialization in FieldTrip? >I would appreciate very much if you could give me a guide or step by step instruction on how to use real time buffer in FieldTrip with TMSi. >Thank you all for the time and help! >Best wishes >  >Jie > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From PGOODIN at groupwise.swin.edu.au Tue Jun 19 01:51:11 2012 From: PGOODIN at groupwise.swin.edu.au (Peter Goodin) Date: Tue, 19 Jun 2012 09:51:11 +1000 Subject: [FieldTrip] Difference wave calculation Message-ID: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Hi Fieldtrip list, I'm quite new to using Fieldtrip for analysis and can't find any information on how to create difference waves, for example to examine MMN activity. Currently I've just been making a new structure and adding items from the ft_timelockedanalysis function, subtracting the standard from the deviant for the .avg and .var fields while keeping the rest intact. Are there any tutorials available that can show me the recommended way to go about this? Alternatively, can anyone working with difference waves give an example of how they calculate them? Thanks, Peter. Peter Goodin Ph.D Candidate Brain and Psychological Research Centre (BPsyC) Swinburne University of Technology 400 Burwood Road, Hawthorn, VIC 3122 Monash Alfred Psychiatric Research Centre (MAPrc) Alfred Hospital Level 1, Old Baker Building, Vic 3008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 19 09:06:37 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 19 Jun 2012 09:06:37 +0200 Subject: [FieldTrip] Difference wave calculation In-Reply-To: <4FE04B8F0200004100011613@groupwise.swin.edu.au> References: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Message-ID: Hi Peter, In that case, welcome to the Fieldtrip list :) Actually, I think your approach of calculating a difference between event-related activities is pretty much the recommended standard way. So: cfg = []; tl1 = ft_timelockanalysis(cfg, data1); tl2 = ft_timelockanalysis(cfg, data2); tlDiff = tl1; tlDiff.avg = tl1.avg - tl2.avg; Of course, this is assuming all trials have the same time axis. And also, if needed, you can change the configuration to whatever is appropriate for your data. One note of caution: while the above is perfectly valid for the averages, you cannot simply subtract the variances from eachother, and expect to end up with the variance of your difference wave. I had to refresh my memory, but wikipedia tells me that the variance of two random variables subtracted from each other is equal to the variances added, minus twice the covariance between them. Best, Eelke On 19 June 2012 01:51, Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any information > on how to create difference waves, for example to examine MMN activity. > Currently I've just been making a new structure and adding items from the > ft_timelockedanalysis function, subtracting the standard from the deviant > for the .avg and .var fields while keeping the rest intact. > > Are there any tutorials available that can show me the recommended way to go > about this? Alternatively, can anyone working with difference waves give an > example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From PGOODIN at groupwise.swin.edu.au Tue Jun 19 13:17:24 2012 From: PGOODIN at groupwise.swin.edu.au (Peter Goodin) Date: Tue, 19 Jun 2012 21:17:24 +1000 Subject: [FieldTrip] Difference wave calculation Message-ID: <4FE0EC640200004100023C9E@groupwise.swin.edu.au> Hi Eelke, Thanks for the kind welcome! Also, thanks for telling me what the .var field contains... :D Peter. >>> Eelke Spaak 19/06/12 5:23 PM >>> Hi Peter, In that case, welcome to the Fieldtrip list :) Actually, I think your approach of calculating a difference between event-related activities is pretty much the recommended standard way. So: cfg = []; tl1 = ft_timelockanalysis(cfg, data1); tl2 = ft_timelockanalysis(cfg, data2); tlDiff = tl1; tlDiff.avg = tl1.avg - tl2.avg; Of course, this is assuming all trials have the same time axis. And also, if needed, you can change the configuration to whatever is appropriate for your data. One note of caution: while the above is perfectly valid for the averages, you cannot simply subtract the variances from eachother, and expect to end up with the variance of your difference wave. I had to refresh my memory, but wikipedia tells me that the variance of two random variables subtracted from each other is equal to the variances added, minus twice the covariance between them. Best, Eelke On 19 June 2012 01:51, Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any information > on how to create difference waves, for example to examine MMN activity. > Currently I've just been making a new structure and adding items from the > ft_timelockedanalysis function, subtracting the standard from the deviant > for the .avg and .var fields while keeping the rest intact. > > Are there any tutorials available that can show me the recommended way to go > about this? Alternatively, can anyone working with difference waves give an > example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Lilla.Magyari at mpi.nl Tue Jun 19 13:50:08 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Tue, 19 Jun 2012 13:50:08 +0200 Subject: [FieldTrip] Difference wave calculation In-Reply-To: <4FE04B8F0200004100011613@groupwise.swin.edu.au> References: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Message-ID: <4FE06770.90501@mpi.nl> hi Peter, You can find in this tutorial site: http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock under "Plotting the results" how condition differences are calculated for visualization purposes. It is probably the same that you have done already. Best, Lilla Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any > information on how to create difference waves, for example to examine > MMN activity. Currently I've just been making a new structure and adding > items from the ft_timelockedanalysis function, subtracting the standard > from the deviant for the .avg and .var fields while keeping the rest > intact. > > Are there any tutorials available that can show me the recommended way > to go about this? Alternatively, can anyone working with difference > waves give an example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From markus.siegel at uni-tuebingen.de Tue Jun 19 14:11:58 2012 From: markus.siegel at uni-tuebingen.de (Markus Siegel) Date: Tue, 19 Jun 2012 14:11:58 +0200 Subject: [FieldTrip] PhD Position - Centre for Integrative Neuroscience (CIN), Tuebingen Message-ID: <2C8E3217-CF4C-473B-AF53-A73DBBF6C06A@uni-tuebingen.de> The laboratory of Markus Siegel at the Centre for Integrative Neuroscience (CIN), Tuebingen (http://www.cin.uni-tuebingen.de/) is seeking candidates for a PhD position to study large-scale neuronal interactions in humans. The project will combine psychophysics, MEG, EEG, and non-invasive stimulation techniques to investigate large-scale neuronal interactions underlying visuomotor decision-making. The ideal candidate is highly motivated with a strong interest in interdisciplinary research. Candidates must have an MA (or equivalent) in neuroscience, psychology, physics, or related fields. Fluency in Matlab is required. Experience in electrophysiology and/or EEG/MEG is highly valued. Applications should include a detailed CV, statement of research interests, and names of at least two referees. Please email applications in PDF format to Markus Siegel (markus.siegel at uni-tuebingen.de) before July 10th, 2012. -- Dr. Markus Siegel Principal Investigator, Centre for Integrative Neuroscience (CIN), Tübingen From A.C.Schouten at tudelft.nl Wed Jun 20 10:02:32 2012 From: A.C.Schouten at tudelft.nl (Alfred Schouten - 3ME) Date: Wed, 20 Jun 2012 08:02:32 +0000 Subject: [FieldTrip] PhD positions - TU Delft Message-ID: The Department of Biomechanical Engineering is seeking three PhD students for the ERC Research Project "4D-EEG: A new tool to investigate the spatial and temporal activity patterns in the brain". 4D-EEG is a highly prestigious project to develop a novel method for investigating brain activity in healthy subjects and humans. The first goal of the project is to develop a new tool to determine brain activity at a high temporal and spatial resolution, with the focus on motor control. The method combines high density EEG and EEG source localisation with advanced robot manipulators to impose precise perturbations to the joints. Using system identification, the dynamic response of brain areas to the perturbation will be assessed, leading to a functional interpretation of the EEG with time. 4D-EEG will provide a direct measure of the neural activity in the brain related to motor control tasks. The second goal is to generate and validate new hypotheses about the longitudinal relationship between motor learning and neuroplasticity in patients suffering from a stroke. The non-invasive 4D-EEG technique combined with haptic robots will open a window into what and how patients (re)learn when showing motor recovery after stroke, in order to develop more effective patient-tailored therapies in neuro-rehabilitation. A further aim is to link these functional results with structural measurements, like Diffusion Tensor Imaging (e.g. DTI). The project consists of five subprojects, each requiring specific expertise. At this moment we are looking for three candidates for three subproject involving 1) EEG source localization, 2) Diffusion Tensor Imaging, 3) Neuromuscular modelling. You should have experience in one or more of the following fields: data acquisition and processing of electrophysiological and biomechanical signals, neuroimaging and EEG source localisation. You should have an affinity for experiments in human subjects and have extensive programming skills (e.g. Matlab or C++). You should have an MSc in (Bio)Mechanical or Electrical Engineering or in (applied) Mathematics or Physics. Excellent knowledge of English is a prerequisite. The successful candidates will be employed by Delft University of Technology for a fixed period of four years, within which he/she is expected to write a doctoral thesis. TU Delft offers an attractive benefits package, including a flexible work week, free high-speed Internet access from home (with contracts of two years or longer), and the option of assembling a customised compensation and benefits package (the 'IKA'). Salary and benefits are in accordance with the Collective Labour Agreement for Dutch Universities. For more information about this position, please contact Dr. A.C. Schouten, e-mail: a.c.schouten at tudelft.nl. To apply, please e-mail a detailed CV along with a letter of application by 1 July 2012 to M.J.B. Kole, application-3mE at tudelft.nl. When applying for this position, please refer to vacancy number 3ME12-20 and the specific subproject (- 1, - 2, or - 3). ------------------------------------------------------------------------------------ Alfred C. Schouten, PhD associate professor Neuromuscular Control Delft University of Technology, Faculty 3mE Biomechanical Engineering, room 5A-1-15 +31-(0)-152785247, http://www.3me.tudelft.nl/nmc University of Twente, Faculty CTW Biomechanical Engineering, room W210 +31-(0)-534892446, http://www.bw.ctw.utwente.nl/research/neuromechanics/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jun 20 17:26:37 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 17:26:37 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface Message-ID: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Dear Fieldtrip users and developpers, I would like to project and visualise time-frequency power values computed on planar gradient data at the sensors level onto the brain surface segmentated from the anatomial MRI of the subject. Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the scripts ? Does anyone see any inconvenient to this visualisation ? Thanks a lot for you help. Andrea -- NEW EMAIL: andrea.brovelli at univ-amu.fr From eelke.spaak at donders.ru.nl Wed Jun 20 18:03:36 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 20 Jun 2012 18:03:36 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: Dear Andrea, If I understand your question correctly, you just want to *visualise* sensor space activity on a brain surface, without doing source reconstruction first? I would advise against this. Time-frequency power values of your planar gradient data reflect the spectral characteristics of the magnetic gradient at the location of your sensors. These sensors are not located at the surface of the brain, but quite some centimeters away from it. Therefore, visualising the data as if it were actually recorded on the brain surface, without doing a proper transformation, is potentially misleading. It is true that people tend to display all sorts of data in a 'topoplot' fashion, but in that case it is clear to the audience that you are looking at a representation in sensor-space. Have a look at ft_topoplotTFR for this approach, if you're not already familiar with it. If you want to display your time-frequency activity on a cortical surface (which is of course a perfectly valid thing to want to do), you first should map the sensor activity to source space. This mapping is non-trivial and can be done by e.g. beamforming. See http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on this. That tutorial ends with a surface plot. Hope this helps! Best, Eelke On 20 June 2012 17:26, andrea brovelli wrote: > > Dear Fieldtrip users and developpers, > > I would like to project and visualise time-frequency power values computed > on planar gradient data at the sensors level onto the brain surface > segmentated from the anatomial MRI of the subject. > > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the > scripts ? > > Does anyone see any inconvenient to this visualisation ? > > Thanks a lot for you help. > > Andrea > > > > -- > >  NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Wed Jun 20 18:22:48 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 20 Jun 2012 18:22:48 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: Dear Andrea, I would like to further clarify the options for this question. Perhaps could you suggest which inverse algorithm you had in mind? For example, it is possible to use beamforming limited only to voxels defined as lying on the cortical sheet (i.e. restrict .inside to be only the gray matter). This is possible, but you might miss out on the spatial peak of the source lying just 5mm away to the inside a bit. Thus, it would be better to do as Eelke suggested and apply beamforming to the whole inside of the brain, and then project those values to the surface for visualisation (which is easily done with the cfg.method='surface' option in ft_sourceplot). Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA or MNE) which are commonly used to reconstruct onto cortical surface voxels only. This works because the min-norm algorithms force all activity to lie in the region over which you select to reconstruct. Thus, a source 5mm inside of the surface will automatically get projected to the surface. I also agree with Eelke you should not just project sensors to surface without doing a specific type of inverse method. Cheers, Johanna 2012/6/20 Eelke Spaak > Dear Andrea, > > If I understand your question correctly, you just want to *visualise* > sensor space activity on a brain surface, without doing source > reconstruction first? I would advise against this. Time-frequency > power values of your planar gradient data reflect the spectral > characteristics of the magnetic gradient at the location of your > sensors. These sensors are not located at the surface of the brain, > but quite some centimeters away from it. Therefore, visualising the > data as if it were actually recorded on the brain surface, without > doing a proper transformation, is potentially misleading. It is true > that people tend to display all sorts of data in a 'topoplot' fashion, > but in that case it is clear to the audience that you are looking at a > representation in sensor-space. Have a look at ft_topoplotTFR for this > approach, if you're not already familiar with it. > > If you want to display your time-frequency activity on a cortical > surface (which is of course a perfectly valid thing to want to do), > you first should map the sensor activity to source space. This mapping > is non-trivial and can be done by e.g. beamforming. See > http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on > this. That tutorial ends with a surface plot. > > Hope this helps! > > Best, > Eelke > > On 20 June 2012 17:26, andrea brovelli > wrote: > > > > Dear Fieldtrip users and developpers, > > > > I would like to project and visualise time-frequency power values > computed > > on planar gradient data at the sensors level onto the brain surface > > segmentated from the anatomial MRI of the subject. > > > > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the > > scripts ? > > > > Does anyone see any inconvenient to this visualisation ? > > > > Thanks a lot for you help. > > > > Andrea > > > > > > > > -- > > > > NEW EMAIL: andrea.brovelli at univ-amu.fr > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jun 20 18:56:58 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 18:56:58 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> Thank you very much for your quick reply, Eelke and Johanna. Yes, I would like only to visualise the data on a cortical surface and I am aware of the potential misinterpretation of such visualisation. I would like to use it as an intermediate step between the ft_topoplot on 2D layout and proper source localisation. It would serve as an exploratory tool to decide at which frequency, say, I would do a beamforming and to have a very rough idea of the number and location of cortical sources. However, it is not very clear to me how I could do this using the example in the beamforming tutorial. Could you be a bit more explicit ? Should I need to do source reconstruction for visualisation ? Thanks a lot Andrea ----- Messaggio da johanna.zumer at donders.ru.nl --------- Data: Wed, 20 Jun 2012 18:22:48 +0200 Da: Johanna Zumer Rispondi-A: FieldTrip discussion list Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface A: FieldTrip discussion list > Dear Andrea, > > I would like to further clarify the options for this question. Perhaps > could you suggest which inverse algorithm you had in mind? > > For example, it is possible to use beamforming limited only to voxels > defined as lying on the cortical sheet (i.e. restrict .inside to be only > the gray matter). This is possible, but you might miss out on the spatial > peak of the source lying just 5mm away to the inside a bit. Thus, it > would be better to do as Eelke suggested and apply beamforming to the whole > inside of the brain, and then project those values to the surface for > visualisation (which is easily done with the cfg.method='surface' option in > ft_sourceplot). > > Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA > or MNE) which are commonly used to reconstruct onto cortical surface voxels > only. This works because the min-norm algorithms force all activity to lie > in the region over which you select to reconstruct. Thus, a source 5mm > inside of the surface will automatically get projected to the surface. > > I also agree with Eelke you should not just project sensors to surface > without doing a specific type of inverse method. > > Cheers, > Johanna > > 2012/6/20 Eelke Spaak > >> Dear Andrea, >> >> If I understand your question correctly, you just want to *visualise* >> sensor space activity on a brain surface, without doing source >> reconstruction first? I would advise against this. Time-frequency >> power values of your planar gradient data reflect the spectral >> characteristics of the magnetic gradient at the location of your >> sensors. These sensors are not located at the surface of the brain, >> but quite some centimeters away from it. Therefore, visualising the >> data as if it were actually recorded on the brain surface, without >> doing a proper transformation, is potentially misleading. It is true >> that people tend to display all sorts of data in a 'topoplot' fashion, >> but in that case it is clear to the audience that you are looking at a >> representation in sensor-space. Have a look at ft_topoplotTFR for this >> approach, if you're not already familiar with it. >> >> If you want to display your time-frequency activity on a cortical >> surface (which is of course a perfectly valid thing to want to do), >> you first should map the sensor activity to source space. This mapping >> is non-trivial and can be done by e.g. beamforming. See >> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >> this. That tutorial ends with a surface plot. >> >> Hope this helps! >> >> Best, >> Eelke >> >> On 20 June 2012 17:26, andrea brovelli >> wrote: >> > >> > Dear Fieldtrip users and developpers, >> > >> > I would like to project and visualise time-frequency power values >> computed >> > on planar gradient data at the sensors level onto the brain surface >> > segmentated from the anatomial MRI of the subject. >> > >> > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >> > scripts ? >> > >> > Does anyone see any inconvenient to this visualisation ? >> > >> > Thanks a lot for you help. >> > >> > Andrea >> > >> > >> > >> > -- >> > >> > NEW EMAIL: andrea.brovelli at univ-amu.fr >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From narayan.ps at tut.fi Wed Jun 20 19:08:40 2012 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Wed, 20 Jun 2012 20:08:40 +0300 Subject: [FieldTrip] EEG data as Matlab matrix Message-ID: <20120620200840.00005cf3@unknown> Hello all, I have EEG data in the format of matrix in Matlab (samples X channels). How can I import this into fieldtrip for further analysis ? I read that fieldtrip supports only standard EEG formats. Any help will be appreciated by this novice field trip user! -- Best Regards Narayan Puthanmadam Subramaniyam, M.Sc PhD student/researcher Department of Biomedical Engineering, Tampere University of Technology Finn Medi 1, 4th Floor, Room 203 FI 33520, Finland From Lilla.Magyari at mpi.nl Wed Jun 20 19:40:02 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 20 Jun 2012 19:40:02 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <20120620200840.00005cf3@unknown> References: <20120620200840.00005cf3@unknown> Message-ID: <4FE20AF2.4060502@mpi.nl> Hi, this FAQ describes how you can make your data compatible with FieldTrip: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat I hope this helps. Best, Lilla Narayan Puthanmadam Subramaniyam wrote: > Hello all, > > I have EEG data in the format of matrix in Matlab (samples X channels). > How can I import this into fieldtrip for further analysis ? I read that > fieldtrip supports only standard EEG formats. > > Any help will be appreciated by this novice field trip user! > > From andrea.brovelli at univ-amu.fr Wed Jun 20 20:44:37 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 20:44:37 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> Message-ID: <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> Otherwise, to make things easier: is there a simple way to visualise a given topography in 3D (rather than in a 2D layout as done with ft_topoplotTFR) together with different segmented surfaces such as the skin or the brain meshes ? Thanks Andrea ----- Messaggio da andrea.brovelli at univ-amu.fr --------- Data: Wed, 20 Jun 2012 18:56:58 +0200 Da: andrea brovelli Rispondi-A: FieldTrip discussion list Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface A: FieldTrip discussion list > Thank you very much for your quick reply, Eelke and Johanna. > > Yes, I would like only to visualise the data on a cortical surface > and I am aware of the potential misinterpretation of such > visualisation. > > I would like to use it as an intermediate step between the > ft_topoplot on 2D layout and proper source localisation. It would > serve as an exploratory tool to decide at which frequency, say, I > would do a beamforming and to have a very rough idea of the number > and location of cortical sources. > > However, it is not very clear to me how I could do this using the > example in the beamforming tutorial. Could you be a bit more > explicit ? Should I need to do source reconstruction for > visualisation ? > > Thanks a lot > > Andrea > > > ----- Messaggio da johanna.zumer at donders.ru.nl --------- > Data: Wed, 20 Jun 2012 18:22:48 +0200 > Da: Johanna Zumer > Rispondi-A: FieldTrip discussion list > Oggetto: Re: [FieldTrip] Projection from sensors space to segmented > brain surface > A: FieldTrip discussion list > > >> Dear Andrea, >> >> I would like to further clarify the options for this question. Perhaps >> could you suggest which inverse algorithm you had in mind? >> >> For example, it is possible to use beamforming limited only to voxels >> defined as lying on the cortical sheet (i.e. restrict .inside to be only >> the gray matter). This is possible, but you might miss out on the spatial >> peak of the source lying just 5mm away to the inside a bit. Thus, it >> would be better to do as Eelke suggested and apply beamforming to the whole >> inside of the brain, and then project those values to the surface for >> visualisation (which is easily done with the cfg.method='surface' option in >> ft_sourceplot). >> >> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >> or MNE) which are commonly used to reconstruct onto cortical surface voxels >> only. This works because the min-norm algorithms force all activity to lie >> in the region over which you select to reconstruct. Thus, a source 5mm >> inside of the surface will automatically get projected to the surface. >> >> I also agree with Eelke you should not just project sensors to surface >> without doing a specific type of inverse method. >> >> Cheers, >> Johanna >> >> 2012/6/20 Eelke Spaak >> >>> Dear Andrea, >>> >>> If I understand your question correctly, you just want to *visualise* >>> sensor space activity on a brain surface, without doing source >>> reconstruction first? I would advise against this. Time-frequency >>> power values of your planar gradient data reflect the spectral >>> characteristics of the magnetic gradient at the location of your >>> sensors. These sensors are not located at the surface of the brain, >>> but quite some centimeters away from it. Therefore, visualising the >>> data as if it were actually recorded on the brain surface, without >>> doing a proper transformation, is potentially misleading. It is true >>> that people tend to display all sorts of data in a 'topoplot' fashion, >>> but in that case it is clear to the audience that you are looking at a >>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>> approach, if you're not already familiar with it. >>> >>> If you want to display your time-frequency activity on a cortical >>> surface (which is of course a perfectly valid thing to want to do), >>> you first should map the sensor activity to source space. This mapping >>> is non-trivial and can be done by e.g. beamforming. See >>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>> this. That tutorial ends with a surface plot. >>> >>> Hope this helps! >>> >>> Best, >>> Eelke >>> >>> On 20 June 2012 17:26, andrea brovelli >>> wrote: >>>> >>>> Dear Fieldtrip users and developpers, >>>> >>>> I would like to project and visualise time-frequency power values >>> computed >>>> on planar gradient data at the sensors level onto the brain surface >>>> segmentated from the anatomial MRI of the subject. >>>> >>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>> scripts ? >>>> >>>> Does anyone see any inconvenient to this visualisation ? >>>> >>>> Thanks a lot for you help. >>>> >>>> Andrea >>>> >>>> >>>> >>>> -- >>>> >>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> > > > ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- > > > -- > > NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From explena at gmail.com Thu Jun 21 06:19:06 2012 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 21 Jun 2012 12:19:06 +0800 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi, Although this might be a late reply, I would like to contribute my two cents and also would be glad to hear any comment. To calculate PLV 1. get and real and imaginary part of of Fourier coefficents for each trial for each sensor cfg.method = 'wavelet'; % 'mtmfft' works as well although I do not really look into the differences between the two cfg.keeptrials = 'yes'; cfg.output = 'fourier'; fourier_coefficent = ft_freqanalysis(cfg, data); 2. calculate the phase phase = arctangent of the imaginary Fourier coefficient divided by the real one. 3. calculate the phase difference between two sensors, i and j (Melloni et al. Journal of neuroscience 2007, 27:2858) phaseij = the phase of the sensor i multiplied by the complex conjugate of the second sensor j 4. calculate the PLV PLVij = the absolute value of the mean of the phaseij across all the trials On Thu, Jun 14, 2012 at 11:16 PM, Simon-Shlomo Poil < poil.simonshlomo at gmail.com> wrote: > Hi Qi, > > I also don't know how to calculate the phase locking value in > Fieldtrip. But you can do it in the Neurophysiological Biomarker > Toolbox http://www.nbtwiki.net/doku.php?id=tutorial:phase_locking_value > > It's a toolbox for EEGLAB, but it should be possible to either use the > functions directly on you fieldtrip signal, or simply convert the > signal to eeglab format.. > > Good luck! :) > Simon-Shlomo Poil > > 2012/6/13 qi li : > > Hi there, > > > > I am wondering whether fieldtrip has a function to compute the > > instantaneous phase and phase locking value. Thanks! > > > > Qi > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > -- > -- > Simon-Shlomo Poil > > Center of MR-Research > University Children’s Hospital Zurich > > Mobile number: +41 (0)76 399 5809 > Office number: +41 (0)44 266 3129 > Skype: poil.simonshlomo > Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and > http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From narayan.ps at tut.fi Thu Jun 21 11:55:13 2012 From: narayan.ps at tut.fi (Narayan) Date: Thu, 21 Jun 2012 12:55:13 +0300 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <4FE20AF2.4060502@mpi.nl> References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> Message-ID: <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Hi Thanks for the reply. I created the data structure as explained in the link using matlab data matrix. I am interested in preprocessing the EEG data ( filtering, artifact removal etc). How can I use this data structure to pass on to the functions that do preprocessing. When I use the ft_preprocessing function with cfg and data as input parameters, I get the following error ??? Error using ==> ft_checkdata at 265 This function requires raw data as input. Error in ==> ft_preprocessing at 281 data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); -- Best Regards, Narayan Quoting "Magyari, Lilla" : > Hi, > > this FAQ describes how you can make your data compatible with FieldTrip: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat > > I hope this helps. > > Best, > Lilla > > Narayan Puthanmadam Subramaniyam wrote: >> Hello all, >> >> I have EEG data in the format of matrix in Matlab (samples X channels). >> How can I import this into fieldtrip for further analysis ? I read that >> fieldtrip supports only standard EEG formats. >> >> Any help will be appreciated by this novice field trip user! >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From eelke.spaak at donders.ru.nl Thu Jun 21 12:04:56 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 21 Jun 2012 12:04:56 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <20120621125513.147062r16nk3qr8c@webmail.tut.fi> References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: Hi Narayan, How does your data structure look after you import it? I.e. what do you get when you type >> data into matlab? (Assuming your structure is called 'data'.) Most likely, you did not convert your data 100% correctly, since ft_checkdata does not recognize it as proper fieldtrip data. Post the details, and we can probably help. Best, Eelke On 21 June 2012 11:55, Narayan wrote: > Hi > > Thanks for the reply. I created the data structure as explained in the link > using matlab data matrix. I am interested in preprocessing the EEG data ( > filtering, artifact removal etc). > > How can I use this data structure to pass on to the functions that do > preprocessing. When I use the ft_preprocessing function with cfg and data as > input parameters, I get the following error > > ??? Error using ==> ft_checkdata at 265 > This function requires raw data as input. > > Error in ==> ft_preprocessing at 281 >  data = ft_checkdata(data, 'datatype', 'raw', >  'hassampleinfo', 'yes'); > > > -- > Best Regards, > Narayan > > > > > Quoting "Magyari, Lilla" : > >> Hi, >> >> this FAQ describes how  you can make your data compatible with FieldTrip: >> >> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat >> >> I hope this helps. >> >> Best, >> Lilla >> >> Narayan Puthanmadam Subramaniyam wrote: >>> >>> Hello all, >>> >>> I have EEG data in the format of matrix in Matlab (samples X channels). >>> How can I import this into fieldtrip for further analysis ? I read that >>> fieldtrip supports only standard EEG formats. >>> >>> Any help will be appreciated by this novice field trip user! >>> >>> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From narayan.ps at tut.fi Thu Jun 21 13:00:32 2012 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Thu, 21 Jun 2012 14:00:32 +0300 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: <20120621140032.00000c8d@unknown> On Thu, 21 Jun 2012 12:04:56 +0200 Eelke Spaak wrote: > Hi Narayan, > > How does your data structure look after you import it? I.e. what do > you get when you type > > >> data > > into matlab? (Assuming your structure is called 'data'.) Most likely, > you did not convert your data 100% correctly, since ft_checkdata does > not recognize it as proper fieldtrip data. Post the details, and we > can probably help. > > Best, > Eelke > > On 21 June 2012 11:55, Narayan wrote: > > Hi > > > > Thanks for the reply. I created the data structure as explained in > > the link using matlab data matrix. I am interested in preprocessing > > the EEG data ( filtering, artifact removal etc). > > > > How can I use this data structure to pass on to the functions that > > do preprocessing. When I use the ft_preprocessing function with cfg > > and data as input parameters, I get the following error > > > > ??? Error using ==> ft_checkdata at 265 > > This function requires raw data as input. > > > > Error in ==> ft_preprocessing at 281 > >  data = ft_checkdata(data, 'datatype', 'raw', > >  'hassampleinfo', 'yes'); > > > > > > -- > > Best Regards, > > Narayan > > > > > > > > > > Quoting "Magyari, Lilla" : > > > >> Hi, > >> > >> this FAQ describes how  you can make your data compatible with > >> FieldTrip: > >> > >> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat > >> > >> I hope this helps. > >> > >> Best, > >> Lilla > >> > >> Narayan Puthanmadam Subramaniyam wrote: > >>> > >>> Hello all, > >>> > >>> I have EEG data in the format of matrix in Matlab (samples X > >>> channels). How can I import this into fieldtrip for further > >>> analysis ? I read that fieldtrip supports only standard EEG > >>> formats. > >>> > >>> Any help will be appreciated by this novice field trip user! > >>> > >>> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Hi I realized the mistake now. Instead of data.label, i had typed data.labels and hence the condition isfield(data, 'label') && isfield(data, 'time') && isa(data.time, 'cell') && isfield(data, 'trial') && isa(data.trial, 'cell') was getting violated. Thanks for the help! It works now! Now my data gives type as raw when I run the ft_datatype function. -- Best Regards Narayan Puthanmadam Subramaniyam, M.Sc PhD student/researcher Department of Biomedical Engineering, Tampere University of Technology Finn Medi 1, 4th Floor, Room 203 FI 33520, Finland From jan.schoffelen at donders.ru.nl Thu Jun 21 13:35:42 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 21 Jun 2012 13:35:42 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> Message-ID: <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> Caro Andrea, You might want to use ft_plot_topo3d for this purpose. This will plot the functional data onto the positions of the channels in 3D, but you need to create the to-be-plotted data as a single vector, and you will need the channel positions in 3D (which you'll get for free when working with MEG data, but which are generally not represented in EEG data). If you concurrently have a cortical reconstruction defined in the same coordinate system as the channels (and in the same metric units (otherwise use ft_convert_units first)), you can do a 'hold on' and use ft_plot_mesh for the visualization of the cortex. I guess that the ft_plot_topo3D has some functionality for transparency. Ciao, JM On Jun 20, 2012, at 8:44 PM, andrea brovelli wrote: > Otherwise, to make things easier: is there a simple way to visualise a given topography in 3D (rather than in a 2D layout as done with ft_topoplotTFR) together with different segmented surfaces such as the skin or the brain meshes ? > > Thanks > > Andrea > > > ----- Messaggio da andrea.brovelli at univ-amu.fr --------- > Data: Wed, 20 Jun 2012 18:56:58 +0200 > Da: andrea brovelli > Rispondi-A: FieldTrip discussion list > Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface > A: FieldTrip discussion list > > >> Thank you very much for your quick reply, Eelke and Johanna. >> >> Yes, I would like only to visualise the data on a cortical surface and I am aware of the potential misinterpretation of such visualisation. >> >> I would like to use it as an intermediate step between the ft_topoplot on 2D layout and proper source localisation. It would serve as an exploratory tool to decide at which frequency, say, I would do a beamforming and to have a very rough idea of the number and location of cortical sources. >> >> However, it is not very clear to me how I could do this using the example in the beamforming tutorial. Could you be a bit more explicit ? Should I need to do source reconstruction for visualisation ? >> >> Thanks a lot >> >> Andrea >> >> >> ----- Messaggio da johanna.zumer at donders.ru.nl --------- >> Data: Wed, 20 Jun 2012 18:22:48 +0200 >> Da: Johanna Zumer >> Rispondi-A: FieldTrip discussion list >> Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface >> A: FieldTrip discussion list >> >> >>> Dear Andrea, >>> >>> I would like to further clarify the options for this question. Perhaps >>> could you suggest which inverse algorithm you had in mind? >>> >>> For example, it is possible to use beamforming limited only to voxels >>> defined as lying on the cortical sheet (i.e. restrict .inside to be only >>> the gray matter). This is possible, but you might miss out on the spatial >>> peak of the source lying just 5mm away to the inside a bit. Thus, it >>> would be better to do as Eelke suggested and apply beamforming to the whole >>> inside of the brain, and then project those values to the surface for >>> visualisation (which is easily done with the cfg.method='surface' option in >>> ft_sourceplot). >>> >>> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >>> or MNE) which are commonly used to reconstruct onto cortical surface voxels >>> only. This works because the min-norm algorithms force all activity to lie >>> in the region over which you select to reconstruct. Thus, a source 5mm >>> inside of the surface will automatically get projected to the surface. >>> >>> I also agree with Eelke you should not just project sensors to surface >>> without doing a specific type of inverse method. >>> >>> Cheers, >>> Johanna >>> >>> 2012/6/20 Eelke Spaak >>> >>>> Dear Andrea, >>>> >>>> If I understand your question correctly, you just want to *visualise* >>>> sensor space activity on a brain surface, without doing source >>>> reconstruction first? I would advise against this. Time-frequency >>>> power values of your planar gradient data reflect the spectral >>>> characteristics of the magnetic gradient at the location of your >>>> sensors. These sensors are not located at the surface of the brain, >>>> but quite some centimeters away from it. Therefore, visualising the >>>> data as if it were actually recorded on the brain surface, without >>>> doing a proper transformation, is potentially misleading. It is true >>>> that people tend to display all sorts of data in a 'topoplot' fashion, >>>> but in that case it is clear to the audience that you are looking at a >>>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>>> approach, if you're not already familiar with it. >>>> >>>> If you want to display your time-frequency activity on a cortical >>>> surface (which is of course a perfectly valid thing to want to do), >>>> you first should map the sensor activity to source space. This mapping >>>> is non-trivial and can be done by e.g. beamforming. See >>>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>>> this. That tutorial ends with a surface plot. >>>> >>>> Hope this helps! >>>> >>>> Best, >>>> Eelke >>>> >>>> On 20 June 2012 17:26, andrea brovelli >>>> wrote: >>>>> >>>>> Dear Fieldtrip users and developpers, >>>>> >>>>> I would like to project and visualise time-frequency power values >>>> computed >>>>> on planar gradient data at the sensors level onto the brain surface >>>>> segmentated from the anatomial MRI of the subject. >>>>> >>>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>>> scripts ? >>>>> >>>>> Does anyone see any inconvenient to this visualisation ? >>>>> >>>>> Thanks a lot for you help. >>>>> >>>>> Andrea >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >> >> >> ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- >> >> >> -- >> >> NEW EMAIL: andrea.brovelli at univ-amu.fr >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- > > > -- > > NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Thu Jun 21 13:46:12 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Thu, 21 Jun 2012 13:46:12 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> Message-ID: <20120621134612.19545qotqy10d75s@wmelperso1.univmed.fr> Thank you all for your help. Andrea ----- Message de jan.schoffelen at donders.ru.nl --------- Date : Thu, 21 Jun 2012 13:35:42 +0200 De : jan-mathijs schoffelen Répondre à : FieldTrip discussion list Objet : Re: [FieldTrip] Projection from sensors space to segmented brain surface À : FieldTrip discussion list > Caro Andrea, > > You might want to use ft_plot_topo3d for this purpose. This will > plot the functional data onto the positions of the channels in 3D, > but you need to create the to-be-plotted data as a single vector, > and you will need the channel positions in 3D (which you'll get for > free when working with MEG data, but which are generally not > represented in EEG data). If you concurrently have a cortical > reconstruction defined in the same coordinate system as the channels > (and in the same metric units (otherwise use ft_convert_units > first)), you can do a 'hold on' and use ft_plot_mesh for the > visualization of the cortex. I guess that the ft_plot_topo3D has > some functionality for transparency. > > Ciao, > > JM > > > > On Jun 20, 2012, at 8:44 PM, andrea brovelli wrote: > >> Otherwise, to make things easier: is there a simple way to >> visualise a given topography in 3D (rather than in a 2D layout as >> done with ft_topoplotTFR) together with different segmented >> surfaces such as the skin or the brain meshes ? >> >> Thanks >> >> Andrea >> >> >> ----- Messaggio da andrea.brovelli at univ-amu.fr --------- >> Data: Wed, 20 Jun 2012 18:56:58 +0200 >> Da: andrea brovelli >> Rispondi-A: FieldTrip discussion list >> Oggetto: Re: [FieldTrip] Projection from sensors space to segmented >> brain surface >> A: FieldTrip discussion list >> >> >>> Thank you very much for your quick reply, Eelke and Johanna. >>> >>> Yes, I would like only to visualise the data on a cortical surface >>> and I am aware of the potential misinterpretation of such >>> visualisation. >>> >>> I would like to use it as an intermediate step between the >>> ft_topoplot on 2D layout and proper source localisation. It would >>> serve as an exploratory tool to decide at which frequency, say, I >>> would do a beamforming and to have a very rough idea of the number >>> and location of cortical sources. >>> >>> However, it is not very clear to me how I could do this using the >>> example in the beamforming tutorial. Could you be a bit more >>> explicit ? Should I need to do source reconstruction for >>> visualisation ? >>> >>> Thanks a lot >>> >>> Andrea >>> >>> >>> ----- Messaggio da johanna.zumer at donders.ru.nl --------- >>> Data: Wed, 20 Jun 2012 18:22:48 +0200 >>> Da: Johanna Zumer >>> Rispondi-A: FieldTrip discussion list >>> Oggetto: Re: [FieldTrip] Projection from sensors space to >>> segmented brain surface >>> A: FieldTrip discussion list >>> >>> >>>> Dear Andrea, >>>> >>>> I would like to further clarify the options for this question. Perhaps >>>> could you suggest which inverse algorithm you had in mind? >>>> >>>> For example, it is possible to use beamforming limited only to voxels >>>> defined as lying on the cortical sheet (i.e. restrict .inside to be only >>>> the gray matter). This is possible, but you might miss out on >>>> the spatial >>>> peak of the source lying just 5mm away to the inside a bit. Thus, it >>>> would be better to do as Eelke suggested and apply beamforming to >>>> the whole >>>> inside of the brain, and then project those values to the surface for >>>> visualisation (which is easily done with the cfg.method='surface' >>>> option in >>>> ft_sourceplot). >>>> >>>> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >>>> or MNE) which are commonly used to reconstruct onto cortical >>>> surface voxels >>>> only. This works because the min-norm algorithms force all >>>> activity to lie >>>> in the region over which you select to reconstruct. Thus, a source 5mm >>>> inside of the surface will automatically get projected to the surface. >>>> >>>> I also agree with Eelke you should not just project sensors to surface >>>> without doing a specific type of inverse method. >>>> >>>> Cheers, >>>> Johanna >>>> >>>> 2012/6/20 Eelke Spaak >>>> >>>>> Dear Andrea, >>>>> >>>>> If I understand your question correctly, you just want to *visualise* >>>>> sensor space activity on a brain surface, without doing source >>>>> reconstruction first? I would advise against this. Time-frequency >>>>> power values of your planar gradient data reflect the spectral >>>>> characteristics of the magnetic gradient at the location of your >>>>> sensors. These sensors are not located at the surface of the brain, >>>>> but quite some centimeters away from it. Therefore, visualising the >>>>> data as if it were actually recorded on the brain surface, without >>>>> doing a proper transformation, is potentially misleading. It is true >>>>> that people tend to display all sorts of data in a 'topoplot' fashion, >>>>> but in that case it is clear to the audience that you are looking at a >>>>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>>>> approach, if you're not already familiar with it. >>>>> >>>>> If you want to display your time-frequency activity on a cortical >>>>> surface (which is of course a perfectly valid thing to want to do), >>>>> you first should map the sensor activity to source space. This mapping >>>>> is non-trivial and can be done by e.g. beamforming. See >>>>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>>>> this. That tutorial ends with a surface plot. >>>>> >>>>> Hope this helps! >>>>> >>>>> Best, >>>>> Eelke >>>>> >>>>> On 20 June 2012 17:26, andrea brovelli >>>>> wrote: >>>>>> >>>>>> Dear Fieldtrip users and developpers, >>>>>> >>>>>> I would like to project and visualise time-frequency power values >>>>> computed >>>>>> on planar gradient data at the sensors level onto the brain surface >>>>>> segmentated from the anatomial MRI of the subject. >>>>>> >>>>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>>>> scripts ? >>>>>> >>>>>> Does anyone see any inconvenient to this visualisation ? >>>>>> >>>>>> Thanks a lot for you help. >>>>>> >>>>>> Andrea >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>> >>> >>> ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- >>> >>> >>> -- >>> >>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- >> >> >> -- >> >> NEW EMAIL: andrea.brovelli at univ-amu.fr >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > ----- Fin du message de jan.schoffelen at donders.ru.nl ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From a.maye at uke.de Thu Jun 21 14:04:16 2012 From: a.maye at uke.de (Alexander Maye) Date: Thu, 21 Jun 2012 14:04:16 +0200 Subject: [FieldTrip] PhD Position in BCI, Univ. Medical Center Hamburg Message-ID: <223382712.sbGkH5R71O@mars.neurophys.uke.uni-hamburg.de> *PhD Student Position in Brain-Computer Interfaces* The International Research Training Group Hamburg – Beijing/China (Internationales Graduierten­kolleg) on Cross-modal Interaction in Natural and Artificial Cognitive Systems (CINACS) is seeking a highly qualified and motivated candidate for a doctoral position in Brain-Computer Interfaces (BCI). The training group is funded by the German Research Foundation (DFG), the State of Ham­burg, and the Ministry of Education of the People’s Republic of China. The candidate will also collaborate with the project “MULTISENSE – The merging of the senses: understanding multisensory experience”, funded by an ERC Advanced Investigators Grant. The major goal of this project is the investigation of dynamic, large-scale neural interactions and the characterization of functional networks during multisensory processing in the human brain, using techniques such as MEG, EEG, TMS, tACS and eye tracking. The dissertation project will be carried out at the Dept. of Neurophysiology and Pathophysiology of the University Medical Center Hamburg-Eppendorf (UKE). The UKE is the largest hospital in Hamburg, comprising 14 centers with 80 clinical and research departments. The Dept. of Neuro­physiology and Pathophysiology is headed by Prof. Dr. Andreas K. Engel. The research of Prof. Engel’s group focuses on cognitive and sensorimotor functions, which are studied in humans and animal models using neurophysiological and neuroimaging techniques. The project will build on strong interactions with the Dept. of Biomedical Engineering at the Tsinghua University in Beijing, China. Tsinghua University is among China's top universities, and the Dept. of Biomedical Engin­eering hosts one of the world's leading BCI research teams. The project will be focused on the integration of different modalities (e.g., vision, audition, and touch) into a unified BCI system. Using several modalities allows to employ proven BCI paradigms to increase the number of control channels. Research questions will be the possibility of gaining ad­ ditional information from switching attention between modalities, and the emergence of immersive control of the system after training with such a multimodal BCI system. Potential applications of the system to be developed are not only in classical BCI application fields like rehabilitation and prosthetics, but rather envisaged in everyday usage for computer control or in computer games. Applicants should have a master in computer science, physics or engineering, and excellent programming skills, as well as expertise in methods in signal processing, pattern recognition and classification. Experience in human electrophysiology would be an asset, but is not required. The position will be funded for up to three years, beginning Oct. 2012 or later. Applicants can have any nationality, female applicants are particularly welcome. Informal inquiries can be directed to Dr. Alexander Maye (a.maye at uke.de). Applicants should send their curriculum vitae, a statement of research interests, as well as names of two referees to Prof. Dr. Andreas K. Engel, Institut für Neurophysiologie und Pathophysiologie, Universitätsklinikum Ham­burg-Eppendorf, Martinistr. 52, 20246 Hamburg, Germany. Web ressources: www.cinacs.org www.tsinghua.edu.cn www.uke.de/neurophysiologie www.multisense.org www.40Hz.de -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- A non-text attachment was scrubbed... Name: BCI_PhD_position_UKE.pdf Type: application/pdf Size: 67604 bytes Desc: not available URL: From Lilla.Magyari at mpi.nl Thu Jun 21 14:19:33 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Thu, 21 Jun 2012 14:19:33 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: <4FE31155.5070105@mpi.nl> hi, and probably it would be also good to know how your cfg structure looks like that you input to ft_preprocessing. Lilla Eelke Spaak wrote: > Hi Narayan, > > How does your data structure look after you import it? I.e. what do > you get when you type > >>> data > > into matlab? (Assuming your structure is called 'data'.) Most likely, > you did not convert your data 100% correctly, since ft_checkdata does > not recognize it as proper fieldtrip data. Post the details, and we > can probably help. > > Best, > Eelke > > On 21 June 2012 11:55, Narayan wrote: >> Hi >> >> Thanks for the reply. I created the data structure as explained in the link >> using matlab data matrix. I am interested in preprocessing the EEG data ( >> filtering, artifact removal etc). >> >> How can I use this data structure to pass on to the functions that do >> preprocessing. When I use the ft_preprocessing function with cfg and data as >> input parameters, I get the following error >> >> ??? Error using ==> ft_checkdata at 265 >> This function requires raw data as input. >> >> Error in ==> ft_preprocessing at 281 >> data = ft_checkdata(data, 'datatype', 'raw', >> 'hassampleinfo', 'yes'); >> >> >> -- >> Best Regards, >> Narayan >> >> >> >> >> Quoting "Magyari, Lilla" : >> >>> Hi, >>> >>> this FAQ describes how you can make your data compatible with FieldTrip: >>> >>> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat >>> >>> I hope this helps. >>> >>> Best, >>> Lilla >>> >>> Narayan Puthanmadam Subramaniyam wrote: >>>> Hello all, >>>> >>>> I have EEG data in the format of matrix in Matlab (samples X channels). >>>> How can I import this into fieldtrip for further analysis ? I read that >>>> fieldtrip supports only standard EEG formats. >>>> >>>> Any help will be appreciated by this novice field trip user! >>>> >>>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From cornabel at googlemail.com Fri Jun 22 14:38:17 2012 From: cornabel at googlemail.com (cornelius abel) Date: Fri, 22 Jun 2012 14:38:17 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error Message-ID: <4FE46739.7010804@googlemail.com> Dear Fieldtrip list, i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. As a next step I tried to calculate a grand average using ft_sourcegrandaverage: cfg=[]; cfg.keepindividual='no'; cfg.parameter='avg.pow'; GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); giving me the following structure: GACont = pos: [3570x3 double] dim: [17 14 15] avg: [1x1 struct] var: [1x1 struct] dimord: 'voxel' inside: [1846x1 double] outside: [1724x1 double] df: [3570x1 double] cfg: [1x1 struct] but interpolating this onto an anatomy always gives me an error: cfg = []; cfg.downsample= 2; cfg.parameter = 'avg.avg.pow'; sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); /??? Error using ==> interpn at 155/ ///Wrong number of input arguments or some dimension of V is less than 2./ ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ ///Error in ==> ft_sourceinterpolate at 368/ ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ however interpolating a single subject source data works just fine... cfg = []; cfg.downsample= 2; cfg.parameter = 'avg.pow'; sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); What am i doing wrong here, any ideas? Greetings, Cornelius From jan.schoffelen at donders.ru.nl Sat Jun 23 08:19:14 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 23 Jun 2012 08:19:14 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <4FE46739.7010804@googlemail.com> References: <4FE46739.7010804@googlemail.com> Message-ID: Hi Cornelius, Could it be that the parameter 'avg.avg.pow' does not work? Best, JM On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > Dear Fieldtrip list, > > i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. > As a next step I tried to calculate a grand average using ft_sourcegrandaverage: > > cfg=[]; > cfg.keepindividual='no'; > cfg.parameter='avg.pow'; > GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); > > giving me the following structure: > > GACont = > pos: [3570x3 double] > dim: [17 14 15] > avg: [1x1 struct] > var: [1x1 struct] > dimord: 'voxel' > inside: [1846x1 double] > outside: [1724x1 double] > df: [3570x1 double] > cfg: [1x1 struct] > > but interpolating this onto an anatomy always gives me an error: > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); > > /??? Error using ==> interpn at 155/ > ///Wrong number of input arguments or some dimension of V is less than 2./ > ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ > ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ > ///Error in ==> ft_sourceinterpolate at 368/ > ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ > > however interpolating a single subject source data works just fine... > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); > > > What am i doing wrong here, any ideas? > > > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Sat Jun 23 16:05:37 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Sat, 23 Jun 2012 16:05:37 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: References: <4FE46739.7010804@googlemail.com> Message-ID: I have the same Problem. I can plot my LCMV-Beamformer results on an anatomy. And I can plot the results of the normalize script. But I can't plot the GrandAVG or the Stats results on that anatomy. The interpolate function doesn' work. Without anatomy it works just fine. Any hint? Thanks, Martin On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Cornelius, > > Could it be that the parameter 'avg.avg.pow' does not work? > > Best, > > JM > > On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > > Dear Fieldtrip list, > > i successfully beamformed some steady state activity and the sourceplots > per subject are looking very nice. > As a next step I tried to calculate a grand average using > ft_sourcegrandaverage: > > cfg=[]; > cfg.keepindividual='no'; > cfg.parameter='avg.pow'; > GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); > > giving me the following structure: > > GACont = > pos: [3570x3 double] > dim: [17 14 15] > avg: [1x1 struct] > var: [1x1 struct] > dimord: 'voxel' > inside: [1846x1 double] > outside: [1724x1 double] > df: [3570x1 double] > cfg: [1x1 struct] > > but interpolating this onto an anatomy always gives me an error: > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); > > /??? Error using ==> interpn at 155/ > ///Wrong number of input arguments or some dimension of V is less than 2./ > ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ > ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ > ///Error in ==> ft_sourceinterpolate at 368/ > ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, > cfg.feedback);/ > > however interpolating a single subject source data works just fine... > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); > > > What am i doing wrong here, any ideas? > > > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Jun 23 22:01:54 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 23 Jun 2012 22:01:54 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: References: <4FE46739.7010804@googlemail.com> Message-ID: <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> Hi Martin, In general, the more info you can provide us with, the more likely it is that anybody can help you. The problem you sketch is too vague to even try start giving hints. It would be best if you could provide us with some detailed error messages to begin with. Even better would be if you create an account on our bugzilla-website, where you can also upload a script and some (small) data structure that would allow us to reproduce the problem. Best wishes, Jan-Mathijs PS: http://bugzilla.fcdonders.nl On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: > I have the same Problem. I can plot my LCMV-Beamformer results on an anatomy. And I can plot the results of the normalize script. But I can't plot the GrandAVG or the Stats results on that anatomy. The interpolate function doesn' work. Without anatomy it works just fine. > > Any hint? > > Thanks, Martin > > On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen wrote: > Hi Cornelius, > > Could it be that the parameter 'avg.avg.pow' does not work? > > Best, > > JM > > On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > >> Dear Fieldtrip list, >> >> i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. >> As a next step I tried to calculate a grand average using ft_sourcegrandaverage: >> >> cfg=[]; >> cfg.keepindividual='no'; >> cfg.parameter='avg.pow'; >> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >> >> giving me the following structure: >> >> GACont = >> pos: [3570x3 double] >> dim: [17 14 15] >> avg: [1x1 struct] >> var: [1x1 struct] >> dimord: 'voxel' >> inside: [1846x1 double] >> outside: [1724x1 double] >> df: [3570x1 double] >> cfg: [1x1 struct] >> >> but interpolating this onto an anatomy always gives me an error: >> >> cfg = []; >> cfg.downsample= 2; >> cfg.parameter = 'avg.avg.pow'; >> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >> >> /??? Error using ==> interpn at 155/ >> ///Wrong number of input arguments or some dimension of V is less than 2./ >> ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ >> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >> ///Error in ==> ft_sourceinterpolate at 368/ >> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ >> >> however interpolating a single subject source data works just fine... >> >> cfg = []; >> cfg.downsample= 2; >> cfg.parameter = 'avg.pow'; >> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >> >> >> What am i doing wrong here, any ideas? >> >> >> >> Greetings, Cornelius >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarang.hahm at gmail.com Mon Jun 25 04:57:51 2012 From: jarang.hahm at gmail.com (Jarang Hahm) Date: Mon, 25 Jun 2012 11:57:51 +0900 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) Message-ID: Dear FieldTrip user. Hi, I'm processing MEG data of Neuromag 306 system after removing some bad channels using fieldtrip-20120620 toolbox. To repair the bad channels with its neighbours, I firstly found the neighbor of all channel based on distance using 'ft_prepare_neighbours'. However, the outcome of neighbour was far more than default distance, 4cm, from a target channel. So, I checked thoroughly the code 'ft_prepare_neighbours', finding it used information of channel label and position from data’s hdr.grad to find neighbour of the target. The problem is channel label and position in hdr.grad are arranged differently. As far as I found, both information come from different source: the channel label was from code 'fiff_read_meas_info', while the channel position was from ‘channelposition’ in 'ft_datatype_sens'. And the channel label is sorted into the sensor location, e. g. MEG 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is arranged along the sensor type (magnetometer and gradiometer) according to its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. Thus, the label and position of channel in hdr.grad were mismatched so that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. It should be matched correctly to find the proper neighbour and ensure the result of repair as well. In fact, the code 'channelposition' in 'ft_datatype_sens' yield the channel label as well as the channel position. It might help to solve this problem. Is there any other way to solve this problem? Best, Jarang Hahm -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 10:44:59 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Mon, 25 Jun 2012 10:44:59 +0200 Subject: [FieldTrip] source analysis: common filter Message-ID: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> Dear all, Currently I am analyzing data of an experiment in which subjects perform two conditions in two sessions. They have been out of the MEG system between the sessions. For sourceanalysis I am using mni-normalized headmodels and grids. This because in the two sessions the subjects are probably seated slightly differently in the MEG system. (Thus I have separate headmodels and grids for the two sessions). Currently I am using a common filter for analyzing the two conditions within a session. I am wondering however if it would be (even) possible and if yes, more, or less correct to use a common filter over all conditions/sessions. Best Regards, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 11:01:22 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Mon, 25 Jun 2012 11:01:22 +0200 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Dear Jarang, Coincidentily I have been working on the same problem a few weeks ago. First of all you should take care that you repair a horizontal gradiometer with neighbouring horizontal gradiometers and vertical ones with vertical ones. This is not built into fieldtrip yet. I have have made a partial fix, which works with the 'layout' option but not with the 'grad' method. I have attached the function I addapted from Fieldtrip, and the layout files that seperatly name the different gradiometers (made by Elisabeth May ;-) ) I hope it somehow helps you! Best regards, Hanneke van Dijk ________________________________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: > Dear FieldTrip user. > > > > Hi, I'm processing MEG data of Neuromag 306 system after removing some bad > channels using fieldtrip-20120620 toolbox. > > > > To repair the bad channels with its neighbours, I firstly found the > neighbor of all channel based on distance using 'ft_prepare_neighbours'. > > However, the outcome of neighbour was far more than default distance, 4cm, > from a target channel. > > So, I checked thoroughly the code 'ft_prepare_neighbours', finding it used > information of channel label and position from data’s hdr.grad to find > neighbour of the target. > > > > The problem is channel label and position in hdr.grad are arranged > differently. > > As far as I found, both information come from different source: the > channel label was from code 'fiff_read_meas_info', while the channel > position was from ‘channelposition’ in 'ft_datatype_sens'. > > And the channel label is sorted into the sensor location, e. g. MEG 0113, > MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is > arranged along the sensor type (magnetometer and gradiometer) according to > its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., > MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. > > Thus, the label and position of channel in hdr.grad were mismatched so > that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. > > > It should be matched correctly to find the proper neighbour and ensure the > result of repair as well. > > In fact, the code 'channelposition' in 'ft_datatype_sens' yield the > channel label as well as the channel position. It might help to solve this > problem. > > > > Is there any other way to solve this problem? > > > > > Best, > > > Jarang Hahm > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neuromag_prepare_neighbours.m Type: application/octet-stream Size: 1823 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306hor.lay Type: application/octet-stream Size: 5238 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306ver.lay Type: application/octet-stream Size: 5235 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: batch_channel_repair.m Type: application/octet-stream Size: 410 bytes Desc: not available URL: From stan.vanpelt at fcdonders.ru.nl Mon Jun 25 13:10:00 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Mon, 25 Jun 2012 13:10:00 +0200 (CEST) Subject: [FieldTrip] source analysis: common filter In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> Message-ID: <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> Hi Hanneke, If my understanding is correct, you cannot use common filters over all sessions, exactly because of the reason you mention (different spatial relation between sensors and the head/brain). Using common filters within a session is ok of course (to look at effect of condition on a source's activity). What you could do as an alternative is compute virtual sensor time courses for the source-of-interest, separately for both sessions, and subsequently append these (source-level) data afterwards (and then your contrasts/statistics). Hope this helps. Stan -- Stan van Pelt, PhD Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstr. 46 60528 Frankfurt, Germany Website: www.esi-frankfurt.de E-mail: stan.vanpelt at esi-frankfurt.de Tel: +49 (0)69 96769 519 Fax: +49 (0)69 96769 555 ----- Oorspronkelijk bericht ----- > Van: "Hanneke vanDijk" > Aan: fieldtrip at donders.ru.nl > Verzonden: Maandag 25 juni 2012 10:44:59 > Onderwerp: [FieldTrip] source analysis: common filter > Dear all, > Currently I am analyzing data of an experiment in which subjects > perform two conditions in two sessions. They have been out of the MEG > system between the sessions. > For sourceanalysis I am using mni-normalized headmodels and grids. > This because in the two sessions the subjects are probably seated > slightly differently in the MEG system. (Thus I have separate > headmodels and grids for the two sessions). > Currently I am using a common filter for analyzing the two conditions > within a session. I am wondering however if it would be (even) > possible and if yes, more, or less correct to use a common filter over > all conditions/sessions. > Best Regards, > Hanneke > __________________________________________ > Hanneke van Dijk, PhD > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > Institute for Clinical Neuroscience, > Heinrich Heine Universit ä t D ü sseldorf, Germany > Hanneke.vanDijk at med.uni-duesseldorf.de > Tel. +49 (0) 211 81 13074 > __________________________________________ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 -------------- next part -------------- An HTML attachment was scrubbed... URL: From anette.giani at tuebingen.mpg.de Mon Jun 25 14:23:40 2012 From: anette.giani at tuebingen.mpg.de (Anette Giani) Date: Mon, 25 Jun 2012 14:23:40 +0200 Subject: [FieldTrip] Alignment problem in tutorial: Create MNI-aligned grids in individual head-space Message-ID: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> Dear fieldtrip users, I am running the tutorial: "Create MNI-aligned grids in individual head-space" (CASE 1). When using the template mri provided on the homepage (i.e. Subject01.mri), it seems like the grid, the resulting vol and the anatomy are not aligned. And even worse: besides the misalignment there seems to be a scaling. Note however, that I am using the exact same parameter as specified on the homepage. For a better understanding see page 1 of Alignment.pdf attached to this mail. I found out that things improve when I use the segmentation procedure specified in the tutorial: "Build a geometrical description of the volume conduction model of the head" (CASE 2). See page 2 of Alignment.pdf. In particular, in CASE 1 I do: cfg = []; cfg.downsample = 2; cfg.coordsys = 'ctf'; seg_MNItutorial = ft_volumesegment(cfg, mri); % plotting case 1 seg_MNItutorial.transform = mri.transform; seg_MNItutorial.anatomy = mri.anatomy; figure cfg.funparameter = 'gray'; ft_sourceplot(cfg,seg_MNItutorial); %segmented gray matter on top While, in CASE 2 I do: cfg = []; cfg.write = 'no'; cfg.coordsys = 'ctf'; cfg.output = {'scalp','skull','brain'}; seg_headmodelTutorial = ft_volumesegment(cfg, mri); % plotting case 2 mri_combine = mri; mri_combine.seg = seg_headmodelTutorial.scalp + 3*seg_headmodelTutorial.skull + 6*seg_headmodelTutorial.brain; mri_combine.mask = (mri_combine.seg)>0; cfg = []; cfg.interactive = 'yes'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure, ft_sourceplot(cfg,mri_combine); I am confused, why CASE 2 works, while CASE 1 does not. Could anyone explain the differences to me? Is doing it like in CASE 2 correct at all? Thanks a lot in advance! Anette -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Alignment.pdf Type: application/pdf Size: 474703 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Jun 25 14:40:46 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 25 Jun 2012 14:40:46 +0200 Subject: [FieldTrip] Alignment problem in tutorial: Create MNI-aligned grids in individual head-space In-Reply-To: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> References: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> Message-ID: <934CD08F-75B4-40F1-A20C-D399EDE30ACA@donders.ru.nl> Hi Anette, Case 1 does not look good because you are overlaying a low resolution image with a high resolution image. This is due to the cfg.downsample=2 before you call ft_volumesegment. (mri.anatomy is just 2^3 as big as the segmented images. Ft_sourceplot assumes all the to-be-plotted data to have the same physical size. Note that you replace the transformation matrix in the seg_MNItutorial variable with the transformation matrix from the mri-variable. This is incorrect, because the original mri has 1-mm resolution, whereas the segmented has 2-mm resolution. Best, Jan-Mathijs On Jun 25, 2012, at 2:23 PM, Anette Giani wrote: > Dear fieldtrip users, > > I am running the tutorial: “Create MNI-aligned grids in individual head-space” (CASE 1). When using the template mri provided on the homepage (i.e. Subject01.mri), it seems like the grid, the resulting vol and the anatomy are not aligned. And even worse: besides the misalignment there seems to be a scaling. Note however, that I am using the exact same parameter as specified on the homepage. For a better understanding see page 1 of Alignment.pdf attached to this mail. > > I found out that things improve when I use the segmentation procedure specified in the tutorial: “Build a geometrical description of the volume conduction model of the head” (CASE 2). See page 2 of Alignment.pdf. > > > In particular, in CASE 1 I do: > > cfg = []; > cfg.downsample = 2; > cfg.coordsys = 'ctf'; > seg_MNItutorial = ft_volumesegment(cfg, mri); > > % plotting case 1 > seg_MNItutorial.transform = mri.transform; > seg_MNItutorial.anatomy = mri.anatomy; > figure > cfg.funparameter = 'gray'; > ft_sourceplot(cfg,seg_MNItutorial); %segmented gray matter on top > > > > While, in CASE 2 I do: > > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'ctf'; > cfg.output = {'scalp','skull','brain'}; > seg_headmodelTutorial = ft_volumesegment(cfg, mri); > > % plotting case 2 > mri_combine = mri; > mri_combine.seg = seg_headmodelTutorial.scalp + 3*seg_headmodelTutorial.skull + 6*seg_headmodelTutorial.brain; > mri_combine.mask = (mri_combine.seg)>0; > cfg = []; > cfg.interactive = 'yes'; > cfg.funparameter = 'seg'; > cfg.funcolormap = 'jet'; > cfg.funcolorlim = [0 7]; > cfg.opacitylim = [0 1.5]; > cfg.maskparameter = 'mask'; > figure, ft_sourceplot(cfg,mri_combine); > > > I am confused, why CASE 2 works, while CASE 1 does not. Could anyone explain the differences to me? Is doing it like in CASE 2 correct at all? > > Thanks a lot in advance! > Anette > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 14:50:17 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Mon, 25 Jun 2012 14:50:17 +0200 Subject: [FieldTrip] source analysis: common filter In-Reply-To: <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Stan, Thanks for your reply! Virtual channel analysis will be a step in my analysis as well! I hope I will get something sensible out of the whole head analysis though, that's (also) why I decided to use these mni_normalized grids. So to first do sourceanalysis for all sessions and conditions (--> all gridpoints are at the same positions for all subjects and sessions) and then compare the 'whole head' sources would also be valid I suppose. I then just have to live with the fact that I use different filters for the two sessions... Groetjes! Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ On Mon, Jun 25, 2012 at 1:10 PM, Stan van Pelt wrote: > Hi Hanneke, > > If my understanding is correct, you cannot use common filters over all > sessions, exactly because of the reason you mention (different spatial > relation between sensors and the head/brain). Using common filters within a > session is ok of course (to look at effect of condition on a source's > activity). > What you could do as an alternative is compute virtual sensor time courses > for the source-of-interest, separately for both sessions, and subsequently append > these (source-level) data afterwards (and then your contrasts/statistics). > > Hope this helps. > > Stan > > -- **** > > Stan van Pelt, PhD**** > > ** ** > > Ernst Strüngmann Institute (ESI)**** > > for Neuroscience in Cooperation with Max Planck Society **** > > Deutschordenstr. 46**** > > 60528 Frankfurt, Germany**** > > Website: www.esi-frankfurt.de**** > > E-mail: stan.vanpelt at esi-frankfurt.de**** > > Tel: +49 (0)69 96769 519**** > > Fax: +49 (0)69 96769 555**** > > ------------------------------ > > *Van: *"Hanneke vanDijk" > *Aan: *fieldtrip at donders.ru.nl > *Verzonden: *Maandag 25 juni 2012 10:44:59 > *Onderwerp: *[FieldTrip] source analysis: common filter > > > Dear all, > > > > Currently I am analyzing data of an experiment in which subjects perform > two conditions in two sessions. They have been out of the MEG system > between the sessions. > > > > For sourceanalysis I am using mni-normalized headmodels and grids. This > because in the two sessions the subjects are probably seated slightly > differently in the MEG system. (Thus I have separate headmodels and grids > for the two sessions). > > > > Currently I am using a common filter for analyzing the two conditions *within > *a session. I am wondering however if it would be (even) possible and if > yes, more, or less correct to use a common filter over all > conditions/sessions. > > > > Best Regards, > > > > Hanneke > > > > __________________________________________ > > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Stan van Pelt > > Donders Institute for Brain, Cognition and Behaviour, Radboud University > Nijmegen > Kapittelweg 29, 6525 EN Nijmegen, Netherlands > E-mail: stan.vanpelt at donders.ru.nl > Website: www.ru.nl/donders/ > Phone: (+31) (0)24 36 10981 > Fax: (+31) (0)24 36 10989 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Mon Jun 25 16:23:29 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Mon, 25 Jun 2012 16:23:29 +0200 Subject: [FieldTrip] ROI based analysis using ft_sourcestatistics Message-ID: Dear all, can anyone provide me some info on how to run a ROI based analysis with ft_sourcestatistics. On the mailing list I found a post from Jan 2011 by Marc Recasens, who reported the same problem that I have. Unfortunately, his post never seemded to be answered by anyone. Like Marc I use the following options: cfg.atlas = 'pathname/wfu_pickatlas/MNI_atlas/templates/TD_lobe.img' cfg.inputcoord = 'mni'; cfg.roi = ROI(8).Nom_C; and when I run ft_sourceanalysis the returned volume is empty. Any help or suggestions on how to run this correctly would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Mon Jun 25 16:23:54 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Mon, 25 Jun 2012 16:23:54 +0200 (CEST) Subject: [FieldTrip] source analysis: common filter In-Reply-To: Message-ID: <61733510.755171.1340634234691.JavaMail.root@sculptor.zimbra.ru.nl> Comparing the 'whole head'-sources like this sounds ok to me! Bets, Stan ----- Oorspronkelijk bericht ----- > Van: "Hanneke van Dijk" > Aan: "FieldTrip discussion list" > Verzonden: Maandag 25 juni 2012 14:50:17 > Onderwerp: Re: [FieldTrip] source analysis: common filter > Hi Stan, > Thanks for your reply! > Virtual channel analysis will be a step in my analysis as well! > I hope I will get something sensible out of the whole head analysis > though, that's (also) why I decided to use these mni_normalized grids. > So to first do sourceanalysis for all sessions and conditions (--> all > gridpoints are at the same positions for all subjects and sessions) > and then compare the 'whole head' sources would also be valid I > suppose. I then just have to live with the fact that I use different > filters for the two sessions... > Groetjes! > Hanneke > __________________________________________ > Hanneke van Dijk, PhD > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > Institute for Clinical Neuroscience, > Heinrich Heine Universit ä t D ü sseldorf, Germany > Hanneke.vanDijk at med.uni-duesseldorf.de > Tel. +49 (0) 211 81 13074 > __________________________________________ > On Mon, Jun 25, 2012 at 1:10 PM, Stan van Pelt < > stan.vanpelt at fcdonders.ru.nl > wrote: > > Hi Hanneke, > > If my understanding is correct, you cannot use common filters over > > all > > sessions, exactly because of the reason you mention (different > > spatial > > relation between sensors and the head/brain). Using common filters > > within a session is ok of course (to look at effect of condition on > > a > > source's activity). > > What you could do as an alternative is compute virtual sensor time > > courses for the source-of-interest, separately for both sessions, > > and > > subsequently append these (source-level) data afterwards (and then > > your contrasts/statistics). > > Hope this helps. > > Stan > > -- > > Stan van Pelt, PhD > > Ernst Strüngmann Institute (ESI) > > for Neuroscience in Cooperation with Max Planck Society > > Deutschordenstr. 46 > > 60528 Frankfurt, Germany > > Website: www.esi-frankfurt.de > > E-mail: stan.vanpelt at esi-frankfurt.de > > Tel: +49 (0)69 96769 519 > > Fax: +49 (0)69 96769 555 > > > Van: "Hanneke vanDijk" < Hanneke.vanDijk at med.uni-duesseldorf.de > > > > Aan: fieldtrip at donders.ru.nl > > > Verzonden: Maandag 25 juni 2012 10:44:59 > > > Onderwerp: [FieldTrip] source analysis: common filter > > > Dear all, > > > Currently I am analyzing data of an experiment in which subjects > > > perform two conditions in two sessions. They have been out of the > > > MEG > > > system between the sessions. > > > For sourceanalysis I am using mni-normalized headmodels and grids. > > > This because in the two sessions the subjects are probably seated > > > slightly differently in the MEG system. (Thus I have separate > > > headmodels and grids for the two sessions). > > > Currently I am using a common filter for analyzing the two > > > conditions > > > within a session. I am wondering however if it would be (even) > > > possible and if yes, more, or less correct to use a common filter > > > over > > > all conditions/sessions. > > > Best Regards, > > > Hanneke > > > __________________________________________ > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > > Institute for Clinical Neuroscience, > > > Heinrich Heine Universit ä t D ü sseldorf, Germany > > > Hanneke.vanDijk at med.uni-duesseldorf.de > > > Tel. +49 (0) 211 81 13074 > > > __________________________________________ > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > Stan van Pelt > > Donders Institute for Brain, Cognition and Behaviour, Radboud > > University Nijmegen > > Kapittelweg 29, 6525 EN Nijmegen, Netherlands > > E-mail: stan.vanpelt at donders.ru.nl > > Website: www.ru.nl/donders/ > > Phone: (+31) (0)24 36 10981 > > Fax: (+31) (0)24 36 10989 > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardoschenberg at gmail.com Mon Jun 25 17:09:35 2012 From: eduardoschenberg at gmail.com (Eduardo Schenberg) Date: Mon, 25 Jun 2012 12:09:35 -0300 Subject: [FieldTrip] EEG reference Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC@gmail.com> Hello all, I am new to this list, as I just started ding EEG experiments. I did some pilot tests with a BrainProducts/Brain Vision with an Acticap and I am doing some preliminary analysis using EEGLab/fieldtrip. I am now planning to buy my own EEG form Brain Products, but I am bothered by the fact that in most cap configs they sell, the reference is near Cz, usually FCz. As far as my knowledge goes, if I want to study power spectrum alterations and coherence in different frequencies between different electrodes, a reference in the head can be a problem, specially if some of the regions of interest are synchronous with the reference itself in the given frequency Can anyone point me to some good review or chapter about these issues so I can study them better and buy the best config available? Many many thanks for all eduardo schenberg From marcel.heers at googlemail.com Tue Jun 26 11:31:32 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Tue, 26 Jun 2012 11:31:32 +0200 Subject: [FieldTrip] Source localization using DICS for EEG data from combined MEG/EEG recordings Message-ID: Dear all, I am trying to perform source localization in the frequency domain from EEG data using DICS. The data were recorded combined with MEG (Neuromag data format). The volume conductor is a 3 shell realistic head model created with bemcp. When running DICS with the following settings cfg = []; cfg.method = 'dics'; cfg.grad = elec; cfg.frequency = 14; cfg.vol = vol_eeg; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 5; source = ft_sourceanalysis(cfg, freq); I am am getting the following error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 568 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 314 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 584 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); and I am not sure what might be the cause. Maybe anyone can help me! Thank you in advance! Marcel From politzerahless at gmail.com Tue Jun 26 13:23:47 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 26 Jun 2012 19:23:47 +0800 Subject: [FieldTrip] EEG reference Message-ID: Eduardo, Steve Luck's (2005) book *An Introduction to the Event-Related Potentials Method* has a chapter discussing reference methods. If you search the archives of the EEGLAB mailing list there are also many recent discussions (including references) about this issue. I am not personally experienced with spectral analyses, but in general, the online reference you use during the recording does not matter very much, since you can re-calculate the data to any other reference offline. For example, in both labs where I have done experiments, we use various online references but always re-reference to the average of both mastoids during the offline analysis; this is a common procedure, if you want to do that all you need to do is make sure to buy a cap that includes mastoid electrodes. Another common procedure is to use the average reference (see Luck (2005) or the EEGLAB online wiki for detailed discussion about average reference); for that, the most important thing is for the cap to have sufficient electrodes, evenly covering enough of the head. Of course, there are also many other referencing procedures available. Best, Steve Politzer-Ahles > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 25 Jun 2012 12:09:35 -0300 > From: Eduardo Schenberg > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] EEG reference > Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hello all, > > I am new to this list, as I just started ding EEG experiments. I did some > pilot tests with a BrainProducts/Brain Vision with an Acticap and I am > doing some preliminary analysis using EEGLab/fieldtrip. I am now planning > to buy my own EEG form Brain Products, but I am bothered by the fact that > in most cap configs they sell, the reference is near Cz, usually FCz. As > far as my knowledge goes, if I want to study power spectrum alterations and > coherence in different frequencies between different electrodes, a > reference in the head can be a problem, specially if some of the regions of > interest are synchronous with the reference itself in the given frequency > > Can anyone point me to some good review or chapter about these issues so I > can study them better and buy the best config available? > > Many many thanks for all > > eduardo schenberg > > > > > > ------------------------------ > > Message: 2 > Date: Tue, 26 Jun 2012 11:31:32 +0200 > From: Marcel Heers > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Source localization using DICS for EEG data from > combined MEG/EEG recordings > Message-ID: > > > Content-Type: text/plain; charset=ISO-8859-1 > > Dear all, > > I am trying to perform source localization in the frequency domain > from EEG data using DICS. The data were recorded combined with MEG > (Neuromag data format). The volume conductor is a 3 shell realistic > head model created with bemcp. > When running DICS with the following settings > > cfg = []; > cfg.method = 'dics'; > cfg.grad = elec; > cfg.frequency = 14; > cfg.vol = vol_eeg; > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = 5; > source = ft_sourceanalysis(cfg, freq); > > > I am am getting the following error message: > > ??? Error using ==> svd > Input to SVD must not contain NaN or Inf. > > Error in ==> beamformer_dics>pinv at 568 > [U,S,V] = svd(A,0); > > Error in ==> beamformer_dics at 314 > filt = pinv(lf' * invCf * lf) * lf' * invCf; % > Gross eqn. 3, use > PINV/SVD to cover rank deficient leadfield > > Error in ==> ft_sourceanalysis at 584 > dip(i) = beamformer_dics(grid, sens, vol, [], > squeeze(Cf(i,:,:)), optarg{:}); > > > and I am not sure what might be the cause. > > Maybe anyone can help me! Thank you in advance! > > Marcel > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 19, Issue 42 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Tue Jun 26 15:15:31 2012 From: cornabel at googlemail.com (cornelius abel) Date: Tue, 26 Jun 2012 15:15:31 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> References: <4FE46739.7010804@googlemail.com> <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> Message-ID: <4FE9B5F3.3080402@googlemail.com> Here is a workaround: It seems that it works if you copy the functional data from "GrandAVG .avg.avg.pow" to "GrandAVG .avg.pow" prior to interpolation (and then using cfg.parameter='avg.pow'). I posted it to the bugzilla system. Cornelius Am 23.06.2012 22:01, schrieb jan-mathijs schoffelen: > Hi Martin, > > In general, the more info you can provide us with, the more likely it > is that anybody can help you. The problem you sketch is too vague to > even try start giving hints. It would be best if you could provide us > with some detailed error messages to begin with. Even better would be > if you create an account on our bugzilla-website, where you can also > upload a script and some (small) data structure that would allow us to > reproduce the problem. > > Best wishes, > > Jan-Mathijs > > PS: http://bugzilla.fcdonders.nl > > > On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: > >> I have the same Problem. I can plot my LCMV-Beamformer results on an >> anatomy. And I can plot the results of the normalize script. But I >> can't plot the GrandAVG or the Stats results on that anatomy. The >> interpolate function doesn' work. Without anatomy it works just fine. >> >> Any hint? >> >> Thanks, Martin >> >> On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen >> > >> wrote: >> >> Hi Cornelius, >> >> Could it be that the parameter 'avg.avg.pow' does not work? >> >> Best, >> >> JM >> >> On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: >> >>> Dear Fieldtrip list, >>> >>> i successfully beamformed some steady state activity and the >>> sourceplots per subject are looking very nice. >>> As a next step I tried to calculate a grand average using >>> ft_sourcegrandaverage: >>> >>> cfg=[]; >>> cfg.keepindividual='no'; >>> cfg.parameter='avg.pow'; >>> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >>> >>> giving me the following structure: >>> >>> GACont = >>> pos: [3570x3 double] >>> dim: [17 14 15] >>> avg: [1x1 struct] >>> var: [1x1 struct] >>> dimord: 'voxel' >>> inside: [1846x1 double] >>> outside: [1724x1 double] >>> df: [3570x1 double] >>> cfg: [1x1 struct] >>> >>> but interpolating this onto an anatomy always gives me an error: >>> >>> cfg = []; >>> cfg.downsample= 2; >>> cfg.parameter = 'avg.avg.pow'; >>> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >>> >>> /??? Error using ==> interpn at 155/ >>> ///Wrong number of input arguments or some dimension of V is >>> less than 2./ >>> ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ >>> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >>> ///Error in ==> ft_sourceinterpolate at 368/ >>> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), >>> cfg.interpmethod, cfg.feedback);/ >>> >>> however interpolating a single subject source data works just >>> fine... >>> >>> cfg = []; >>> cfg.downsample= 2; >>> cfg.parameter = 'avg.pow'; >>> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >>> >>> >>> What am i doing wrong here, any ideas? >>> >>> >>> >>> Greetings, Cornelius >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.urai.11 at ucl.ac.uk Tue Jun 26 16:00:37 2012 From: a.urai.11 at ucl.ac.uk (Anne Urai) Date: Tue, 26 Jun 2012 15:00:37 +0100 Subject: [FieldTrip] Cluster statistics - WCM Message-ID: When specifying the configuration of clusterstatistic, there are the options 'maxsum', 'max', 'maxsize' and 'wcm'. There seems to be no explanation of the 'wcm' option in the documentation that I can find, except that the option needs an extra cfg.wcm_weight. I am assuming that wcm means weights cluster means, and that the cfg.wcm_weight is used to specify priors about sensors/time/frequencies of interest. However, it is not clear what this cfg.wcm_weight should look like, which dimensions it should have and how the ft_freqstatistics treats those weights. It would be great if anyone could clarify this weighted cluster means. Assuming that I'm looking for effects in the data that might be quite focal in the time-frequency dimensions, would a weighting of ones (so equal weighting for all time and frequency points) pick up more clusters even if they are not very big in the time-frequency space? Thanks for your help! Anne Urai MSc Brain and Mind Sciences Institute of Neurology, University College London 07428392105 anne.urai -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Tue Jun 26 17:03:43 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Tue, 26 Jun 2012 08:03:43 -0700 (PDT) Subject: [FieldTrip] TMSi fieldtrip data collection Message-ID: <1340723023.89313.YahooMailNeo@web160403.mail.bf1.yahoo.com> Dear All, I tried to collect data using TMSI refa and real-time buffer from FieldTrip, did some tests. using ft_realtime_signalviewer,but failed, could you guys please give me some comments or clues? if someone did experiment using TMSi system with fieldtrip, please show me some basic script for data collection using ft_read_data and convert the data to voltage using gain and offset. Any information would be greatly appreciated!Thank you! Jie cfg=[]; figure; ft_realtime_signalviewer(cfg) got such errors. errors: Invalid name for channel 1. Skipping the rest. ??? Error using ==> cell.unique at 47 Input must be a cell array of strings. Error in ==> ft_channelselection at 83 if length(datachannel)~=length(unique(datachannel)) Error in ==> ft_realtime_signalviewer at 75 cfg.channel = ft_channelselection(cfg.channel, hdr.label); Error in ==> test_Buffer_draw at 7 ft_realtime_signalviewer(cfg) -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Tue Jun 26 17:20:07 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Tue, 26 Jun 2012 11:20:07 -0400 Subject: [FieldTrip] EEG reference In-Reply-To: References: Message-ID: NeuroBoludo!! welcome! this is (I think) a book you have to read if you are working in EEG (at least some chapters). It's from Paul Nunez Electric Fields of the Brain: The Neurophysics of EEGIf you need more info about authors, just write me an email. Good to know about you! a big hug! Y On Tue, Jun 26, 2012 at 7:23 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Eduardo, > > Steve Luck's (2005) book *An Introduction to the Event-Related Potentials > Method* has a chapter discussing reference methods. If you search the > archives of the EEGLAB mailing list there are also many recent discussions > (including references) about this issue. > > I am not personally experienced with spectral analyses, but in general, > the online reference you use during the recording does not matter very > much, since you can re-calculate the data to any other reference offline. > For example, in both labs where I have done experiments, we use various > online references but always re-reference to the average of both mastoids > during the offline analysis; this is a common procedure, if you want to do > that all you need to do is make sure to buy a cap that includes mastoid > electrodes. Another common procedure is to use the average reference (see > Luck (2005) or the EEGLAB online wiki for detailed discussion about average > reference); for that, the most important thing is for the cap to have > sufficient electrodes, evenly covering enough of the head. Of course, there > are also many other referencing procedures available. > > Best, > Steve Politzer-Ahles > > >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Mon, 25 Jun 2012 12:09:35 -0300 >> From: Eduardo Schenberg >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] EEG reference >> Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC at gmail.com> >> Content-Type: text/plain; charset=us-ascii >> >> >> Hello all, >> >> I am new to this list, as I just started ding EEG experiments. I did some >> pilot tests with a BrainProducts/Brain Vision with an Acticap and I am >> doing some preliminary analysis using EEGLab/fieldtrip. I am now planning >> to buy my own EEG form Brain Products, but I am bothered by the fact that >> in most cap configs they sell, the reference is near Cz, usually FCz. As >> far as my knowledge goes, if I want to study power spectrum alterations and >> coherence in different frequencies between different electrodes, a >> reference in the head can be a problem, specially if some of the regions of >> interest are synchronous with the reference itself in the given frequency >> >> Can anyone point me to some good review or chapter about these issues so >> I can study them better and buy the best config available? >> >> Many many thanks for all >> >> eduardo schenberg >> >> >> >> >> >> ------------------------------ >> >> Message: 2 >> Date: Tue, 26 Jun 2012 11:31:32 +0200 >> From: Marcel Heers >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] Source localization using DICS for EEG data from >> combined MEG/EEG recordings >> Message-ID: >> > xNecrA at mail.gmail.com> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> Dear all, >> >> I am trying to perform source localization in the frequency domain >> from EEG data using DICS. The data were recorded combined with MEG >> (Neuromag data format). The volume conductor is a 3 shell realistic >> head model created with bemcp. >> When running DICS with the following settings >> >> cfg = []; >> cfg.method = 'dics'; >> cfg.grad = elec; >> cfg.frequency = 14; >> cfg.vol = vol_eeg; >> cfg.dics.projectnoise = 'yes'; >> cfg.dics.lambda = 5; >> source = ft_sourceanalysis(cfg, freq); >> >> >> I am am getting the following error message: >> >> ??? Error using ==> svd >> Input to SVD must not contain NaN or Inf. >> >> Error in ==> beamformer_dics>pinv at 568 >> [U,S,V] = svd(A,0); >> >> Error in ==> beamformer_dics at 314 >> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use >> PINV/SVD to cover rank deficient leadfield >> >> Error in ==> ft_sourceanalysis at 584 >> dip(i) = beamformer_dics(grid, sens, vol, [], >> squeeze(Cf(i,:,:)), optarg{:}); >> >> >> and I am not sure what might be the cause. >> >> Maybe anyone can help me! Thank you in advance! >> >> Marcel >> >> >> ------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 19, Issue 42 >> ***************************************** >> > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Tue Jun 26 17:41:15 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Tue, 26 Jun 2012 17:41:15 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <4FE9B5F3.3080402@googlemail.com> References: <4FE46739.7010804@googlemail.com> <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> <4FE9B5F3.3080402@googlemail.com> Message-ID: i will try that, thank you very very much! On Tue, Jun 26, 2012 at 3:15 PM, cornelius abel wrote: > Here is a workaround: > It seems that it works if you copy the functional data from "GrandAVG > .avg.avg.pow" to "GrandAVG .avg.pow" prior to interpolation (and then using > cfg.parameter='avg.pow'). > > I posted it to the bugzilla system. > > Cornelius > > Am 23.06.2012 22:01, schrieb jan-mathijs schoffelen: > >> Hi Martin, >> >> In general, the more info you can provide us with, the more likely it is >> that anybody can help you. The problem you sketch is too vague to even try >> start giving hints. It would be best if you could provide us with some >> detailed error messages to begin with. Even better would be if you create >> an account on our bugzilla-website, where you can also upload a script and >> some (small) data structure that would allow us to reproduce the problem. >> >> Best wishes, >> >> Jan-Mathijs >> >> PS: http://bugzilla.fcdonders.nl >> >> >> On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: >> >> I have the same Problem. I can plot my LCMV-Beamformer results on an >>> anatomy. And I can plot the results of the normalize script. But I can't >>> plot the GrandAVG or the Stats results on that anatomy. The interpolate >>> function doesn' work. Without anatomy it works just fine. >>> >>> Any hint? >>> >>> Thanks, Martin >>> >>> On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen < >>> jan.schoffelen at donders.ru.nl >> >>> wrote: >>> >>> Hi Cornelius, >>> >>> Could it be that the parameter 'avg.avg.pow' does not work? >>> >>> Best, >>> >>> JM >>> >>> On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: >>> >>> Dear Fieldtrip list, >>>> >>>> i successfully beamformed some steady state activity and the >>>> sourceplots per subject are looking very nice. >>>> As a next step I tried to calculate a grand average using >>>> ft_sourcegrandaverage: >>>> >>>> cfg=[]; >>>> cfg.keepindividual='no'; >>>> cfg.parameter='avg.pow'; >>>> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >>>> >>>> giving me the following structure: >>>> >>>> GACont = >>>> pos: [3570x3 double] >>>> dim: [17 14 15] >>>> avg: [1x1 struct] >>>> var: [1x1 struct] >>>> dimord: 'voxel' >>>> inside: [1846x1 double] >>>> outside: [1724x1 double] >>>> df: [3570x1 double] >>>> cfg: [1x1 struct] >>>> >>>> but interpolating this onto an anatomy always gives me an error: >>>> >>>> cfg = []; >>>> cfg.downsample= 2; >>>> cfg.parameter = 'avg.avg.pow'; >>>> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >>>> >>>> /??? Error using ==> interpn at 155/ >>>> ///Wrong number of input arguments or some dimension of V is >>>> less than 2./ >>>> ///Error in ==> ft_sourceinterpolate>my_**interpn at 464/ >>>> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >>>> ///Error in ==> ft_sourceinterpolate at 368/ >>>> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), >>>> cfg.interpmethod, cfg.feedback);/ >>>> >>>> however interpolating a single subject source data works just >>>> fine... >>>> >>>> cfg = []; >>>> cfg.downsample= 2; >>>> cfg.parameter = 'avg.pow'; >>>> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >>>> >>>> >>>> What am i doing wrong here, any ideas? >>>> >>>> >>>> >>>> Greetings, Cornelius >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> > >>> Telephone: +31-24-3614793 >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> > >> >> Telephone: +31-24-3614793 >> >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From silvia.pagano at unitn.it Tue Jun 26 18:04:15 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Tue, 26 Jun 2012 18:04:15 +0200 Subject: [FieldTrip] multitaper and NaN Message-ID: Dear list subscribers, I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. Here's what I did following the tutorial: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4*cfg.foi; cfg.toi = -1.1:0.02:0.1; cfg.pad = 'maxperlen'; TFRmult = ft_freqanalysis(cfg, data); Does anyone have a clue on this? Thank you very much Silvia -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From conrado.bosman at gmail.com Tue Jun 26 18:41:46 2012 From: conrado.bosman at gmail.com (Conrado Bosman) Date: Tue, 26 Jun 2012 18:41:46 +0200 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Dear Silvia, The cfg.t_ftimwin parameter sets your current windows of analysis. In your actual configuration, you are using a pretty much similar wavelet approach in which your time window changes according to the frequency increase. Then your first time window is 5/2 = 2.5 sec which is bigger than your actual trial length (1.2 sec). Thats the reason why you get only NaNs in your low-frequency analyses and also a boundary of NaNs in the subsequent analyses. It is recommended to use in case of lower frequencies just one taper approach, unless you have several seconds of signal to analyze. Reading carefully, the Gould et al. suggestion goes in that direction. They said that they're using a .5 s window Ther (Rayleigh) frequency of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely what they described. So,according to this, I suggest you to use the following parameters: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; numfoi = length(cfg.foi) cfg.timwin = ones(1,numfoi).*0.5; cfg.tapsmofrq = ones(1,numfoi).*2; cfg.taper = 'hanning'; Best, Conrado On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > Dear list subscribers, > > I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) > > I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. > > Here's what I did following the tutorial: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = 5./cfg.foi; > cfg.tapsmofrq = 0.4*cfg.foi; > cfg.toi = -1.1:0.02:0.1; > cfg.pad = 'maxperlen'; > TFRmult = ft_freqanalysis(cfg, data); > > > Does anyone have a clue on this? > > > Thank you very much > > Silvia > -- > __________________________________ > > Silvia Pagano PhD student > CIMeC - Center for Mind/Brain Science > Corso Bettini, 31 38068 Rovereto (TN) > Tel. +39 0464 808709 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From inieuwenhuis at berkeley.edu Tue Jun 26 18:43:10 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Tue, 26 Jun 2012 09:43:10 -0700 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: <4FE9E69E.4050302@berkeley.edu> Hi Silvia, Also see here: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_contain_nans good luck, Ingrid On 6/26/2012 9:41 AM, Conrado Bosman wrote: > Dear Silvia, > > The cfg.t_ftimwin parameter sets your current windows of analysis. In your actual configuration, you are using a pretty much similar wavelet approach in which your time window changes according to the frequency increase. Then your first time window is 5/2 = 2.5 sec which is bigger than your actual trial length (1.2 sec). Thats the reason why you get only NaNs in your low-frequency analyses and also a boundary of NaNs in the subsequent analyses. > It is recommended to use in case of lower frequencies just one taper approach, unless you have several seconds of signal to analyze. Reading carefully, the Gould et al. suggestion goes in that direction. They said that they're using a .5 s window Ther (Rayleigh) frequency of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely what they described. So,according to this, I suggest you to use the following parameters: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > numfoi = length(cfg.foi) > cfg.timwin = ones(1,numfoi).*0.5; > cfg.tapsmofrq = ones(1,numfoi).*2; > cfg.taper = 'hanning'; > > Best, > Conrado > > > On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > >> Dear list subscribers, >> >> I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on >> all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) >> >> I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. >> >> Here's what I did following the tutorial: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = 'EEG'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 2:2:30; >> cfg.t_ftimwin = 5./cfg.foi; >> cfg.tapsmofrq = 0.4*cfg.foi; >> cfg.toi = -1.1:0.02:0.1; >> cfg.pad = 'maxperlen'; >> TFRmult = ft_freqanalysis(cfg, data); >> >> >> Does anyone have a clue on this? >> >> >> Thank you very much >> >> Silvia >> -- >> __________________________________ >> >> Silvia Pagano PhD student >> CIMeC - Center for Mind/Brain Science >> Corso Bettini, 31 38068 Rovereto (TN) >> Tel. +39 0464 808709 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 From rmontefusco at med.uchile.cl Tue Jun 26 18:49:52 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Tue, 26 Jun 2012 12:49:52 -0400 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Hi Silvia, As I see in your config, you are using 5 cycles per frequency (cfg.t_ftimwin = 5./cfg.foi;), that means that for 2 Hz you need at least 500ms * 5 = 2.5 secs epochs to resolve that frequency. 1.- you can try with longer epochs...(eg 5 secs) 2.- using less cycles per freq. please someone correct me if I'm wrong cheers Y On Tue, Jun 26, 2012 at 12:04 PM, Silvia Pagano wrote: > Dear list subscribers, > > I am an ERPer looking for the first time into the world of time-frequency > analysis. I am trying to perform some multitaper analysis on a data set. > Ideally I would like to perform similar analysis as described in a paper by > Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words > "Time-frequency analysis was performed on > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms > temporal smoothing window, 2-Hz frequency resolution)" ) > > I have epochs from -1100 ms to 100 time locked to the stimulus onset and I > am trying to replicate the analysis they did. The problem is that I got > boundary effects on all my conditions, namely I obtain NaN in the extreme > 100 ms of the time window for all frequencies and for very low frequencies > (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time > windows large enough to avoid boundary effects, however there must be > something I am missing in my code. > > Here's what I did following the tutorial: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = 5./cfg.foi; > cfg.tapsmofrq = 0.4*cfg.foi; > cfg.toi = -1.1:0.02:0.1; > cfg.pad = 'maxperlen'; > TFRmult = ft_freqanalysis(cfg, data); > > > Does anyone have a clue on this? > > > Thank you very much > > Silvia > -- > __________________________________ > > Silvia Pagano PhD student > CIMeC - Center for Mind/Brain Science > Corso Bettini, 31 38068 Rovereto (TN) > Tel. +39 0464 808709 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Tue Jun 26 19:29:02 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 26 Jun 2012 12:29:02 -0500 Subject: [FieldTrip] cfg.bandwidth field missing Message-ID: Hello, I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. cfg = []; cfg.method = 'psi'; psi = ft_connectivityanalysis(cfg, freq); selection fourierspctrm along dimension 2 averaging crsspctrm over rpt removing dimension rpt from crsspctrm Reference to non-existent field 'bandwidth'. Error in ft_connectivityanalysis (line 719) nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1; -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Tue Jun 26 19:36:44 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 26 Jun 2012 12:36:44 -0500 Subject: [FieldTrip] resend: missing cfg.bandwidth field Message-ID: Hello, Apologies for the double email. I sent the previous one without finishing. I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. I don't find the bandwidth field to be output in any of the ft_freqanalysis functions. Is it simply the foi/some smoothing amount? *cfg = [];* *cfg.method = 'psi';* *psi = ft_connectivityanalysis(cfg, freq);* * * *selection fourierspctrm along dimension 2* *averaging crsspctrm over rpt* *removing dimension rpt from crsspctrm* *Reference to non-existent field 'bandwidth'.* * * *Error in ft_connectivityanalysis (line 719)* * nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1;* * * * * *freq was computed with the following:* * * *cfg = [];* *cfg.channel = chans; %{'MEG', '-A41','-A71'};* *cfg.channelcmb = chancmb;* *cfg.method = 'mtmconvol';* *cfg.output = 'fourier';* *cfg.keeptrials = 'yes';* *cfg.foi = band(1):band(2); %8:12Hz* *cfg.toi = 1.8:0.01:3.0;* *cfg.t_ftimwin = 5./cfg.foi;* *cfg.taper = 'hanning';* * * *freq = ft_freqanalysis(cfg, data);* * * * * * * Thanks you, Karl Doron, phd UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 26 20:14:25 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 26 Jun 2012 20:14:25 +0200 Subject: [FieldTrip] resend: missing cfg.bandwidth field In-Reply-To: References: Message-ID: Hi Karl, Just check the original paper: the bandwidth is a required parameter for the thing to be computed in the first place, because the metric is computed by integrating over a specified frequency band. You as a user should specify it; and even more so, the value is up to you ;-). JM On Jun 26, 2012, at 7:36 PM, Karl Doron wrote: > Hello, > > Apologies for the double email. I sent the previous one without finishing. > > I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. I don't find the bandwidth field to be output in any of the ft_freqanalysis functions. Is it simply the foi/some smoothing amount? > > cfg = []; > cfg.method = 'psi'; > psi = ft_connectivityanalysis(cfg, freq); > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Reference to non-existent field 'bandwidth'. > > Error in ft_connectivityanalysis (line 719) > nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1; > > > freq was computed with the following: > > cfg = []; > cfg.channel = chans; %{'MEG', '-A41','-A71'}; > cfg.channelcmb = chancmb; > cfg.method = 'mtmconvol'; > cfg.output = 'fourier'; > cfg.keeptrials = 'yes'; > cfg.foi = band(1):band(2); %8:12Hz > cfg.toi = 1.8:0.01:3.0; > cfg.t_ftimwin = 5./cfg.foi; > cfg.taper = 'hanning'; > > freq = ft_freqanalysis(cfg, data); > > > > Thanks you, > > Karl Doron, phd > UC, Santa Barbara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Wed Jun 27 09:03:48 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Wed, 27 Jun 2012 09:03:48 +0200 (CEST) Subject: [FieldTrip] multitaper and NaN In-Reply-To: Message-ID: <1215816663.779368.1340780628381.JavaMail.root@sculptor.zimbra.ru.nl> Dear Sylvia, If you want to keep the settings even more similar to Gould et al, you should set the cfg.foi to: cfg.foi=2:0.5:30 which corresponds to the 0.5 Hz steps. You have to keep in mind though that since your frequency resolution is actually 2Hz (as follows from the 500ms time window you put in), smaller steps than that (such as the 0.5 Hz steps I put in here) gives you redundant information. See also the tutorial at http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis. Best, Stan ----- Oorspronkelijk bericht ----- > Van: "Conrado Bosman" > Aan: "FieldTrip discussion list" > Verzonden: Dinsdag 26 juni 2012 18:41:46 > Onderwerp: Re: [FieldTrip] multitaper and NaN > Dear Silvia, > > The cfg.t_ftimwin parameter sets your current windows of analysis. In > your actual configuration, you are using a pretty much similar wavelet > approach in which your time window changes according to the frequency > increase. Then your first time window is 5/2 = 2.5 sec which is bigger > than your actual trial length (1.2 sec). Thats the reason why you get > only NaNs in your low-frequency analyses and also a boundary of NaNs > in the subsequent analyses. > It is recommended to use in case of lower frequencies just one taper > approach, unless you have several seconds of signal to analyze. > Reading carefully, the Gould et al. suggestion goes in that direction. > They said that they're using a .5 s window Ther (Rayleigh) frequency > of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely > what they described. So,according to this, I suggest you to use the > following parameters: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > numfoi = length(cfg.foi) > cfg.timwin = ones(1,numfoi).*0.5; > cfg.tapsmofrq = ones(1,numfoi).*2; > cfg.taper = 'hanning'; > > Best, > Conrado > > > On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > > > Dear list subscribers, > > > > I am an ERPer looking for the first time into the world of > > time-frequency analysis. I am trying to perform some multitaper > > analysis on a data set. Ideally I would like to perform similar > > analysis as described in a paper by Gould et al (2011) on Journal of > > Neurophysiology. (i.e. in their own words "Time-frequency analysis > > was performed on > > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, > > 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) > > > > I have epochs from -1100 ms to 100 time locked to the stimulus onset > > and I am trying to replicate the analysis they did. The problem is > > that I got boundary effects on all my conditions, namely I obtain > > NaN in the extreme 100 ms of the time window for all frequencies and > > for very low frequencies (e.g. 2-4Hz) I have no data in the whole > > time window. I thought I had time windows large enough to avoid > > boundary effects, however there must be something I am missing in my > > code. > > > > Here's what I did following the tutorial: > > > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = 'EEG'; > > cfg.method = 'mtmconvol'; > > cfg.foi = 2:2:30; > > cfg.t_ftimwin = 5./cfg.foi; > > cfg.tapsmofrq = 0.4*cfg.foi; > > cfg.toi = -1.1:0.02:0.1; > > cfg.pad = 'maxperlen'; > > TFRmult = ft_freqanalysis(cfg, data); > > > > > > Does anyone have a clue on this? > > > > > > Thank you very much > > > > Silvia > > -- > > __________________________________ > > > > Silvia Pagano PhD student > > CIMeC - Center for Mind/Brain Science > > Corso Bettini, 31 38068 Rovereto (TN) > > Tel. +39 0464 808709 > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 From silvia.pagano at unitn.it Wed Jun 27 09:26:52 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Wed, 27 Jun 2012 09:26:52 +0200 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Hi all, thank you a lot for your suggestions. The thing that was not clear to me was the parameter that expresses Raleigh frequency in Fieldtrip. Now it makes much more sense. Thanks again, I will try with your suggestions and see what happens Cheers Silvia On Tue, Jun 26, 2012 at 6:49 PM, Rodrigo Montefusco < rmontefusco at med.uchile.cl> wrote: > Hi Silvia, > > As I see in your config, you are using 5 cycles per frequency > (cfg.t_ftimwin = 5./cfg.foi;), that means that for 2 Hz you need at least > 500ms * 5 = 2.5 secs epochs to resolve that frequency. > 1.- you can try with longer epochs...(eg 5 secs) > 2.- using less cycles per freq. > > please someone correct me if I'm wrong > > cheers > > Y > > On Tue, Jun 26, 2012 at 12:04 PM, Silvia Pagano wrote: > >> Dear list subscribers, >> >> I am an ERPer looking for the first time into the world of time-frequency >> analysis. I am trying to perform some multitaper analysis on a data set. >> Ideally I would like to perform similar analysis as described in a paper by >> Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words >> "Time-frequency analysis was performed on >> all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms >> temporal smoothing window, 2-Hz frequency resolution)" ) >> >> I have epochs from -1100 ms to 100 time locked to the stimulus onset and >> I am trying to replicate the analysis they did. The problem is that I got >> boundary effects on all my conditions, namely I obtain NaN in the extreme >> 100 ms of the time window for all frequencies and for very low frequencies >> (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time >> windows large enough to avoid boundary effects, however there must be >> something I am missing in my code. >> >> Here's what I did following the tutorial: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = 'EEG'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 2:2:30; >> cfg.t_ftimwin = 5./cfg.foi; >> cfg.tapsmofrq = 0.4*cfg.foi; >> cfg.toi = -1.1:0.02:0.1; >> cfg.pad = 'maxperlen'; >> TFRmult = ft_freqanalysis(cfg, data); >> >> >> Does anyone have a clue on this? >> >> >> Thank you very much >> >> Silvia >> -- >> __________________________________ >> >> Silvia Pagano PhD student >> CIMeC - Center for Mind/Brain Science >> Corso Bettini, 31 38068 Rovereto (TN) >> Tel. +39 0464 808709 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From silvia.pagano at unitn.it Wed Jun 27 09:35:12 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Wed, 27 Jun 2012 09:35:12 +0200 Subject: [FieldTrip] Fwd: FW: multitaper and NaN In-Reply-To: References: Message-ID: Hi all, Ian Gould, the author of the paper I cited in my previous mail, also replied to me. He kindly asked me to post his reply on the mailing list. Thanks again for your help Silvia ---------- Forwarded message ---------- From: Ian Gould Date: Tue, Jun 26, 2012 at 6:57 PM Subject: FW: [FieldTrip] multitaper and NaN To: "Pagano, Silvia" Hi Silvia, Although I'm not subscribed to it at the moment, a friend of mine monitors the field trip email list and forwarded your question to me. The boundary effects you are talking about occur because oscillatory signals have to be computed over a time window. The time window width is specified for each frequency you are analysing in cfg.t_ftimwin, and is centred on the time point you are trying to compute power at. So, if the half-width of the window is greater than the distance from a time point to the edge of your data, field trip will not be able to compute power at that frequency. The solution to this is to (1) use a shorter time window, and/or (2) calculate data over longer epochs so the boundary effect doesn't affect the time points you are interested in. In the code you posted, the time window varies with frequency, unlike the fixed window we used in our JNeurophys paper. Your missing data at lower frequencies are explained by this. For example, you'd need 2.5s of data to estimate power at 2Hz with your settings. To get 500ms smoothing you could use: cfg.t_ftimwin = 0.5 *ones(1,length(cfg.foi)); Similarly, for 2Hz smoothing you'd want something like: cfg.tapsmofrq = 2*ones(1,length(cfg.foi)); Finally, for 50ms steps you'd want: cfg.toi = -1.1:0.05:0.1; Hope that helps. Let me know if any other questions. Also, could you please post this to the list on my behalf, so others know that your question has been answered. Kind Regards, Ian From: Andre Cravo Date: Tuesday, 26 June 2012 17:11 To: Ian Gould , "ian.gould at merton.ox.ac.uk" < ian.gould at merton.ox.ac.uk> Subject: Fwd: [FieldTrip] multitaper and NaN Hello Ian, How are you? I hope all is well. I'm pretty sure you get fieldtrip emails, but I saw this one and thought you might like to give a help. Cheers Andre ---------- Forwarded message ---------- From: Silvia Pagano Date: 26 June 2012 13:04 Subject: [FieldTrip] multitaper and NaN To: fieldtrip at science.ru.nl Dear list subscribers, I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. Here's what I did following the tutorial: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4*cfg.foi; cfg.toi = -1.1:0.02:0.1; cfg.pad = 'maxperlen'; TFRmult = ft_freqanalysis(cfg, data); Does anyone have a clue on this? Thank you very much Silvia -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andre M. Cravo Postdoctoral Researcher University of Sao Paulo-Brazil -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From acorneyllie at olfac.univ-lyon1.fr Wed Jun 27 10:38:03 2012 From: acorneyllie at olfac.univ-lyon1.fr (acorneyllie at olfac.univ-lyon1.fr) Date: Wed, 27 Jun 2012 10:38:03 +0200 (CEST) Subject: [FieldTrip] help about Fieldtrip Multivariate Module Message-ID: <4850ff08aa0483a2cd3bc77e5ad6157d.squirrel@olfac.univ-lyon1.fr> Dear all, I'm starting to use fieldtrip to analyse EEG data : I would like to select channels and extract representative features of 18 cognitive tasks. The signal comes from a 96ch brain product system. To begin, I made the anlysis offline. Using the tutorial, I had imported, rereferenced and preprocessed the data (find the good layout, extract trials, remove artifacts,..) and made some first analysis using the toolbox. (pca, time frequency representation, average spectrum over trials and subjects,..). (By the way, the fieldtrip toolbox is brilliant) I'm really interested on using the FieldTrip Multivariate Module but I'm having difficulties to get started. Is there an usage example ? My data (after preprocessing) are organized, for each subject, on a structure of 18 stuctures (one for each task) each corresponding to the output of ft_preprocessing. I also get the same organization for the spectral corresponding values. Do you think it's a good way to process ? Feel free to ask me more details or give advices. Thanks for your implication, Best, Alexandra Corneyllie CAP engineer team CNRS UMR5292 - INSERM U1028 Lyon Neuroscience Research Center CRNL Phone + 33 04.37.28.74.90 From jarang.hahm at gmail.com Wed Jun 27 13:00:07 2012 From: jarang.hahm at gmail.com (Jarang Hahm) Date: Wed, 27 Jun 2012 20:00:07 +0900 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Dear Hanneke, Thanks to you, I properly found neighbours. :-) And I confirmed it by plotting the neighbours. To do this, I modified a code 'ft_plotneighbours' for correcting a mismatch between the channel position and label. You also probably need this code, so I have attatched what I modified. :-) Thanks! Best, Jarang Hahm On Mon, Jun 25, 2012 at 6:01 PM, Hanneke van Dijk < Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > Dear Jarang, > > Coincidentily I have been working on the same problem a few weeks ago. > > First of all you should take care that you repair a horizontal gradiometer > with neighbouring horizontal gradiometers and vertical ones with vertical > ones. This is not built into fieldtrip yet. > > I have have made a partial fix, which works with the 'layout' option but > not with the 'grad' method. I have attached the function I addapted from > Fieldtrip, and the layout files that seperatly name the different > gradiometers (made by Elisabeth May ;-) ) > > I hope it somehow helps you! > > Best regards, > > Hanneke van Dijk > > ________________________________________________________________ > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: > >> Dear FieldTrip user. >> >> >> >> Hi, I'm processing MEG data of Neuromag 306 system after removing some >> bad channels using fieldtrip-20120620 toolbox. >> >> >> >> To repair the bad channels with its neighbours, I firstly found the >> neighbor of all channel based on distance using 'ft_prepare_neighbours'. >> >> However, the outcome of neighbour was far more than default distance, >> 4cm, from a target channel. >> >> So, I checked thoroughly the code 'ft_prepare_neighbours', finding it >> used information of channel label and position from data’s hdr.grad to find >> neighbour of the target. >> >> >> >> The problem is channel label and position in hdr.grad are arranged >> differently. >> >> As far as I found, both information come from different source: the >> channel label was from code 'fiff_read_meas_info', while the channel >> position was from ‘channelposition’ in 'ft_datatype_sens'. >> >> And the channel label is sorted into the sensor location, e. g. MEG >> 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is >> arranged along the sensor type (magnetometer and gradiometer) according to >> its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., >> MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. >> >> Thus, the label and position of channel in hdr.grad were mismatched so >> that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. >> >> >> It should be matched correctly to find the proper neighbour and ensure >> the result of repair as well. >> >> In fact, the code 'channelposition' in 'ft_datatype_sens' yield the >> channel label as well as the channel position. It might help to solve this >> problem. >> >> >> >> Is there any other way to solve this problem? >> >> >> >> >> Best, >> >> >> Jarang Hahm >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- 함자랑 드림. Jarang Hahm Interdisciplinary Program in Cognitive Science Seoul National University Seoul, Korea, Republic of. +82-10-9079-3121 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neuromag_neighbourplot.m Type: application/octet-stream Size: 7578 bytes Desc: not available URL: From hanneke.p.van.dijk at gmail.com Wed Jun 27 13:04:36 2012 From: hanneke.p.van.dijk at gmail.com (Hanneke van Dijk) Date: Wed, 27 Jun 2012 13:04:36 +0200 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Hi Jarang, Thanks for the code! I'm happy I could help you! Best, Hanneke Op 27 jun. 2012 13:00 schreef "Jarang Hahm" het volgende: > Dear Hanneke, > > > Thanks to you, I properly found neighbours. :-) > > And I confirmed it by plotting the neighbours. To do this, I modified a > code 'ft_plotneighbours' for correcting a mismatch between the channel > position and label. > > You also probably need this code, so I have attatched what I modified. :-) > > > Thanks! > > > Best, > > > Jarang Hahm > > > On Mon, Jun 25, 2012 at 6:01 PM, Hanneke van Dijk < > Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > >> Dear Jarang, >> >> Coincidentily I have been working on the same problem a few weeks ago. >> >> First of all you should take care that you repair a horizontal >> gradiometer with neighbouring horizontal gradiometers and vertical ones >> with vertical ones. This is not built into fieldtrip yet. >> >> I have have made a partial fix, which works with the 'layout' option but >> not with the 'grad' method. I have attached the function I addapted from >> Fieldtrip, and the layout files that seperatly name the different >> gradiometers (made by Elisabeth May ;-) ) >> >> I hope it somehow helps you! >> >> Best regards, >> >> Hanneke van Dijk >> >> ________________________________________________________________ >> >> >> Hanneke van Dijk, PhD >> >> >> http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html >> >> Institute for Clinical Neuroscience, >> >> Heinrich Heine Universität Düsseldorf, Germany >> >> Hanneke.vanDijk at med.uni-duesseldorf.de >> >> Tel. +49 (0) 211 81 13074 >> >> __________________________________________ >> >> >> On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: >> >>> Dear FieldTrip user. >>> >>> >>> >>> Hi, I'm processing MEG data of Neuromag 306 system after removing some >>> bad channels using fieldtrip-20120620 toolbox. >>> >>> >>> >>> To repair the bad channels with its neighbours, I firstly found the >>> neighbor of all channel based on distance using 'ft_prepare_neighbours'. >>> >>> However, the outcome of neighbour was far more than default distance, >>> 4cm, from a target channel. >>> >>> So, I checked thoroughly the code 'ft_prepare_neighbours', finding it >>> used information of channel label and position from data’s hdr.grad to find >>> neighbour of the target. >>> >>> >>> >>> The problem is channel label and position in hdr.grad are arranged >>> differently. >>> >>> As far as I found, both information come from different source: the >>> channel label was from code 'fiff_read_meas_info', while the channel >>> position was from ‘channelposition’ in 'ft_datatype_sens'. >>> >>> And the channel label is sorted into the sensor location, e. g. MEG >>> 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is >>> arranged along the sensor type (magnetometer and gradiometer) according to >>> its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., >>> MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. >>> >>> Thus, the label and position of channel in hdr.grad were mismatched so >>> that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. >>> >>> >>> It should be matched correctly to find the proper neighbour and ensure >>> the result of repair as well. >>> >>> In fact, the code 'channelposition' in 'ft_datatype_sens' yield the >>> channel label as well as the channel position. It might help to solve this >>> problem. >>> >>> >>> >>> Is there any other way to solve this problem? >>> >>> >>> >>> >>> Best, >>> >>> >>> Jarang Hahm >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > 함자랑 드림. > > Jarang Hahm > > Interdisciplinary Program in Cognitive Science > Seoul National University > Seoul, Korea, Republic of. > +82-10-9079-3121 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaveh.manshaei at googlemail.com Wed Jun 27 13:13:29 2012 From: kaveh.manshaei at googlemail.com (kaveh manshaei) Date: Wed, 27 Jun 2012 13:13:29 +0200 Subject: [FieldTrip] Merging files and speeding up Message-ID: Hi all I have 3 blocks for each patient in my experiment and there are separately header , marker and dat file for each of them! I would like to merge these files together and generate one header and one dat and one marker file for each patient! Is it possible in fieldtrip or you know the other way around? Thanks in advance Kaveh -------------- next part -------------- An HTML attachment was scrubbed... URL: From philipp.hintze at uni-muenster.de Wed Jun 27 15:30:42 2012 From: philipp.hintze at uni-muenster.de (Philipp Hintze) Date: Wed, 27 Jun 2012 15:30:42 +0200 (CEST) Subject: [FieldTrip] Questions on High pass and Dft filtering Message-ID: Dear mailing list members, I continue to run into errors during my first FieldTrip analysis: I would like to use a high pass filter on my data prior to the segmentation into trials, the reason being that the trial duration is ~900 ms and I would like to filter low frequencies. The continuous data set is 900 seconds long. Simply using cfg.continuous = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.1; filteredContinuousData = ft_preprocessing(cfg); as my first run of preprocessing, I am confronted with an error stating Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff frequency or a different type/order of filter. How can I avoid this? Another problem I have concernes the line noise filtering. I would like to use the dft filter to get rid of the line noise. Using it on the segmented trials, I still notice residual 50 Hz noise, despite using cfg.padding = 10. A combination of the dft filter and a band stop filter using cfg.bsfreq = [49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of the line noise. The problem I have concerns the order of the filtering steps: I would like to use the high pass filter described above, given it works, on the continuous data. If I use the dft filter on the continuous data set, there is no effect on the averaged trials. Is this trivial or is there a mistake on my part? However, I can hardly use the dft filter on data that was preprocessed as continuous and than segmented using ft_redefinetrial, because I can not set any filter padding (because the data is not read from the dataset). Is there something I am overlooking or doing wrong or has someone used a different approach to a similar problem? Thank you in advance for your time and effort, Philipp From caspervanheck at gmail.com Wed Jun 27 15:34:11 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 27 Jun 2012 15:34:11 +0200 Subject: [FieldTrip] Merging files and speeding up In-Reply-To: References: Message-ID: Kaveh, 'ft_appenddata ' can combine data from separate files into one datafile with a single command: data = ft_appenddata(cfg,data1,data2,data3) If you want to save it as a brainvision datafile, the funcion 'ft_write_data' should come in handy. Its use is explained on the page 'How can I convert one dataformat into an other '. Good luck, Casper On Wed, Jun 27, 2012 at 1:13 PM, kaveh manshaei < kaveh.manshaei at googlemail.com> wrote: > Hi all > > I have 3 blocks for each patient in my experiment and there are separately > header , marker and dat file for each of them! I would like to merge these > files together and generate one header and one dat and one marker file for > each patient! Is it possible in fieldtrip or you know the other way around? > > Thanks in advance > Kaveh > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Wed Jun 27 17:26:24 2012 From: cornabel at googlemail.com (cornelius abel) Date: Wed, 27 Jun 2012 17:26:24 +0200 Subject: [FieldTrip] reverse source interpolate? Message-ID: <4FEB2620.3050505@googlemail.com> Hello, does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. I tried to get the position by applying the inverse transformation matrix of the used anatomy like: pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); but that did not give usefull results :( Any ideas how it could be done? Greetings, Cornelius From jan.schoffelen at donders.ru.nl Wed Jun 27 18:27:16 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 27 Jun 2012 18:27:16 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: <4FEB2620.3050505@googlemail.com> References: <4FEB2620.3050505@googlemail.com> Message-ID: Hi Cornelius, There is no need to 'uninterpolate' because the coordinates are already expressed in the correct coordinate system. What you probably want is to find the index to the voxel in the original source-structure closest to your 'hotspot' in the interpolated image. This can be achieved by something like this: write down the coordinates of your favourite position in the interpolated image (in world coordinates, here I assume that you are still in MEG coordinate system and have not normalized to MNI space), call this pos pos = pos./10 (from mm to cm) dpos = source.pos - repmat(pos, size(source.pos,1),1); [m,ind] = min(sum(dpos.^2,2)); source is the original source structure. ind is the index you are looking for. If you have interpolate to the MNI-template grid you need to replace the source.pos with the set of grid positions from your template grid (i.e. expressed in MNI coordinates). Cheers, JM On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > Hello, > > does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. > In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. > > I tried to get the position by applying the inverse transformation matrix of the used anatomy like: > pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); > > but that did not give usefull results :( > > Any ideas how it could be done? > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 28 09:00:52 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 28 Jun 2012 09:00:52 +0200 Subject: [FieldTrip] MEG BTI reading problems References: <539a5a71329ed45a4f4e76b8c52236e7.squirrel@neuro2.med.uni-magdeburg.de> Message-ID: Dear Sascha, I am forwarding this e-mail to the list because many brains know more than one... I do not exactly recall whether this problem was solved in the end. The error you get seems a pretty low level one, but I am not sure whether this is caused by the operating system, or by an old version of MATLAB. What version of matlab are you using? Apparently, your version of fseek (which is a built-in matlab function) does not support int32 as input class. I have never encountered this problem, nor on Linux, MacOS or Windows. You could try to do the following: change fseek(fid, nbytes2, ... into fseek(fid, double(nbytes2), ...)? If this works we know where to find the solution to the problem. With best wishes, Jan-Mathijs Begin forwarded message: > From: styll at med.ovgu.de > Date: June 27, 2012 3:14:42 PM GMT+02:00 > To: jan.schoffelen at donders.ru.nl > Subject: MEG BTI reading problems > > Hi Jan, > > I have read your conversation with Mehmet in the field trip mailing list > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-March/003599.html). > Unfortunately he sends no feedback whether he has solved his problem, > because I have the same problem. > > I am using a windows machine (32bit) and the newest fieldtrip version from > 06/25/2012. > Whenever I try to read the raw data as suggested in the description of the > field trip homepage (hdr = ft_read_header('c,rfDC')) I getting the > following error. > > ?? Error using ==> fseek > Offset must be of class double. > > Error in ==> fileio\private\read_4d_hdr at 185 > fseek(fid, nbytes2 - 32, 'cof'); > > Error in ==> ft_read_header at 153 > orig = read_4d_hdr(datafile); > > > Maybe you can help me. > > Many thanks > > Sascha > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Jun 28 09:14:45 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 28 Jun 2012 15:14:45 +0800 Subject: [FieldTrip] Merging files and speeding up Message-ID: Kaveh, In addition to Casper's comment, I just wanted to add: depending on what data processing you plan to do and what is the nature of your three different data sets per subject, it may be important to *not* merge the datasets right away. For example, if the reason you have three recordings for each participant is that they were recorded in three separate sessions (with the cap taken off and re-applied in between) and if you are planning on running an ICA algorithm, you should keep the datasets separate and run ICA separately on each one before merging them; there might be other procedures I'm not aware of that also have this caveat. I'm not sure what sort of data processing you have in mind so I'm not sure if this issue will apply to you, I just wanted to mention it. Best, Steve > > Message: 3 > Date: Wed, 27 Jun 2012 15:34:11 +0200 > From: Casper van Heck > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Merging files and speeding up > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Kaveh, > > 'ft_appenddata ' > can > combine data from separate files into one datafile with a single command: > data = ft_appenddata(cfg,data1,data2,data3) > > If you want to save it as a brainvision datafile, the funcion > 'ft_write_data' > should come in handy. Its use is explained on the page 'How can I convert > one dataformat into an > other< > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_one_dataformat_into_an_other?s[]=brainvision > > > '. > > Good luck, > > Casper > > > > On Wed, Jun 27, 2012 at 1:13 PM, kaveh manshaei < > kaveh.manshaei at googlemail.com> wrote: > > > Hi all > > > > I have 3 blocks for each patient in my experiment and there are > separately > > header , marker and dat file for each of them! I would like to merge > these > > files together and generate one header and one dat and one marker file > for > > each patient! Is it possible in fieldtrip or you know the other way > around? > > > > Thanks in advance > > Kaveh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Thu Jun 28 11:19:55 2012 From: cornabel at googlemail.com (Cornelius Abel) Date: Thu, 28 Jun 2012 11:19:55 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: References: <4FEB2620.3050505@googlemail.com> Message-ID: Hi jan mathijs, hello mailing list, thanks for your answer. I think i got your idea with finding the minimum in this squared differences. This should the work with positions of any scaling, right? However it gives me strange results when trying to get voxel indices in the "raw" source using voxel indices aquired from interpolated source. But even using the ctf coordinates in mm doesn't work. Here is a short script showing what i did, i also attached the necessary mat files. greetings, Cornelius clear all; load testdata.mat; % Interpolate source on anatomy cfg = []; cfg.parameter = 'avg.itc'; cfg.interpmethod = 'linear'; sourceInt = ft_sourceinterpolate(cfg, source,mri); % Find position of max voxel in interpolated source [maxval, maxindx] = max(sourceInt.avg.itc(:)); [x,y,z]=ind2sub(size(sourceInt.avg.itc),maxindx); pos=[x y z]; % plot this position in interpolated source figure; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.itc'; cfg.locationcoordinates = 'voxel'; cfg.location = pos; ft_sourceplot(cfg, sourceInt); % Calculate respective position in 'raw' source struct dpos = source.pos - repmat(pos, size(source.pos,1),1); [m,ind] = min(sum(dpos.^2,2)); spos=source.pos(ind,:); % Plot position in 'raw' source. % This gives not the position of max activity!!! figure; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.itc'; cfg.locationcoordinates = 'voxel'; cfg.location = spos; ft_sourceplot(cfg, source); 2012/6/27 jan-mathijs schoffelen > Hi Cornelius, > > There is no need to 'uninterpolate' because the coordinates are already > expressed in the correct coordinate system. What you probably want is to > find the index to the voxel in the original source-structure closest to > your 'hotspot' in the interpolated image. > This can be achieved by something like this: > > write down the coordinates of your favourite position in the interpolated > image (in world coordinates, here I assume that you are still in MEG > coordinate system and have not normalized to MNI space), call this pos > > pos = pos./10 (from mm to cm) > > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > > source is the original source structure. > ind is the index you are looking for. > > If you have interpolate to the MNI-template grid you need to replace the > source.pos with the set of grid positions from your template grid (i.e. > expressed in MNI coordinates). > > > Cheers, > > JM > > > On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > > Hello, > > does anybody know how to get the uninterpolated source position giving the > coordinates aquired after interpolation with an anatomy. > In principle i want to get an individual source time course at the > position i picked from the interpolated grand average source plot. Therfore > i need the corresponding filter and its position in the source structure. > > I tried to get the position by applying the inverse transformation matrix > of the used anatomy like: > pos_before_interpolation=warp_apply(inv(anatomy.transform), > position_after_interpolation); > > but that did not give usefull results :( > > Any ideas how it could be done? > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jun 28 11:40:19 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 28 Jun 2012 11:40:19 +0200 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: References: Message-ID: <4FEC2683.5030503@donders.ru.nl> Dear Philipp, we are quite aware that the filter sometimes results in unstable solutions, see also here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=780 How to avoid this, however, is already explained in the error message. Just try to change the order of the filter or increase the cut-off frequency. The order/cutoff frequency needed is something I cannot tell you from the top of my head, to just try some values (for the order, look at the default, which is around 4 or so and then increase/decrease by one stepwise). The dft-filter basically works by fitting a 50Hz sine wave to substract the line noise, thereby leaving a residual when the amplitude is not constant. In contrast a bandstop filter removes activity in a specified frequency band. This is explained in more details in our FAQ on the webpage: http://fieldtrip.fcdonders.nl/faq/why_is_there_a_residual_50hz_line-noise_component_after_applying_a_dft_filter The dftfilter therefore also does not really require any padding (imho it would be even counter productive). I don't quite get with what you mean by saying that there is no effect on the continuous data set, can you give an example (e.g. explain with what cfg options you call ft_preprocessing). Your problem concerning filter padding with data in memory will be handled soon, by implementing additional options for padding, see here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1318 But as I said, I don't see the point in using padding for a dftfilter. Hope that helps! Best, Jörn On 6/27/2012 3:30 PM, Philipp Hintze wrote: > Dear mailing list members, > > I continue to run into errors during my first FieldTrip analysis: > I would like to use a high pass filter on my data prior to the segmentation > into trials, the reason being that the trial duration is ~900 ms and I would > like to filter low frequencies. The continuous data set is 900 seconds long. > Simply using > cfg.continuous = 'yes'; > > cfg.hpfilter = 'yes'; > cfg.hpfreq = 0.1; > filteredContinuousData = ft_preprocessing(cfg); > > as my first run of preprocessing, I am confronted with an error stating > > Calculated filter coefficients have poles on or outside the unit circle and > will not be stable. Try a higher cutoff frequency or a different > type/order of filter. > > How can I avoid this? > > Another problem I have concernes the line noise filtering. I would like to use > the dft filter to get rid of the line noise. Using it on the segmented trials, > I still notice residual 50 Hz noise, despite using cfg.padding = 10. A > combination of the dft filter and a band stop filter using cfg.bsfreq = > [49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of the line > noise. > > The problem I have concerns the order of the filtering steps: I would like to > use the high pass filter described above, given it works, on the continuous > data. If I use the dft filter on the continuous data set, there is no effect > on the averaged trials. Is this trivial or is there a mistake on my part? > However, I can hardly use the dft filter on data that was preprocessed as > continuous and than segmented using ft_redefinetrial, because I can not set > any filter padding (because the data is not read from the dataset). > Is there something I am overlooking or doing wrong or has someone used a > different approach to a similar problem? > > Thank you in advance for your time and effort, > > Philipp > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jan.schoffelen at donders.ru.nl Thu Jun 28 14:29:40 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 28 Jun 2012 14:29:40 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: References: <4FEB2620.3050505@googlemail.com> Message-ID: <36BAC777-CD99-4F3E-95D1-A133F5CC2372@donders.ru.nl> Hi Cornelius, Probably you should use: cfg.locationcoordinates to be 'head'. Best, JM On Jun 28, 2012, at 11:19 AM, Cornelius Abel wrote: > Hi jan mathijs, hello mailing list, > > thanks for your answer. I think i got your idea with finding the minimum in this squared differences. This should the work with positions of any scaling, right? > However it gives me strange results when trying to get voxel indices in the "raw" source using voxel indices aquired from interpolated source. > But even using the ctf coordinates in mm doesn't work. > > Here is a short script showing what i did, i also attached the necessary mat files. > > greetings, Cornelius > > > clear all; > load testdata.mat; > > % Interpolate source on anatomy > cfg = []; > cfg.parameter = 'avg.itc'; > cfg.interpmethod = 'linear'; > sourceInt = ft_sourceinterpolate(cfg, source,mri); > > % Find position of max voxel in interpolated source > [maxval, maxindx] = max(sourceInt.avg.itc(:)); > [x,y,z]=ind2sub(size(sourceInt.avg.itc),maxindx); > pos=[x y z]; > > % plot this position in interpolated source > figure; > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.itc'; > cfg.locationcoordinates = 'voxel'; > cfg.location = pos; > ft_sourceplot(cfg, sourceInt); > > % Calculate respective position in 'raw' source struct > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > spos=source.pos(ind,:); > > % Plot position in 'raw' source. > % This gives not the position of max activity!!! > figure; > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.itc'; > cfg.locationcoordinates = 'voxel'; > cfg.location = spos; > ft_sourceplot(cfg, source); > > > > 2012/6/27 jan-mathijs schoffelen > Hi Cornelius, > > There is no need to 'uninterpolate' because the coordinates are already expressed in the correct coordinate system. What you probably want is to find the index to the voxel in the original source-structure closest to your 'hotspot' in the interpolated image. > This can be achieved by something like this: > > write down the coordinates of your favourite position in the interpolated image (in world coordinates, here I assume that you are still in MEG coordinate system and have not normalized to MNI space), call this pos > > pos = pos./10 (from mm to cm) > > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > > source is the original source structure. > ind is the index you are looking for. > > If you have interpolate to the MNI-template grid you need to replace the source.pos with the set of grid positions from your template grid (i.e. expressed in MNI coordinates). > > > Cheers, > > JM > > > On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > >> Hello, >> >> does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. >> In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. >> >> I tried to get the position by applying the inverse transformation matrix of the used anatomy like: >> pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); >> >> but that did not give usefull results :( >> >> Any ideas how it could be done? >> >> Greetings, Cornelius >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From philipp.hintze at uni-muenster.de Thu Jun 28 15:13:16 2012 From: philipp.hintze at uni-muenster.de (Philipp Hintze) Date: Thu, 28 Jun 2012 15:13:16 +0200 (CEST) Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: <4FEC2683.5030503@donders.ru.nl> Message-ID: Dear Jörn, thank you for your fast response. > Just try to change the order of the filter or increase the cut-off > frequency. I did that and found a stable solution for the 0.1 Hz filter at an order of 5. > The dftfilter therefore also does not really require any padding > (imho > it would be even counter productive). I read in the tutorials and in other discussions on this mailing list, that the padding is required. The FAQ (http://fieldtrip.fcdonders.nl/faq/what_kind_of_filters_can_i_apply_to_my_data) states: "To make this dft filter very sharp, you have to pad the data to a large amount (cfg.padding), e.g. to 5 or 10 seconds." Rober Oostenveld wrote: "...in preprocessing with cfg.dftfilter=yes, optionally cfg.dftfreq (default is [50 100 150]), and what we do is cfg.padding=10 to pad the data up to 10 seconds before subtracting the 50Hz sine wave. The padding ensures that we only filter out a narrow 1/10 Hz wide frequency bin. After sufficient mutitapering in the frequency domain, you won't notice the narrow 50Hz notch any more. If you don't filterpad, and e.g. have 0.5 s trials, you will put a wider 1/0.5=2Hz notch in your power spectrum." I tried using the filter without padding and the results are still acceptable, yet there is more residual noise than if it is applied with padding. The issue with the continuous data is the following: I tried using cfg = []; cfg.channel = {'EEG'}; cfg.datafile = dataset; cfg.headerfile = dataset; cfg.dataset = dataset; cfg.continuous = 'yes'; (cfg.padding = 10;) cfg.dftfilter = 'yes'; filteredContinuousData = ft_preprocessing(cfg); but looking at averaged timelocked data for the subject, the data looks identical to the result I get using no filter at all, i.e., contaminated by strong line noise. Including padding makes no difference either, therefore the brackets. Best regards, Philipp "Jörn M. Horschig" schrieb am 2012-06-28: > Dear Philipp, > we are quite aware that the filter sometimes results in unstable > solutions, see also here: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=780 > How to avoid this, however, is already explained in the error > message. > Just try to change the order of the filter or increase the cut-off > frequency. The order/cutoff frequency needed is something I cannot > tell > you from the top of my head, to just try some values (for the order, > look at the default, which is around 4 or so and then > increase/decrease > by one stepwise). > The dft-filter basically works by fitting a 50Hz sine wave to > substract > the line noise, thereby leaving a residual when the amplitude is not > constant. In contrast a bandstop filter removes activity in a > specified > frequency band. This is explained in more details in our FAQ on the > webpage: > http://fieldtrip.fcdonders.nl/faq/why_is_there_a_residual_50hz_line-n > oise_component_after_applying_a_dft_filter > The dftfilter therefore also does not really require any padding > (imho > it would be even counter productive). > I don't quite get with what you mean by saying that there is no > effect > on the continuous data set, can you give an example (e.g. explain > with > what cfg options you call ft_preprocessing). > Your problem concerning filter padding with data in memory will be > handled soon, by implementing additional options for padding, see > here: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1318 > But as I said, I don't see the point in using padding for a > dftfilter. > Hope that helps! > Best, > Jörn > On 6/27/2012 3:30 PM, Philipp Hintze wrote: > >Dear mailing list members, > >I continue to run into errors during my first FieldTrip analysis: > >I would like to use a high pass filter on my data prior to the > >segmentation > >into trials, the reason being that the trial duration is ~900 ms > >and I would > >like to filter low frequencies. The continuous data set is 900 > >seconds long. > >Simply using > > cfg.continuous = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfreq = 0.1; > > filteredContinuousData = ft_preprocessing(cfg); > >as my first run of preprocessing, I am confronted with an error > >stating > >Calculated filter coefficients have poles on or outside the unit > >circle and > >will not be stable. Try a higher cutoff frequency or a different > >type/order of filter. > >How can I avoid this? > >Another problem I have concernes the line noise filtering. I would > >like to use > >the dft filter to get rid of the line noise. Using it on the > >segmented trials, > >I still notice residual 50 Hz noise, despite using cfg.padding = > >10. A > >combination of the dft filter and a band stop filter using > >cfg.bsfreq = > >[49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of > >the line > >noise. > >The problem I have concerns the order of the filtering steps: I > >would like to > >use the high pass filter described above, given it works, on the > >continuous > >data. If I use the dft filter on the continuous data set, there is > >no effect > >on the averaged trials. Is this trivial or is there a mistake on my > >part? > >However, I can hardly use the dft filter on data that was > >preprocessed as > >continuous and than segmented using ft_redefinetrial, because I can > >not set > >any filter padding (because the data is not read from the dataset). > >Is there something I am overlooking or doing wrong or has someone > >used a > >different approach to a similar problem? > >Thank you in advance for your time and effort, > >Philipp > >_______________________________________________ > >fieldtrip mailing list > >fieldtrip at donders.ru.nl > >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 28 16:45:54 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 28 Jun 2012 16:45:54 +0200 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: References: Message-ID: <4FEC6E22.1040707@donders.ru.nl> Hi Philipp, > The padding ensures that we only filter out a narrow 1/10 Hz wide > frequency bin. sure, I didn't think about that - that's a pretty good reason to use padding :) However, the estimation of the 50Hz noise will be biased by the padded samples. I don't like the dftfilter anyway, and I am not filtering either (the reason for me is that 50Hz noise should be invariant to the experimental effects. I mostly investigate TFRs). > but looking at averaged timelocked data for the subject, the data looks > identical to the result I get using no filter at all, i.e., contaminated by > strong line noise. I'm gonna look into this to see whether it is a bug or not. I'll let you know soon. Best, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From akiko.ikkai at gmail.com Thu Jun 28 20:30:50 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 28 Jun 2012 14:30:50 -0400 Subject: [FieldTrip] suspiciously high plv Message-ID: Dear FieldTrippers, I've been trying to calculate chan-chan plv, based on the connectivity tutorial ( http://fieldtrip.fcdonders.nl/tutorial/connectivity?s[]=connectivity) and on past mailing-list posts. However, when I plot these plv, some plv are really high, in .8-.9 range sometimes all the way into gamma range. It is especially suspicious when channels that are in the opposite hemispheres, separated in anterior-posterior axis show such high values. Does anyone have any suggestions what might be going wrong? My script is pasted below. I'm using Waveguard cap with 128 channels in Duke layout, sampled at 512 Hz, and average-referenced, and data are analyzed using fieldtrip-20120103 version. Thanks in advance, Akiko %%%% first define variables chans = {'RD7','LL11','RA2','LC3'}; % let's try with these first... testTime = [.8 2.5]; %%%% % choose time range cfg = []; cfg.toilim = testTime; % extract delay period ft_data = ft_redefinetrial(cfg, ft_data); % fourier transform cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.tapsmofrq = 2; cfg.channel = chans; freq = ft_freqanalysis(cfg, ft_data); % plv calc cfg = []; cfg.method = 'plv'; plv = ft_connectivityanalysis(cfg, freq); -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wilsch at cbs.mpg.de Fri Jun 29 11:10:51 2012 From: wilsch at cbs.mpg.de (Anna Wilsch) Date: Fri, 29 Jun 2012 11:10:51 +0200 (CEST) Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: <1376177301.1612.1340961039830.JavaMail.root@zimbra> Message-ID: <1659120385.1619.1340961051346.JavaMail.root@zimbra> Dear Fieldtrippers, I'm trying to beamform my MEG data by building a common filter including three conditions and a baseline for each condition. The baseline intervals have a duration of 500 ms. I was wondering if it is ok if the post-baseline data are longer than that (1000 - 2000 ms). Does it have any negative impact on the cross-spectral-density matrix and/or the common filter? Would that still be a valid operation to do or is it necessary that baseline and post baseline data have the same length? Thank you for your comments. Cheers, Anna Anna Wilsch, Dipl.-Psych. Auditory Cognition Research Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a - Leipzig, Germany (p) +49 (0)341 9940 2641 (e) wilsch at cbs.mpg.de From m_wink10 at uni-muenster.de Fri Jun 29 14:09:47 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Fri, 29 Jun 2012 14:09:47 +0200 Subject: [FieldTrip] GrandAVG and Stats can't be plottet on anatomy or be interpolated on an MRI Message-ID: Hello, I got a kind of big problem as follows. *I can easly normalize, interpolate and plot my LCMV-Beamformer results on an MRI and plot with that anatomy:* template = '/media/sonja1/MatlabAnalysis/ Martin/WFU_PickAtlas/spm8/canonical/single_subj_T1.nii'; template_mri = ft_read_mri(template); cfg = []; % cfg.coordsys = 'spm'; cfg.method = 'fiducial'; %'interactive'; cfg.fiducial.nas = [45 106 17]; %position of nasion cfg.fiducial.lpa = [88 49 11]; %position of LPA cfg.fiducial.rpa = [3 49 11]; %position of RPA mri = ft_volumerealign(cfg, template_mri); load(sourcesOutFile); cfg = []; cfg.downsample = 1; cfg.parameter = {'avg.pow', 'avg.logpowDiff'}; sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri); Works without any problem! And can be plotted afterwords kind of nicely on an anatomy. * Now what doesn't work:* %Load functional data load(['/media/sonja1/Patienten/Parkinson/grandAVG_SourceDiff_OHNEdysphagie__beta.mat']); %avg.avg.pow to avg.pow powtemp = grandavg.avg.avg.pow; grandavg = rmfield(grandavg, 'avg'); grandavg.avg.pow = powtemp; %Load template MRI template = '/media/sonja1/MatlabAnalysis/Martin/WFU_PickAtlas/spm8/canonical/single_subj_T1.nii'; template_mri = ft_read_mri(template); %Segment and Interpolate MRI cfg = []; cfg.method = 'fiducial'; %'interactive'; cfg.fiducial.nas = [45 106 17]; %position of nasion cfg.fiducial.lpa = [88 49 11]; %position of LPA cfg.fiducial.rpa = [3 49 11]; %position of RPA mri_realign = ft_volumerealign(cfg, template_mri); % match up volumetric source result matrix with anatomical volume cfg = []; cfg.downsample = 1; cfg.parameter = 'avg.pow'; sourceDiff_int = ft_sourceinterpolate(cfg, grandavg , mri_realign); %Plot MRI cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; figure; ft_sourceplot(cfg, grandavg); - it starts to interpolate over hours and hours... and the results are worng at the end. *I tried also this way (this worked with another experiment where we got individual MRI's for each subject):* %load GAVG-Results load(['/media/sonja1/Patienten/Parkinson/grandAVG_SourceDiff_OHNEdysphagie__beta.mat']); %Remove the avg.avg field powtemp = grandavg.avg.avg.pow; grandavg = rmfield(grandavg, 'avg'); grandavg.avg.pow = powtemp; %Load an anatomy from the normalized subjects which have been interpolated load(['/media/sonja1/Patienten/Parkinson/P0390/P0390-vol-f.ds/sourceDiffNormalized.mat']); %Plot with anatomy from normalized subject cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; grandavg.anatomy = sourceDiffIntNorm_beta.anatomy; figure; ft_sourceplot(cfg, grandavg); That prints the following error: ??? Attempted to access dim(3); index out of bounds because numel(dim)=2. Error in ==> ft_plot_slice at 207 if all(ori==[0 1 0]), xplane = 1:dim(1); yplane = loc(2); zplane = 1:dim(3); end Error in ==> ft_plot_ortho at 119 hx = ft_plot_slice(dat, varargin{:}); Error in ==> ft_sourceplot at 781 ft_plot_ortho(ana, 'transform', eye(4), 'location', ijk, 'style', 'subplot', 'parents', [h1 h2 h3].*update, 'doscale', false); Error in ==> mw_ft_plot_GrandAVGa at 19 figure; ft_sourceplot(cfg, grandavg); I also upladed the data here: http://www.sendspace.com/file/zkbgqz Does anybody have any suggestions? (I send this to the Email-System and the Bug-System maybe I'm just doing something wrong and somebody faced the same problem some time ago) Thanks, Martin Winkels Universität Münster -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Sat Jun 30 03:09:22 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Fri, 29 Jun 2012 18:09:22 -0700 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: <4FEC6E22.1040707@donders.ru.nl> References: <4FEC6E22.1040707@donders.ru.nl> Message-ID: <4FEE51C2.5070304@berkeley.edu> Hi Phillipp and Jörn, I'm pretty sure that the padding for filtering is data padding not zero padding, so this does make sense and should not bias the estimation of the 50Hz noise. My experience with the dft filter is that it works very will when the line noise is stable in amplitude, it sharply (the longer the data/padding the sharper the filter) filters out specifically the line noise. It can do this because the frequency of the line noise is so stable. However, when the amplitude of the line noise varies (which it did in my data), this results in creating noise in frequencies outside 50Hz (if your interested in why, this piece of the FieldTrip wiki sheds some light on that), and the dft filter fails. I'm using a band stop around the line noise frequency and harmonics. I'd recommend plying with the values, and plotting to see which settings are appropriate for your specific circumstances. Below you can find a snipped of code I used to determine my settings. Good luck, Ingrid ------- code snippet ------- widths = [0.5 1 1.5 2 3 5 10]; orders = [2:6]; for iWidth = 1:length(widths) for iOrd = 1:length(orders) width = widths(iWidth); %preprocess data cfg = []; %cfg.event = event; cfg.dataset = [cur_path_MFF, 'NS_EMR_', subjStr, '_', stages{iStage}]; cfg.channel = {'EOG*', 'EMG', 'EEG', '-E1', '-E9', '-E32', '-E8', '-E25', '-E129'}; cfg.demean = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.3; cfg.hpfiltord = 1; cfg.bsfilter = 'yes'; cfg.bsfiltord = orders(iOrd); cfg.bsfreq = [60-width 60+width; 120-width 120+width; 180-width 180+width]; %note I'm in the US so have 60Hz line noise, you might have 50Hz cfg.pad = 0.5; cfg.trl = trl(1:100,:); data_S1_clean = ft_preprocessing(cfg); %do freqanalysis cfg = []; cfg.channel = ['EEG' BadChan]; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [30 200]; freq_S1_clean = ft_freqanalysis(cfg, data_S1_clean); %plot figure; plot(freq_S1_clean.freq,freq_S1_clean.powspctrm(:,:)) print(gcf, '-dpng', '-r300', [cur_path_fig, subjStr, '_', stages{iStage}, '_W', num2str(width*10),'_O', num2str(orders(iOrd))]); close %zoom in around 60 hz; figure; plot(freq_S1_clean.freq(22:41),freq_S1_clean.powspctrm(:,22:41)) print(gcf, '-dpng', '-r300', [cur_path_fig, subjStr, 'zoomed_', stages{iStage}, '_W', num2str(width*10),'_O', num2str(orders(iOrd))]); close end end On 6/28/2012 7:45 AM, "Jörn M. Horschig" wrote: > Hi Philipp, > >> The padding ensures that we only filter out a narrow 1/10 Hz wide >> frequency bin. > > sure, I didn't think about that - that's a pretty good reason to use > padding :) However, the estimation of the 50Hz noise will be biased by > the padded samples. I don't like the dftfilter anyway, and I am not > filtering either (the reason for me is that 50Hz noise should be > invariant to the experimental effects. I mostly investigate TFRs). > >> but looking at averaged timelocked data for the subject, the data >> looks >> identical to the result I get using no filter at all, i.e., >> contaminated by >> strong line noise. > > I'm gonna look into this to see whether it is a bug or not. I'll let > you know soon. > > Best, > Jörn > > > > > -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jun 1 13:29:46 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Fri, 1 Jun 2012 13:29:46 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data In-Reply-To: References: Message-ID: Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space ) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: not available URL: From aler1 at web.de Fri Jun 1 17:36:18 2012 From: aler1 at web.de (alla brodski) Date: Fri, 1 Jun 2012 17:36:18 +0200 (CEST) Subject: [FieldTrip] change in ft_sourceanalysis? Message-ID: An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jun 1 20:51:51 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Fri, 1 Jun 2012 20:51:51 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data References: Message-ID: <72E993C35FB11743B79FF9286E5B6D8B013F06BB@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: headmodel.jpg URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Sat Jun 2 11:49:29 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (van Dijk, Hanneke) Date: Sat, 02 Jun 2012 11:49:29 +0200 Subject: [FieldTrip] [ FieldTrip] creating mni-normalised headmodels of neuromag data Message-ID: -------- Oorspronkelijk bericht -------- Onderwerp:Fwd: creating mni-normalised headmodels of neuromag data Van:Hanneke van Dijk Aan:"van Dijk, Hanneke" Cc: Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg                      = []; cfg.coordsys         = 'neuromag'; cfg.method           = 'singleshell'; cfg.sourceunits     = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg                  = []; cfg.grid.warpmni     = 'yes'; cfg.grid.template   = template_grid; cfg.grid.nonlinear  = 'yes'; % use non-linear normalization cfg.coordsys        = 'neuromag'; cfg.sourceunits     = 'm';  % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri                 = mri; cfg.vol                  = vol; grid                     = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html  Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: not available URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 4 09:11:15 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Mon, 4 Jun 2012 09:11:15 +0200 Subject: [FieldTrip] creating mni-normalised headmodels of neuromag data References: Message-ID: <72E993C35FB11743B79FF9286E5B6D8B013F06BD@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) The 'vol' structure is created like this: cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; cfg.sourceunits = 'mm'; % I have been playing with different units here vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.sourceunits = 'm'; % I have been playing with different units here as well (the template grid resolution is 1 cm) cfg.mri = mri; cfg.vol = vol; grid = ft_prepare_sourcemodel(cfg); save(strcat(basepath,cases{s},'brain.mat'), 'vol','grid'); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodel.jpg Type: image/jpeg Size: 134105 bytes Desc: headmodel.jpg URL: From ith at deakin.edu.au Tue Jun 5 05:32:07 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 5 Jun 2012 03:32:07 +0000 Subject: [FieldTrip] Creating a MRI based headmodel Message-ID: <5A1787011651BC42A4D41856DBC2E06038227A5A@mbox-f-3.du.deakin.edu.au> Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From tsauvigny at googlemail.com Tue Jun 5 22:32:04 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Tue, 5 Jun 2012 22:32:04 +0200 Subject: [FieldTrip] colorbar In-Reply-To: References: <5EF2586E-9839-4CA0-9540-C6BA3060DEFC@uke.uni-hamburg.de> Message-ID: <006901cd435a$46078cf0$d216a6d0$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Cheers! Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From ith at deakin.edu.au Wed Jun 6 10:48:30 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Wed, 6 Jun 2012 08:48:30 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes Message-ID: <5A1787011651BC42A4D41856DBC2E0603E0395C7@mbox-f-3.du.deakin.edu.au> Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali ________________________________ From: IMALI THANUJA HETTIARACHCHI Sent: Tuesday, 5 June 2012 1:32 PM To: fieldtrip at science.ru.nl Subject: Creating a MRI based headmodel Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: m_file.txt URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: innerSkull.mat Type: application/octet-stream Size: 141056 bytes Desc: innerSkull.mat URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: outerSkull.mat Type: application/octet-stream Size: 98624 bytes Desc: outerSkull.mat URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: skin.mat Type: application/octet-stream Size: 100160 bytes Desc: skin.mat URL: From tsauvigny at googlemail.com Wed Jun 6 11:19:40 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Wed, 6 Jun 2012 11:19:40 +0200 Subject: [FieldTrip] colorbar Message-ID: <001d01cd43c5$81966d70$84c34850$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Cheers! Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From marcel.heers at googlemail.com Wed Jun 6 11:25:10 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Wed, 6 Jun 2012 11:25:10 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting the individual brain to creat a BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be the chance to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel From marcel.heers at googlemail.com Wed Jun 6 11:29:09 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Wed, 6 Jun 2012 11:29:09 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting the individual brain to creat a BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be the chance to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel From r.oostenveld at donders.ru.nl Wed Jun 6 17:08:25 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 6 Jun 2012 17:08:25 +0200 Subject: [FieldTrip] fieldtrip/multivariate directory has moved Message-ID: <954B1630-700E-4ACD-A112-5B9E42CAFC7E@donders.ru.nl> Dear FieldTrip users, Marcel van Gerven has decided to move on with the development of the multivariate classification methods in a slightly different manner. Consequently the functions in the directory fieldtrip/multivariate (and all subdirectories) have moved to the directory fieldtrip/external/dmlt. If you are using the multivariate analysis functions, e.g. though the cfg.method='crossvalidate' option in T_TIMELOCKSTATISTICS, T_FREQSTATISTICS or FT_SOURCESTATISTICS or the other methods explained on http://fieldtrip.fcdonders.nl/tutorial/multivariateanalysis, you should already have gotten used to addpath(genpath('fieldtrip/multivariate')). From now on you just have to update your path settings to point to external/dmlt instead of multivariate. In the FieldTrip versions from this evening onward the code will not be present in the old location any more. best regards, Robert From r.oostenveld at donders.ru.nl Wed Jun 6 17:34:28 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 6 Jun 2012 17:34:28 +0200 Subject: [FieldTrip] problems with mailing list Message-ID: <9091F14C-A2B0-4A84-B28E-96049DDA1B9D@donders.ru.nl> Dear fieldtrip users, Recently we have had some problems with the fieldtrip email discussion list due to changes on the mailman server by the hosting ICT department. Of course the email list is very important for the community and support. Let me summarise: Intially the mailing list was always on the address fieldtrip at donders.ru.nl >From 25 May onward the automatic reply to address has changed to fieldtrip at science.ru.nl. This caused me (and probably others) that the email filters would not sort the messages in the proper email box, but all mails still came through. >From 1 June (last Friday) onward something else seems to have changed, resulting in myself and some other colleagues in Nijmegen (as I learnt today) did not receive any messages. From the http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html online archive it is clear that the list has not been silent over the last days, but somehow the messages did not get through to all people. I want to ask you a special favour: could you for this time (and this time only!) contact me directly replying whether you recently have received the recent mails. Please do NOT REPLY TO THIS EMAIL DIRECTLY, but change the reply address to r.oostenveld_at_donders.ru.nl. Please reply with extending the subject line of the email with either one of Re: problems with mailing list -> none Re: problems with mailing list -> some Re: problems with mailing list -> yes so that I can easily sort out the problematic ones. If you have more information, you can pass that to me in the body of the email. Note that I will not be responding to the individual emails. With your input I will be able to make the case to our own ICT department and to the hosting (science faculty) ICT department on what precisely the problems are and consequently needs to be fixed/reverted to the old situation. best regards, Robert PS please be sure that you do not reply to this email to the whole fieldtrip email list, only to me!!! From r.oostenveld at donders.ru.nl Thu Jun 7 11:33:30 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:33:30 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: this is a test email to fieldtrip at donders From r.oostenveld at donders.ru.nl Thu Jun 7 11:34:03 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:34:03 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: <0BCEDDB3-000A-431E-9550-86223506A682@donders.ru.nl> this is a test email to fieldtrip at science From r.oostenveld at donders.ru.nl Thu Jun 7 11:55:28 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 11:55:28 +0200 Subject: [FieldTrip] test email, please ignore Message-ID: <4B5B0C91-1660-40A1-8900-37536FD336BD@donders.ru.nl> this is another test email to the fieldtrip at donders mailing list. I just changed the host_name in the mailmain admin interface. From r.oostenveld at donders.ru.nl Thu Jun 7 12:19:46 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 12:19:46 +0200 Subject: [FieldTrip] problems with the email discussion list Message-ID: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> Dear FieldTrip community Over the last few days we have encountered some problems with the email discussion list, which started around 23 May due to some configuration changes on the mailman server that hosts our list. Over the last few days, starting June 1, no messages got through at all. As of now (7 June) I hope that mails get through again. The emails that were sent to the mailing list the last week, but that were not passed on, have been archived at http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html Please have a look there to see whether those mails are of relevance for you. For the original posters: you might want to reconsider posting the email again. There are still some smaller configuration issues that need to be resolved, the most important that it now appears as if the mailing list is at fieldtrip at science.ru.nl instead of the proper address at fieldtrip at donders.ru.nl. We are working with the ICT team to get these sorted out as well. Sorry for the inconvenience this might have caused. I am looking forward to a continuation of the fruitful and positive atmosphere discussions. best regards, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging skype: r.oostenveld ----------------------------------------------------------- From r.oostenveld at donders.ru.nl Thu Jun 7 22:40:00 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 7 Jun 2012 22:40:00 +0200 Subject: [FieldTrip] problems with the email discussion list -> resolved In-Reply-To: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> Message-ID: <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> Dear all I believe the problems have been resolved. You can start posting questions and of course also your replies and insights. best regards, Robert On 7 Jun 2012, at 12:19, Robert Oostenveld wrote: > Dear FieldTrip community > > Over the last few days we have encountered some problems with the email discussion list, which started around 23 May due to some configuration changes on the mailman server that hosts our list. Over the last few days, starting June 1, no messages got through at all. As of now (7 June) I hope that mails get through again. > > The emails that were sent to the mailing list the last week, but that were not passed on, have been archived at http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/thread.html > > Please have a look there to see whether those mails are of relevance for you. For the original posters: you might want to reconsider posting the email again. > > There are still some smaller configuration issues that need to be resolved, the most important that it now appears as if the mailing list is at fieldtrip at science.ru.nl instead of the proper address at fieldtrip at donders.ru.nl. We are working with the ICT team to get these sorted out as well. > > Sorry for the inconvenience this might have caused. I am looking forward to a continuation of the fruitful and positive atmosphere discussions. > > best regards, > Robert > > > ----------------------------------------------------------- > Robert Oostenveld, PhD > Senior Researcher & MEG Physicist > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > tel.: +31 (0)24 3619695 > e-mail: r.oostenveld at donders.ru.nl > web: http://www.ru.nl/neuroimaging > skype: r.oostenveld > ----------------------------------------------------------- > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tsauvigny at googlemail.com Thu Jun 7 22:46:08 2012 From: tsauvigny at googlemail.com (Thomas Sauvigny) Date: Thu, 7 Jun 2012 22:46:08 +0200 Subject: [FieldTrip] colorbar In-Reply-To: <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> Message-ID: <003d01cd44ee$922c89b0$b6859d10$@com> Dear FieldTripers! I have a question regarding clusterplots. I'm using the ft_clusterplot-function to plot my statistic results of a cluster-based permutation test on event related fields (within-subjects design). What is the unit of the colorbar and what is the interpretation of the references to colour? (see attached jpeg-file) Thank you! Cheers! Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 52440 bytes Desc: not available URL: From ljbj_2009 at yahoo.com Thu Jun 7 23:08:20 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Thu, 7 Jun 2012 14:08:20 -0700 (PDT) Subject: [FieldTrip] TMSI realtime buffer and tmsidriver Message-ID: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> Dear All, Is there a demo available to show us how to use the Fieldtrip real time buffer? The hardware is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. Using Fieldtrip and tmsidriver, I was able collect data using the function ft_read_data via Fieldtrip real time buffer. I used  ft_read_data(C:\work\fieldtrip-20120604\fileio), this function returns a 2-D matrix of size Nchans*Nsamples for continuous data. The values are 8189887,-394150....  I want to know how to calculate the voltage from the data collected from fieldtrip buffer. Thanks for your help,   Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Fri Jun 8 03:05:00 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Fri, 8 Jun 2012 01:05:00 +0000 Subject: [FieldTrip] Creating a MRI based headmodel Message-ID: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> Dear All, I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code load standard_mri.mat mri_orig=mri; % Realign the data to the CTF system cfg = []; cfg.method = 'interactive'; % use n,l,r fudicials mri_realign = ft_volumerealign(cfg, mri_orig); cfg = []; cfg.resolution = 1; % mm cfg.dim = mri_orig.dim; mri_reslice = ft_volumereslice(cfg, mri_realign); %% Segmenting the data cfg = []; cfg.output= {'scalp','skull','brain'}; cfg.coordinates = 'ctf'; cfg.keepintermediate = 'no'; [mri_segment] = ft_volumesegment(cfg, mri_reslice); mri_combine = mri_reslice; mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; mri_combine.mask = (mri_combine.seg)>0; %% Plot data cfg = []; cfg.interactive = 'no'; cfg.method='slice'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure , ft_sourceplot(cfg,mri_combine); %% Generating the mesh cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[5000 3000 800]; cfg.sourceunits=mri_segment.unit; scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); skull=2*(mri_segment.skull); brain=3*(mri_segment.brain); mri_segment.seg= scalp+skull+brain; bnd = ft_prepare_mesh(cfg, mri_segment); %% View meshes a transparent plot figure (2) tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); trisurf(tr1,'facealpha',0.1); hold on trisurf(tr2,'facealpha',0.2); hold on trisurf(tr3) %% BEM Computation-calculating the related electromagnetic model Cskin_surface= 0.33; %scalp Couter_skull_surface=0.0042; %skull Cinner_skull_surface=0.33; %brain vol=[]; for i=1:3 vol.bnd(i).tri=bnd(i).tri; vol.bnd(i).pnt=bnd(i).pnt; end vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; cfg=[]; cfg.method = 'openmeeg'; vol = ft_prepare_headmodel(cfg, vol); When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; ??? Error using ==> surface_nesting at 24 the compartment nesting cannot be determined Error in ==> ft_headmodel_bem_openmeeg at 96 order = surface_nesting(vol.bnd, 'insidefirst'); With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. I would really appreciate any guidance and any suggestions given to make this work. Many thanks in advance. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From jm.horschig at donders.ru.nl Fri Jun 8 09:34:48 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jun 2012 09:34:48 +0200 Subject: [FieldTrip] colorbar In-Reply-To: <003d01cd44ee$922c89b0$b6859d10$@com> References: <242FD507-05F3-4929-BAB5-17E785C76D9B@donders.ru.nl> <10C1F5C9-36CE-4968-ACB7-FE9430667BC9@donders.ru.nl> <003d01cd44ee$922c89b0$b6859d10$@com> Message-ID: <4FD1AB18.4020509@donders.ru.nl> Hi Thomas, the values refer to your statistical test, e.g. it might be t-values or z-score or whatever statistic you are basing your cluster based test on. Best, Jörn On 6/7/2012 10:46 PM, Thomas Sauvigny wrote: > Dear FieldTripers! > > I have a question regarding clusterplots. > I'm using the ft_clusterplot-function to plot my statistic results of a > cluster-based permutation test on event related fields (within-subjects > design). > What is the unit of the colorbar and what is the interpretation of the > references to colour? (see attached jpeg-file) > > Thank you! > > Cheers! > Thomas > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 8 10:48:00 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 08 Jun 2012 10:48:00 +0200 Subject: [FieldTrip] Help improving "Getting started with BrainVision data" on the wiki Message-ID: <4FD1BC40.3000509@donders.ru.nl> Dear FieldTrip list, As you know, there are several getting started sections on our wiki-page: http://fieldtrip.fcdonders.nl/getting_started Unfortunately, however, we (the FieldTrip development team) are no expert for all different dataformats, mainly because at the Donders Institute, we do not work with all those data formats. You, on the other hand, might be an expert. In order to provide good documentation, we therefore rely on your input as well and would like to ask your help. First, we want to get started with BrainVision data. 1) What would you like to see in the Getting Started guide? 2) What explanation would you like to see there that is specific to BrainVision data? 3) Is there any particular example code that you would like to be shown there? 4) Are there particular problems you encountered (and solved) with reading in and working with BrainVision data in FieldTrip? What are these problems and what are the solutions? 5) Are there questions you always asked yourself about using BrainVision data with FieldTrip? It would be great if you share this information with us. Feel free to write whatever you want, any information is useful (preferably of course some elaborations and explanation so that we can put this information there). If you are working with other data, feel free to also answer this mail on a more general note, but we will ask separately for other data formats in near future. On behalf of the FieldTrip development team, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From r.oostenveld at donders.ru.nl Fri Jun 8 10:51:29 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 8 Jun 2012 10:51:29 +0200 Subject: [FieldTrip] Creating a MRI based headmodel In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E0397D3@mbox-f-3.du.deakin.edu.au> Message-ID: Dear Imali One problem might be that the surfaces are intersecting, but with this clean template MRI I consider that unlikely. If it were the case, then we should revise the segmentation procedure for skull and skin. An alternative for the problem is that it is due to the surfaces being incorrectly oriented (e.g. inside out). So the problem you are descibing suggests that there is an error (or imperfection) in the code. I have filed it as a bug on http://bugzilla.fcdonders.nl/show_bug.cgi?id=1510 under your name. The bug tracking system will automatically keep you posted on the updates. best regards, Robert On 8 Jun 2012, at 3:05, IMALI THANUJA HETTIARACHCHI wrote: > Dear All, > > I started with fieldTrip recently and I am trying to create a BEM headmodel using the mri data (standard_mri.mat) available on the website. I use the following code > > load standard_mri.mat > mri_orig=mri; > > % Realign the data to the CTF system > > cfg = []; > cfg.method = 'interactive'; > % use n,l,r fudicials > mri_realign = ft_volumerealign(cfg, mri_orig); > > cfg = []; > cfg.resolution = 1; % mm > cfg.dim = mri_orig.dim; > mri_reslice = ft_volumereslice(cfg, mri_realign); > > %% Segmenting the data > > cfg = []; > cfg.output= {'scalp','skull','brain'}; > cfg.coordinates = 'ctf'; > cfg.keepintermediate = 'no'; > [mri_segment] = ft_volumesegment(cfg, mri_reslice); > mri_combine = mri_reslice; > mri_combine.seg = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain; > mri_combine.mask = (mri_combine.seg)>0; > > %% Plot data > > cfg = []; > cfg.interactive = 'no'; > cfg.method='slice'; > cfg.funparameter = 'seg'; > cfg.funcolormap = 'jet'; > cfg.funcolorlim = [0 7]; > cfg.opacitylim = [0 1.5]; > cfg.maskparameter = 'mask'; > figure , ft_sourceplot(cfg,mri_combine); > > %% Generating the mesh > > cfg=[]; > cfg.tissue=[1 2 3]; > cfg.numvertices=[5000 3000 800]; > cfg.sourceunits=mri_segment.unit; > scalp=(mri_segment.scalp)&~(mri_segment.skull | mri_segment.brain); > skull=2*(mri_segment.skull); > brain=3*(mri_segment.brain); > > mri_segment.seg= scalp+skull+brain; > bnd = ft_prepare_mesh(cfg, mri_segment); > > %% View meshes a transparent plot > > figure (2) > tr1=TriRep(bnd(1).tri,bnd(1).pnt(:,1),bnd(1).pnt(:,2),bnd(1).pnt(:,3)); > tr2=TriRep(bnd(2).tri,bnd(2).pnt(:,1),bnd(2).pnt(:,2),bnd(2).pnt(:,3)); > tr3=TriRep(bnd(3).tri,bnd(3).pnt(:,1),bnd(3).pnt(:,2),bnd(3).pnt(:,3)); > trisurf(tr1,'facealpha',0.1); hold on > trisurf(tr2,'facealpha',0.2); hold on > trisurf(tr3) > > > %% BEM Computation-calculating the related electromagnetic model > > Cskin_surface= 0.33; %scalp > Couter_skull_surface=0.0042; %skull > Cinner_skull_surface=0.33; %brain > vol=[]; > for i=1:3 > vol.bnd(i).tri=bnd(i).tri; > vol.bnd(i).pnt=bnd(i).pnt; > end > vol.cond=[Cskin_surface Couter_skull_surface Cinner_skull_surface]; > cfg=[]; > cfg.method = 'openmeeg'; > vol = ft_prepare_headmodel(cfg, vol); > > When I run the code at the stage of generating the headmodel with ft_prepare_headmodel, I get an error as; > ??? Error using ==> surface_nesting at 24 > the compartment nesting cannot be determined > > Error in ==> ft_headmodel_bem_openmeeg at 96 > order = surface_nesting(vol.bnd, 'insidefirst'); > > With the limited experience with fieldTrip and headmodels I assume that this is because the meshes are overlapping. > > I would really appreciate any guidance and any suggestions given to make this work. > > Many thanks in advance. > > Kind regards > Imali > > Imali Thanuja Hettiarachchi > PhD Candidate > Centre for Intelligent Systems research > Deakin University, Geelong 3217, Australia. > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From b.reuderink at donders.ru.nl Fri Jun 8 12:16:25 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Fri, 8 Jun 2012 12:16:25 +0200 Subject: [FieldTrip] TMSI realtime buffer and tmsidriver In-Reply-To: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> References: <1339103300.48349.YahooMailNeo@web160405.mail.bf1.yahoo.com> Message-ID: Dear Jie, There is a number of examples of real-time processing with FieldTrip. Perhaps the best starting point is the real-time section on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/development/realtime#, which contains pointers to example scripts. But, the range of the values you get with ft_read_data is a bit unexpected, I would expect uV units. Could you test with one of the example scripts if that persists, and if the signals are sensible despite the scale? Best, Boris Reuderink On Thu, Jun 7, 2012 at 11:08 PM, jie liu wrote: > Dear All, > > Is there a demo available to show us how to use the Fieldtrip real time > buffer? > The hardware is TMSI refa 128 working with usb (driver is fusbi version > 6.0.0.76.) windows xp+service pack3. > > Using Fieldtrip and tmsidriver, I was able collect data using the function > ft_read_data via Fieldtrip real time buffer. I used > ft_read_data(C:\work\fieldtrip-20120604\fileio), this function returns a 2-D > matrix of size Nchans*Nsamples for continuous data. The values are > 8189887,-394150.... > >  I want to know how to calculate the voltage from the data collected from > fieldtrip buffer. > > > > Thanks for your help, > > > > Jie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- twitter.com/#!/breuderink | github.com/breuderink | borisreuderink.nl From vlad_chiriacescu at yahoo.com Mon Jun 11 03:40:42 2012 From: vlad_chiriacescu at yahoo.com (Vlad Chiriacescu) Date: Sun, 10 Jun 2012 18:40:42 -0700 (PDT) Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Message-ID: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com>   Hello,   I am working on a school project related to the Biomag 2012 analysis competition.   I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/.   I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2).   I was able to load the 2 mat files into Matlab workspace.   I was also able to use FieldTrip functions on tutorial code.   However, when I try to use ft_preprocessing on one of the mat files I get an error.   Here is the code I wrote:   cfg1.dataset = 'ltmcla_S08.mat'   data_org = ft_preprocessing(cfg1)   And the error is:   ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344   hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);   I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair.   However, I do not have a .dat file, I have a .mat file.   Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim.   How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest?   Thanks a lot,   Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.heers at googlemail.com Mon Jun 11 08:39:58 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Mon, 11 Jun 2012 08:39:58 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip Message-ID: Dear Fieldtip experts, I am having a many problems segmenting individual brains to creat BEM for EEG source localization with the spm methods implemented in fieldtrip no matter which thresholds and smoothing factors I am using. So I was wondering wether there would be a way to directly import the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' and 'scalp.surf.gii' into fieldtrip to use them for further processing. Thank you for your comments! Best regards, Marcel -- Dr. Marcel Heers, M.D. Fischenbergstr. 10 D-58455 Witten phone: +49-2302-2034057 fax: +49-2302-2033528 From jan.schoffelen at donders.ru.nl Mon Jun 11 08:57:24 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 11 Jun 2012 08:57:24 +0200 Subject: [FieldTrip] Importing surfaces created by spm8 to fieldtrip References: Message-ID: <40D2886E-BF14-42CF-9FCE-B74BB8AB0472@donders.ru.nl> Hi Marcel, You can read in gifti-files with ft_read_headshape. Best, Jan-Mathijs On Jun 11, 2012, at 8:39 AM, Marcel Heers wrote: > Dear Fieldtip experts, > > I am having a many problems segmenting individual brains to creat > BEM for EEG source localization with the spm methods implemented in > fieldtrip no matter which thresholds and smoothing factors I am using. > So I was wondering wether there would be a way to directly import > the surface files created in spm8 'iskull.surf.gii', 'oskull.surf.gii' > and 'scalp.surf.gii' into fieldtrip to use them for further > processing. > Thank you for your comments! > > Best regards, > > Marcel > > -- > Dr. Marcel Heers, M.D. > Fischenbergstr. 10 > D-58455 Witten > phone: +49-2302-2034057 > fax: +49-2302-2033528 > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 11 09:20:46 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 11 Jun 2012 09:20:46 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: <4FD59C4E.5060208@donders.ru.nl> Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using />> load ltmcla_S08.mat/ This should result in some variable, most likely /data/ in your workspace. You can then call ft_preprocessing like this: />> ft_preprocessing(cfg, data) /I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at /data.cfg /Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn // On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: > Hello, > > I am working on a school project related to the Biomag 2012 analysis > competition. > > I have downloaded a .zip file from > ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second > objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files > I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, > which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jun 11 09:21:25 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 11 Jun 2012 09:21:25 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Dear Vlad, The Biomag 2012 data competition is not part of the FieldTrip project. Of course you should be able to use FieldTrip for parts (or all) of the analysis, but it might be that the data is provided in a file format that is not directly compatible with FieldTrip (see http://fieldtrip.fcdonders.nl/dataformat). The specific error that you get suggests that the data that is distributed was already preprocessed and is in MATLAB format and that you should just do "load ". Note that the content you might find in the mat-file could very well be formatted in a way that FieldTrip is not directly able to process it further. On http://www.biomag2012.org/content/data-analysis-competition at the bottom is an email address that is specific to the competition, I suggest you contact that with your questions that are specific to the the competition. best regards, Robert On 11 Jun 2012, at 3:40, Vlad Chiriacescu wrote: > Hello, > > I am working on a school project related to the Biomag 2012 analysis competition. > > I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Mon Jun 11 09:27:28 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 11 Jun 2012 09:27:28 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Hi Vlad, If you have the data already in Matlab, it is quite straightforward to convert it to a FieldTrip-compatible data structure. See http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined#raw_data for an explanation of how raw data structures look, in general. Now I see Jörn's e-mail on the same subject. His explanation is the right one, if the data you have is already in FieldTrip format. However, from your explanation, I assume you still need to do a little bit of tweaking to get your data to be FT-compatible. Hope this helps, Eelke On 11 June 2012 03:40, Vlad Chiriacescu wrote: >   Hello, > >   I am working on a school project related to the Biomag 2012 analysis > competition. > >   I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > >   I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > >   I was able to load the 2 mat files into Matlab workspace. > >   I was also able to use FieldTrip functions on tutorial code. > >   However, when I try to use ft_preprocessing on one of the mat files I get > an error. > >   Here is the code I wrote: > >   cfg1.dataset = 'ltmcla_S08.mat' >   data_org = ft_preprocessing(cfg1) > >   And the error is: >   ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 >   hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > >   I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > >   However, I do not have a .dat file, I have a .mat file. > >   Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > >   How could I use FieldTrip on this data? If there are more ways, which one > would be the fastest/easiest? > >   Thanks a lot, > >   Vlad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From smoratti at psi.ucm.es Mon Jun 11 09:39:43 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 11 Jun 2012 09:39:43 +0200 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> References: <1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: Dear Vlad, It seems that the matlab structure already contains the data in fieldtrip format. This structure normally is created when you read raw data from some compatible data format. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 11/06/2012, a las 03:40, Vlad Chiriacescu escribió: > Hello, > > I am working on a school project related to the Biomag 2012 analysis competition. > > I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. > > I have extracted the content and I am interested in the second objective, > the one related to long-term memory representations (folder data2). > > I was able to load the 2 mat files into Matlab workspace. > > I was also able to use FieldTrip functions on tutorial code. > > However, when I try to use ft_preprocessing on one of the mat files I get an error. > > Here is the code I wrote: > > cfg1.dataset = 'ltmcla_S08.mat' > data_org = ft_preprocessing(cfg1) > > And the error is: > ??? Error using ==> ft_read_header at 1639 > unsupported header format (matlab) > > Error in ==> ft_preprocessing at 344 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > I saw a tutorial using ft_read_header, ft_read_data and ft_write_data > on a .dat file that was converting it to a mat/bin pair. > > However, I do not have a .dat file, I have a .mat file. > > Just in case is necessary, I write some details of the .mat file: > Is a 1*1 matlab structure with the following fields: > data, channel, design, time, fs, dim. > > How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? > > Thanks a lot, > > Vlad > _______________________________________________ > fieldtrip mailing list > fieldtrip at science.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindenberger at mpib-berlin.mpg.de Mon Jun 11 10:10:36 2012 From: lindenberger at mpib-berlin.mpg.de (Lindenberger, Ulman) Date: Mon, 11 Jun 2012 08:10:36 +0000 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <4FD59C4E.5060208@donders.ru.nl> Message-ID: <4ADF66FEA083904FA4A12CBD5A303E5B6F668B68@MaxMail03.mpib-berlin.mpg.de> Sent by Blackberry Von: "Jörn M. Horschig" [mailto:jm.horschig at donders.ru.nl] Gesendet: Monday, June 11, 2012 09:20 AM An: FieldTrip discussion list Betreff: Re: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using >> load ltmcla_S08.mat This should result in some variable, most likely data in your workspace. You can then call ft_preprocessing like this: >> ft_preprocessing(cfg, data) I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at data.cfg Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: Hello, I am working on a school project related to the Biomag 2012 analysis competition. I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2). I was able to load the 2 mat files into Matlab workspace. I was also able to use FieldTrip functions on tutorial code. However, when I try to use ft_preprocessing on one of the mat files I get an error. Here is the code I wrote: cfg1.dataset = 'ltmcla_S08.mat' data_org = ft_preprocessing(cfg1) And the error is: ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair. However, I do not have a .dat file, I have a .mat file. Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim. How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? Thanks a lot, Vlad _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindenberger at mpib-berlin.mpg.de Mon Jun 11 10:15:44 2012 From: lindenberger at mpib-berlin.mpg.de (Lindenberger, Ulman) Date: Mon, 11 Jun 2012 08:15:44 +0000 Subject: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? In-Reply-To: <4FD59C4E.5060208@donders.ru.nl> Message-ID: <4ADF66FEA083904FA4A12CBD5A303E5B6F668B79@MaxMail03.mpib-berlin.mpg.de> Sent by Blackberry Von: "Jörn M. Horschig" [mailto:jm.horschig at donders.ru.nl] Gesendet: Monday, June 11, 2012 09:20 AM An: FieldTrip discussion list Betreff: Re: [FieldTrip] How to use FieldTrip on mat files for Biomag2012? Dear Vlad, FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using >> load ltmcla_S08.mat This should result in some variable, most likely data in your workspace. You can then call ft_preprocessing like this: >> ft_preprocessing(cfg, data) I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at data.cfg Good luck with your project, I hope you have fun and success using FieldTrip ;) Best, Jörn On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote: Hello, I am working on a school project related to the Biomag 2012 analysis competition. I have downloaded a .zip file from ftp://ftp.fcdonders.nl/pub/biomag2012/. I have extracted the content and I am interested in the second objective, the one related to long-term memory representations (folder data2). I was able to load the 2 mat files into Matlab workspace. I was also able to use FieldTrip functions on tutorial code. However, when I try to use ft_preprocessing on one of the mat files I get an error. Here is the code I wrote: cfg1.dataset = 'ltmcla_S08.mat' data_org = ft_preprocessing(cfg1) And the error is: ??? Error using ==> ft_read_header at 1639 unsupported header format (matlab) Error in ==> ft_preprocessing at 344 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); I saw a tutorial using ft_read_header, ft_read_data and ft_write_data on a .dat file that was converting it to a mat/bin pair. However, I do not have a .dat file, I have a .mat file. Just in case is necessary, I write some details of the .mat file: Is a 1*1 matlab structure with the following fields: data, channel, design, time, fs, dim. How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest? Thanks a lot, Vlad _______________________________________________ fieldtrip mailing list fieldtrip at science.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Tue Jun 12 02:25:47 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 12 Jun 2012 00:25:47 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes Message-ID: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NeuroScan meshes.zip Type: application/x-zip-compressed Size: 157689 bytes Desc: NeuroScan meshes.zip URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: m_file.txt URL: From alexandre.gramfort at inria.fr Tue Jun 12 08:10:58 2012 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 12 Jun 2012 09:10:58 +0300 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> Message-ID: hi Imali, your meshes had indeed tiny problems. To fixed it I just smoothed a tiny bit the meshes. In matlab: >> load innerSkull >> om_save_tri('innerSkull.tri', curryloc', currytri'); then : $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert $ om_mesh_info -i innerSkull_sm_flip.tri om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 load_tri : innerSkull_sm_flip.tri Mesh Info : # points : 2934 # triangles : 5864 Euler characteristic : 2 Min Area : 6.55783 Max Area : 28.9211 Mesh orientation correct (valid for closed mesh). this should fix the problem. Note that you can surely also smooth the meshes in matlab. Alex -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team, NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://alexandre.gramfort.net On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI < ith at deakin.edu.au> wrote: > ** ** > > Dear FieldTrip users,**** > > **** > > As I have faced problems in creating a head model with MRI's, so I thought > to try the MNI head for creating the meshes. I used the NeuroScan software > to create the surface meshes and exported them to Matlab. Then tried to > crate the head model using ft_prepare_headmodel function. however the > 'om_minverser' stops working and the program terminates.**** > > **** > > When I plot the meshes they seem fine to me so I assume that there is no > segmenting issues. But Now I get an error as attached in the 'log.txt' from > the Matlab workspace, which says about self intersecting meshes. I have > attached the Neuroscan exported meshes > (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function > (m_file.txt) that I used in creating the head model.**** > > **** > > I really want to generate some simulated EEG data but cannot make anything > work. If someone can give a guidance on where I am going wrong in the > procedure , that will be highly appreciated.**** > > **** > > Many thanks.**** > > **** > > Kind regards**** > > Imali**** > > ** ** > > *Imali Thanuja Hettiarachchi* > > PhD Candidate**** > > Centre for Intelligent Systems research**** > > Deakin University, Geelong 3217, Australia.**** > > ** ** > > Mobile : +61430321972**** > > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr**** > > ** ** > > [image: Description: Description: Description: > cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au]**** > > ** ** > > > > **** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Tue Jun 12 10:08:32 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Tue, 12 Jun 2012 08:08:32 +0000 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au>, Message-ID: <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> Deal Alex, Thank you so much for the quick reply, I managed to do what you suggested then got stuck at loading the '_sm_flip.tri' files to MATLAB. This may be a very naive question, but hope you can give me some help on this please. Many thanks Kind regards Imali ________________________________ From: alexandre.gramfort at gmail.com [alexandre.gramfort at gmail.com] on behalf of Alexandre Gramfort [alexandre.gramfort at inria.fr] Sent: Tuesday, 12 June 2012 4:10 PM To: FieldTrip discussion list; IMALI THANUJA HETTIARACHCHI Subject: Re: [FieldTrip] Headmodel with NeuroScan meshes hi Imali, your meshes had indeed tiny problems. To fixed it I just smoothed a tiny bit the meshes. In matlab: >> load innerSkull >> om_save_tri('innerSkull.tri', curryloc', currytri'); then : $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert $ om_mesh_info -i innerSkull_sm_flip.tri om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 load_tri : innerSkull_sm_flip.tri Mesh Info : # points : 2934 # triangles : 5864 Euler characteristic : 2 Min Area : 6.55783 Max Area : 28.9211 Mesh orientation correct (valid for closed mesh). this should fix the problem. Note that you can surely also smooth the meshes in matlab. Alex -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team, NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://alexandre.gramfort.net On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI > wrote: Dear FieldTrip users, As I have faced problems in creating a head model with MRI's, so I thought to try the MNI head for creating the meshes. I used the NeuroScan software to create the surface meshes and exported them to Matlab. Then tried to crate the head model using ft_prepare_headmodel function. however the 'om_minverser' stops working and the program terminates. When I plot the meshes they seem fine to me so I assume that there is no segmenting issues. But Now I get an error as attached in the 'log.txt' from the Matlab workspace, which says about self intersecting meshes. I have attached the Neuroscan exported meshes (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function (m_file.txt) that I used in creating the head model. I really want to generate some simulated EEG data but cannot make anything work. If someone can give a guidance on where I am going wrong in the procedure , that will be highly appreciated. Many thanks. Kind regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Tue Jun 12 10:17:01 2012 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 12 Jun 2012 11:17:01 +0300 Subject: [FieldTrip] Headmodel with NeuroScan meshes In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E039CBD@mbox-f-3.du.deakin.edu.au> <5A1787011651BC42A4D41856DBC2E0603E039D46@mbox-f-3.du.deakin.edu.au> Message-ID: Here is a tiny function that should help https://github.com/agramfort/matlab_mesh_toolbox/blob/master/load_tri.m Alex On Tue, Jun 12, 2012 at 11:08 AM, IMALI THANUJA HETTIARACHCHI < ith at deakin.edu.au> wrote: > Deal Alex, > > > > Thank you so much for the quick reply, I managed to do what you suggested > then got stuck at loading the '_sm_flip.tri' files to MATLAB. > > > > This may be a very naive question, but hope you can give me some help on > this please. > > > > Many thanks > > > > Kind regards > > Imali > ------------------------------ > *From:* alexandre.gramfort at gmail.com [alexandre.gramfort at gmail.com] on > behalf of Alexandre Gramfort [alexandre.gramfort at inria.fr] > *Sent:* Tuesday, 12 June 2012 4:10 PM > *To:* FieldTrip discussion list; IMALI THANUJA HETTIARACHCHI > *Subject:* Re: [FieldTrip] Headmodel with NeuroScan meshes > > hi Imali, > > your meshes had indeed tiny problems. To fixed it I just smoothed a tiny > bit the meshes. > > In matlab: > > >> load innerSkull > >> om_save_tri('innerSkull.tri', curryloc', currytri'); > > then : > > $om_mesh_smooth -i innerSkull.tri -o innerSkull_sm.tri -n 2 > $om_mesh_convert -i innerSkull_sm.tri -o innerSkull_sm_flip.tri -invert > $ om_mesh_info -i innerSkull_sm_flip.tri > om_mesh_info version 2.2.dev (exported) compiled at Mar 7 2012 15:37:20 > > load_tri : innerSkull_sm_flip.tri > Mesh Info : > # points : 2934 > # triangles : 5864 > Euler characteristic : 2 > Min Area : 6.55783 > Max Area : 28.9211 > Mesh orientation correct (valid for closed mesh). > > this should fix the problem. Note that you can surely also smooth the > meshes in matlab. > > Alex > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team, NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://alexandre.gramfort.net > > On Tue, Jun 12, 2012 at 3:25 AM, IMALI THANUJA HETTIARACHCHI < > ith at deakin.edu.au> wrote: > >> **** >> >> Dear FieldTrip users,**** >> >> **** >> >> As I have faced problems in creating a head model with MRI's, so I >> thought to try the MNI head for creating the meshes. I used the NeuroScansoftware to create the surface meshes and exported them to Matlab. >> Then tried to crate the head model using ft_prepare_headmodel function. >> however the 'om_minverser' stops working and the program terminates.**** >> >> **** >> >> When I plot the meshes they seem fine to me so I assume that there is no >> segmenting issues. But Now I get an error as attached in the 'log.txt' >> from the Matlab workspace, which says about self intersecting meshes. I >> have attached the Neuroscan exported meshes >> (innerSkull.mat,outerSkull.mat,skin.mat) and the Matlab function >> (m_file.txt) that I used in creating the head model.**** >> >> **** >> >> I really want to generate some simulated EEG data but cannot make >> anything work. If someone can give a guidance on where I am going wrong in >> the procedure , that will be highly appreciated.**** >> >> **** >> >> Many thanks.**** >> >> **** >> >> Kind regards**** >> >> ***Imali* >> >> **** >> >> *Imali Thanuja Hettiarachchi* >> >> PhD Candidate**** >> >> Centre for Intelligent Systems research**** >> >> Deakin University, Geelong 3217, Australia.**** >> >> **** >> >> Mobile : +61430321972**** >> >> Email: ith at deakin.edu.au >> www.deakin.edu.au/cisr**** >> >> **** >> >> [image: Description: Description: Description: >> cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] **** >> >> **** >> >> >> >> **** >> >> **** >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> The information in this e-mail is intended only for the person to whom it >> is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners >> Compliance HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you >> in error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> >> > -- > Alexandre Gramfort, PhD > alexandre.gramfort at inria.fr > INRIA Parietal Project Team @ NeuroSpin CEA Saclay > Bat. 145, PC 156 > 91191 Gif-sur-Yvette, France > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > -- Alexandre Gramfort, PhD alexandre.gramfort at inria.fr INRIA Parietal Project Team @ NeuroSpin CEA Saclay Bat. 145, PC 156 91191 Gif-sur-Yvette, France http://www-sop.inria.fr/members/Alexandre.Gramfort/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nuria.donamayor at neuro.uni-luebeck.de Wed Jun 13 19:21:56 2012 From: nuria.donamayor at neuro.uni-luebeck.de (=?iso-8859-1?Q?Nuria_Do=F1amayor_Alonso?=) Date: Wed, 13 Jun 2012 19:21:56 +0200 Subject: [FieldTrip] sourceanalysis on neuromag data Message-ID: <810A8E06C75EB447A8CEB73DBFD7BB0E4BB16F2398@solaris.neuro.uni-luebeck.de> Dear fieldtrippers, I am doing source localization on some neuromag 306-channel data and I have a couple of questions for which I haven't been able to flind answers in the community. I have performed timelockanalysis on magnetometers and planar gradiometers separately, and combined the planar gradiometers. Should I perform sourceanalysis using just one type of sensor, or can I input both in the algorithm? In the case of the gradiometers: should I used the combined or the individual gradients? If using the combined gradients, what sensor positions/channel names do I input when calculating the leadfield? Thanks so much for your help, Nuria From tim.curran at Colorado.EDU Wed Jun 13 21:01:28 2012 From: tim.curran at Colorado.EDU (Tim Curran) Date: Wed, 13 Jun 2012 13:01:28 -0600 Subject: [FieldTrip] skewed classes for pattern classification Message-ID: I am trying some pattern classification in fieldtrip. Mostly using: cfg.method = 'crossvalidate'; cfg.mva = {dml.standardizer dml.glmnet('family','binomial')}; I am trying to predict task accuracy (0,1) in cases where accuracy is often around 80%, so the frequency of the correct class is much greater than the frequency of the incorrect class. dml.crossvalidate can handle this as follows: % In order to balance the occurrence of different classes one may set % 'resample' equal to true (default: false). Resample will upsample less % occurring classes during training and downsample often occurring % classes during testing. … but this requires tossing a lot of data in the downsampling process. Has anybody tried other approaches for dealing with skewed classes that do not involve downsampling? Like this for example: Loss functions allowing for unbalanced classes The classification performance is always evaluated by some loss function, see the section Estimation of the generalization error. Typical examples are the 0/1-loss (i.e., average number of misclassified samples) and the area under the receiver operator characteristic (ROC) curve (Fawcett, 2006). When using misclassification rate, it must be assured that the classes have approximately the same number of samples. Otherwise, the employed performance measure has to consider the different class prior probabilities. For instance, in oddball paradigms the task is to discriminate brain responses to an attended rare stimulus from responses to a frequent stimulus. A typical ratio of frequent-to-rare stimuli is 85:15. In such a setting, an uninformative classifier which always predicts the majority class would obtain an accuracy of 85%. Accordingly, a different loss function needs to be employed. Denoting the number of samples in class i by ni, the normalized error can be calculated as weighted average, where errors committed on samples of class i are weighted by N/ni with N =Σk nk: From S. Lemm, B. Blankertz, T. Dickhaus, K. R. Müller, Introduction to machine learning for brain imaging NeuroImage, 56:387-399, 2011 http://doc.ml.tu-berlin.de/bbci/publications/LemBlaDicMue11.pdf Not being a very good programmer, I got lost in the code before I could find the relevant cost function to apply normalization. Any advice on these issues would be much appreciated. thanks Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Wed Jun 13 23:35:22 2012 From: lihqih at gmail.com (qi li) Date: Wed, 13 Jun 2012 17:35:22 -0400 Subject: [FieldTrip] instantaneous phase and phase locking value Message-ID: Hi there, I am wondering whether fieldtrip has a function to compute the instantaneous phase and phase locking value. Thanks! Qi From asaygin at ucsd.edu Thu Jun 14 02:43:16 2012 From: asaygin at ucsd.edu (Ayse Pinar Saygin) Date: Wed, 13 Jun 2012 17:43:16 -0700 Subject: [FieldTrip] Postdoctoral position in cognitive neuroscience at UCSD: Human perception of humanoid robots Message-ID: Postdoctoral position in cognitive neuroscience at UCSD: Human perception of humanoid robots We are seeking a motivated and creative postdoctoral research associate to join the Cognitive Neuroscience and Neuropsychology Lab at the University of California, San Diego (http://www.sayginlab.org). Our lab studies the perception of socially-relevant stimuli such as bodies, actions, and biological motion using psychophysical, neuroimaging, neuropsychological and brain stimulation studies. The current position is part of an interdisciplinary research program exploring the perception of body movements of not only humans, but also of humanoid robots. The position requires experience with EEG, including both ERP and time/frequency approaches, as well as strong analytical and programming abilities. The ideal candidate will have a PhD in cognitive science, neuroscience, computer science, psychology, engineering or related discipline, and a strong interest in the research foci of the lab. Substantial experience with EEG is essential, and experience with Brain-Computer Interfaces (BCI) is highly desirable. Proficiency in programming (preferably but not necessarily in Matlab) is essential; experience with machine learning is highly desirable. Interest in and experience with other methods our lab uses (e.g., structural and functional neuroimaging, brain stimulation) is desirable but not required. Candidates should have excellent written and oral communication skills and a commitment to efficient publication of research results. San Diego is home to an outstanding cognitive science and neuroscience community, which includes UCSD, Salk Institute, Institute for Neural Computation (INC), Swartz Center for Computational Neuroscience (SCCN), Center for Research in Language (CRL), and Kavli Institute for Brain and Mind (KIBM). The successful candidate will work with a lively and interdisciplinary group of researchers and students. EEG collaborators include Prof. Marta Kutas, INC, SCCN, and local industry partners; robotics collaborator is Prof. Ishiguro from Osaka University. More information can be found on our website at http://www.sayginlab.org The position is initially available for two years, the second year contingent on satisfactory progress. Extension beyond two years may be possible. The target start date is Summer 2012 or possibly early Fall. Interested candidates, please email Ayse P. Saygin at asaygin at ucsd.edu, with a cover letter describing past research experience and current interests, a CV including list of publications (in pdf format), and names and contact information for 3 individuals who can provide a recommendation letter. Please also indicate US citizenship/residence status in your letter. A.P. Saygin http://www.sayginlab.org From ith at deakin.edu.au Thu Jun 14 05:53:14 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Thu, 14 Jun 2012 03:53:14 +0000 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file Message-ID: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> Dear fieldtrip users, I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, elec = ft_read_sens('mydirectory\standard_1020.elc'); The I used the function, [vol, sens] = ft_prepare_vol_sens(vol, elec); However this give as error, ??? Reference to non-existent field 'mat'. Error in ==> ft_prepare_vol_sens at 419 if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) Error in ==> curry_leadField at 15 [vol, sens] = ft_prepare_vol_sens(vol, elec); The vol created with the OPENMEEG only contains the following fields, vol = bnd: [1x3 struct] cond: [0.3300 0.0042 0.3300] skin_surface: 1 source: 3 type: 'openmeeg' unit: 'mm' cfg: [1x1 struct] Can someone please help me with this error, any advice and comment will be highly appreciated. Thank you very much! Regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr [Description: Description: Description: cid:1216BE20-1800-4A47-8B9F-E7B9D94831CD at deakin.edu.au] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 29155 bytes Desc: image001.jpg URL: From tzvetan.popov at uni-konstanz.de Thu Jun 14 09:17:58 2012 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 14 Jun 2012 09:17:58 +0200 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file In-Reply-To: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> References: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au> Message-ID: Hi Imali, in this case your meshes probably touch somewhere so that om doesn't created the bem model at all and as a consequence didn't wrote the mat file. You should go back in the segmentation procedure and play around with the option "cfg.threshold", plot the meshes and make sure they do not touch. Good luck tzvetan > > Dear fieldtrip users, > > I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, > elec = ft_read_sens('mydirectory\standard_1020.elc'); > > The I used the function, > > [vol, sens] = ft_prepare_vol_sens(vol, elec); > However this give as error, > > ??? Reference to non-existent field 'mat'. > > Error in ==> ft_prepare_vol_sens at 419 > if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) > > Error in ==> curry_leadField at 15 > [vol, sens] = ft_prepare_vol_sens(vol, elec); > > The vol created with the OPENMEEG only contains the following fields, > vol = > > bnd: [1x3 struct] > cond: [0.3300 0.0042 0.3300] > skin_surface: 1 > source: 3 > type: 'openmeeg' > unit: 'mm' > cfg: [1x1 struct] > > Can someone please help me with this error, any advice and comment will be highly appreciated. > Thank you very much! > > Regards > Imali > > Imali Thanuja Hettiarachchi > PhD Candidate > Centre for Intelligent Systems research > Deakin University, Geelong 3217, Australia. > > Mobile : +61430321972 > Email: ith at deakin.edu.au > www.deakin.edu.au/cisr > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From ith at deakin.edu.au Thu Jun 14 10:56:49 2012 From: ith at deakin.edu.au (IMALI THANUJA HETTIARACHCHI) Date: Thu, 14 Jun 2012 08:56:49 +0000 Subject: [FieldTrip] ft_prepare_vol_sens-missing .mat file In-Reply-To: References: <5A1787011651BC42A4D41856DBC2E0603E03CBF0@mbox-f-3.du.deakin.edu.au>, Message-ID: <5A1787011651BC42A4D41856DBC2E0603E03CC6D@mbox-f-3.du.deakin.edu.au> Hi Tzvetan, Thank you very much for your reply. I am using the MNI surface meshes from the NeuroScan Curry Software as I had trouble in generating the MRI based headmodels. I had trouble with the MNI surface meshes as well but as Alex suggested earlier in the "Headmodel with NeuroScan meshes" discussion thread I managed to overcome the problems after smoothing them. When I ran the ft_prepare_headmodel with the new smoothed meshes the program ran without explicitly giving me any errors(including om_minverser), but now with your comment I understand that om has not run succesfully to create the mat file. I am attaching the figure with the smoothed meshes to have a look whether you observe an intersecting mesh. Please let me know if you have any comments on my procedure. Many Thanks. Regards Imali ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tzvetan Popov [tzvetan.popov at uni-konstanz.de] Sent: Thursday, 14 June 2012 5:17 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_prepare_vol_sens-missing .mat file Hi Imali, in this case your meshes probably touch somewhere so that om doesn't created the bem model at all and as a consequence didn't wrote the mat file. You should go back in the segmentation procedure and play around with the option "cfg.threshold", plot the meshes and make sure they do not touch. Good luck tzvetan Dear fieldtrip users, I am using a BEM (using OPENMEEG) created volume conduction model, and in order to prepare lead fields I loaded the electrode array with, elec = ft_read_sens('mydirectory\standard_1020.elc'); The I used the function, [vol, sens] = ft_prepare_vol_sens(vol, elec); However this give as error, ??? Reference to non-existent field 'mat'. Error in ==> ft_prepare_vol_sens at 419 if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) Error in ==> curry_leadField at 15 [vol, sens] = ft_prepare_vol_sens(vol, elec); The vol created with the OPENMEEG only contains the following fields, vol = bnd: [1x3 struct] cond: [0.3300 0.0042 0.3300] skin_surface: 1 source: 3 type: 'openmeeg' unit: 'mm' cfg: [1x1 struct] Can someone please help me with this error, any advice and comment will be highly appreciated. Thank you very much! Regards Imali Imali Thanuja Hettiarachchi PhD Candidate Centre for Intelligent Systems research Deakin University, Geelong 3217, Australia. Mobile : +61430321972 Email: ith at deakin.edu.au www.deakin.edu.au/cisr _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Surface meshes.zip Type: application/x-zip-compressed Size: 215061 bytes Desc: Surface meshes.zip URL: From b.reuderink at donders.ru.nl Thu Jun 14 11:40:55 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 14 Jun 2012 11:40:55 +0200 Subject: [FieldTrip] skewed classes for pattern classification In-Reply-To: References: Message-ID: Dear Tim, You pose a very interesting question, that is not asked enough in my opinion :). There are indeed various approaches to classification and evaluation of ill-balanced data. One option is indeed resampling, which is a way to fake a per-instance importance weight. Some classifiers implement this instance weight directly, such as libsvm. I am not familiar enough with the DMLT methods in FieldTrip to know if similar options exist. BTW, I am not sure that resampling is needed for testing, and if it is, it can perhaps be performed in the performance metric. This might reduce the amount of 'tossing data'. Another option is to use a performance metric that is insensitive to class imbalance, such as the AUC-ROC or mutual information. Note that this only solves your evaluation problem; if the classifiers objective is to minimize a form of loss that *is* sensitive to imbalance, you probably would still get constant prediction of the most frequent class. Best regards, Boris On Wed, Jun 13, 2012 at 9:01 PM, Tim Curran wrote: > I am trying some pattern classification in fieldtrip. > > Mostly using: > cfg.method = 'crossvalidate'; > cfg.mva = {dml.standardizer dml.glmnet('family','binomial')}; > > I am trying to predict task accuracy (0,1) in cases where accuracy is often > around 80%, so the frequency of the correct class is much greater than the > frequency of the incorrect class. > > > dml.crossvalidate can handle this as follows: > %   In order to balance the occurrence of different classes one may set > %   'resample' equal to true (default: false). Resample will upsample less > %   occurring classes during training and downsample often occurring > %   classes during testing. > > … but this requires tossing a lot of data in the downsampling process. > > > Has anybody tried other approaches for dealing with skewed classes that do > not involve downsampling?  Like this for example: > > Loss functions allowing for unbalanced classes > The classification performance is always evaluated by some loss > function, see the section Estimation of the generalization > error. Typical examples are the 0/1-loss (i.e., average number of > misclassified samples) and the area under the receiver operator > characteristic (ROC) curve (Fawcett, 2006). When using misclassification > rate, it must be assured that the classes have approximately > the same number of samples. Otherwise, the employed performance > measure has to consider the different class prior probabilities. > For instance, in oddball paradigms the task is to discriminate > brain responses to an attended rare stimulus from responses to a > frequent stimulus. A typical ratio of frequent-to-rare stimuli is > 85:15. In such a setting, an uninformative classifier which > always predicts the majority class would obtain an accuracy of 85%. > Accordingly, a different loss function needs to be employed. Denoting > the number of samples in class i by ni, the normalized error can be > calculated as weighted average, where errors committed on samples > of class i are weighted by N/ni with N =Σk nk: > > From > S. Lemm, B. Blankertz, T. Dickhaus, K. R. Müller, > Introduction to machine learning for brain imaging > NeuroImage, 56:387-399, 2011 > http://doc.ml.tu-berlin.de/bbci/publications/LemBlaDicMue11.pdf > > > Not being a very good programmer, I got lost in the code before I could find > the relevant cost function to apply normalization. > > Any advice on these issues would be much appreciated. > > thanks > Tim > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- twitter.com/#!/breuderink | github.com/breuderink | borisreuderink.nl From anette.giani at tuebingen.mpg.de Thu Jun 14 11:49:50 2012 From: anette.giani at tuebingen.mpg.de (Anette Giani) Date: Thu, 14 Jun 2012 11:49:50 +0200 Subject: [FieldTrip] LCMV beamformer analysis: uncertainties Message-ID: <000201cd4a13$0ab328c0$20197a40$@tuebingen.mpg.de> Dear Fieldtrip users, I am currently trying to localize averaged time courses of condion1 and condition2 in 20 subjects using LCMV beamformer and to compare source activity of both conditions statistically. However, results look suspicious to me and I am wondering if I am doing things correctly. It will be of great help if you could comment on some issues and check the parameters I am using. Things I am wondering about: (1) doing cluster statistics I get 1 big cluster that is highly significant (clusterstat: 6.5829e+006, prob: 0.0020) and includes all!! (but one) voxels that are labeled as "inside". I tried to decrease the alpha level to 0.01, but it didn't really help. (2) How can I check the quality of alignment of the individual anatomicals? So far I am just using ft_volumenormalise, hoping that alignment works well. However, I am getting suspicious by the warning: 1377485 voxels are inside the brain of all subjects 2557673 voxels are inside the brain of some, but not all subjects 4551464 voxels are outside the brain of all subjects Warning: marking only voxels inside the brain of all subjects as 'inside' If MRI's would be aligned, why aren't inside voxels of all subjects identical? How does the fact that voxels are not exactly aligned affect my analysis? Any comments & and ideas are welcome Thank you so much for your help!! Anette -- PARAMETERS %% Calculating the cross spectral density matrix cfg = []; cfg.covariance = 'yes'; cfg.channel = 'MEG'; cfg.removemean = 'no'; cfg.trials = cond1; cfg.covariancewindow = [0.15 0.25]; tlckav_cond1 = ft_timelockanalysis(cfg, OrigSPMdata); cfg.trials = cond2; cfg.covariancewindow = [0.15 0.25]; tlckav_cond2 = ft_timelockanalysis(cfg, OrigSPMdata); cfg.trials = [cond1 cond2]; cfg.covariancewindow = [0.15 0.25]; tlckav_combined = ft_timelockanalysis(cfg, OrigSPMdata); %% lcmv beamformer using common filters cfg = []; cfg.method = 'lcmv'; cfg.lambda = '5%'; cfg.grid = grid; cfg.grad = grad; cfg.vol = vol; cfg.lcmv.projectnoise = 'yes'; % necessary? cfg.lcmv.lambda = '5%'; cfg.lcmv.keepfilter = 'yes'; cfg.lcmv.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, tlckav_combined) cfg.grid.filter = sourceAll.avg.filter; source_cond1 = ft_sourceanalysis(cfg, tlckav_cond1); source_cond2 = ft_sourceanalysis(cfg, tlckav_cond2); %% reslice mri_re = ft_volumereslice([], mri2); source_cond1.anatomy = mri_re.anatomy; source_cond2.anatomy = mri_re.anatomy; % interpolate cfg = []; cfg.units = 'mm'; cfg.downsample = 2; % taken from tutorial cfg.parameter = 'avg.pow'; source_cond1_Int = ft_sourceinterpolate(cfg, source_cond1 , mri_re); source_cond2_Int = ft_sourceinterpolate(cfg, source_cond2 , mri_re); % normalise cfg = []; cfg.coordsys = 'ctf'; cfg.nonlinear = 'no'; source_cond1_Int_Norm = ft_volumenormalise(cfg, source_cond1_Int); source_cond2_Int_Norm = ft_volumenormalise(cfg, source_cond2_Int); --------------------------- STATISTICS -------------------------------------------------------------------------- % merge all subject's data cfg = []; cfg.keepindividual = 'yes'; grandavg_cond1 = ft_sourcegrandaverage(cfg, sSub6_cond1, sSub8_cond1, . tbc grandavg_cond2 = ft_sourcegrandaverage(cfg, sSub6_cond2, sSub8_cond2, . tbc % ------------------------------------------------------------------------- % run statistics over subjects cfg = []; cfg.dim = grandavg_cond1.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 500; cfg.tail = 0; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.correcttail = 'alpha'; nsubj=length(grandavg_cond1.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandavg_cond1, grandavg_cond2); -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Thu Jun 14 12:47:01 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Thu, 14 Jun 2012 12:47:01 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data Message-ID: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> Dear all, I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) First I realign the mri with the fiducials I get out of mri-lab (in voxels). The 'vol' structure is created like this: Cfg = []; cfg.coordsys = 'neuromag'; cfg.method = 'singleshell'; vol = ft_prepare_singleshell(cfg, segmentedmri); the 'grid' like this: load(strcat(basepath,'templates/template_grid.mat')); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.coordsys = 'neuromag'; cfg.mri = mri; %the realigned mri grid = ft_prepare_sourcemodel(cfg); Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? The results are plotted and attached to this e-mail. Thanks in advance, Hanneke p.s. I also filed this in bugzilla, for more information see there: http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: grid_vol.png Type: image/png Size: 324339 bytes Desc: grid_vol.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grid_vol2.jpg Type: image/jpeg Size: 139682 bytes Desc: grid_vol2.jpg URL: From jan.schoffelen at donders.ru.nl Thu Jun 14 13:13:43 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 14 Jun 2012 13:13:43 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> Message-ID: <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> Hi Hanneke, You could try the following: mri=ft_convert_units(mri, 'mm'), prior to calling ft_prepare_sourcemodel? (and then do ft_convert_units(grid,'m') on the output) Also, what happens if you do cfg.grid.nonlinear = 'no'? I also saw that you already created a bug on our bugzilla-site. Thanks for doing so; we were already aware of your problem and it's on our list to look into it in more detail as soon as our time resources allow. At the moment I suspect a metric unit issue to be the problem when doing the inverse (non-linear) warp. Best, Jan-Mathijs On Jun 14, 2012, at 12:47 PM, wrote: > Dear all, > > I am creating headmodels of neuromag data (Using FT version 20123105 and the example script http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > > First I realign the mri with the fiducials I get out of mri-lab (in voxels). > > The 'vol' structure is created like this: > > Cfg = []; > cfg.coordsys = 'neuromag'; > cfg.method = 'singleshell'; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > the 'grid' like this: > > load(strcat(basepath,'templates/template_grid.mat')); > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.coordsys = 'neuromag'; > cfg.mri = mri; %the realigned mri > grid = ft_prepare_sourcemodel(cfg); > > Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea? > The results are plotted and attached to this e-mail. > > Thanks in advance, > > Hanneke > > p.s. I also filed this in bugzilla, for more information see there: > > http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com > > > __________________________________________ > > Hanneke van Dijk, PhD > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanneke.p.van.dijk at gmail.com Thu Jun 14 13:21:11 2012 From: hanneke.p.van.dijk at gmail.com (Hanneke van Dijk) Date: Thu, 14 Jun 2012 13:21:11 +0200 Subject: [FieldTrip] [Fieldtrip] creating mni-normalised headmodels of neuromag data In-Reply-To: <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CAD@Mail2-UKD.VMED.UKD> <5129EB69-7524-4208-B80C-4D28E91E1E09@donders.ru.nl> Message-ID: Hi Jan-Mathijs, The converting units before ft_prepare_sourcemodel solved it! I suspected the same, but didn't know at which step it went wrong, and wasn't aware of the function ft_convert_units... I will also report it in bugzilla so you have the solution at hand! Thanks so much! Hanneke On Thu, Jun 14, 2012 at 1:13 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Hanneke, > > You could try the following: > > mri=ft_convert_units(mri, 'mm'), prior to calling ft_prepare_sourcemodel? > (and then do ft_convert_units(grid,'m') on the output) > > Also, what happens if you do cfg.grid.nonlinear = 'no'? > > I also saw that you already created a bug on our bugzilla-site. Thanks for > doing so; we were already aware of your problem and it's on our list to > look into it in more detail as soon as our time resources allow. At the > moment I suspect a metric unit issue to be the problem when doing the > inverse (non-linear) warp. > > Best, > > Jan-Mathijs > > > On Jun 14, 2012, at 12:47 PM, < > Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > > Dear all, > > I am creating headmodels of neuromag data (Using FT version 20123105 and > the example script > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space) > > > First I realign the mri with the fiducials I get out of mri-lab (in > voxels). > > The 'vol' structure is created like this: > > Cfg = []; > cfg.coordsys = 'neuromag'; > cfg.method = 'singleshell'; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > the 'grid' like this: > > load(strcat(basepath,'templates/template_grid.mat')); > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.coordsys = 'neuromag'; > cfg.mri = mri; %the realigned mri > grid = ft_prepare_sourcemodel(cfg); > > Everything works well, untill I plot and see that the sizes/ origins (or > units) are completely different for the vol and grid. At the moment I > cannot find a solution. Does anyone have an idea? > The results are plotted and attached to this e-mail. > > Thanks in advance, > > Hanneke > > p.s. I also filed this in bugzilla, for more information see there: > > > http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com > > > __________________________________________ > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html< > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html> > > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jun 14 14:34:52 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 14 Jun 2012 14:34:52 +0200 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi Qi, There are several options in FT for estimating instantaneous phase. You could use a sliding time window FFT in ft_freqanalysis, where you choose to get complex Fourier spectra as output, and specify to get an estimate at each sample, as in: cfg = []; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.taper = 'hanning'; % in general, dpss here does not make sense if you're interested in instantaneous phase cfg.toi = data.time{1}; % assuming your trials are of equal length cfg.foi = 10; % or whatever frequency you want estimated (can of course be a vector) cfg.t_ftimwin = 5./cfg.foi; % use e.g. 5 cycles to estimate the phase cfg.output = 'fourier'; freq = ft_freqanalysis(cfg, data); The output freq.fourierspctrm will be a nTrials X nChannels X nFreqs X nSamples complex-valued matrix, from which you can get instantaneous phase by using angle(). An alternative approach would be to first filter your data, and then apply a Hilbert transform. This can be done in ft_preprocessing: cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = [7 14]; cfg.bpfilttype = 'fir'; % or 'firls' (slower), but avoid the default 'but' (= not well-suited for hilbert phase estimate) cfg.hilbert = 'angle'; % this gives you just the phase, you can specify 'complex' to get both phase and amplitude datPhase = ft_preprocessing(cfg, data); where datPhase will be just a FT raw data structure containing phase information (or complex phase/amplitude information, depending on your choice). Concerning the phase-locking value, you might want to take a look at ft_connectivityanalysis with cfg.method='plv', but I have no experience on this. Best, Eelke On 13 June 2012 23:35, qi li wrote: > Hi there, > > I am wondering whether fieldtrip has a function to compute the > instantaneous phase and phase locking value. Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From poil.simonshlomo at gmail.com Thu Jun 14 17:16:10 2012 From: poil.simonshlomo at gmail.com (Simon-Shlomo Poil) Date: Thu, 14 Jun 2012 17:16:10 +0200 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi Qi, I also don't know how to calculate the phase locking value in Fieldtrip. But you can do it in the Neurophysiological Biomarker Toolbox http://www.nbtwiki.net/doku.php?id=tutorial:phase_locking_value It's a toolbox for EEGLAB, but it should be possible to either use the functions directly on you fieldtrip signal, or simply convert the signal to eeglab format.. Good luck! :) Simon-Shlomo Poil 2012/6/13 qi li : > Hi there, > > I am wondering whether fieldtrip has a function to compute the > instantaneous phase and phase locking value. Thanks! > > Qi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- -- Simon-Shlomo Poil Center of MR-Research University Children’s Hospital Zurich Mobile number: +41 (0)76 399 5809 Office number: +41 (0)44 266 3129 Skype: poil.simonshlomo Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html From Lilla.Magyari at mpi.nl Fri Jun 15 14:33:00 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 15 Jun 2012 14:33:00 +0200 Subject: [FieldTrip] ft_sourcemovie In-Reply-To: <4FD1BC40.3000509@donders.ru.nl> References: <4FD1BC40.3000509@donders.ru.nl> Message-ID: <4FDB2B7C.9010505@mpi.nl> hi Jorn, I am wondering if you have been the one who was trying to develop further the ft_sourcemovie function. If yes, I would like to ask some questions. Let me know. thanks. cheers, Lilla From Lilla.Magyari at mpi.nl Fri Jun 15 14:35:50 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 15 Jun 2012 14:35:50 +0200 Subject: [FieldTrip] ft_sourcemovie - ignore earlier email with this subject In-Reply-To: <4FD1BC40.3000509@donders.ru.nl> References: <4FD1BC40.3000509@donders.ru.nl> Message-ID: <4FDB2C26.8000006@mpi.nl> Dear all, sorry for my latest email. It went totally to the wrong address. Best, Lilla Jörn M. Horschig wrote: > Dear FieldTrip list, > > As you know, there are several getting started sections on our wiki-page: > http://fieldtrip.fcdonders.nl/getting_started > Unfortunately, however, we (the FieldTrip development team) are no > expert for all different dataformats, mainly because at the Donders > Institute, we do not work with all those data formats. You, on the other > hand, might be an expert. In order to provide good documentation, we > therefore rely on your input as well and would like to ask your help. > First, we want to get started with BrainVision data. > > 1) What would you like to see in the Getting Started guide? > 2) What explanation would you like to see there that is specific to > BrainVision data? > 3) Is there any particular example code that you would like to be shown > there? > 4) Are there particular problems you encountered (and solved) with > reading in and working with BrainVision data in FieldTrip? What are > these problems and what are the solutions? > 5) Are there questions you always asked yourself about using BrainVision > data with FieldTrip? > > It would be great if you share this information with us. Feel free to > write whatever you want, any information is useful (preferably of course > some elaborations and explanation so that we can put this information > there). If you are working with other data, feel free to also answer > this mail on a more general note, but we will ask separately for other > data formats in near future. > > On behalf of the FieldTrip development team, > Jörn > From ljbj_2009 at yahoo.com Fri Jun 15 19:35:05 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Fri, 15 Jun 2012 10:35:05 -0700 (PDT) Subject: [FieldTrip] TMSI2FiledTrip real time buffer Message-ID: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> Hi All,   The hardware I used is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. I was using TMSi-to-Fieldtrip interface from TMSi  to export data to the Fieldtrip buffer I tried the ft_realtime_signalviewer function to get the data as  suggested. The code I was using: cfg                = []; cfg.blocksize      = 1;                            % seconds cfg.dataset        = 'buffer://localhost:1972';    % where to read the data ft_realtime_signalviewer(cfg) I got some errors: Warning: could not read header from buffer://localhost:1972, retrying in 1 second > In ft_read_header at 894   In ft_realtime_signalviewer at 72   In test_Buffer_draw at 6 My question is that do I need to open the FieldTrip buffer server before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to do some kinds of initialization in FieldTrip? I would appreciate very much if you could give me a guide or step by step instruction on how to use real time buffer in FieldTrip with TMSi. Thank you all for the time and help! Best wishes   Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Fri Jun 15 22:44:50 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Fri, 15 Jun 2012 13:44:50 -0700 (PDT) Subject: [FieldTrip] configuration file for TMSi Message-ID: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> Hi All, Did  any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI.   Many thanks in advance for any insight. Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Jun 18 10:53:53 2012 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 18 Jun 2012 10:53:53 +0200 Subject: [FieldTrip] configuration file for TMSi In-Reply-To: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> References: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> Hi Jie I'm using the tmsi2ft buffer in my experiments with a refa72 amplifier. Below you can find a copy of the config file that I use (put it in a .txt file). When the tmsi2ft is correctly started you should see all the channels with some extra information below in the cmd window. You could also try starting the bufferviewer (in realtime/utilities/viewer) to see if data is comming in after you have started the tmsi2ft buffer. Best, Marianne # Write n=label to select hardware channel number n (starting from 1) # and attach a label to it. This will show up in the Fieldtrip buffer # and the GDF file. # Currently, there is no check for double inclusion of channels. # That is, if you define 1=FOO and 1=BAR, the first hardware channel # will show up twice, with different names. # Channels listed before the first [save] or [stream] line will be added # to both saving and streaming selections. Write [select] to enable # selection for both saving and streaming. [select] 1=Fp1 2=Fpz 3=Fp2 4=F7 5=F3 6=Fz 7=F4 8=F8 9=FC5 10=FC1 11=FC2 12=FC6 13=M1 14=T7 15=C3 16=Cz 17=C4 18=T8 19=M2 20=CP5 21=CP1 22=CP2 23=CP6 24=P7 25=P3 26=Pz 27=P4 28=P8 29=POz 30=O1 31=Oz 32=O2 33=AF7 34=AF3 35=AF4 36=AF8 37=F5 38=F1 39=F2 40=F6 41=FC3 42=FCz 43=FC4 44=C5 45=C1 46=C2 47=C6 48=CP3 49=CPz 50=CP4 51=P5 52=P1 53=P2 54=P6 55=PO5 56=PO3 57=PO4 58=PO6 59=FT7 60=FT8 61=TP7 62=TP8 63=PO7 64=PO8 65=BIP1 66=BIP2 67=BIP3 68=BIP4 69=AUX1 70=AUX2 71=AUX3 72=AUX4 73=Digi # Please take note that the channels will be written out in the order specified here, # that is, they will not be sorted according to the hardware channel number! # Write "downsample X" with a positive number X to set the downsampling # factor for streaming. The GDF file will receive full-rate data. # Assuming the sampling rate of the TMSI device is 5Khz, downsample to # 1 KHz (5x) with a 4-th order Butterworth lowpass @ 250 Hz # downsample=5 # bandwidth=250 # bworder=4 # Adjust sample rate samplerate=500 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] On Behalf Of jie liu [ljbj_2009 at yahoo.com] Sent: Friday, June 15, 2012 10:44 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] configuration file for TMSi Hi All, Did any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI. Many thanks in advance for any insight. Jie Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From jm.horschig at donders.ru.nl Mon Jun 18 15:58:58 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 18 Jun 2012 15:58:58 +0200 Subject: [FieldTrip] TMSI2FiledTrip real time buffer In-Reply-To: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> References: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> Message-ID: <4FDF3422.8070905@donders.ru.nl> Dear Jie, I'm afraid I cannot really help you with your particular problem, but some basics that you should generally be covered and may thus help nonetheless: - when using cfg.dataset = '(...) localhost (...) ' make sure that the shared memory/buffer is running locally, i.e. on the same computer. This involves starting tmsi2ft on that computer. - if it is running on a different computer, be sure to not use localhost but the corresponding computer's name or ip - make sure that the port (here 1972) is open (i.e. not blocked by some firewall or in use by another program) and that the buffer accesses it - maybe you could try to 'ping' the ip where the buffer is supposed to run to check whether everything is set up correctly (not sure if this actually works) I guess you already saw this page (but I thought it'd be wise to point to it nonetheless): http://fieldtrip.fcdonders.nl/development/realtime/tmsi?s[]=tmsi I hope that one of these comments help. Best, Jörn On 6/15/2012 7:35 PM, jie liu wrote: > Hi All, > The hardware I used is TMSI refa 128 working with usb (driver is fusbi > version 6.0.0.76.) windows xp+service pack3. > I was using TMSi-to-Fieldtrip interface from TMSito export data to the > Fieldtrip buffer > I tried the ft_realtime_signalviewer function to get the data assuggested. > The code I was using: > cfg= []; > cfg.blocksize= 1;% seconds > cfg.dataset= 'buffer://localhost:1972';% where to read the data > ft_realtime_signalviewer(cfg) > I got some errors: > Warning: could not read header from > buffer://localhost:1972, retrying in 1 > second > > In ft_read_header at 894 > In ft_realtime_signalviewer at 72 > In test_Buffer_draw at 6 > My question is that do I need to open the FieldTrip buffer server > before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to > do some kinds of initialization in FieldTrip? > I would appreciate very much if you could give me a guide or step by > step instruction on how to use real time buffer in FieldTrip with TMSi. > Thank you all for the time and help! > Best wishes > Jie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Mon Jun 18 16:32:13 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Mon, 18 Jun 2012 07:32:13 -0700 (PDT) Subject: [FieldTrip] configuration file for TMSi In-Reply-To: <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> References: <1339793090.11902.YahooMailNeo@web160403.mail.bf1.yahoo.com> <70FC3ACFFB46314EBEAF9101EA45F50E0742E94184@smkexch02.maartenskliniek.nl> Message-ID: <1340029933.69547.YahooMailNeo@web160403.mail.bf1.yahoo.com>   Hi Marianne, I am glad to get your suggestions and comments. Thank you!     The original values from Refa need to be converted to voltage in vu, how did you get the scale based on the gain and offset for each channel?   I really appreciated your time and help. Thank you again!   Best regards Jie ________________________________ From: "Severens, Marianne" To: FieldTrip discussion list Sent: Monday, June 18, 2012 3:53 AM Subject: Re: [FieldTrip] configuration file for TMSi Hi Jie I'm using the tmsi2ft buffer in my experiments with a refa72 amplifier. Below you can find a copy of the config file that I use (put it in a .txt file). When the tmsi2ft is correctly started you should see all the channels with some extra information below in the cmd window. You could also try starting the bufferviewer (in realtime/utilities/viewer) to see if data is comming in after you have started the tmsi2ft buffer. Best, Marianne # Write n=label to select hardware channel number n (starting from 1) # and attach a label to it. This will show up in the Fieldtrip buffer # and the GDF file. # Currently, there is no check for double inclusion of channels. # That is, if you define 1=FOO and 1=BAR, the first hardware channel # will show up twice, with different names. # Channels listed before the first [save] or [stream] line will be added # to both saving and streaming selections. Write [select] to enable # selection for both saving and streaming. [select] 1=Fp1 2=Fpz 3=Fp2 4=F7 5=F3 6=Fz 7=F4 8=F8 9=FC5 10=FC1 11=FC2 12=FC6 13=M1 14=T7 15=C3 16=Cz 17=C4 18=T8 19=M2 20=CP5 21=CP1 22=CP2 23=CP6 24=P7 25=P3 26=Pz 27=P4 28=P8 29=POz 30=O1 31=Oz 32=O2 33=AF7 34=AF3 35=AF4 36=AF8 37=F5 38=F1 39=F2 40=F6 41=FC3 42=FCz 43=FC4 44=C5 45=C1 46=C2 47=C6 48=CP3 49=CPz 50=CP4 51=P5 52=P1 53=P2 54=P6 55=PO5 56=PO3 57=PO4 58=PO6 59=FT7 60=FT8 61=TP7 62=TP8 63=PO7 64=PO8 65=BIP1 66=BIP2 67=BIP3 68=BIP4 69=AUX1 70=AUX2 71=AUX3 72=AUX4 73=Digi # Please take note that the channels will be written out in the order specified here, # that is, they will not be sorted according to the hardware channel number! # Write "downsample X" with a positive number X to set the downsampling # factor for streaming. The GDF file will receive full-rate data. # Assuming the sampling rate of the TMSI device is 5Khz, downsample to # 1 KHz (5x) with a 4-th order Butterworth lowpass @ 250 Hz # downsample=5 # bandwidth=250 # bworder=4 # Adjust sample rate samplerate=500 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] On Behalf Of jie liu [ljbj_2009 at yahoo.com] Sent: Friday, June 15, 2012 10:44 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] configuration file for TMSi Hi All, Did  any test the TMSi refa system with FieldTrip before? I need an example of Fieldtrip configuration file for TMSI. Many thanks in advance for any insight. Jie Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Mon Jun 18 17:05:13 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Mon, 18 Jun 2012 08:05:13 -0700 (PDT) Subject: [FieldTrip] TMSI2FiledTrip real time buffer In-Reply-To: <4FDF3422.8070905@donders.ru.nl> References: <1339781705.68646.YahooMailNeo@web160401.mail.bf1.yahoo.com> <4FDF3422.8070905@donders.ru.nl> Message-ID: <1340031913.62103.YahooMailNeo@web160406.mail.bf1.yahoo.com> Hi Jörn, I am glad to get your suggestions and comments. I tested on the same PC and the port was open. still the same problem I really appreciated your time and help. Thank you again! best regards Jie ________________________________ From: ""Jörn M. Horschig"" To: FieldTrip discussion list Sent: Monday, June 18, 2012 8:58 AM Subject: Re: [FieldTrip] TMSI2FiledTrip real time buffer Dear Jie, I'm afraid I cannot really help you with your particular problem, but some basics that you should generally be covered and may thus help nonetheless:  - when using cfg.dataset = '(...) localhost (...) ' make sure that the shared memory/buffer is running locally, i.e. on the same computer. This involves starting tmsi2ft on that computer.  - if it is running on a different computer, be sure to not use localhost but the corresponding computer's name or ip  - make sure that the port (here 1972) is open (i.e. not blocked by some firewall or in use by another program) and that the buffer accesses it  - maybe you could try to 'ping' the ip where the buffer is supposed to run to check whether everything is set up correctly (not sure if this actually works) I guess you already saw this page (but I thought it'd be wise to point to it nonetheless): http://fieldtrip.fcdonders.nl/development/realtime/tmsi?s[]=tmsi I hope that one of these comments help. Best, Jörn On 6/15/2012 7:35 PM, jie liu wrote: Hi All, >  >The hardware I used is TMSI refa 128 working with usb (driver is fusbi version 6.0.0.76.) windows xp+service pack3. >I was using TMSi-to-Fieldtrip interface from TMSi  to export data to the Fieldtrip buffer >I tried the ft_realtime_signalviewer function to get the data as  suggested. >The code I was using: >cfg                = []; >cfg.blocksize      = 1;                            % seconds >cfg.dataset        = 'buffer://localhost:1972';    % where to read the data >ft_realtime_signalviewer(cfg) >I got some errors: >Warning: could not read header from >buffer://localhost:1972, retrying in 1 >second >> In ft_read_header at 894 >  In ft_realtime_signalviewer at 72 >  In test_Buffer_draw at 6 >My question is that do I need to open the FieldTrip buffer server before I start the TMSi-to-Fieldtrip interface from TMSi? Do I need to do some kinds of initialization in FieldTrip? >I would appreciate very much if you could give me a guide or step by step instruction on how to use real time buffer in FieldTrip with TMSi. >Thank you all for the time and help! >Best wishes >  >Jie > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From PGOODIN at groupwise.swin.edu.au Tue Jun 19 01:51:11 2012 From: PGOODIN at groupwise.swin.edu.au (Peter Goodin) Date: Tue, 19 Jun 2012 09:51:11 +1000 Subject: [FieldTrip] Difference wave calculation Message-ID: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Hi Fieldtrip list, I'm quite new to using Fieldtrip for analysis and can't find any information on how to create difference waves, for example to examine MMN activity. Currently I've just been making a new structure and adding items from the ft_timelockedanalysis function, subtracting the standard from the deviant for the .avg and .var fields while keeping the rest intact. Are there any tutorials available that can show me the recommended way to go about this? Alternatively, can anyone working with difference waves give an example of how they calculate them? Thanks, Peter. Peter Goodin Ph.D Candidate Brain and Psychological Research Centre (BPsyC) Swinburne University of Technology 400 Burwood Road, Hawthorn, VIC 3122 Monash Alfred Psychiatric Research Centre (MAPrc) Alfred Hospital Level 1, Old Baker Building, Vic 3008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 19 09:06:37 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 19 Jun 2012 09:06:37 +0200 Subject: [FieldTrip] Difference wave calculation In-Reply-To: <4FE04B8F0200004100011613@groupwise.swin.edu.au> References: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Message-ID: Hi Peter, In that case, welcome to the Fieldtrip list :) Actually, I think your approach of calculating a difference between event-related activities is pretty much the recommended standard way. So: cfg = []; tl1 = ft_timelockanalysis(cfg, data1); tl2 = ft_timelockanalysis(cfg, data2); tlDiff = tl1; tlDiff.avg = tl1.avg - tl2.avg; Of course, this is assuming all trials have the same time axis. And also, if needed, you can change the configuration to whatever is appropriate for your data. One note of caution: while the above is perfectly valid for the averages, you cannot simply subtract the variances from eachother, and expect to end up with the variance of your difference wave. I had to refresh my memory, but wikipedia tells me that the variance of two random variables subtracted from each other is equal to the variances added, minus twice the covariance between them. Best, Eelke On 19 June 2012 01:51, Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any information > on how to create difference waves, for example to examine MMN activity. > Currently I've just been making a new structure and adding items from the > ft_timelockedanalysis function, subtracting the standard from the deviant > for the .avg and .var fields while keeping the rest intact. > > Are there any tutorials available that can show me the recommended way to go > about this? Alternatively, can anyone working with difference waves give an > example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From PGOODIN at groupwise.swin.edu.au Tue Jun 19 13:17:24 2012 From: PGOODIN at groupwise.swin.edu.au (Peter Goodin) Date: Tue, 19 Jun 2012 21:17:24 +1000 Subject: [FieldTrip] Difference wave calculation Message-ID: <4FE0EC640200004100023C9E@groupwise.swin.edu.au> Hi Eelke, Thanks for the kind welcome! Also, thanks for telling me what the .var field contains... :D Peter. >>> Eelke Spaak 19/06/12 5:23 PM >>> Hi Peter, In that case, welcome to the Fieldtrip list :) Actually, I think your approach of calculating a difference between event-related activities is pretty much the recommended standard way. So: cfg = []; tl1 = ft_timelockanalysis(cfg, data1); tl2 = ft_timelockanalysis(cfg, data2); tlDiff = tl1; tlDiff.avg = tl1.avg - tl2.avg; Of course, this is assuming all trials have the same time axis. And also, if needed, you can change the configuration to whatever is appropriate for your data. One note of caution: while the above is perfectly valid for the averages, you cannot simply subtract the variances from eachother, and expect to end up with the variance of your difference wave. I had to refresh my memory, but wikipedia tells me that the variance of two random variables subtracted from each other is equal to the variances added, minus twice the covariance between them. Best, Eelke On 19 June 2012 01:51, Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any information > on how to create difference waves, for example to examine MMN activity. > Currently I've just been making a new structure and adding items from the > ft_timelockedanalysis function, subtracting the standard from the deviant > for the .avg and .var fields while keeping the rest intact. > > Are there any tutorials available that can show me the recommended way to go > about this? Alternatively, can anyone working with difference waves give an > example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Lilla.Magyari at mpi.nl Tue Jun 19 13:50:08 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Tue, 19 Jun 2012 13:50:08 +0200 Subject: [FieldTrip] Difference wave calculation In-Reply-To: <4FE04B8F0200004100011613@groupwise.swin.edu.au> References: <4FE04B8F0200004100011613@groupwise.swin.edu.au> Message-ID: <4FE06770.90501@mpi.nl> hi Peter, You can find in this tutorial site: http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock under "Plotting the results" how condition differences are calculated for visualization purposes. It is probably the same that you have done already. Best, Lilla Peter Goodin wrote: > Hi Fieldtrip list, > > I'm quite new to using Fieldtrip for analysis and can't find any > information on how to create difference waves, for example to examine > MMN activity. Currently I've just been making a new structure and adding > items from the ft_timelockedanalysis function, subtracting the standard > from the deviant for the .avg and .var fields while keeping the rest > intact. > > Are there any tutorials available that can show me the recommended way > to go about this? Alternatively, can anyone working with difference > waves give an example of how they calculate them? > > Thanks, > > Peter. > > > > Peter Goodin > Ph.D Candidate > Brain and Psychological Research Centre (BPsyC) > Swinburne University of Technology > 400 Burwood Road, Hawthorn, VIC 3122 > > Monash Alfred Psychiatric Research Centre (MAPrc) > Alfred Hospital > Level 1, Old Baker Building, > Vic 3008 > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From markus.siegel at uni-tuebingen.de Tue Jun 19 14:11:58 2012 From: markus.siegel at uni-tuebingen.de (Markus Siegel) Date: Tue, 19 Jun 2012 14:11:58 +0200 Subject: [FieldTrip] PhD Position - Centre for Integrative Neuroscience (CIN), Tuebingen Message-ID: <2C8E3217-CF4C-473B-AF53-A73DBBF6C06A@uni-tuebingen.de> The laboratory of Markus Siegel at the Centre for Integrative Neuroscience (CIN), Tuebingen (http://www.cin.uni-tuebingen.de/) is seeking candidates for a PhD position to study large-scale neuronal interactions in humans. The project will combine psychophysics, MEG, EEG, and non-invasive stimulation techniques to investigate large-scale neuronal interactions underlying visuomotor decision-making. The ideal candidate is highly motivated with a strong interest in interdisciplinary research. Candidates must have an MA (or equivalent) in neuroscience, psychology, physics, or related fields. Fluency in Matlab is required. Experience in electrophysiology and/or EEG/MEG is highly valued. Applications should include a detailed CV, statement of research interests, and names of at least two referees. Please email applications in PDF format to Markus Siegel (markus.siegel at uni-tuebingen.de) before July 10th, 2012. -- Dr. Markus Siegel Principal Investigator, Centre for Integrative Neuroscience (CIN), Tübingen From A.C.Schouten at tudelft.nl Wed Jun 20 10:02:32 2012 From: A.C.Schouten at tudelft.nl (Alfred Schouten - 3ME) Date: Wed, 20 Jun 2012 08:02:32 +0000 Subject: [FieldTrip] PhD positions - TU Delft Message-ID: The Department of Biomechanical Engineering is seeking three PhD students for the ERC Research Project "4D-EEG: A new tool to investigate the spatial and temporal activity patterns in the brain". 4D-EEG is a highly prestigious project to develop a novel method for investigating brain activity in healthy subjects and humans. The first goal of the project is to develop a new tool to determine brain activity at a high temporal and spatial resolution, with the focus on motor control. The method combines high density EEG and EEG source localisation with advanced robot manipulators to impose precise perturbations to the joints. Using system identification, the dynamic response of brain areas to the perturbation will be assessed, leading to a functional interpretation of the EEG with time. 4D-EEG will provide a direct measure of the neural activity in the brain related to motor control tasks. The second goal is to generate and validate new hypotheses about the longitudinal relationship between motor learning and neuroplasticity in patients suffering from a stroke. The non-invasive 4D-EEG technique combined with haptic robots will open a window into what and how patients (re)learn when showing motor recovery after stroke, in order to develop more effective patient-tailored therapies in neuro-rehabilitation. A further aim is to link these functional results with structural measurements, like Diffusion Tensor Imaging (e.g. DTI). The project consists of five subprojects, each requiring specific expertise. At this moment we are looking for three candidates for three subproject involving 1) EEG source localization, 2) Diffusion Tensor Imaging, 3) Neuromuscular modelling. You should have experience in one or more of the following fields: data acquisition and processing of electrophysiological and biomechanical signals, neuroimaging and EEG source localisation. You should have an affinity for experiments in human subjects and have extensive programming skills (e.g. Matlab or C++). You should have an MSc in (Bio)Mechanical or Electrical Engineering or in (applied) Mathematics or Physics. Excellent knowledge of English is a prerequisite. The successful candidates will be employed by Delft University of Technology for a fixed period of four years, within which he/she is expected to write a doctoral thesis. TU Delft offers an attractive benefits package, including a flexible work week, free high-speed Internet access from home (with contracts of two years or longer), and the option of assembling a customised compensation and benefits package (the 'IKA'). Salary and benefits are in accordance with the Collective Labour Agreement for Dutch Universities. For more information about this position, please contact Dr. A.C. Schouten, e-mail: a.c.schouten at tudelft.nl. To apply, please e-mail a detailed CV along with a letter of application by 1 July 2012 to M.J.B. Kole, application-3mE at tudelft.nl. When applying for this position, please refer to vacancy number 3ME12-20 and the specific subproject (- 1, - 2, or - 3). ------------------------------------------------------------------------------------ Alfred C. Schouten, PhD associate professor Neuromuscular Control Delft University of Technology, Faculty 3mE Biomechanical Engineering, room 5A-1-15 +31-(0)-152785247, http://www.3me.tudelft.nl/nmc University of Twente, Faculty CTW Biomechanical Engineering, room W210 +31-(0)-534892446, http://www.bw.ctw.utwente.nl/research/neuromechanics/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jun 20 17:26:37 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 17:26:37 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface Message-ID: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Dear Fieldtrip users and developpers, I would like to project and visualise time-frequency power values computed on planar gradient data at the sensors level onto the brain surface segmentated from the anatomial MRI of the subject. Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the scripts ? Does anyone see any inconvenient to this visualisation ? Thanks a lot for you help. Andrea -- NEW EMAIL: andrea.brovelli at univ-amu.fr From eelke.spaak at donders.ru.nl Wed Jun 20 18:03:36 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 20 Jun 2012 18:03:36 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: Dear Andrea, If I understand your question correctly, you just want to *visualise* sensor space activity on a brain surface, without doing source reconstruction first? I would advise against this. Time-frequency power values of your planar gradient data reflect the spectral characteristics of the magnetic gradient at the location of your sensors. These sensors are not located at the surface of the brain, but quite some centimeters away from it. Therefore, visualising the data as if it were actually recorded on the brain surface, without doing a proper transformation, is potentially misleading. It is true that people tend to display all sorts of data in a 'topoplot' fashion, but in that case it is clear to the audience that you are looking at a representation in sensor-space. Have a look at ft_topoplotTFR for this approach, if you're not already familiar with it. If you want to display your time-frequency activity on a cortical surface (which is of course a perfectly valid thing to want to do), you first should map the sensor activity to source space. This mapping is non-trivial and can be done by e.g. beamforming. See http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on this. That tutorial ends with a surface plot. Hope this helps! Best, Eelke On 20 June 2012 17:26, andrea brovelli wrote: > > Dear Fieldtrip users and developpers, > > I would like to project and visualise time-frequency power values computed > on planar gradient data at the sensors level onto the brain surface > segmentated from the anatomial MRI of the subject. > > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the > scripts ? > > Does anyone see any inconvenient to this visualisation ? > > Thanks a lot for you help. > > Andrea > > > > -- > >  NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johanna.zumer at donders.ru.nl Wed Jun 20 18:22:48 2012 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 20 Jun 2012 18:22:48 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: Dear Andrea, I would like to further clarify the options for this question. Perhaps could you suggest which inverse algorithm you had in mind? For example, it is possible to use beamforming limited only to voxels defined as lying on the cortical sheet (i.e. restrict .inside to be only the gray matter). This is possible, but you might miss out on the spatial peak of the source lying just 5mm away to the inside a bit. Thus, it would be better to do as Eelke suggested and apply beamforming to the whole inside of the brain, and then project those values to the surface for visualisation (which is easily done with the cfg.method='surface' option in ft_sourceplot). Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA or MNE) which are commonly used to reconstruct onto cortical surface voxels only. This works because the min-norm algorithms force all activity to lie in the region over which you select to reconstruct. Thus, a source 5mm inside of the surface will automatically get projected to the surface. I also agree with Eelke you should not just project sensors to surface without doing a specific type of inverse method. Cheers, Johanna 2012/6/20 Eelke Spaak > Dear Andrea, > > If I understand your question correctly, you just want to *visualise* > sensor space activity on a brain surface, without doing source > reconstruction first? I would advise against this. Time-frequency > power values of your planar gradient data reflect the spectral > characteristics of the magnetic gradient at the location of your > sensors. These sensors are not located at the surface of the brain, > but quite some centimeters away from it. Therefore, visualising the > data as if it were actually recorded on the brain surface, without > doing a proper transformation, is potentially misleading. It is true > that people tend to display all sorts of data in a 'topoplot' fashion, > but in that case it is clear to the audience that you are looking at a > representation in sensor-space. Have a look at ft_topoplotTFR for this > approach, if you're not already familiar with it. > > If you want to display your time-frequency activity on a cortical > surface (which is of course a perfectly valid thing to want to do), > you first should map the sensor activity to source space. This mapping > is non-trivial and can be done by e.g. beamforming. See > http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on > this. That tutorial ends with a surface plot. > > Hope this helps! > > Best, > Eelke > > On 20 June 2012 17:26, andrea brovelli > wrote: > > > > Dear Fieldtrip users and developpers, > > > > I would like to project and visualise time-frequency power values > computed > > on planar gradient data at the sensors level onto the brain surface > > segmentated from the anatomial MRI of the subject. > > > > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the > > scripts ? > > > > Does anyone see any inconvenient to this visualisation ? > > > > Thanks a lot for you help. > > > > Andrea > > > > > > > > -- > > > > NEW EMAIL: andrea.brovelli at univ-amu.fr > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jun 20 18:56:58 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 18:56:58 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> Message-ID: <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> Thank you very much for your quick reply, Eelke and Johanna. Yes, I would like only to visualise the data on a cortical surface and I am aware of the potential misinterpretation of such visualisation. I would like to use it as an intermediate step between the ft_topoplot on 2D layout and proper source localisation. It would serve as an exploratory tool to decide at which frequency, say, I would do a beamforming and to have a very rough idea of the number and location of cortical sources. However, it is not very clear to me how I could do this using the example in the beamforming tutorial. Could you be a bit more explicit ? Should I need to do source reconstruction for visualisation ? Thanks a lot Andrea ----- Messaggio da johanna.zumer at donders.ru.nl --------- Data: Wed, 20 Jun 2012 18:22:48 +0200 Da: Johanna Zumer Rispondi-A: FieldTrip discussion list Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface A: FieldTrip discussion list > Dear Andrea, > > I would like to further clarify the options for this question. Perhaps > could you suggest which inverse algorithm you had in mind? > > For example, it is possible to use beamforming limited only to voxels > defined as lying on the cortical sheet (i.e. restrict .inside to be only > the gray matter). This is possible, but you might miss out on the spatial > peak of the source lying just 5mm away to the inside a bit. Thus, it > would be better to do as Eelke suggested and apply beamforming to the whole > inside of the brain, and then project those values to the surface for > visualisation (which is easily done with the cfg.method='surface' option in > ft_sourceplot). > > Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA > or MNE) which are commonly used to reconstruct onto cortical surface voxels > only. This works because the min-norm algorithms force all activity to lie > in the region over which you select to reconstruct. Thus, a source 5mm > inside of the surface will automatically get projected to the surface. > > I also agree with Eelke you should not just project sensors to surface > without doing a specific type of inverse method. > > Cheers, > Johanna > > 2012/6/20 Eelke Spaak > >> Dear Andrea, >> >> If I understand your question correctly, you just want to *visualise* >> sensor space activity on a brain surface, without doing source >> reconstruction first? I would advise against this. Time-frequency >> power values of your planar gradient data reflect the spectral >> characteristics of the magnetic gradient at the location of your >> sensors. These sensors are not located at the surface of the brain, >> but quite some centimeters away from it. Therefore, visualising the >> data as if it were actually recorded on the brain surface, without >> doing a proper transformation, is potentially misleading. It is true >> that people tend to display all sorts of data in a 'topoplot' fashion, >> but in that case it is clear to the audience that you are looking at a >> representation in sensor-space. Have a look at ft_topoplotTFR for this >> approach, if you're not already familiar with it. >> >> If you want to display your time-frequency activity on a cortical >> surface (which is of course a perfectly valid thing to want to do), >> you first should map the sensor activity to source space. This mapping >> is non-trivial and can be done by e.g. beamforming. See >> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >> this. That tutorial ends with a surface plot. >> >> Hope this helps! >> >> Best, >> Eelke >> >> On 20 June 2012 17:26, andrea brovelli >> wrote: >> > >> > Dear Fieldtrip users and developpers, >> > >> > I would like to project and visualise time-frequency power values >> computed >> > on planar gradient data at the sensors level onto the brain surface >> > segmentated from the anatomial MRI of the subject. >> > >> > Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >> > scripts ? >> > >> > Does anyone see any inconvenient to this visualisation ? >> > >> > Thanks a lot for you help. >> > >> > Andrea >> > >> > >> > >> > -- >> > >> > NEW EMAIL: andrea.brovelli at univ-amu.fr >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From narayan.ps at tut.fi Wed Jun 20 19:08:40 2012 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Wed, 20 Jun 2012 20:08:40 +0300 Subject: [FieldTrip] EEG data as Matlab matrix Message-ID: <20120620200840.00005cf3@unknown> Hello all, I have EEG data in the format of matrix in Matlab (samples X channels). How can I import this into fieldtrip for further analysis ? I read that fieldtrip supports only standard EEG formats. Any help will be appreciated by this novice field trip user! -- Best Regards Narayan Puthanmadam Subramaniyam, M.Sc PhD student/researcher Department of Biomedical Engineering, Tampere University of Technology Finn Medi 1, 4th Floor, Room 203 FI 33520, Finland From Lilla.Magyari at mpi.nl Wed Jun 20 19:40:02 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 20 Jun 2012 19:40:02 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <20120620200840.00005cf3@unknown> References: <20120620200840.00005cf3@unknown> Message-ID: <4FE20AF2.4060502@mpi.nl> Hi, this FAQ describes how you can make your data compatible with FieldTrip: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat I hope this helps. Best, Lilla Narayan Puthanmadam Subramaniyam wrote: > Hello all, > > I have EEG data in the format of matrix in Matlab (samples X channels). > How can I import this into fieldtrip for further analysis ? I read that > fieldtrip supports only standard EEG formats. > > Any help will be appreciated by this novice field trip user! > > From andrea.brovelli at univ-amu.fr Wed Jun 20 20:44:37 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 20 Jun 2012 20:44:37 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> Message-ID: <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> Otherwise, to make things easier: is there a simple way to visualise a given topography in 3D (rather than in a 2D layout as done with ft_topoplotTFR) together with different segmented surfaces such as the skin or the brain meshes ? Thanks Andrea ----- Messaggio da andrea.brovelli at univ-amu.fr --------- Data: Wed, 20 Jun 2012 18:56:58 +0200 Da: andrea brovelli Rispondi-A: FieldTrip discussion list Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface A: FieldTrip discussion list > Thank you very much for your quick reply, Eelke and Johanna. > > Yes, I would like only to visualise the data on a cortical surface > and I am aware of the potential misinterpretation of such > visualisation. > > I would like to use it as an intermediate step between the > ft_topoplot on 2D layout and proper source localisation. It would > serve as an exploratory tool to decide at which frequency, say, I > would do a beamforming and to have a very rough idea of the number > and location of cortical sources. > > However, it is not very clear to me how I could do this using the > example in the beamforming tutorial. Could you be a bit more > explicit ? Should I need to do source reconstruction for > visualisation ? > > Thanks a lot > > Andrea > > > ----- Messaggio da johanna.zumer at donders.ru.nl --------- > Data: Wed, 20 Jun 2012 18:22:48 +0200 > Da: Johanna Zumer > Rispondi-A: FieldTrip discussion list > Oggetto: Re: [FieldTrip] Projection from sensors space to segmented > brain surface > A: FieldTrip discussion list > > >> Dear Andrea, >> >> I would like to further clarify the options for this question. Perhaps >> could you suggest which inverse algorithm you had in mind? >> >> For example, it is possible to use beamforming limited only to voxels >> defined as lying on the cortical sheet (i.e. restrict .inside to be only >> the gray matter). This is possible, but you might miss out on the spatial >> peak of the source lying just 5mm away to the inside a bit. Thus, it >> would be better to do as Eelke suggested and apply beamforming to the whole >> inside of the brain, and then project those values to the surface for >> visualisation (which is easily done with the cfg.method='surface' option in >> ft_sourceplot). >> >> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >> or MNE) which are commonly used to reconstruct onto cortical surface voxels >> only. This works because the min-norm algorithms force all activity to lie >> in the region over which you select to reconstruct. Thus, a source 5mm >> inside of the surface will automatically get projected to the surface. >> >> I also agree with Eelke you should not just project sensors to surface >> without doing a specific type of inverse method. >> >> Cheers, >> Johanna >> >> 2012/6/20 Eelke Spaak >> >>> Dear Andrea, >>> >>> If I understand your question correctly, you just want to *visualise* >>> sensor space activity on a brain surface, without doing source >>> reconstruction first? I would advise against this. Time-frequency >>> power values of your planar gradient data reflect the spectral >>> characteristics of the magnetic gradient at the location of your >>> sensors. These sensors are not located at the surface of the brain, >>> but quite some centimeters away from it. Therefore, visualising the >>> data as if it were actually recorded on the brain surface, without >>> doing a proper transformation, is potentially misleading. It is true >>> that people tend to display all sorts of data in a 'topoplot' fashion, >>> but in that case it is clear to the audience that you are looking at a >>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>> approach, if you're not already familiar with it. >>> >>> If you want to display your time-frequency activity on a cortical >>> surface (which is of course a perfectly valid thing to want to do), >>> you first should map the sensor activity to source space. This mapping >>> is non-trivial and can be done by e.g. beamforming. See >>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>> this. That tutorial ends with a surface plot. >>> >>> Hope this helps! >>> >>> Best, >>> Eelke >>> >>> On 20 June 2012 17:26, andrea brovelli >>> wrote: >>>> >>>> Dear Fieldtrip users and developpers, >>>> >>>> I would like to project and visualise time-frequency power values >>> computed >>>> on planar gradient data at the sensors level onto the brain surface >>>> segmentated from the anatomial MRI of the subject. >>>> >>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>> scripts ? >>>> >>>> Does anyone see any inconvenient to this visualisation ? >>>> >>>> Thanks a lot for you help. >>>> >>>> Andrea >>>> >>>> >>>> >>>> -- >>>> >>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> > > > ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- > > > -- > > NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From explena at gmail.com Thu Jun 21 06:19:06 2012 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 21 Jun 2012 12:19:06 +0800 Subject: [FieldTrip] instantaneous phase and phase locking value In-Reply-To: References: Message-ID: Hi, Although this might be a late reply, I would like to contribute my two cents and also would be glad to hear any comment. To calculate PLV 1. get and real and imaginary part of of Fourier coefficents for each trial for each sensor cfg.method = 'wavelet'; % 'mtmfft' works as well although I do not really look into the differences between the two cfg.keeptrials = 'yes'; cfg.output = 'fourier'; fourier_coefficent = ft_freqanalysis(cfg, data); 2. calculate the phase phase = arctangent of the imaginary Fourier coefficient divided by the real one. 3. calculate the phase difference between two sensors, i and j (Melloni et al. Journal of neuroscience 2007, 27:2858) phaseij = the phase of the sensor i multiplied by the complex conjugate of the second sensor j 4. calculate the PLV PLVij = the absolute value of the mean of the phaseij across all the trials On Thu, Jun 14, 2012 at 11:16 PM, Simon-Shlomo Poil < poil.simonshlomo at gmail.com> wrote: > Hi Qi, > > I also don't know how to calculate the phase locking value in > Fieldtrip. But you can do it in the Neurophysiological Biomarker > Toolbox http://www.nbtwiki.net/doku.php?id=tutorial:phase_locking_value > > It's a toolbox for EEGLAB, but it should be possible to either use the > functions directly on you fieldtrip signal, or simply convert the > signal to eeglab format.. > > Good luck! :) > Simon-Shlomo Poil > > 2012/6/13 qi li : > > Hi there, > > > > I am wondering whether fieldtrip has a function to compute the > > instantaneous phase and phase locking value. Thanks! > > > > Qi > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > -- > -- > Simon-Shlomo Poil > > Center of MR-Research > University Children’s Hospital Zurich > > Mobile number: +41 (0)76 399 5809 > Office number: +41 (0)44 266 3129 > Skype: poil.simonshlomo > Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and > http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From narayan.ps at tut.fi Thu Jun 21 11:55:13 2012 From: narayan.ps at tut.fi (Narayan) Date: Thu, 21 Jun 2012 12:55:13 +0300 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <4FE20AF2.4060502@mpi.nl> References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> Message-ID: <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Hi Thanks for the reply. I created the data structure as explained in the link using matlab data matrix. I am interested in preprocessing the EEG data ( filtering, artifact removal etc). How can I use this data structure to pass on to the functions that do preprocessing. When I use the ft_preprocessing function with cfg and data as input parameters, I get the following error ??? Error using ==> ft_checkdata at 265 This function requires raw data as input. Error in ==> ft_preprocessing at 281 data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); -- Best Regards, Narayan Quoting "Magyari, Lilla" : > Hi, > > this FAQ describes how you can make your data compatible with FieldTrip: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat > > I hope this helps. > > Best, > Lilla > > Narayan Puthanmadam Subramaniyam wrote: >> Hello all, >> >> I have EEG data in the format of matrix in Matlab (samples X channels). >> How can I import this into fieldtrip for further analysis ? I read that >> fieldtrip supports only standard EEG formats. >> >> Any help will be appreciated by this novice field trip user! >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From eelke.spaak at donders.ru.nl Thu Jun 21 12:04:56 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 21 Jun 2012 12:04:56 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: <20120621125513.147062r16nk3qr8c@webmail.tut.fi> References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: Hi Narayan, How does your data structure look after you import it? I.e. what do you get when you type >> data into matlab? (Assuming your structure is called 'data'.) Most likely, you did not convert your data 100% correctly, since ft_checkdata does not recognize it as proper fieldtrip data. Post the details, and we can probably help. Best, Eelke On 21 June 2012 11:55, Narayan wrote: > Hi > > Thanks for the reply. I created the data structure as explained in the link > using matlab data matrix. I am interested in preprocessing the EEG data ( > filtering, artifact removal etc). > > How can I use this data structure to pass on to the functions that do > preprocessing. When I use the ft_preprocessing function with cfg and data as > input parameters, I get the following error > > ??? Error using ==> ft_checkdata at 265 > This function requires raw data as input. > > Error in ==> ft_preprocessing at 281 >  data = ft_checkdata(data, 'datatype', 'raw', >  'hassampleinfo', 'yes'); > > > -- > Best Regards, > Narayan > > > > > Quoting "Magyari, Lilla" : > >> Hi, >> >> this FAQ describes how  you can make your data compatible with FieldTrip: >> >> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat >> >> I hope this helps. >> >> Best, >> Lilla >> >> Narayan Puthanmadam Subramaniyam wrote: >>> >>> Hello all, >>> >>> I have EEG data in the format of matrix in Matlab (samples X channels). >>> How can I import this into fieldtrip for further analysis ? I read that >>> fieldtrip supports only standard EEG formats. >>> >>> Any help will be appreciated by this novice field trip user! >>> >>> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From narayan.ps at tut.fi Thu Jun 21 13:00:32 2012 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Thu, 21 Jun 2012 14:00:32 +0300 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: <20120621140032.00000c8d@unknown> On Thu, 21 Jun 2012 12:04:56 +0200 Eelke Spaak wrote: > Hi Narayan, > > How does your data structure look after you import it? I.e. what do > you get when you type > > >> data > > into matlab? (Assuming your structure is called 'data'.) Most likely, > you did not convert your data 100% correctly, since ft_checkdata does > not recognize it as proper fieldtrip data. Post the details, and we > can probably help. > > Best, > Eelke > > On 21 June 2012 11:55, Narayan wrote: > > Hi > > > > Thanks for the reply. I created the data structure as explained in > > the link using matlab data matrix. I am interested in preprocessing > > the EEG data ( filtering, artifact removal etc). > > > > How can I use this data structure to pass on to the functions that > > do preprocessing. When I use the ft_preprocessing function with cfg > > and data as input parameters, I get the following error > > > > ??? Error using ==> ft_checkdata at 265 > > This function requires raw data as input. > > > > Error in ==> ft_preprocessing at 281 > >  data = ft_checkdata(data, 'datatype', 'raw', > >  'hassampleinfo', 'yes'); > > > > > > -- > > Best Regards, > > Narayan > > > > > > > > > > Quoting "Magyari, Lilla" : > > > >> Hi, > >> > >> this FAQ describes how  you can make your data compatible with > >> FieldTrip: > >> > >> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat > >> > >> I hope this helps. > >> > >> Best, > >> Lilla > >> > >> Narayan Puthanmadam Subramaniyam wrote: > >>> > >>> Hello all, > >>> > >>> I have EEG data in the format of matrix in Matlab (samples X > >>> channels). How can I import this into fieldtrip for further > >>> analysis ? I read that fieldtrip supports only standard EEG > >>> formats. > >>> > >>> Any help will be appreciated by this novice field trip user! > >>> > >>> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Hi I realized the mistake now. Instead of data.label, i had typed data.labels and hence the condition isfield(data, 'label') && isfield(data, 'time') && isa(data.time, 'cell') && isfield(data, 'trial') && isa(data.trial, 'cell') was getting violated. Thanks for the help! It works now! Now my data gives type as raw when I run the ft_datatype function. -- Best Regards Narayan Puthanmadam Subramaniyam, M.Sc PhD student/researcher Department of Biomedical Engineering, Tampere University of Technology Finn Medi 1, 4th Floor, Room 203 FI 33520, Finland From jan.schoffelen at donders.ru.nl Thu Jun 21 13:35:42 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 21 Jun 2012 13:35:42 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> Message-ID: <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> Caro Andrea, You might want to use ft_plot_topo3d for this purpose. This will plot the functional data onto the positions of the channels in 3D, but you need to create the to-be-plotted data as a single vector, and you will need the channel positions in 3D (which you'll get for free when working with MEG data, but which are generally not represented in EEG data). If you concurrently have a cortical reconstruction defined in the same coordinate system as the channels (and in the same metric units (otherwise use ft_convert_units first)), you can do a 'hold on' and use ft_plot_mesh for the visualization of the cortex. I guess that the ft_plot_topo3D has some functionality for transparency. Ciao, JM On Jun 20, 2012, at 8:44 PM, andrea brovelli wrote: > Otherwise, to make things easier: is there a simple way to visualise a given topography in 3D (rather than in a 2D layout as done with ft_topoplotTFR) together with different segmented surfaces such as the skin or the brain meshes ? > > Thanks > > Andrea > > > ----- Messaggio da andrea.brovelli at univ-amu.fr --------- > Data: Wed, 20 Jun 2012 18:56:58 +0200 > Da: andrea brovelli > Rispondi-A: FieldTrip discussion list > Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface > A: FieldTrip discussion list > > >> Thank you very much for your quick reply, Eelke and Johanna. >> >> Yes, I would like only to visualise the data on a cortical surface and I am aware of the potential misinterpretation of such visualisation. >> >> I would like to use it as an intermediate step between the ft_topoplot on 2D layout and proper source localisation. It would serve as an exploratory tool to decide at which frequency, say, I would do a beamforming and to have a very rough idea of the number and location of cortical sources. >> >> However, it is not very clear to me how I could do this using the example in the beamforming tutorial. Could you be a bit more explicit ? Should I need to do source reconstruction for visualisation ? >> >> Thanks a lot >> >> Andrea >> >> >> ----- Messaggio da johanna.zumer at donders.ru.nl --------- >> Data: Wed, 20 Jun 2012 18:22:48 +0200 >> Da: Johanna Zumer >> Rispondi-A: FieldTrip discussion list >> Oggetto: Re: [FieldTrip] Projection from sensors space to segmented brain surface >> A: FieldTrip discussion list >> >> >>> Dear Andrea, >>> >>> I would like to further clarify the options for this question. Perhaps >>> could you suggest which inverse algorithm you had in mind? >>> >>> For example, it is possible to use beamforming limited only to voxels >>> defined as lying on the cortical sheet (i.e. restrict .inside to be only >>> the gray matter). This is possible, but you might miss out on the spatial >>> peak of the source lying just 5mm away to the inside a bit. Thus, it >>> would be better to do as Eelke suggested and apply beamforming to the whole >>> inside of the brain, and then project those values to the surface for >>> visualisation (which is easily done with the cfg.method='surface' option in >>> ft_sourceplot). >>> >>> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >>> or MNE) which are commonly used to reconstruct onto cortical surface voxels >>> only. This works because the min-norm algorithms force all activity to lie >>> in the region over which you select to reconstruct. Thus, a source 5mm >>> inside of the surface will automatically get projected to the surface. >>> >>> I also agree with Eelke you should not just project sensors to surface >>> without doing a specific type of inverse method. >>> >>> Cheers, >>> Johanna >>> >>> 2012/6/20 Eelke Spaak >>> >>>> Dear Andrea, >>>> >>>> If I understand your question correctly, you just want to *visualise* >>>> sensor space activity on a brain surface, without doing source >>>> reconstruction first? I would advise against this. Time-frequency >>>> power values of your planar gradient data reflect the spectral >>>> characteristics of the magnetic gradient at the location of your >>>> sensors. These sensors are not located at the surface of the brain, >>>> but quite some centimeters away from it. Therefore, visualising the >>>> data as if it were actually recorded on the brain surface, without >>>> doing a proper transformation, is potentially misleading. It is true >>>> that people tend to display all sorts of data in a 'topoplot' fashion, >>>> but in that case it is clear to the audience that you are looking at a >>>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>>> approach, if you're not already familiar with it. >>>> >>>> If you want to display your time-frequency activity on a cortical >>>> surface (which is of course a perfectly valid thing to want to do), >>>> you first should map the sensor activity to source space. This mapping >>>> is non-trivial and can be done by e.g. beamforming. See >>>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>>> this. That tutorial ends with a surface plot. >>>> >>>> Hope this helps! >>>> >>>> Best, >>>> Eelke >>>> >>>> On 20 June 2012 17:26, andrea brovelli >>>> wrote: >>>>> >>>>> Dear Fieldtrip users and developpers, >>>>> >>>>> I would like to project and visualise time-frequency power values >>>> computed >>>>> on planar gradient data at the sensors level onto the brain surface >>>>> segmentated from the anatomial MRI of the subject. >>>>> >>>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>>> scripts ? >>>>> >>>>> Does anyone see any inconvenient to this visualisation ? >>>>> >>>>> Thanks a lot for you help. >>>>> >>>>> Andrea >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >> >> >> ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- >> >> >> -- >> >> NEW EMAIL: andrea.brovelli at univ-amu.fr >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- > > > -- > > NEW EMAIL: andrea.brovelli at univ-amu.fr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Thu Jun 21 13:46:12 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Thu, 21 Jun 2012 13:46:12 +0200 Subject: [FieldTrip] Projection from sensors space to segmented brain surface In-Reply-To: <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> References: <20120620172637.158625qti9441sps@wmelperso1.univmed.fr> <20120620185658.19677962l0ehui9s@wmelperso1.univmed.fr> <20120620204437.16877idrzdybgt1c@wmelperso1.univmed.fr> <93C1A622-D9E4-4FB4-8546-512ED25A801D@donders.ru.nl> Message-ID: <20120621134612.19545qotqy10d75s@wmelperso1.univmed.fr> Thank you all for your help. Andrea ----- Message de jan.schoffelen at donders.ru.nl --------- Date : Thu, 21 Jun 2012 13:35:42 +0200 De : jan-mathijs schoffelen Répondre à : FieldTrip discussion list Objet : Re: [FieldTrip] Projection from sensors space to segmented brain surface À : FieldTrip discussion list > Caro Andrea, > > You might want to use ft_plot_topo3d for this purpose. This will > plot the functional data onto the positions of the channels in 3D, > but you need to create the to-be-plotted data as a single vector, > and you will need the channel positions in 3D (which you'll get for > free when working with MEG data, but which are generally not > represented in EEG data). If you concurrently have a cortical > reconstruction defined in the same coordinate system as the channels > (and in the same metric units (otherwise use ft_convert_units > first)), you can do a 'hold on' and use ft_plot_mesh for the > visualization of the cortex. I guess that the ft_plot_topo3D has > some functionality for transparency. > > Ciao, > > JM > > > > On Jun 20, 2012, at 8:44 PM, andrea brovelli wrote: > >> Otherwise, to make things easier: is there a simple way to >> visualise a given topography in 3D (rather than in a 2D layout as >> done with ft_topoplotTFR) together with different segmented >> surfaces such as the skin or the brain meshes ? >> >> Thanks >> >> Andrea >> >> >> ----- Messaggio da andrea.brovelli at univ-amu.fr --------- >> Data: Wed, 20 Jun 2012 18:56:58 +0200 >> Da: andrea brovelli >> Rispondi-A: FieldTrip discussion list >> Oggetto: Re: [FieldTrip] Projection from sensors space to segmented >> brain surface >> A: FieldTrip discussion list >> >> >>> Thank you very much for your quick reply, Eelke and Johanna. >>> >>> Yes, I would like only to visualise the data on a cortical surface >>> and I am aware of the potential misinterpretation of such >>> visualisation. >>> >>> I would like to use it as an intermediate step between the >>> ft_topoplot on 2D layout and proper source localisation. It would >>> serve as an exploratory tool to decide at which frequency, say, I >>> would do a beamforming and to have a very rough idea of the number >>> and location of cortical sources. >>> >>> However, it is not very clear to me how I could do this using the >>> example in the beamforming tutorial. Could you be a bit more >>> explicit ? Should I need to do source reconstruction for >>> visualisation ? >>> >>> Thanks a lot >>> >>> Andrea >>> >>> >>> ----- Messaggio da johanna.zumer at donders.ru.nl --------- >>> Data: Wed, 20 Jun 2012 18:22:48 +0200 >>> Da: Johanna Zumer >>> Rispondi-A: FieldTrip discussion list >>> Oggetto: Re: [FieldTrip] Projection from sensors space to >>> segmented brain surface >>> A: FieldTrip discussion list >>> >>> >>>> Dear Andrea, >>>> >>>> I would like to further clarify the options for this question. Perhaps >>>> could you suggest which inverse algorithm you had in mind? >>>> >>>> For example, it is possible to use beamforming limited only to voxels >>>> defined as lying on the cortical sheet (i.e. restrict .inside to be only >>>> the gray matter). This is possible, but you might miss out on >>>> the spatial >>>> peak of the source lying just 5mm away to the inside a bit. Thus, it >>>> would be better to do as Eelke suggested and apply beamforming to >>>> the whole >>>> inside of the brain, and then project those values to the surface for >>>> visualisation (which is easily done with the cfg.method='surface' >>>> option in >>>> ft_sourceplot). >>>> >>>> Alternatively, you can use a min-norm type of inverse method (e.g. sLORETA >>>> or MNE) which are commonly used to reconstruct onto cortical >>>> surface voxels >>>> only. This works because the min-norm algorithms force all >>>> activity to lie >>>> in the region over which you select to reconstruct. Thus, a source 5mm >>>> inside of the surface will automatically get projected to the surface. >>>> >>>> I also agree with Eelke you should not just project sensors to surface >>>> without doing a specific type of inverse method. >>>> >>>> Cheers, >>>> Johanna >>>> >>>> 2012/6/20 Eelke Spaak >>>> >>>>> Dear Andrea, >>>>> >>>>> If I understand your question correctly, you just want to *visualise* >>>>> sensor space activity on a brain surface, without doing source >>>>> reconstruction first? I would advise against this. Time-frequency >>>>> power values of your planar gradient data reflect the spectral >>>>> characteristics of the magnetic gradient at the location of your >>>>> sensors. These sensors are not located at the surface of the brain, >>>>> but quite some centimeters away from it. Therefore, visualising the >>>>> data as if it were actually recorded on the brain surface, without >>>>> doing a proper transformation, is potentially misleading. It is true >>>>> that people tend to display all sorts of data in a 'topoplot' fashion, >>>>> but in that case it is clear to the audience that you are looking at a >>>>> representation in sensor-space. Have a look at ft_topoplotTFR for this >>>>> approach, if you're not already familiar with it. >>>>> >>>>> If you want to display your time-frequency activity on a cortical >>>>> surface (which is of course a perfectly valid thing to want to do), >>>>> you first should map the sensor activity to source space. This mapping >>>>> is non-trivial and can be done by e.g. beamforming. See >>>>> http://fieldtrip.fcdonders.nl/tutorial/beamformer for a tutorial on >>>>> this. That tutorial ends with a surface plot. >>>>> >>>>> Hope this helps! >>>>> >>>>> Best, >>>>> Eelke >>>>> >>>>> On 20 June 2012 17:26, andrea brovelli >>>>> wrote: >>>>>> >>>>>> Dear Fieldtrip users and developpers, >>>>>> >>>>>> I would like to project and visualise time-frequency power values >>>>> computed >>>>>> on planar gradient data at the sensors level onto the brain surface >>>>>> segmentated from the anatomial MRI of the subject. >>>>>> >>>>>> Can anyone suggest me how to do it in Fieldtrip ? Can anyone share the >>>>>> scripts ? >>>>>> >>>>>> Does anyone see any inconvenient to this visualisation ? >>>>>> >>>>>> Thanks a lot for you help. >>>>>> >>>>>> Andrea >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>> >>> >>> ----- Fine messaggio da johanna.zumer at donders.ru.nl ----- >>> >>> >>> -- >>> >>> NEW EMAIL: andrea.brovelli at univ-amu.fr >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> ----- Fine messaggio da andrea.brovelli at univ-amu.fr ----- >> >> >> -- >> >> NEW EMAIL: andrea.brovelli at univ-amu.fr >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > ----- Fin du message de jan.schoffelen at donders.ru.nl ----- -- NEW EMAIL: andrea.brovelli at univ-amu.fr From a.maye at uke.de Thu Jun 21 14:04:16 2012 From: a.maye at uke.de (Alexander Maye) Date: Thu, 21 Jun 2012 14:04:16 +0200 Subject: [FieldTrip] PhD Position in BCI, Univ. Medical Center Hamburg Message-ID: <223382712.sbGkH5R71O@mars.neurophys.uke.uni-hamburg.de> *PhD Student Position in Brain-Computer Interfaces* The International Research Training Group Hamburg – Beijing/China (Internationales Graduierten­kolleg) on Cross-modal Interaction in Natural and Artificial Cognitive Systems (CINACS) is seeking a highly qualified and motivated candidate for a doctoral position in Brain-Computer Interfaces (BCI). The training group is funded by the German Research Foundation (DFG), the State of Ham­burg, and the Ministry of Education of the People’s Republic of China. The candidate will also collaborate with the project “MULTISENSE – The merging of the senses: understanding multisensory experience”, funded by an ERC Advanced Investigators Grant. The major goal of this project is the investigation of dynamic, large-scale neural interactions and the characterization of functional networks during multisensory processing in the human brain, using techniques such as MEG, EEG, TMS, tACS and eye tracking. The dissertation project will be carried out at the Dept. of Neurophysiology and Pathophysiology of the University Medical Center Hamburg-Eppendorf (UKE). The UKE is the largest hospital in Hamburg, comprising 14 centers with 80 clinical and research departments. The Dept. of Neuro­physiology and Pathophysiology is headed by Prof. Dr. Andreas K. Engel. The research of Prof. Engel’s group focuses on cognitive and sensorimotor functions, which are studied in humans and animal models using neurophysiological and neuroimaging techniques. The project will build on strong interactions with the Dept. of Biomedical Engineering at the Tsinghua University in Beijing, China. Tsinghua University is among China's top universities, and the Dept. of Biomedical Engin­eering hosts one of the world's leading BCI research teams. The project will be focused on the integration of different modalities (e.g., vision, audition, and touch) into a unified BCI system. Using several modalities allows to employ proven BCI paradigms to increase the number of control channels. Research questions will be the possibility of gaining ad­ ditional information from switching attention between modalities, and the emergence of immersive control of the system after training with such a multimodal BCI system. Potential applications of the system to be developed are not only in classical BCI application fields like rehabilitation and prosthetics, but rather envisaged in everyday usage for computer control or in computer games. Applicants should have a master in computer science, physics or engineering, and excellent programming skills, as well as expertise in methods in signal processing, pattern recognition and classification. Experience in human electrophysiology would be an asset, but is not required. The position will be funded for up to three years, beginning Oct. 2012 or later. Applicants can have any nationality, female applicants are particularly welcome. Informal inquiries can be directed to Dr. Alexander Maye (a.maye at uke.de). Applicants should send their curriculum vitae, a statement of research interests, as well as names of two referees to Prof. Dr. Andreas K. Engel, Institut für Neurophysiologie und Pathophysiologie, Universitätsklinikum Ham­burg-Eppendorf, Martinistr. 52, 20246 Hamburg, Germany. Web ressources: www.cinacs.org www.tsinghua.edu.cn www.uke.de/neurophysiologie www.multisense.org www.40Hz.de -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- A non-text attachment was scrubbed... Name: BCI_PhD_position_UKE.pdf Type: application/pdf Size: 67604 bytes Desc: not available URL: From Lilla.Magyari at mpi.nl Thu Jun 21 14:19:33 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Thu, 21 Jun 2012 14:19:33 +0200 Subject: [FieldTrip] EEG data as Matlab matrix In-Reply-To: References: <20120620200840.00005cf3@unknown> <4FE20AF2.4060502@mpi.nl> <20120621125513.147062r16nk3qr8c@webmail.tut.fi> Message-ID: <4FE31155.5070105@mpi.nl> hi, and probably it would be also good to know how your cfg structure looks like that you input to ft_preprocessing. Lilla Eelke Spaak wrote: > Hi Narayan, > > How does your data structure look after you import it? I.e. what do > you get when you type > >>> data > > into matlab? (Assuming your structure is called 'data'.) Most likely, > you did not convert your data 100% correctly, since ft_checkdata does > not recognize it as proper fieldtrip data. Post the details, and we > can probably help. > > Best, > Eelke > > On 21 June 2012 11:55, Narayan wrote: >> Hi >> >> Thanks for the reply. I created the data structure as explained in the link >> using matlab data matrix. I am interested in preprocessing the EEG data ( >> filtering, artifact removal etc). >> >> How can I use this data structure to pass on to the functions that do >> preprocessing. When I use the ft_preprocessing function with cfg and data as >> input parameters, I get the following error >> >> ??? Error using ==> ft_checkdata at 265 >> This function requires raw data as input. >> >> Error in ==> ft_preprocessing at 281 >> data = ft_checkdata(data, 'datatype', 'raw', >> 'hassampleinfo', 'yes'); >> >> >> -- >> Best Regards, >> Narayan >> >> >> >> >> Quoting "Magyari, Lilla" : >> >>> Hi, >>> >>> this FAQ describes how you can make your data compatible with FieldTrip: >>> >>> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat >>> >>> I hope this helps. >>> >>> Best, >>> Lilla >>> >>> Narayan Puthanmadam Subramaniyam wrote: >>>> Hello all, >>>> >>>> I have EEG data in the format of matrix in Matlab (samples X channels). >>>> How can I import this into fieldtrip for further analysis ? I read that >>>> fieldtrip supports only standard EEG formats. >>>> >>>> Any help will be appreciated by this novice field trip user! >>>> >>>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From cornabel at googlemail.com Fri Jun 22 14:38:17 2012 From: cornabel at googlemail.com (cornelius abel) Date: Fri, 22 Jun 2012 14:38:17 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error Message-ID: <4FE46739.7010804@googlemail.com> Dear Fieldtrip list, i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. As a next step I tried to calculate a grand average using ft_sourcegrandaverage: cfg=[]; cfg.keepindividual='no'; cfg.parameter='avg.pow'; GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); giving me the following structure: GACont = pos: [3570x3 double] dim: [17 14 15] avg: [1x1 struct] var: [1x1 struct] dimord: 'voxel' inside: [1846x1 double] outside: [1724x1 double] df: [3570x1 double] cfg: [1x1 struct] but interpolating this onto an anatomy always gives me an error: cfg = []; cfg.downsample= 2; cfg.parameter = 'avg.avg.pow'; sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); /??? Error using ==> interpn at 155/ ///Wrong number of input arguments or some dimension of V is less than 2./ ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ ///Error in ==> ft_sourceinterpolate at 368/ ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ however interpolating a single subject source data works just fine... cfg = []; cfg.downsample= 2; cfg.parameter = 'avg.pow'; sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); What am i doing wrong here, any ideas? Greetings, Cornelius From jan.schoffelen at donders.ru.nl Sat Jun 23 08:19:14 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 23 Jun 2012 08:19:14 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <4FE46739.7010804@googlemail.com> References: <4FE46739.7010804@googlemail.com> Message-ID: Hi Cornelius, Could it be that the parameter 'avg.avg.pow' does not work? Best, JM On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > Dear Fieldtrip list, > > i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. > As a next step I tried to calculate a grand average using ft_sourcegrandaverage: > > cfg=[]; > cfg.keepindividual='no'; > cfg.parameter='avg.pow'; > GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); > > giving me the following structure: > > GACont = > pos: [3570x3 double] > dim: [17 14 15] > avg: [1x1 struct] > var: [1x1 struct] > dimord: 'voxel' > inside: [1846x1 double] > outside: [1724x1 double] > df: [3570x1 double] > cfg: [1x1 struct] > > but interpolating this onto an anatomy always gives me an error: > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); > > /??? Error using ==> interpn at 155/ > ///Wrong number of input arguments or some dimension of V is less than 2./ > ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ > ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ > ///Error in ==> ft_sourceinterpolate at 368/ > ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ > > however interpolating a single subject source data works just fine... > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); > > > What am i doing wrong here, any ideas? > > > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Sat Jun 23 16:05:37 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Sat, 23 Jun 2012 16:05:37 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: References: <4FE46739.7010804@googlemail.com> Message-ID: I have the same Problem. I can plot my LCMV-Beamformer results on an anatomy. And I can plot the results of the normalize script. But I can't plot the GrandAVG or the Stats results on that anatomy. The interpolate function doesn' work. Without anatomy it works just fine. Any hint? Thanks, Martin On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Cornelius, > > Could it be that the parameter 'avg.avg.pow' does not work? > > Best, > > JM > > On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > > Dear Fieldtrip list, > > i successfully beamformed some steady state activity and the sourceplots > per subject are looking very nice. > As a next step I tried to calculate a grand average using > ft_sourcegrandaverage: > > cfg=[]; > cfg.keepindividual='no'; > cfg.parameter='avg.pow'; > GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); > > giving me the following structure: > > GACont = > pos: [3570x3 double] > dim: [17 14 15] > avg: [1x1 struct] > var: [1x1 struct] > dimord: 'voxel' > inside: [1846x1 double] > outside: [1724x1 double] > df: [3570x1 double] > cfg: [1x1 struct] > > but interpolating this onto an anatomy always gives me an error: > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); > > /??? Error using ==> interpn at 155/ > ///Wrong number of input arguments or some dimension of V is less than 2./ > ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ > ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ > ///Error in ==> ft_sourceinterpolate at 368/ > ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, > cfg.feedback);/ > > however interpolating a single subject source data works just fine... > > cfg = []; > cfg.downsample= 2; > cfg.parameter = 'avg.pow'; > sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); > > > What am i doing wrong here, any ideas? > > > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Jun 23 22:01:54 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 23 Jun 2012 22:01:54 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: References: <4FE46739.7010804@googlemail.com> Message-ID: <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> Hi Martin, In general, the more info you can provide us with, the more likely it is that anybody can help you. The problem you sketch is too vague to even try start giving hints. It would be best if you could provide us with some detailed error messages to begin with. Even better would be if you create an account on our bugzilla-website, where you can also upload a script and some (small) data structure that would allow us to reproduce the problem. Best wishes, Jan-Mathijs PS: http://bugzilla.fcdonders.nl On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: > I have the same Problem. I can plot my LCMV-Beamformer results on an anatomy. And I can plot the results of the normalize script. But I can't plot the GrandAVG or the Stats results on that anatomy. The interpolate function doesn' work. Without anatomy it works just fine. > > Any hint? > > Thanks, Martin > > On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen wrote: > Hi Cornelius, > > Could it be that the parameter 'avg.avg.pow' does not work? > > Best, > > JM > > On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: > >> Dear Fieldtrip list, >> >> i successfully beamformed some steady state activity and the sourceplots per subject are looking very nice. >> As a next step I tried to calculate a grand average using ft_sourcegrandaverage: >> >> cfg=[]; >> cfg.keepindividual='no'; >> cfg.parameter='avg.pow'; >> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >> >> giving me the following structure: >> >> GACont = >> pos: [3570x3 double] >> dim: [17 14 15] >> avg: [1x1 struct] >> var: [1x1 struct] >> dimord: 'voxel' >> inside: [1846x1 double] >> outside: [1724x1 double] >> df: [3570x1 double] >> cfg: [1x1 struct] >> >> but interpolating this onto an anatomy always gives me an error: >> >> cfg = []; >> cfg.downsample= 2; >> cfg.parameter = 'avg.avg.pow'; >> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >> >> /??? Error using ==> interpn at 155/ >> ///Wrong number of input arguments or some dimension of V is less than 2./ >> ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ >> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >> ///Error in ==> ft_sourceinterpolate at 368/ >> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback);/ >> >> however interpolating a single subject source data works just fine... >> >> cfg = []; >> cfg.downsample= 2; >> cfg.parameter = 'avg.pow'; >> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >> >> >> What am i doing wrong here, any ideas? >> >> >> >> Greetings, Cornelius >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarang.hahm at gmail.com Mon Jun 25 04:57:51 2012 From: jarang.hahm at gmail.com (Jarang Hahm) Date: Mon, 25 Jun 2012 11:57:51 +0900 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) Message-ID: Dear FieldTrip user. Hi, I'm processing MEG data of Neuromag 306 system after removing some bad channels using fieldtrip-20120620 toolbox. To repair the bad channels with its neighbours, I firstly found the neighbor of all channel based on distance using 'ft_prepare_neighbours'. However, the outcome of neighbour was far more than default distance, 4cm, from a target channel. So, I checked thoroughly the code 'ft_prepare_neighbours', finding it used information of channel label and position from data’s hdr.grad to find neighbour of the target. The problem is channel label and position in hdr.grad are arranged differently. As far as I found, both information come from different source: the channel label was from code 'fiff_read_meas_info', while the channel position was from ‘channelposition’ in 'ft_datatype_sens'. And the channel label is sorted into the sensor location, e. g. MEG 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is arranged along the sensor type (magnetometer and gradiometer) according to its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. Thus, the label and position of channel in hdr.grad were mismatched so that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. It should be matched correctly to find the proper neighbour and ensure the result of repair as well. In fact, the code 'channelposition' in 'ft_datatype_sens' yield the channel label as well as the channel position. It might help to solve this problem. Is there any other way to solve this problem? Best, Jarang Hahm -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 10:44:59 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Mon, 25 Jun 2012 10:44:59 +0200 Subject: [FieldTrip] source analysis: common filter Message-ID: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> Dear all, Currently I am analyzing data of an experiment in which subjects perform two conditions in two sessions. They have been out of the MEG system between the sessions. For sourceanalysis I am using mni-normalized headmodels and grids. This because in the two sessions the subjects are probably seated slightly differently in the MEG system. (Thus I have separate headmodels and grids for the two sessions). Currently I am using a common filter for analyzing the two conditions within a session. I am wondering however if it would be (even) possible and if yes, more, or less correct to use a common filter over all conditions/sessions. Best Regards, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 11:01:22 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Mon, 25 Jun 2012 11:01:22 +0200 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Dear Jarang, Coincidentily I have been working on the same problem a few weeks ago. First of all you should take care that you repair a horizontal gradiometer with neighbouring horizontal gradiometers and vertical ones with vertical ones. This is not built into fieldtrip yet. I have have made a partial fix, which works with the 'layout' option but not with the 'grad' method. I have attached the function I addapted from Fieldtrip, and the layout files that seperatly name the different gradiometers (made by Elisabeth May ;-) ) I hope it somehow helps you! Best regards, Hanneke van Dijk ________________________________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: > Dear FieldTrip user. > > > > Hi, I'm processing MEG data of Neuromag 306 system after removing some bad > channels using fieldtrip-20120620 toolbox. > > > > To repair the bad channels with its neighbours, I firstly found the > neighbor of all channel based on distance using 'ft_prepare_neighbours'. > > However, the outcome of neighbour was far more than default distance, 4cm, > from a target channel. > > So, I checked thoroughly the code 'ft_prepare_neighbours', finding it used > information of channel label and position from data’s hdr.grad to find > neighbour of the target. > > > > The problem is channel label and position in hdr.grad are arranged > differently. > > As far as I found, both information come from different source: the > channel label was from code 'fiff_read_meas_info', while the channel > position was from ‘channelposition’ in 'ft_datatype_sens'. > > And the channel label is sorted into the sensor location, e. g. MEG 0113, > MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is > arranged along the sensor type (magnetometer and gradiometer) according to > its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., > MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. > > Thus, the label and position of channel in hdr.grad were mismatched so > that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. > > > It should be matched correctly to find the proper neighbour and ensure the > result of repair as well. > > In fact, the code 'channelposition' in 'ft_datatype_sens' yield the > channel label as well as the channel position. It might help to solve this > problem. > > > > Is there any other way to solve this problem? > > > > > Best, > > > Jarang Hahm > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neuromag_prepare_neighbours.m Type: application/octet-stream Size: 1823 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306hor.lay Type: application/octet-stream Size: 5238 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306ver.lay Type: application/octet-stream Size: 5235 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: batch_channel_repair.m Type: application/octet-stream Size: 410 bytes Desc: not available URL: From stan.vanpelt at fcdonders.ru.nl Mon Jun 25 13:10:00 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Mon, 25 Jun 2012 13:10:00 +0200 (CEST) Subject: [FieldTrip] source analysis: common filter In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> Message-ID: <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> Hi Hanneke, If my understanding is correct, you cannot use common filters over all sessions, exactly because of the reason you mention (different spatial relation between sensors and the head/brain). Using common filters within a session is ok of course (to look at effect of condition on a source's activity). What you could do as an alternative is compute virtual sensor time courses for the source-of-interest, separately for both sessions, and subsequently append these (source-level) data afterwards (and then your contrasts/statistics). Hope this helps. Stan -- Stan van Pelt, PhD Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstr. 46 60528 Frankfurt, Germany Website: www.esi-frankfurt.de E-mail: stan.vanpelt at esi-frankfurt.de Tel: +49 (0)69 96769 519 Fax: +49 (0)69 96769 555 ----- Oorspronkelijk bericht ----- > Van: "Hanneke vanDijk" > Aan: fieldtrip at donders.ru.nl > Verzonden: Maandag 25 juni 2012 10:44:59 > Onderwerp: [FieldTrip] source analysis: common filter > Dear all, > Currently I am analyzing data of an experiment in which subjects > perform two conditions in two sessions. They have been out of the MEG > system between the sessions. > For sourceanalysis I am using mni-normalized headmodels and grids. > This because in the two sessions the subjects are probably seated > slightly differently in the MEG system. (Thus I have separate > headmodels and grids for the two sessions). > Currently I am using a common filter for analyzing the two conditions > within a session. I am wondering however if it would be (even) > possible and if yes, more, or less correct to use a common filter over > all conditions/sessions. > Best Regards, > Hanneke > __________________________________________ > Hanneke van Dijk, PhD > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > Institute for Clinical Neuroscience, > Heinrich Heine Universit ä t D ü sseldorf, Germany > Hanneke.vanDijk at med.uni-duesseldorf.de > Tel. +49 (0) 211 81 13074 > __________________________________________ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 -------------- next part -------------- An HTML attachment was scrubbed... URL: From anette.giani at tuebingen.mpg.de Mon Jun 25 14:23:40 2012 From: anette.giani at tuebingen.mpg.de (Anette Giani) Date: Mon, 25 Jun 2012 14:23:40 +0200 Subject: [FieldTrip] Alignment problem in tutorial: Create MNI-aligned grids in individual head-space Message-ID: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> Dear fieldtrip users, I am running the tutorial: "Create MNI-aligned grids in individual head-space" (CASE 1). When using the template mri provided on the homepage (i.e. Subject01.mri), it seems like the grid, the resulting vol and the anatomy are not aligned. And even worse: besides the misalignment there seems to be a scaling. Note however, that I am using the exact same parameter as specified on the homepage. For a better understanding see page 1 of Alignment.pdf attached to this mail. I found out that things improve when I use the segmentation procedure specified in the tutorial: "Build a geometrical description of the volume conduction model of the head" (CASE 2). See page 2 of Alignment.pdf. In particular, in CASE 1 I do: cfg = []; cfg.downsample = 2; cfg.coordsys = 'ctf'; seg_MNItutorial = ft_volumesegment(cfg, mri); % plotting case 1 seg_MNItutorial.transform = mri.transform; seg_MNItutorial.anatomy = mri.anatomy; figure cfg.funparameter = 'gray'; ft_sourceplot(cfg,seg_MNItutorial); %segmented gray matter on top While, in CASE 2 I do: cfg = []; cfg.write = 'no'; cfg.coordsys = 'ctf'; cfg.output = {'scalp','skull','brain'}; seg_headmodelTutorial = ft_volumesegment(cfg, mri); % plotting case 2 mri_combine = mri; mri_combine.seg = seg_headmodelTutorial.scalp + 3*seg_headmodelTutorial.skull + 6*seg_headmodelTutorial.brain; mri_combine.mask = (mri_combine.seg)>0; cfg = []; cfg.interactive = 'yes'; cfg.funparameter = 'seg'; cfg.funcolormap = 'jet'; cfg.funcolorlim = [0 7]; cfg.opacitylim = [0 1.5]; cfg.maskparameter = 'mask'; figure, ft_sourceplot(cfg,mri_combine); I am confused, why CASE 2 works, while CASE 1 does not. Could anyone explain the differences to me? Is doing it like in CASE 2 correct at all? Thanks a lot in advance! Anette -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Alignment.pdf Type: application/pdf Size: 474703 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Jun 25 14:40:46 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 25 Jun 2012 14:40:46 +0200 Subject: [FieldTrip] Alignment problem in tutorial: Create MNI-aligned grids in individual head-space In-Reply-To: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> References: <008f01cd52cd$5abf1d20$103d5760$@tuebingen.mpg.de> Message-ID: <934CD08F-75B4-40F1-A20C-D399EDE30ACA@donders.ru.nl> Hi Anette, Case 1 does not look good because you are overlaying a low resolution image with a high resolution image. This is due to the cfg.downsample=2 before you call ft_volumesegment. (mri.anatomy is just 2^3 as big as the segmented images. Ft_sourceplot assumes all the to-be-plotted data to have the same physical size. Note that you replace the transformation matrix in the seg_MNItutorial variable with the transformation matrix from the mri-variable. This is incorrect, because the original mri has 1-mm resolution, whereas the segmented has 2-mm resolution. Best, Jan-Mathijs On Jun 25, 2012, at 2:23 PM, Anette Giani wrote: > Dear fieldtrip users, > > I am running the tutorial: “Create MNI-aligned grids in individual head-space” (CASE 1). When using the template mri provided on the homepage (i.e. Subject01.mri), it seems like the grid, the resulting vol and the anatomy are not aligned. And even worse: besides the misalignment there seems to be a scaling. Note however, that I am using the exact same parameter as specified on the homepage. For a better understanding see page 1 of Alignment.pdf attached to this mail. > > I found out that things improve when I use the segmentation procedure specified in the tutorial: “Build a geometrical description of the volume conduction model of the head” (CASE 2). See page 2 of Alignment.pdf. > > > In particular, in CASE 1 I do: > > cfg = []; > cfg.downsample = 2; > cfg.coordsys = 'ctf'; > seg_MNItutorial = ft_volumesegment(cfg, mri); > > % plotting case 1 > seg_MNItutorial.transform = mri.transform; > seg_MNItutorial.anatomy = mri.anatomy; > figure > cfg.funparameter = 'gray'; > ft_sourceplot(cfg,seg_MNItutorial); %segmented gray matter on top > > > > While, in CASE 2 I do: > > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'ctf'; > cfg.output = {'scalp','skull','brain'}; > seg_headmodelTutorial = ft_volumesegment(cfg, mri); > > % plotting case 2 > mri_combine = mri; > mri_combine.seg = seg_headmodelTutorial.scalp + 3*seg_headmodelTutorial.skull + 6*seg_headmodelTutorial.brain; > mri_combine.mask = (mri_combine.seg)>0; > cfg = []; > cfg.interactive = 'yes'; > cfg.funparameter = 'seg'; > cfg.funcolormap = 'jet'; > cfg.funcolorlim = [0 7]; > cfg.opacitylim = [0 1.5]; > cfg.maskparameter = 'mask'; > figure, ft_sourceplot(cfg,mri_combine); > > > I am confused, why CASE 2 works, while CASE 1 does not. Could anyone explain the differences to me? Is doing it like in CASE 2 correct at all? > > Thanks a lot in advance! > Anette > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Mon Jun 25 14:50:17 2012 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke van Dijk) Date: Mon, 25 Jun 2012 14:50:17 +0200 Subject: [FieldTrip] source analysis: common filter In-Reply-To: <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B029F8CB4@Mail2-UKD.VMED.UKD> <903363031.749934.1340622600647.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Stan, Thanks for your reply! Virtual channel analysis will be a step in my analysis as well! I hope I will get something sensible out of the whole head analysis though, that's (also) why I decided to use these mni_normalized grids. So to first do sourceanalysis for all sessions and conditions (--> all gridpoints are at the same positions for all subjects and sessions) and then compare the 'whole head' sources would also be valid I suppose. I then just have to live with the fact that I use different filters for the two sessions... Groetjes! Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ On Mon, Jun 25, 2012 at 1:10 PM, Stan van Pelt wrote: > Hi Hanneke, > > If my understanding is correct, you cannot use common filters over all > sessions, exactly because of the reason you mention (different spatial > relation between sensors and the head/brain). Using common filters within a > session is ok of course (to look at effect of condition on a source's > activity). > What you could do as an alternative is compute virtual sensor time courses > for the source-of-interest, separately for both sessions, and subsequently append > these (source-level) data afterwards (and then your contrasts/statistics). > > Hope this helps. > > Stan > > -- **** > > Stan van Pelt, PhD**** > > ** ** > > Ernst Strüngmann Institute (ESI)**** > > for Neuroscience in Cooperation with Max Planck Society **** > > Deutschordenstr. 46**** > > 60528 Frankfurt, Germany**** > > Website: www.esi-frankfurt.de**** > > E-mail: stan.vanpelt at esi-frankfurt.de**** > > Tel: +49 (0)69 96769 519**** > > Fax: +49 (0)69 96769 555**** > > ------------------------------ > > *Van: *"Hanneke vanDijk" > *Aan: *fieldtrip at donders.ru.nl > *Verzonden: *Maandag 25 juni 2012 10:44:59 > *Onderwerp: *[FieldTrip] source analysis: common filter > > > Dear all, > > > > Currently I am analyzing data of an experiment in which subjects perform > two conditions in two sessions. They have been out of the MEG system > between the sessions. > > > > For sourceanalysis I am using mni-normalized headmodels and grids. This > because in the two sessions the subjects are probably seated slightly > differently in the MEG system. (Thus I have separate headmodels and grids > for the two sessions). > > > > Currently I am using a common filter for analyzing the two conditions *within > *a session. I am wondering however if it would be (even) possible and if > yes, more, or less correct to use a common filter over all > conditions/sessions. > > > > Best Regards, > > > > Hanneke > > > > __________________________________________ > > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Stan van Pelt > > Donders Institute for Brain, Cognition and Behaviour, Radboud University > Nijmegen > Kapittelweg 29, 6525 EN Nijmegen, Netherlands > E-mail: stan.vanpelt at donders.ru.nl > Website: www.ru.nl/donders/ > Phone: (+31) (0)24 36 10981 > Fax: (+31) (0)24 36 10989 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Mon Jun 25 16:23:29 2012 From: fredericroux at hotmail.de (Frederic Roux) Date: Mon, 25 Jun 2012 16:23:29 +0200 Subject: [FieldTrip] ROI based analysis using ft_sourcestatistics Message-ID: Dear all, can anyone provide me some info on how to run a ROI based analysis with ft_sourcestatistics. On the mailing list I found a post from Jan 2011 by Marc Recasens, who reported the same problem that I have. Unfortunately, his post never seemded to be answered by anyone. Like Marc I use the following options: cfg.atlas = 'pathname/wfu_pickatlas/MNI_atlas/templates/TD_lobe.img' cfg.inputcoord = 'mni'; cfg.roi = ROI(8).Nom_C; and when I run ft_sourceanalysis the returned volume is empty. Any help or suggestions on how to run this correctly would be highly appreciated. Best, Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Mon Jun 25 16:23:54 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Mon, 25 Jun 2012 16:23:54 +0200 (CEST) Subject: [FieldTrip] source analysis: common filter In-Reply-To: Message-ID: <61733510.755171.1340634234691.JavaMail.root@sculptor.zimbra.ru.nl> Comparing the 'whole head'-sources like this sounds ok to me! Bets, Stan ----- Oorspronkelijk bericht ----- > Van: "Hanneke van Dijk" > Aan: "FieldTrip discussion list" > Verzonden: Maandag 25 juni 2012 14:50:17 > Onderwerp: Re: [FieldTrip] source analysis: common filter > Hi Stan, > Thanks for your reply! > Virtual channel analysis will be a step in my analysis as well! > I hope I will get something sensible out of the whole head analysis > though, that's (also) why I decided to use these mni_normalized grids. > So to first do sourceanalysis for all sessions and conditions (--> all > gridpoints are at the same positions for all subjects and sessions) > and then compare the 'whole head' sources would also be valid I > suppose. I then just have to live with the fact that I use different > filters for the two sessions... > Groetjes! > Hanneke > __________________________________________ > Hanneke van Dijk, PhD > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > Institute for Clinical Neuroscience, > Heinrich Heine Universit ä t D ü sseldorf, Germany > Hanneke.vanDijk at med.uni-duesseldorf.de > Tel. +49 (0) 211 81 13074 > __________________________________________ > On Mon, Jun 25, 2012 at 1:10 PM, Stan van Pelt < > stan.vanpelt at fcdonders.ru.nl > wrote: > > Hi Hanneke, > > If my understanding is correct, you cannot use common filters over > > all > > sessions, exactly because of the reason you mention (different > > spatial > > relation between sensors and the head/brain). Using common filters > > within a session is ok of course (to look at effect of condition on > > a > > source's activity). > > What you could do as an alternative is compute virtual sensor time > > courses for the source-of-interest, separately for both sessions, > > and > > subsequently append these (source-level) data afterwards (and then > > your contrasts/statistics). > > Hope this helps. > > Stan > > -- > > Stan van Pelt, PhD > > Ernst Strüngmann Institute (ESI) > > for Neuroscience in Cooperation with Max Planck Society > > Deutschordenstr. 46 > > 60528 Frankfurt, Germany > > Website: www.esi-frankfurt.de > > E-mail: stan.vanpelt at esi-frankfurt.de > > Tel: +49 (0)69 96769 519 > > Fax: +49 (0)69 96769 555 > > > Van: "Hanneke vanDijk" < Hanneke.vanDijk at med.uni-duesseldorf.de > > > > Aan: fieldtrip at donders.ru.nl > > > Verzonden: Maandag 25 juni 2012 10:44:59 > > > Onderwerp: [FieldTrip] source analysis: common filter > > > Dear all, > > > Currently I am analyzing data of an experiment in which subjects > > > perform two conditions in two sessions. They have been out of the > > > MEG > > > system between the sessions. > > > For sourceanalysis I am using mni-normalized headmodels and grids. > > > This because in the two sessions the subjects are probably seated > > > slightly differently in the MEG system. (Thus I have separate > > > headmodels and grids for the two sessions). > > > Currently I am using a common filter for analyzing the two > > > conditions > > > within a session. I am wondering however if it would be (even) > > > possible and if yes, more, or less correct to use a common filter > > > over > > > all conditions/sessions. > > > Best Regards, > > > Hanneke > > > __________________________________________ > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > > Institute for Clinical Neuroscience, > > > Heinrich Heine Universit ä t D ü sseldorf, Germany > > > Hanneke.vanDijk at med.uni-duesseldorf.de > > > Tel. +49 (0) 211 81 13074 > > > __________________________________________ > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > Stan van Pelt > > Donders Institute for Brain, Cognition and Behaviour, Radboud > > University Nijmegen > > Kapittelweg 29, 6525 EN Nijmegen, Netherlands > > E-mail: stan.vanpelt at donders.ru.nl > > Website: www.ru.nl/donders/ > > Phone: (+31) (0)24 36 10981 > > Fax: (+31) (0)24 36 10989 > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardoschenberg at gmail.com Mon Jun 25 17:09:35 2012 From: eduardoschenberg at gmail.com (Eduardo Schenberg) Date: Mon, 25 Jun 2012 12:09:35 -0300 Subject: [FieldTrip] EEG reference Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC@gmail.com> Hello all, I am new to this list, as I just started ding EEG experiments. I did some pilot tests with a BrainProducts/Brain Vision with an Acticap and I am doing some preliminary analysis using EEGLab/fieldtrip. I am now planning to buy my own EEG form Brain Products, but I am bothered by the fact that in most cap configs they sell, the reference is near Cz, usually FCz. As far as my knowledge goes, if I want to study power spectrum alterations and coherence in different frequencies between different electrodes, a reference in the head can be a problem, specially if some of the regions of interest are synchronous with the reference itself in the given frequency Can anyone point me to some good review or chapter about these issues so I can study them better and buy the best config available? Many many thanks for all eduardo schenberg From marcel.heers at googlemail.com Tue Jun 26 11:31:32 2012 From: marcel.heers at googlemail.com (Marcel Heers) Date: Tue, 26 Jun 2012 11:31:32 +0200 Subject: [FieldTrip] Source localization using DICS for EEG data from combined MEG/EEG recordings Message-ID: Dear all, I am trying to perform source localization in the frequency domain from EEG data using DICS. The data were recorded combined with MEG (Neuromag data format). The volume conductor is a 3 shell realistic head model created with bemcp. When running DICS with the following settings cfg = []; cfg.method = 'dics'; cfg.grad = elec; cfg.frequency = 14; cfg.vol = vol_eeg; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 5; source = ft_sourceanalysis(cfg, freq); I am am getting the following error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 568 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 314 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 584 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); and I am not sure what might be the cause. Maybe anyone can help me! Thank you in advance! Marcel From politzerahless at gmail.com Tue Jun 26 13:23:47 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 26 Jun 2012 19:23:47 +0800 Subject: [FieldTrip] EEG reference Message-ID: Eduardo, Steve Luck's (2005) book *An Introduction to the Event-Related Potentials Method* has a chapter discussing reference methods. If you search the archives of the EEGLAB mailing list there are also many recent discussions (including references) about this issue. I am not personally experienced with spectral analyses, but in general, the online reference you use during the recording does not matter very much, since you can re-calculate the data to any other reference offline. For example, in both labs where I have done experiments, we use various online references but always re-reference to the average of both mastoids during the offline analysis; this is a common procedure, if you want to do that all you need to do is make sure to buy a cap that includes mastoid electrodes. Another common procedure is to use the average reference (see Luck (2005) or the EEGLAB online wiki for detailed discussion about average reference); for that, the most important thing is for the cap to have sufficient electrodes, evenly covering enough of the head. Of course, there are also many other referencing procedures available. Best, Steve Politzer-Ahles > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 25 Jun 2012 12:09:35 -0300 > From: Eduardo Schenberg > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] EEG reference > Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Hello all, > > I am new to this list, as I just started ding EEG experiments. I did some > pilot tests with a BrainProducts/Brain Vision with an Acticap and I am > doing some preliminary analysis using EEGLab/fieldtrip. I am now planning > to buy my own EEG form Brain Products, but I am bothered by the fact that > in most cap configs they sell, the reference is near Cz, usually FCz. As > far as my knowledge goes, if I want to study power spectrum alterations and > coherence in different frequencies between different electrodes, a > reference in the head can be a problem, specially if some of the regions of > interest are synchronous with the reference itself in the given frequency > > Can anyone point me to some good review or chapter about these issues so I > can study them better and buy the best config available? > > Many many thanks for all > > eduardo schenberg > > > > > > ------------------------------ > > Message: 2 > Date: Tue, 26 Jun 2012 11:31:32 +0200 > From: Marcel Heers > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Source localization using DICS for EEG data from > combined MEG/EEG recordings > Message-ID: > > > Content-Type: text/plain; charset=ISO-8859-1 > > Dear all, > > I am trying to perform source localization in the frequency domain > from EEG data using DICS. The data were recorded combined with MEG > (Neuromag data format). The volume conductor is a 3 shell realistic > head model created with bemcp. > When running DICS with the following settings > > cfg = []; > cfg.method = 'dics'; > cfg.grad = elec; > cfg.frequency = 14; > cfg.vol = vol_eeg; > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = 5; > source = ft_sourceanalysis(cfg, freq); > > > I am am getting the following error message: > > ??? Error using ==> svd > Input to SVD must not contain NaN or Inf. > > Error in ==> beamformer_dics>pinv at 568 > [U,S,V] = svd(A,0); > > Error in ==> beamformer_dics at 314 > filt = pinv(lf' * invCf * lf) * lf' * invCf; % > Gross eqn. 3, use > PINV/SVD to cover rank deficient leadfield > > Error in ==> ft_sourceanalysis at 584 > dip(i) = beamformer_dics(grid, sens, vol, [], > squeeze(Cf(i,:,:)), optarg{:}); > > > and I am not sure what might be the cause. > > Maybe anyone can help me! Thank you in advance! > > Marcel > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 19, Issue 42 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Tue Jun 26 15:15:31 2012 From: cornabel at googlemail.com (cornelius abel) Date: Tue, 26 Jun 2012 15:15:31 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> References: <4FE46739.7010804@googlemail.com> <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> Message-ID: <4FE9B5F3.3080402@googlemail.com> Here is a workaround: It seems that it works if you copy the functional data from "GrandAVG .avg.avg.pow" to "GrandAVG .avg.pow" prior to interpolation (and then using cfg.parameter='avg.pow'). I posted it to the bugzilla system. Cornelius Am 23.06.2012 22:01, schrieb jan-mathijs schoffelen: > Hi Martin, > > In general, the more info you can provide us with, the more likely it > is that anybody can help you. The problem you sketch is too vague to > even try start giving hints. It would be best if you could provide us > with some detailed error messages to begin with. Even better would be > if you create an account on our bugzilla-website, where you can also > upload a script and some (small) data structure that would allow us to > reproduce the problem. > > Best wishes, > > Jan-Mathijs > > PS: http://bugzilla.fcdonders.nl > > > On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: > >> I have the same Problem. I can plot my LCMV-Beamformer results on an >> anatomy. And I can plot the results of the normalize script. But I >> can't plot the GrandAVG or the Stats results on that anatomy. The >> interpolate function doesn' work. Without anatomy it works just fine. >> >> Any hint? >> >> Thanks, Martin >> >> On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen >> > >> wrote: >> >> Hi Cornelius, >> >> Could it be that the parameter 'avg.avg.pow' does not work? >> >> Best, >> >> JM >> >> On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: >> >>> Dear Fieldtrip list, >>> >>> i successfully beamformed some steady state activity and the >>> sourceplots per subject are looking very nice. >>> As a next step I tried to calculate a grand average using >>> ft_sourcegrandaverage: >>> >>> cfg=[]; >>> cfg.keepindividual='no'; >>> cfg.parameter='avg.pow'; >>> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >>> >>> giving me the following structure: >>> >>> GACont = >>> pos: [3570x3 double] >>> dim: [17 14 15] >>> avg: [1x1 struct] >>> var: [1x1 struct] >>> dimord: 'voxel' >>> inside: [1846x1 double] >>> outside: [1724x1 double] >>> df: [3570x1 double] >>> cfg: [1x1 struct] >>> >>> but interpolating this onto an anatomy always gives me an error: >>> >>> cfg = []; >>> cfg.downsample= 2; >>> cfg.parameter = 'avg.avg.pow'; >>> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >>> >>> /??? Error using ==> interpn at 155/ >>> ///Wrong number of input arguments or some dimension of V is >>> less than 2./ >>> ///Error in ==> ft_sourceinterpolate>my_interpn at 464/ >>> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >>> ///Error in ==> ft_sourceinterpolate at 368/ >>> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), >>> cfg.interpmethod, cfg.feedback);/ >>> >>> however interpolating a single subject source data works just >>> fine... >>> >>> cfg = []; >>> cfg.downsample= 2; >>> cfg.parameter = 'avg.pow'; >>> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >>> >>> >>> What am i doing wrong here, any ideas? >>> >>> >>> >>> Greetings, Cornelius >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.urai.11 at ucl.ac.uk Tue Jun 26 16:00:37 2012 From: a.urai.11 at ucl.ac.uk (Anne Urai) Date: Tue, 26 Jun 2012 15:00:37 +0100 Subject: [FieldTrip] Cluster statistics - WCM Message-ID: When specifying the configuration of clusterstatistic, there are the options 'maxsum', 'max', 'maxsize' and 'wcm'. There seems to be no explanation of the 'wcm' option in the documentation that I can find, except that the option needs an extra cfg.wcm_weight. I am assuming that wcm means weights cluster means, and that the cfg.wcm_weight is used to specify priors about sensors/time/frequencies of interest. However, it is not clear what this cfg.wcm_weight should look like, which dimensions it should have and how the ft_freqstatistics treats those weights. It would be great if anyone could clarify this weighted cluster means. Assuming that I'm looking for effects in the data that might be quite focal in the time-frequency dimensions, would a weighting of ones (so equal weighting for all time and frequency points) pick up more clusters even if they are not very big in the time-frequency space? Thanks for your help! Anne Urai MSc Brain and Mind Sciences Institute of Neurology, University College London 07428392105 anne.urai -------------- next part -------------- An HTML attachment was scrubbed... URL: From ljbj_2009 at yahoo.com Tue Jun 26 17:03:43 2012 From: ljbj_2009 at yahoo.com (jie liu) Date: Tue, 26 Jun 2012 08:03:43 -0700 (PDT) Subject: [FieldTrip] TMSi fieldtrip data collection Message-ID: <1340723023.89313.YahooMailNeo@web160403.mail.bf1.yahoo.com> Dear All, I tried to collect data using TMSI refa and real-time buffer from FieldTrip, did some tests. using ft_realtime_signalviewer,but failed, could you guys please give me some comments or clues? if someone did experiment using TMSi system with fieldtrip, please show me some basic script for data collection using ft_read_data and convert the data to voltage using gain and offset. Any information would be greatly appreciated!Thank you! Jie cfg=[]; figure; ft_realtime_signalviewer(cfg) got such errors. errors: Invalid name for channel 1. Skipping the rest. ??? Error using ==> cell.unique at 47 Input must be a cell array of strings. Error in ==> ft_channelselection at 83 if length(datachannel)~=length(unique(datachannel)) Error in ==> ft_realtime_signalviewer at 75 cfg.channel = ft_channelselection(cfg.channel, hdr.label); Error in ==> test_Buffer_draw at 7 ft_realtime_signalviewer(cfg) -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Tue Jun 26 17:20:07 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Tue, 26 Jun 2012 11:20:07 -0400 Subject: [FieldTrip] EEG reference In-Reply-To: References: Message-ID: NeuroBoludo!! welcome! this is (I think) a book you have to read if you are working in EEG (at least some chapters). It's from Paul Nunez Electric Fields of the Brain: The Neurophysics of EEGIf you need more info about authors, just write me an email. Good to know about you! a big hug! Y On Tue, Jun 26, 2012 at 7:23 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Eduardo, > > Steve Luck's (2005) book *An Introduction to the Event-Related Potentials > Method* has a chapter discussing reference methods. If you search the > archives of the EEGLAB mailing list there are also many recent discussions > (including references) about this issue. > > I am not personally experienced with spectral analyses, but in general, > the online reference you use during the recording does not matter very > much, since you can re-calculate the data to any other reference offline. > For example, in both labs where I have done experiments, we use various > online references but always re-reference to the average of both mastoids > during the offline analysis; this is a common procedure, if you want to do > that all you need to do is make sure to buy a cap that includes mastoid > electrodes. Another common procedure is to use the average reference (see > Luck (2005) or the EEGLAB online wiki for detailed discussion about average > reference); for that, the most important thing is for the cap to have > sufficient electrodes, evenly covering enough of the head. Of course, there > are also many other referencing procedures available. > > Best, > Steve Politzer-Ahles > > >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Mon, 25 Jun 2012 12:09:35 -0300 >> From: Eduardo Schenberg >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] EEG reference >> Message-ID: <7D53A322-3BF0-46F4-8D4B-B72E5B973EEC at gmail.com> >> Content-Type: text/plain; charset=us-ascii >> >> >> Hello all, >> >> I am new to this list, as I just started ding EEG experiments. I did some >> pilot tests with a BrainProducts/Brain Vision with an Acticap and I am >> doing some preliminary analysis using EEGLab/fieldtrip. I am now planning >> to buy my own EEG form Brain Products, but I am bothered by the fact that >> in most cap configs they sell, the reference is near Cz, usually FCz. As >> far as my knowledge goes, if I want to study power spectrum alterations and >> coherence in different frequencies between different electrodes, a >> reference in the head can be a problem, specially if some of the regions of >> interest are synchronous with the reference itself in the given frequency >> >> Can anyone point me to some good review or chapter about these issues so >> I can study them better and buy the best config available? >> >> Many many thanks for all >> >> eduardo schenberg >> >> >> >> >> >> ------------------------------ >> >> Message: 2 >> Date: Tue, 26 Jun 2012 11:31:32 +0200 >> From: Marcel Heers >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] Source localization using DICS for EEG data from >> combined MEG/EEG recordings >> Message-ID: >> > xNecrA at mail.gmail.com> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> Dear all, >> >> I am trying to perform source localization in the frequency domain >> from EEG data using DICS. The data were recorded combined with MEG >> (Neuromag data format). The volume conductor is a 3 shell realistic >> head model created with bemcp. >> When running DICS with the following settings >> >> cfg = []; >> cfg.method = 'dics'; >> cfg.grad = elec; >> cfg.frequency = 14; >> cfg.vol = vol_eeg; >> cfg.dics.projectnoise = 'yes'; >> cfg.dics.lambda = 5; >> source = ft_sourceanalysis(cfg, freq); >> >> >> I am am getting the following error message: >> >> ??? Error using ==> svd >> Input to SVD must not contain NaN or Inf. >> >> Error in ==> beamformer_dics>pinv at 568 >> [U,S,V] = svd(A,0); >> >> Error in ==> beamformer_dics at 314 >> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use >> PINV/SVD to cover rank deficient leadfield >> >> Error in ==> ft_sourceanalysis at 584 >> dip(i) = beamformer_dics(grid, sens, vol, [], >> squeeze(Cf(i,:,:)), optarg{:}); >> >> >> and I am not sure what might be the cause. >> >> Maybe anyone can help me! Thank you in advance! >> >> Marcel >> >> >> ------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 19, Issue 42 >> ***************************************** >> > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Tue Jun 26 17:41:15 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Tue, 26 Jun 2012 17:41:15 +0200 Subject: [FieldTrip] ft_sourceinterpolate after grandaverage, interpn error In-Reply-To: <4FE9B5F3.3080402@googlemail.com> References: <4FE46739.7010804@googlemail.com> <67B5EF96-D03B-4DD4-85BF-5ABBA76550C1@donders.ru.nl> <4FE9B5F3.3080402@googlemail.com> Message-ID: i will try that, thank you very very much! On Tue, Jun 26, 2012 at 3:15 PM, cornelius abel wrote: > Here is a workaround: > It seems that it works if you copy the functional data from "GrandAVG > .avg.avg.pow" to "GrandAVG .avg.pow" prior to interpolation (and then using > cfg.parameter='avg.pow'). > > I posted it to the bugzilla system. > > Cornelius > > Am 23.06.2012 22:01, schrieb jan-mathijs schoffelen: > >> Hi Martin, >> >> In general, the more info you can provide us with, the more likely it is >> that anybody can help you. The problem you sketch is too vague to even try >> start giving hints. It would be best if you could provide us with some >> detailed error messages to begin with. Even better would be if you create >> an account on our bugzilla-website, where you can also upload a script and >> some (small) data structure that would allow us to reproduce the problem. >> >> Best wishes, >> >> Jan-Mathijs >> >> PS: http://bugzilla.fcdonders.nl >> >> >> On Jun 23, 2012, at 4:05 PM, Martin Winkels wrote: >> >> I have the same Problem. I can plot my LCMV-Beamformer results on an >>> anatomy. And I can plot the results of the normalize script. But I can't >>> plot the GrandAVG or the Stats results on that anatomy. The interpolate >>> function doesn' work. Without anatomy it works just fine. >>> >>> Any hint? >>> >>> Thanks, Martin >>> >>> On Sat, Jun 23, 2012 at 8:19 AM, jan-mathijs schoffelen < >>> jan.schoffelen at donders.ru.nl >> >>> wrote: >>> >>> Hi Cornelius, >>> >>> Could it be that the parameter 'avg.avg.pow' does not work? >>> >>> Best, >>> >>> JM >>> >>> On Jun 22, 2012, at 2:38 PM, cornelius abel wrote: >>> >>> Dear Fieldtrip list, >>>> >>>> i successfully beamformed some steady state activity and the >>>> sourceplots per subject are looking very nice. >>>> As a next step I tried to calculate a grand average using >>>> ft_sourcegrandaverage: >>>> >>>> cfg=[]; >>>> cfg.keepindividual='no'; >>>> cfg.parameter='avg.pow'; >>>> GACont= ft_sourcegrandaverage(cfg, AllsourceCont{:}); >>>> >>>> giving me the following structure: >>>> >>>> GACont = >>>> pos: [3570x3 double] >>>> dim: [17 14 15] >>>> avg: [1x1 struct] >>>> var: [1x1 struct] >>>> dimord: 'voxel' >>>> inside: [1846x1 double] >>>> outside: [1724x1 double] >>>> df: [3570x1 double] >>>> cfg: [1x1 struct] >>>> >>>> but interpolating this onto an anatomy always gives me an error: >>>> >>>> cfg = []; >>>> cfg.downsample= 2; >>>> cfg.parameter = 'avg.avg.pow'; >>>> sourceDiffInt= ft_sourceinterpolate(cfg, GACont , mri); >>>> >>>> /??? Error using ==> interpn at 155/ >>>> ///Wrong number of input arguments or some dimension of V is >>>> less than 2./ >>>> ///Error in ==> ft_sourceinterpolate>my_**interpn at 464/ >>>> ///av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);/ >>>> ///Error in ==> ft_sourceinterpolate at 368/ >>>> ///av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), >>>> cfg.interpmethod, cfg.feedback);/ >>>> >>>> however interpolating a single subject source data works just >>>> fine... >>>> >>>> cfg = []; >>>> cfg.downsample= 2; >>>> cfg.parameter = 'avg.pow'; >>>> sourceDiffInt= ft_sourceinterpolate(cfg, AllsourceCont{1} , mri); >>>> >>>> >>>> What am i doing wrong here, any ideas? >>>> >>>> >>>> >>>> Greetings, Cornelius >>>> >>>> ______________________________**_________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> > >>>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>>> >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> > >>> Telephone: +31-24-3614793 >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >>> >>> ______________________________**_________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> > >>> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >>> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> > >> >> Telephone: +31-24-3614793 >> >> >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From silvia.pagano at unitn.it Tue Jun 26 18:04:15 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Tue, 26 Jun 2012 18:04:15 +0200 Subject: [FieldTrip] multitaper and NaN Message-ID: Dear list subscribers, I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. Here's what I did following the tutorial: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4*cfg.foi; cfg.toi = -1.1:0.02:0.1; cfg.pad = 'maxperlen'; TFRmult = ft_freqanalysis(cfg, data); Does anyone have a clue on this? Thank you very much Silvia -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From conrado.bosman at gmail.com Tue Jun 26 18:41:46 2012 From: conrado.bosman at gmail.com (Conrado Bosman) Date: Tue, 26 Jun 2012 18:41:46 +0200 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Dear Silvia, The cfg.t_ftimwin parameter sets your current windows of analysis. In your actual configuration, you are using a pretty much similar wavelet approach in which your time window changes according to the frequency increase. Then your first time window is 5/2 = 2.5 sec which is bigger than your actual trial length (1.2 sec). Thats the reason why you get only NaNs in your low-frequency analyses and also a boundary of NaNs in the subsequent analyses. It is recommended to use in case of lower frequencies just one taper approach, unless you have several seconds of signal to analyze. Reading carefully, the Gould et al. suggestion goes in that direction. They said that they're using a .5 s window Ther (Rayleigh) frequency of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely what they described. So,according to this, I suggest you to use the following parameters: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; numfoi = length(cfg.foi) cfg.timwin = ones(1,numfoi).*0.5; cfg.tapsmofrq = ones(1,numfoi).*2; cfg.taper = 'hanning'; Best, Conrado On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > Dear list subscribers, > > I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) > > I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. > > Here's what I did following the tutorial: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = 5./cfg.foi; > cfg.tapsmofrq = 0.4*cfg.foi; > cfg.toi = -1.1:0.02:0.1; > cfg.pad = 'maxperlen'; > TFRmult = ft_freqanalysis(cfg, data); > > > Does anyone have a clue on this? > > > Thank you very much > > Silvia > -- > __________________________________ > > Silvia Pagano PhD student > CIMeC - Center for Mind/Brain Science > Corso Bettini, 31 38068 Rovereto (TN) > Tel. +39 0464 808709 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From inieuwenhuis at berkeley.edu Tue Jun 26 18:43:10 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Tue, 26 Jun 2012 09:43:10 -0700 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: <4FE9E69E.4050302@berkeley.edu> Hi Silvia, Also see here: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_contain_nans good luck, Ingrid On 6/26/2012 9:41 AM, Conrado Bosman wrote: > Dear Silvia, > > The cfg.t_ftimwin parameter sets your current windows of analysis. In your actual configuration, you are using a pretty much similar wavelet approach in which your time window changes according to the frequency increase. Then your first time window is 5/2 = 2.5 sec which is bigger than your actual trial length (1.2 sec). Thats the reason why you get only NaNs in your low-frequency analyses and also a boundary of NaNs in the subsequent analyses. > It is recommended to use in case of lower frequencies just one taper approach, unless you have several seconds of signal to analyze. Reading carefully, the Gould et al. suggestion goes in that direction. They said that they're using a .5 s window Ther (Rayleigh) frequency of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely what they described. So,according to this, I suggest you to use the following parameters: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > numfoi = length(cfg.foi) > cfg.timwin = ones(1,numfoi).*0.5; > cfg.tapsmofrq = ones(1,numfoi).*2; > cfg.taper = 'hanning'; > > Best, > Conrado > > > On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > >> Dear list subscribers, >> >> I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on >> all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) >> >> I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. >> >> Here's what I did following the tutorial: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = 'EEG'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 2:2:30; >> cfg.t_ftimwin = 5./cfg.foi; >> cfg.tapsmofrq = 0.4*cfg.foi; >> cfg.toi = -1.1:0.02:0.1; >> cfg.pad = 'maxperlen'; >> TFRmult = ft_freqanalysis(cfg, data); >> >> >> Does anyone have a clue on this? >> >> >> Thank you very much >> >> Silvia >> -- >> __________________________________ >> >> Silvia Pagano PhD student >> CIMeC - Center for Mind/Brain Science >> Corso Bettini, 31 38068 Rovereto (TN) >> Tel. +39 0464 808709 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 From rmontefusco at med.uchile.cl Tue Jun 26 18:49:52 2012 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Tue, 26 Jun 2012 12:49:52 -0400 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Hi Silvia, As I see in your config, you are using 5 cycles per frequency (cfg.t_ftimwin = 5./cfg.foi;), that means that for 2 Hz you need at least 500ms * 5 = 2.5 secs epochs to resolve that frequency. 1.- you can try with longer epochs...(eg 5 secs) 2.- using less cycles per freq. please someone correct me if I'm wrong cheers Y On Tue, Jun 26, 2012 at 12:04 PM, Silvia Pagano wrote: > Dear list subscribers, > > I am an ERPer looking for the first time into the world of time-frequency > analysis. I am trying to perform some multitaper analysis on a data set. > Ideally I would like to perform similar analysis as described in a paper by > Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words > "Time-frequency analysis was performed on > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms > temporal smoothing window, 2-Hz frequency resolution)" ) > > I have epochs from -1100 ms to 100 time locked to the stimulus onset and I > am trying to replicate the analysis they did. The problem is that I got > boundary effects on all my conditions, namely I obtain NaN in the extreme > 100 ms of the time window for all frequencies and for very low frequencies > (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time > windows large enough to avoid boundary effects, however there must be > something I am missing in my code. > > Here's what I did following the tutorial: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > cfg.t_ftimwin = 5./cfg.foi; > cfg.tapsmofrq = 0.4*cfg.foi; > cfg.toi = -1.1:0.02:0.1; > cfg.pad = 'maxperlen'; > TFRmult = ft_freqanalysis(cfg, data); > > > Does anyone have a clue on this? > > > Thank you very much > > Silvia > -- > __________________________________ > > Silvia Pagano PhD student > CIMeC - Center for Mind/Brain Science > Corso Bettini, 31 38068 Rovereto (TN) > Tel. +39 0464 808709 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Tue Jun 26 19:29:02 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 26 Jun 2012 12:29:02 -0500 Subject: [FieldTrip] cfg.bandwidth field missing Message-ID: Hello, I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. cfg = []; cfg.method = 'psi'; psi = ft_connectivityanalysis(cfg, freq); selection fourierspctrm along dimension 2 averaging crsspctrm over rpt removing dimension rpt from crsspctrm Reference to non-existent field 'bandwidth'. Error in ft_connectivityanalysis (line 719) nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1; -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Tue Jun 26 19:36:44 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 26 Jun 2012 12:36:44 -0500 Subject: [FieldTrip] resend: missing cfg.bandwidth field Message-ID: Hello, Apologies for the double email. I sent the previous one without finishing. I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. I don't find the bandwidth field to be output in any of the ft_freqanalysis functions. Is it simply the foi/some smoothing amount? *cfg = [];* *cfg.method = 'psi';* *psi = ft_connectivityanalysis(cfg, freq);* * * *selection fourierspctrm along dimension 2* *averaging crsspctrm over rpt* *removing dimension rpt from crsspctrm* *Reference to non-existent field 'bandwidth'.* * * *Error in ft_connectivityanalysis (line 719)* * nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1;* * * * * *freq was computed with the following:* * * *cfg = [];* *cfg.channel = chans; %{'MEG', '-A41','-A71'};* *cfg.channelcmb = chancmb;* *cfg.method = 'mtmconvol';* *cfg.output = 'fourier';* *cfg.keeptrials = 'yes';* *cfg.foi = band(1):band(2); %8:12Hz* *cfg.toi = 1.8:0.01:3.0;* *cfg.t_ftimwin = 5./cfg.foi;* *cfg.taper = 'hanning';* * * *freq = ft_freqanalysis(cfg, data);* * * * * * * Thanks you, Karl Doron, phd UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 26 20:14:25 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 26 Jun 2012 20:14:25 +0200 Subject: [FieldTrip] resend: missing cfg.bandwidth field In-Reply-To: References: Message-ID: Hi Karl, Just check the original paper: the bandwidth is a required parameter for the thing to be computed in the first place, because the metric is computed by integrating over a specified frequency band. You as a user should specify it; and even more so, the value is up to you ;-). JM On Jun 26, 2012, at 7:36 PM, Karl Doron wrote: > Hello, > > Apologies for the double email. I sent the previous one without finishing. > > I'm trying to use ft_connectivityanalysis with the phase slope index method. There is an error in ft_connectivityanalysis because the field "bandwidth" is missing. I don't find the bandwidth field to be output in any of the ft_freqanalysis functions. Is it simply the foi/some smoothing amount? > > cfg = []; > cfg.method = 'psi'; > psi = ft_connectivityanalysis(cfg, freq); > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Reference to non-existent field 'bandwidth'. > > Error in ft_connectivityanalysis (line 719) > nbin = nearest(data.freq, data.freq(1)+cfg.bandwidth)-1; > > > freq was computed with the following: > > cfg = []; > cfg.channel = chans; %{'MEG', '-A41','-A71'}; > cfg.channelcmb = chancmb; > cfg.method = 'mtmconvol'; > cfg.output = 'fourier'; > cfg.keeptrials = 'yes'; > cfg.foi = band(1):band(2); %8:12Hz > cfg.toi = 1.8:0.01:3.0; > cfg.t_ftimwin = 5./cfg.foi; > cfg.taper = 'hanning'; > > freq = ft_freqanalysis(cfg, data); > > > > Thanks you, > > Karl Doron, phd > UC, Santa Barbara > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Wed Jun 27 09:03:48 2012 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Wed, 27 Jun 2012 09:03:48 +0200 (CEST) Subject: [FieldTrip] multitaper and NaN In-Reply-To: Message-ID: <1215816663.779368.1340780628381.JavaMail.root@sculptor.zimbra.ru.nl> Dear Sylvia, If you want to keep the settings even more similar to Gould et al, you should set the cfg.foi to: cfg.foi=2:0.5:30 which corresponds to the 0.5 Hz steps. You have to keep in mind though that since your frequency resolution is actually 2Hz (as follows from the 500ms time window you put in), smaller steps than that (such as the 0.5 Hz steps I put in here) gives you redundant information. See also the tutorial at http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis. Best, Stan ----- Oorspronkelijk bericht ----- > Van: "Conrado Bosman" > Aan: "FieldTrip discussion list" > Verzonden: Dinsdag 26 juni 2012 18:41:46 > Onderwerp: Re: [FieldTrip] multitaper and NaN > Dear Silvia, > > The cfg.t_ftimwin parameter sets your current windows of analysis. In > your actual configuration, you are using a pretty much similar wavelet > approach in which your time window changes according to the frequency > increase. Then your first time window is 5/2 = 2.5 sec which is bigger > than your actual trial length (1.2 sec). Thats the reason why you get > only NaNs in your low-frequency analyses and also a boundary of NaNs > in the subsequent analyses. > It is recommended to use in case of lower frequencies just one taper > approach, unless you have several seconds of signal to analyze. > Reading carefully, the Gould et al. suggestion goes in that direction. > They said that they're using a .5 s window Ther (Rayleigh) frequency > of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely > what they described. So,according to this, I suggest you to use the > following parameters: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'EEG'; > cfg.method = 'mtmconvol'; > cfg.foi = 2:2:30; > numfoi = length(cfg.foi) > cfg.timwin = ones(1,numfoi).*0.5; > cfg.tapsmofrq = ones(1,numfoi).*2; > cfg.taper = 'hanning'; > > Best, > Conrado > > > On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote: > > > Dear list subscribers, > > > > I am an ERPer looking for the first time into the world of > > time-frequency analysis. I am trying to perform some multitaper > > analysis on a data set. Ideally I would like to perform similar > > analysis as described in a paper by Gould et al (2011) on Journal of > > Neurophysiology. (i.e. in their own words "Time-frequency analysis > > was performed on > > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, > > 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) > > > > I have epochs from -1100 ms to 100 time locked to the stimulus onset > > and I am trying to replicate the analysis they did. The problem is > > that I got boundary effects on all my conditions, namely I obtain > > NaN in the extreme 100 ms of the time window for all frequencies and > > for very low frequencies (e.g. 2-4Hz) I have no data in the whole > > time window. I thought I had time windows large enough to avoid > > boundary effects, however there must be something I am missing in my > > code. > > > > Here's what I did following the tutorial: > > > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = 'EEG'; > > cfg.method = 'mtmconvol'; > > cfg.foi = 2:2:30; > > cfg.t_ftimwin = 5./cfg.foi; > > cfg.tapsmofrq = 0.4*cfg.foi; > > cfg.toi = -1.1:0.02:0.1; > > cfg.pad = 'maxperlen'; > > TFRmult = ft_freqanalysis(cfg, data); > > > > > > Does anyone have a clue on this? > > > > > > Thank you very much > > > > Silvia > > -- > > __________________________________ > > > > Silvia Pagano PhD student > > CIMeC - Center for Mind/Brain Science > > Corso Bettini, 31 38068 Rovereto (TN) > > Tel. +39 0464 808709 > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Stan van Pelt Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen Kapittelweg 29, 6525 EN Nijmegen, Netherlands E-mail: stan.vanpelt at donders.ru.nl Website: www.ru.nl/donders/ Phone: (+31) (0)24 36 10981 Fax: (+31) (0)24 36 10989 From silvia.pagano at unitn.it Wed Jun 27 09:26:52 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Wed, 27 Jun 2012 09:26:52 +0200 Subject: [FieldTrip] multitaper and NaN In-Reply-To: References: Message-ID: Hi all, thank you a lot for your suggestions. The thing that was not clear to me was the parameter that expresses Raleigh frequency in Fieldtrip. Now it makes much more sense. Thanks again, I will try with your suggestions and see what happens Cheers Silvia On Tue, Jun 26, 2012 at 6:49 PM, Rodrigo Montefusco < rmontefusco at med.uchile.cl> wrote: > Hi Silvia, > > As I see in your config, you are using 5 cycles per frequency > (cfg.t_ftimwin = 5./cfg.foi;), that means that for 2 Hz you need at least > 500ms * 5 = 2.5 secs epochs to resolve that frequency. > 1.- you can try with longer epochs...(eg 5 secs) > 2.- using less cycles per freq. > > please someone correct me if I'm wrong > > cheers > > Y > > On Tue, Jun 26, 2012 at 12:04 PM, Silvia Pagano wrote: > >> Dear list subscribers, >> >> I am an ERPer looking for the first time into the world of time-frequency >> analysis. I am trying to perform some multitaper analysis on a data set. >> Ideally I would like to perform similar analysis as described in a paper by >> Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words >> "Time-frequency analysis was performed on >> all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms >> temporal smoothing window, 2-Hz frequency resolution)" ) >> >> I have epochs from -1100 ms to 100 time locked to the stimulus onset and >> I am trying to replicate the analysis they did. The problem is that I got >> boundary effects on all my conditions, namely I obtain NaN in the extreme >> 100 ms of the time window for all frequencies and for very low frequencies >> (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time >> windows large enough to avoid boundary effects, however there must be >> something I am missing in my code. >> >> Here's what I did following the tutorial: >> >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = 'EEG'; >> cfg.method = 'mtmconvol'; >> cfg.foi = 2:2:30; >> cfg.t_ftimwin = 5./cfg.foi; >> cfg.tapsmofrq = 0.4*cfg.foi; >> cfg.toi = -1.1:0.02:0.1; >> cfg.pad = 'maxperlen'; >> TFRmult = ft_freqanalysis(cfg, data); >> >> >> Does anyone have a clue on this? >> >> >> Thank you very much >> >> Silvia >> -- >> __________________________________ >> >> Silvia Pagano PhD student >> CIMeC - Center for Mind/Brain Science >> Corso Bettini, 31 38068 Rovereto (TN) >> Tel. +39 0464 808709 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From silvia.pagano at unitn.it Wed Jun 27 09:35:12 2012 From: silvia.pagano at unitn.it (Silvia Pagano) Date: Wed, 27 Jun 2012 09:35:12 +0200 Subject: [FieldTrip] Fwd: FW: multitaper and NaN In-Reply-To: References: Message-ID: Hi all, Ian Gould, the author of the paper I cited in my previous mail, also replied to me. He kindly asked me to post his reply on the mailing list. Thanks again for your help Silvia ---------- Forwarded message ---------- From: Ian Gould Date: Tue, Jun 26, 2012 at 6:57 PM Subject: FW: [FieldTrip] multitaper and NaN To: "Pagano, Silvia" Hi Silvia, Although I'm not subscribed to it at the moment, a friend of mine monitors the field trip email list and forwarded your question to me. The boundary effects you are talking about occur because oscillatory signals have to be computed over a time window. The time window width is specified for each frequency you are analysing in cfg.t_ftimwin, and is centred on the time point you are trying to compute power at. So, if the half-width of the window is greater than the distance from a time point to the edge of your data, field trip will not be able to compute power at that frequency. The solution to this is to (1) use a shorter time window, and/or (2) calculate data over longer epochs so the boundary effect doesn't affect the time points you are interested in. In the code you posted, the time window varies with frequency, unlike the fixed window we used in our JNeurophys paper. Your missing data at lower frequencies are explained by this. For example, you'd need 2.5s of data to estimate power at 2Hz with your settings. To get 500ms smoothing you could use: cfg.t_ftimwin = 0.5 *ones(1,length(cfg.foi)); Similarly, for 2Hz smoothing you'd want something like: cfg.tapsmofrq = 2*ones(1,length(cfg.foi)); Finally, for 50ms steps you'd want: cfg.toi = -1.1:0.05:0.1; Hope that helps. Let me know if any other questions. Also, could you please post this to the list on my behalf, so others know that your question has been answered. Kind Regards, Ian From: Andre Cravo Date: Tuesday, 26 June 2012 17:11 To: Ian Gould , "ian.gould at merton.ox.ac.uk" < ian.gould at merton.ox.ac.uk> Subject: Fwd: [FieldTrip] multitaper and NaN Hello Ian, How are you? I hope all is well. I'm pretty sure you get fieldtrip emails, but I saw this one and thought you might like to give a help. Cheers Andre ---------- Forwarded message ---------- From: Silvia Pagano Date: 26 June 2012 13:04 Subject: [FieldTrip] multitaper and NaN To: fieldtrip at science.ru.nl Dear list subscribers, I am an ERPer looking for the first time into the world of time-frequency analysis. I am trying to perform some multitaper analysis on a data set. Ideally I would like to perform similar analysis as described in a paper by Gould et al (2011) on Journal of Neurophysiology. (i.e. in their own words "Time-frequency analysis was performed on all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps, 500-ms temporal smoothing window, 2-Hz frequency resolution)" ) I have epochs from -1100 ms to 100 time locked to the stimulus onset and I am trying to replicate the analysis they did. The problem is that I got boundary effects on all my conditions, namely I obtain NaN in the extreme 100 ms of the time window for all frequencies and for very low frequencies (e.g. 2-4Hz) I have no data in the whole time window. I thought I had time windows large enough to avoid boundary effects, however there must be something I am missing in my code. Here's what I did following the tutorial: cfg = []; cfg.output = 'pow'; cfg.channel = 'EEG'; cfg.method = 'mtmconvol'; cfg.foi = 2:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4*cfg.foi; cfg.toi = -1.1:0.02:0.1; cfg.pad = 'maxperlen'; TFRmult = ft_freqanalysis(cfg, data); Does anyone have a clue on this? Thank you very much Silvia -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andre M. Cravo Postdoctoral Researcher University of Sao Paulo-Brazil -- __________________________________ Silvia Pagano PhD student CIMeC - Center for Mind/Brain Science Corso Bettini, 31 38068 Rovereto (TN) Tel. +39 0464 808709 -------------- next part -------------- An HTML attachment was scrubbed... URL: From acorneyllie at olfac.univ-lyon1.fr Wed Jun 27 10:38:03 2012 From: acorneyllie at olfac.univ-lyon1.fr (acorneyllie at olfac.univ-lyon1.fr) Date: Wed, 27 Jun 2012 10:38:03 +0200 (CEST) Subject: [FieldTrip] help about Fieldtrip Multivariate Module Message-ID: <4850ff08aa0483a2cd3bc77e5ad6157d.squirrel@olfac.univ-lyon1.fr> Dear all, I'm starting to use fieldtrip to analyse EEG data : I would like to select channels and extract representative features of 18 cognitive tasks. The signal comes from a 96ch brain product system. To begin, I made the anlysis offline. Using the tutorial, I had imported, rereferenced and preprocessed the data (find the good layout, extract trials, remove artifacts,..) and made some first analysis using the toolbox. (pca, time frequency representation, average spectrum over trials and subjects,..). (By the way, the fieldtrip toolbox is brilliant) I'm really interested on using the FieldTrip Multivariate Module but I'm having difficulties to get started. Is there an usage example ? My data (after preprocessing) are organized, for each subject, on a structure of 18 stuctures (one for each task) each corresponding to the output of ft_preprocessing. I also get the same organization for the spectral corresponding values. Do you think it's a good way to process ? Feel free to ask me more details or give advices. Thanks for your implication, Best, Alexandra Corneyllie CAP engineer team CNRS UMR5292 - INSERM U1028 Lyon Neuroscience Research Center CRNL Phone + 33 04.37.28.74.90 From jarang.hahm at gmail.com Wed Jun 27 13:00:07 2012 From: jarang.hahm at gmail.com (Jarang Hahm) Date: Wed, 27 Jun 2012 20:00:07 +0900 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Dear Hanneke, Thanks to you, I properly found neighbours. :-) And I confirmed it by plotting the neighbours. To do this, I modified a code 'ft_plotneighbours' for correcting a mismatch between the channel position and label. You also probably need this code, so I have attatched what I modified. :-) Thanks! Best, Jarang Hahm On Mon, Jun 25, 2012 at 6:01 PM, Hanneke van Dijk < Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > Dear Jarang, > > Coincidentily I have been working on the same problem a few weeks ago. > > First of all you should take care that you repair a horizontal gradiometer > with neighbouring horizontal gradiometers and vertical ones with vertical > ones. This is not built into fieldtrip yet. > > I have have made a partial fix, which works with the 'layout' option but > not with the 'grad' method. I have attached the function I addapted from > Fieldtrip, and the layout files that seperatly name the different > gradiometers (made by Elisabeth May ;-) ) > > I hope it somehow helps you! > > Best regards, > > Hanneke van Dijk > > ________________________________________________________________ > > > Hanneke van Dijk, PhD > > > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > Institute for Clinical Neuroscience, > > Heinrich Heine Universität Düsseldorf, Germany > > Hanneke.vanDijk at med.uni-duesseldorf.de > > Tel. +49 (0) 211 81 13074 > > __________________________________________ > > > On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: > >> Dear FieldTrip user. >> >> >> >> Hi, I'm processing MEG data of Neuromag 306 system after removing some >> bad channels using fieldtrip-20120620 toolbox. >> >> >> >> To repair the bad channels with its neighbours, I firstly found the >> neighbor of all channel based on distance using 'ft_prepare_neighbours'. >> >> However, the outcome of neighbour was far more than default distance, >> 4cm, from a target channel. >> >> So, I checked thoroughly the code 'ft_prepare_neighbours', finding it >> used information of channel label and position from data’s hdr.grad to find >> neighbour of the target. >> >> >> >> The problem is channel label and position in hdr.grad are arranged >> differently. >> >> As far as I found, both information come from different source: the >> channel label was from code 'fiff_read_meas_info', while the channel >> position was from ‘channelposition’ in 'ft_datatype_sens'. >> >> And the channel label is sorted into the sensor location, e. g. MEG >> 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is >> arranged along the sensor type (magnetometer and gradiometer) according to >> its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., >> MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. >> >> Thus, the label and position of channel in hdr.grad were mismatched so >> that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. >> >> >> It should be matched correctly to find the proper neighbour and ensure >> the result of repair as well. >> >> In fact, the code 'channelposition' in 'ft_datatype_sens' yield the >> channel label as well as the channel position. It might help to solve this >> problem. >> >> >> >> Is there any other way to solve this problem? >> >> >> >> >> Best, >> >> >> Jarang Hahm >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- 함자랑 드림. Jarang Hahm Interdisciplinary Program in Cognitive Science Seoul National University Seoul, Korea, Republic of. +82-10-9079-3121 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: neuromag_neighbourplot.m Type: application/octet-stream Size: 7578 bytes Desc: not available URL: From hanneke.p.van.dijk at gmail.com Wed Jun 27 13:04:36 2012 From: hanneke.p.van.dijk at gmail.com (Hanneke van Dijk) Date: Wed, 27 Jun 2012 13:04:36 +0200 Subject: [FieldTrip] Mismatch between channel label and position in hdr.grad (Neuromag 306 system) In-Reply-To: References: Message-ID: Hi Jarang, Thanks for the code! I'm happy I could help you! Best, Hanneke Op 27 jun. 2012 13:00 schreef "Jarang Hahm" het volgende: > Dear Hanneke, > > > Thanks to you, I properly found neighbours. :-) > > And I confirmed it by plotting the neighbours. To do this, I modified a > code 'ft_plotneighbours' for correcting a mismatch between the channel > position and label. > > You also probably need this code, so I have attatched what I modified. :-) > > > Thanks! > > > Best, > > > Jarang Hahm > > > On Mon, Jun 25, 2012 at 6:01 PM, Hanneke van Dijk < > Hanneke.vanDijk at med.uni-duesseldorf.de> wrote: > >> Dear Jarang, >> >> Coincidentily I have been working on the same problem a few weeks ago. >> >> First of all you should take care that you repair a horizontal >> gradiometer with neighbouring horizontal gradiometers and vertical ones >> with vertical ones. This is not built into fieldtrip yet. >> >> I have have made a partial fix, which works with the 'layout' option but >> not with the 'grad' method. I have attached the function I addapted from >> Fieldtrip, and the layout files that seperatly name the different >> gradiometers (made by Elisabeth May ;-) ) >> >> I hope it somehow helps you! >> >> Best regards, >> >> Hanneke van Dijk >> >> ________________________________________________________________ >> >> >> Hanneke van Dijk, PhD >> >> >> http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html >> >> Institute for Clinical Neuroscience, >> >> Heinrich Heine Universität Düsseldorf, Germany >> >> Hanneke.vanDijk at med.uni-duesseldorf.de >> >> Tel. +49 (0) 211 81 13074 >> >> __________________________________________ >> >> >> On Mon, Jun 25, 2012 at 4:57 AM, Jarang Hahm wrote: >> >>> Dear FieldTrip user. >>> >>> >>> >>> Hi, I'm processing MEG data of Neuromag 306 system after removing some >>> bad channels using fieldtrip-20120620 toolbox. >>> >>> >>> >>> To repair the bad channels with its neighbours, I firstly found the >>> neighbor of all channel based on distance using 'ft_prepare_neighbours'. >>> >>> However, the outcome of neighbour was far more than default distance, >>> 4cm, from a target channel. >>> >>> So, I checked thoroughly the code 'ft_prepare_neighbours', finding it >>> used information of channel label and position from data’s hdr.grad to find >>> neighbour of the target. >>> >>> >>> >>> The problem is channel label and position in hdr.grad are arranged >>> differently. >>> >>> As far as I found, both information come from different source: the >>> channel label was from code 'fiff_read_meas_info', while the channel >>> position was from ‘channelposition’ in 'ft_datatype_sens'. >>> >>> And the channel label is sorted into the sensor location, e. g. MEG >>> 0113, MEG 0112, MEG 0111, MEG 0122, etc, however, the channel position is >>> arranged along the sensor type (magnetometer and gradiometer) according to >>> its ending number (1, 2, or 3), e.g. MEG 0111, MEG 0121, MEG 0131, ...., >>> MEG 0112, MEG 0122, MEG 0132, ...MEG 0113, MEG 0123, MEG 0133, etc. >>> >>> Thus, the label and position of channel in hdr.grad were mismatched so >>> that we got somewhat weired neighbour after using 'ft_prepare_neighbours'. >>> >>> >>> It should be matched correctly to find the proper neighbour and ensure >>> the result of repair as well. >>> >>> In fact, the code 'channelposition' in 'ft_datatype_sens' yield the >>> channel label as well as the channel position. It might help to solve this >>> problem. >>> >>> >>> >>> Is there any other way to solve this problem? >>> >>> >>> >>> >>> Best, >>> >>> >>> Jarang Hahm >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > 함자랑 드림. > > Jarang Hahm > > Interdisciplinary Program in Cognitive Science > Seoul National University > Seoul, Korea, Republic of. > +82-10-9079-3121 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaveh.manshaei at googlemail.com Wed Jun 27 13:13:29 2012 From: kaveh.manshaei at googlemail.com (kaveh manshaei) Date: Wed, 27 Jun 2012 13:13:29 +0200 Subject: [FieldTrip] Merging files and speeding up Message-ID: Hi all I have 3 blocks for each patient in my experiment and there are separately header , marker and dat file for each of them! I would like to merge these files together and generate one header and one dat and one marker file for each patient! Is it possible in fieldtrip or you know the other way around? Thanks in advance Kaveh -------------- next part -------------- An HTML attachment was scrubbed... URL: From philipp.hintze at uni-muenster.de Wed Jun 27 15:30:42 2012 From: philipp.hintze at uni-muenster.de (Philipp Hintze) Date: Wed, 27 Jun 2012 15:30:42 +0200 (CEST) Subject: [FieldTrip] Questions on High pass and Dft filtering Message-ID: Dear mailing list members, I continue to run into errors during my first FieldTrip analysis: I would like to use a high pass filter on my data prior to the segmentation into trials, the reason being that the trial duration is ~900 ms and I would like to filter low frequencies. The continuous data set is 900 seconds long. Simply using cfg.continuous = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.1; filteredContinuousData = ft_preprocessing(cfg); as my first run of preprocessing, I am confronted with an error stating Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff frequency or a different type/order of filter. How can I avoid this? Another problem I have concernes the line noise filtering. I would like to use the dft filter to get rid of the line noise. Using it on the segmented trials, I still notice residual 50 Hz noise, despite using cfg.padding = 10. A combination of the dft filter and a band stop filter using cfg.bsfreq = [49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of the line noise. The problem I have concerns the order of the filtering steps: I would like to use the high pass filter described above, given it works, on the continuous data. If I use the dft filter on the continuous data set, there is no effect on the averaged trials. Is this trivial or is there a mistake on my part? However, I can hardly use the dft filter on data that was preprocessed as continuous and than segmented using ft_redefinetrial, because I can not set any filter padding (because the data is not read from the dataset). Is there something I am overlooking or doing wrong or has someone used a different approach to a similar problem? Thank you in advance for your time and effort, Philipp From caspervanheck at gmail.com Wed Jun 27 15:34:11 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 27 Jun 2012 15:34:11 +0200 Subject: [FieldTrip] Merging files and speeding up In-Reply-To: References: Message-ID: Kaveh, 'ft_appenddata ' can combine data from separate files into one datafile with a single command: data = ft_appenddata(cfg,data1,data2,data3) If you want to save it as a brainvision datafile, the funcion 'ft_write_data' should come in handy. Its use is explained on the page 'How can I convert one dataformat into an other '. Good luck, Casper On Wed, Jun 27, 2012 at 1:13 PM, kaveh manshaei < kaveh.manshaei at googlemail.com> wrote: > Hi all > > I have 3 blocks for each patient in my experiment and there are separately > header , marker and dat file for each of them! I would like to merge these > files together and generate one header and one dat and one marker file for > each patient! Is it possible in fieldtrip or you know the other way around? > > Thanks in advance > Kaveh > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Wed Jun 27 17:26:24 2012 From: cornabel at googlemail.com (cornelius abel) Date: Wed, 27 Jun 2012 17:26:24 +0200 Subject: [FieldTrip] reverse source interpolate? Message-ID: <4FEB2620.3050505@googlemail.com> Hello, does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. I tried to get the position by applying the inverse transformation matrix of the used anatomy like: pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); but that did not give usefull results :( Any ideas how it could be done? Greetings, Cornelius From jan.schoffelen at donders.ru.nl Wed Jun 27 18:27:16 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 27 Jun 2012 18:27:16 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: <4FEB2620.3050505@googlemail.com> References: <4FEB2620.3050505@googlemail.com> Message-ID: Hi Cornelius, There is no need to 'uninterpolate' because the coordinates are already expressed in the correct coordinate system. What you probably want is to find the index to the voxel in the original source-structure closest to your 'hotspot' in the interpolated image. This can be achieved by something like this: write down the coordinates of your favourite position in the interpolated image (in world coordinates, here I assume that you are still in MEG coordinate system and have not normalized to MNI space), call this pos pos = pos./10 (from mm to cm) dpos = source.pos - repmat(pos, size(source.pos,1),1); [m,ind] = min(sum(dpos.^2,2)); source is the original source structure. ind is the index you are looking for. If you have interpolate to the MNI-template grid you need to replace the source.pos with the set of grid positions from your template grid (i.e. expressed in MNI coordinates). Cheers, JM On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > Hello, > > does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. > In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. > > I tried to get the position by applying the inverse transformation matrix of the used anatomy like: > pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); > > but that did not give usefull results :( > > Any ideas how it could be done? > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 28 09:00:52 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 28 Jun 2012 09:00:52 +0200 Subject: [FieldTrip] MEG BTI reading problems References: <539a5a71329ed45a4f4e76b8c52236e7.squirrel@neuro2.med.uni-magdeburg.de> Message-ID: Dear Sascha, I am forwarding this e-mail to the list because many brains know more than one... I do not exactly recall whether this problem was solved in the end. The error you get seems a pretty low level one, but I am not sure whether this is caused by the operating system, or by an old version of MATLAB. What version of matlab are you using? Apparently, your version of fseek (which is a built-in matlab function) does not support int32 as input class. I have never encountered this problem, nor on Linux, MacOS or Windows. You could try to do the following: change fseek(fid, nbytes2, ... into fseek(fid, double(nbytes2), ...)? If this works we know where to find the solution to the problem. With best wishes, Jan-Mathijs Begin forwarded message: > From: styll at med.ovgu.de > Date: June 27, 2012 3:14:42 PM GMT+02:00 > To: jan.schoffelen at donders.ru.nl > Subject: MEG BTI reading problems > > Hi Jan, > > I have read your conversation with Mehmet in the field trip mailing list > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-March/003599.html). > Unfortunately he sends no feedback whether he has solved his problem, > because I have the same problem. > > I am using a windows machine (32bit) and the newest fieldtrip version from > 06/25/2012. > Whenever I try to read the raw data as suggested in the description of the > field trip homepage (hdr = ft_read_header('c,rfDC')) I getting the > following error. > > ?? Error using ==> fseek > Offset must be of class double. > > Error in ==> fileio\private\read_4d_hdr at 185 > fseek(fid, nbytes2 - 32, 'cof'); > > Error in ==> ft_read_header at 153 > orig = read_4d_hdr(datafile); > > > Maybe you can help me. > > Many thanks > > Sascha > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Jun 28 09:14:45 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 28 Jun 2012 15:14:45 +0800 Subject: [FieldTrip] Merging files and speeding up Message-ID: Kaveh, In addition to Casper's comment, I just wanted to add: depending on what data processing you plan to do and what is the nature of your three different data sets per subject, it may be important to *not* merge the datasets right away. For example, if the reason you have three recordings for each participant is that they were recorded in three separate sessions (with the cap taken off and re-applied in between) and if you are planning on running an ICA algorithm, you should keep the datasets separate and run ICA separately on each one before merging them; there might be other procedures I'm not aware of that also have this caveat. I'm not sure what sort of data processing you have in mind so I'm not sure if this issue will apply to you, I just wanted to mention it. Best, Steve > > Message: 3 > Date: Wed, 27 Jun 2012 15:34:11 +0200 > From: Casper van Heck > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Merging files and speeding up > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Kaveh, > > 'ft_appenddata ' > can > combine data from separate files into one datafile with a single command: > data = ft_appenddata(cfg,data1,data2,data3) > > If you want to save it as a brainvision datafile, the funcion > 'ft_write_data' > should come in handy. Its use is explained on the page 'How can I convert > one dataformat into an > other< > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_one_dataformat_into_an_other?s[]=brainvision > > > '. > > Good luck, > > Casper > > > > On Wed, Jun 27, 2012 at 1:13 PM, kaveh manshaei < > kaveh.manshaei at googlemail.com> wrote: > > > Hi all > > > > I have 3 blocks for each patient in my experiment and there are > separately > > header , marker and dat file for each of them! I would like to merge > these > > files together and generate one header and one dat and one marker file > for > > each patient! Is it possible in fieldtrip or you know the other way > around? > > > > Thanks in advance > > Kaveh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornabel at googlemail.com Thu Jun 28 11:19:55 2012 From: cornabel at googlemail.com (Cornelius Abel) Date: Thu, 28 Jun 2012 11:19:55 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: References: <4FEB2620.3050505@googlemail.com> Message-ID: Hi jan mathijs, hello mailing list, thanks for your answer. I think i got your idea with finding the minimum in this squared differences. This should the work with positions of any scaling, right? However it gives me strange results when trying to get voxel indices in the "raw" source using voxel indices aquired from interpolated source. But even using the ctf coordinates in mm doesn't work. Here is a short script showing what i did, i also attached the necessary mat files. greetings, Cornelius clear all; load testdata.mat; % Interpolate source on anatomy cfg = []; cfg.parameter = 'avg.itc'; cfg.interpmethod = 'linear'; sourceInt = ft_sourceinterpolate(cfg, source,mri); % Find position of max voxel in interpolated source [maxval, maxindx] = max(sourceInt.avg.itc(:)); [x,y,z]=ind2sub(size(sourceInt.avg.itc),maxindx); pos=[x y z]; % plot this position in interpolated source figure; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.itc'; cfg.locationcoordinates = 'voxel'; cfg.location = pos; ft_sourceplot(cfg, sourceInt); % Calculate respective position in 'raw' source struct dpos = source.pos - repmat(pos, size(source.pos,1),1); [m,ind] = min(sum(dpos.^2,2)); spos=source.pos(ind,:); % Plot position in 'raw' source. % This gives not the position of max activity!!! figure; cfg = []; cfg.method = 'ortho'; cfg.funparameter = 'avg.itc'; cfg.locationcoordinates = 'voxel'; cfg.location = spos; ft_sourceplot(cfg, source); 2012/6/27 jan-mathijs schoffelen > Hi Cornelius, > > There is no need to 'uninterpolate' because the coordinates are already > expressed in the correct coordinate system. What you probably want is to > find the index to the voxel in the original source-structure closest to > your 'hotspot' in the interpolated image. > This can be achieved by something like this: > > write down the coordinates of your favourite position in the interpolated > image (in world coordinates, here I assume that you are still in MEG > coordinate system and have not normalized to MNI space), call this pos > > pos = pos./10 (from mm to cm) > > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > > source is the original source structure. > ind is the index you are looking for. > > If you have interpolate to the MNI-template grid you need to replace the > source.pos with the set of grid positions from your template grid (i.e. > expressed in MNI coordinates). > > > Cheers, > > JM > > > On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > > Hello, > > does anybody know how to get the uninterpolated source position giving the > coordinates aquired after interpolation with an anatomy. > In principle i want to get an individual source time course at the > position i picked from the interpolated grand average source plot. Therfore > i need the corresponding filter and its position in the source structure. > > I tried to get the position by applying the inverse transformation matrix > of the used anatomy like: > pos_before_interpolation=warp_apply(inv(anatomy.transform), > position_after_interpolation); > > but that did not give usefull results :( > > Any ideas how it could be done? > > Greetings, Cornelius > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jun 28 11:40:19 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 28 Jun 2012 11:40:19 +0200 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: References: Message-ID: <4FEC2683.5030503@donders.ru.nl> Dear Philipp, we are quite aware that the filter sometimes results in unstable solutions, see also here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=780 How to avoid this, however, is already explained in the error message. Just try to change the order of the filter or increase the cut-off frequency. The order/cutoff frequency needed is something I cannot tell you from the top of my head, to just try some values (for the order, look at the default, which is around 4 or so and then increase/decrease by one stepwise). The dft-filter basically works by fitting a 50Hz sine wave to substract the line noise, thereby leaving a residual when the amplitude is not constant. In contrast a bandstop filter removes activity in a specified frequency band. This is explained in more details in our FAQ on the webpage: http://fieldtrip.fcdonders.nl/faq/why_is_there_a_residual_50hz_line-noise_component_after_applying_a_dft_filter The dftfilter therefore also does not really require any padding (imho it would be even counter productive). I don't quite get with what you mean by saying that there is no effect on the continuous data set, can you give an example (e.g. explain with what cfg options you call ft_preprocessing). Your problem concerning filter padding with data in memory will be handled soon, by implementing additional options for padding, see here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1318 But as I said, I don't see the point in using padding for a dftfilter. Hope that helps! Best, Jörn On 6/27/2012 3:30 PM, Philipp Hintze wrote: > Dear mailing list members, > > I continue to run into errors during my first FieldTrip analysis: > I would like to use a high pass filter on my data prior to the segmentation > into trials, the reason being that the trial duration is ~900 ms and I would > like to filter low frequencies. The continuous data set is 900 seconds long. > Simply using > cfg.continuous = 'yes'; > > cfg.hpfilter = 'yes'; > cfg.hpfreq = 0.1; > filteredContinuousData = ft_preprocessing(cfg); > > as my first run of preprocessing, I am confronted with an error stating > > Calculated filter coefficients have poles on or outside the unit circle and > will not be stable. Try a higher cutoff frequency or a different > type/order of filter. > > How can I avoid this? > > Another problem I have concernes the line noise filtering. I would like to use > the dft filter to get rid of the line noise. Using it on the segmented trials, > I still notice residual 50 Hz noise, despite using cfg.padding = 10. A > combination of the dft filter and a band stop filter using cfg.bsfreq = > [49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of the line > noise. > > The problem I have concerns the order of the filtering steps: I would like to > use the high pass filter described above, given it works, on the continuous > data. If I use the dft filter on the continuous data set, there is no effect > on the averaged trials. Is this trivial or is there a mistake on my part? > However, I can hardly use the dft filter on data that was preprocessed as > continuous and than segmented using ft_redefinetrial, because I can not set > any filter padding (because the data is not read from the dataset). > Is there something I am overlooking or doing wrong or has someone used a > different approach to a similar problem? > > Thank you in advance for your time and effort, > > Philipp > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jan.schoffelen at donders.ru.nl Thu Jun 28 14:29:40 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 28 Jun 2012 14:29:40 +0200 Subject: [FieldTrip] reverse source interpolate? In-Reply-To: References: <4FEB2620.3050505@googlemail.com> Message-ID: <36BAC777-CD99-4F3E-95D1-A133F5CC2372@donders.ru.nl> Hi Cornelius, Probably you should use: cfg.locationcoordinates to be 'head'. Best, JM On Jun 28, 2012, at 11:19 AM, Cornelius Abel wrote: > Hi jan mathijs, hello mailing list, > > thanks for your answer. I think i got your idea with finding the minimum in this squared differences. This should the work with positions of any scaling, right? > However it gives me strange results when trying to get voxel indices in the "raw" source using voxel indices aquired from interpolated source. > But even using the ctf coordinates in mm doesn't work. > > Here is a short script showing what i did, i also attached the necessary mat files. > > greetings, Cornelius > > > clear all; > load testdata.mat; > > % Interpolate source on anatomy > cfg = []; > cfg.parameter = 'avg.itc'; > cfg.interpmethod = 'linear'; > sourceInt = ft_sourceinterpolate(cfg, source,mri); > > % Find position of max voxel in interpolated source > [maxval, maxindx] = max(sourceInt.avg.itc(:)); > [x,y,z]=ind2sub(size(sourceInt.avg.itc),maxindx); > pos=[x y z]; > > % plot this position in interpolated source > figure; > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.itc'; > cfg.locationcoordinates = 'voxel'; > cfg.location = pos; > ft_sourceplot(cfg, sourceInt); > > % Calculate respective position in 'raw' source struct > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > spos=source.pos(ind,:); > > % Plot position in 'raw' source. > % This gives not the position of max activity!!! > figure; > cfg = []; > cfg.method = 'ortho'; > cfg.funparameter = 'avg.itc'; > cfg.locationcoordinates = 'voxel'; > cfg.location = spos; > ft_sourceplot(cfg, source); > > > > 2012/6/27 jan-mathijs schoffelen > Hi Cornelius, > > There is no need to 'uninterpolate' because the coordinates are already expressed in the correct coordinate system. What you probably want is to find the index to the voxel in the original source-structure closest to your 'hotspot' in the interpolated image. > This can be achieved by something like this: > > write down the coordinates of your favourite position in the interpolated image (in world coordinates, here I assume that you are still in MEG coordinate system and have not normalized to MNI space), call this pos > > pos = pos./10 (from mm to cm) > > dpos = source.pos - repmat(pos, size(source.pos,1),1); > [m,ind] = min(sum(dpos.^2,2)); > > source is the original source structure. > ind is the index you are looking for. > > If you have interpolate to the MNI-template grid you need to replace the source.pos with the set of grid positions from your template grid (i.e. expressed in MNI coordinates). > > > Cheers, > > JM > > > On Jun 27, 2012, at 5:26 PM, cornelius abel wrote: > >> Hello, >> >> does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy. >> In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure. >> >> I tried to get the position by applying the inverse transformation matrix of the used anatomy like: >> pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation); >> >> but that did not give usefull results :( >> >> Any ideas how it could be done? >> >> Greetings, Cornelius >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From philipp.hintze at uni-muenster.de Thu Jun 28 15:13:16 2012 From: philipp.hintze at uni-muenster.de (Philipp Hintze) Date: Thu, 28 Jun 2012 15:13:16 +0200 (CEST) Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: <4FEC2683.5030503@donders.ru.nl> Message-ID: Dear Jörn, thank you for your fast response. > Just try to change the order of the filter or increase the cut-off > frequency. I did that and found a stable solution for the 0.1 Hz filter at an order of 5. > The dftfilter therefore also does not really require any padding > (imho > it would be even counter productive). I read in the tutorials and in other discussions on this mailing list, that the padding is required. The FAQ (http://fieldtrip.fcdonders.nl/faq/what_kind_of_filters_can_i_apply_to_my_data) states: "To make this dft filter very sharp, you have to pad the data to a large amount (cfg.padding), e.g. to 5 or 10 seconds." Rober Oostenveld wrote: "...in preprocessing with cfg.dftfilter=yes, optionally cfg.dftfreq (default is [50 100 150]), and what we do is cfg.padding=10 to pad the data up to 10 seconds before subtracting the 50Hz sine wave. The padding ensures that we only filter out a narrow 1/10 Hz wide frequency bin. After sufficient mutitapering in the frequency domain, you won't notice the narrow 50Hz notch any more. If you don't filterpad, and e.g. have 0.5 s trials, you will put a wider 1/0.5=2Hz notch in your power spectrum." I tried using the filter without padding and the results are still acceptable, yet there is more residual noise than if it is applied with padding. The issue with the continuous data is the following: I tried using cfg = []; cfg.channel = {'EEG'}; cfg.datafile = dataset; cfg.headerfile = dataset; cfg.dataset = dataset; cfg.continuous = 'yes'; (cfg.padding = 10;) cfg.dftfilter = 'yes'; filteredContinuousData = ft_preprocessing(cfg); but looking at averaged timelocked data for the subject, the data looks identical to the result I get using no filter at all, i.e., contaminated by strong line noise. Including padding makes no difference either, therefore the brackets. Best regards, Philipp "Jörn M. Horschig" schrieb am 2012-06-28: > Dear Philipp, > we are quite aware that the filter sometimes results in unstable > solutions, see also here: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=780 > How to avoid this, however, is already explained in the error > message. > Just try to change the order of the filter or increase the cut-off > frequency. The order/cutoff frequency needed is something I cannot > tell > you from the top of my head, to just try some values (for the order, > look at the default, which is around 4 or so and then > increase/decrease > by one stepwise). > The dft-filter basically works by fitting a 50Hz sine wave to > substract > the line noise, thereby leaving a residual when the amplitude is not > constant. In contrast a bandstop filter removes activity in a > specified > frequency band. This is explained in more details in our FAQ on the > webpage: > http://fieldtrip.fcdonders.nl/faq/why_is_there_a_residual_50hz_line-n > oise_component_after_applying_a_dft_filter > The dftfilter therefore also does not really require any padding > (imho > it would be even counter productive). > I don't quite get with what you mean by saying that there is no > effect > on the continuous data set, can you give an example (e.g. explain > with > what cfg options you call ft_preprocessing). > Your problem concerning filter padding with data in memory will be > handled soon, by implementing additional options for padding, see > here: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=1318 > But as I said, I don't see the point in using padding for a > dftfilter. > Hope that helps! > Best, > Jörn > On 6/27/2012 3:30 PM, Philipp Hintze wrote: > >Dear mailing list members, > >I continue to run into errors during my first FieldTrip analysis: > >I would like to use a high pass filter on my data prior to the > >segmentation > >into trials, the reason being that the trial duration is ~900 ms > >and I would > >like to filter low frequencies. The continuous data set is 900 > >seconds long. > >Simply using > > cfg.continuous = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfreq = 0.1; > > filteredContinuousData = ft_preprocessing(cfg); > >as my first run of preprocessing, I am confronted with an error > >stating > >Calculated filter coefficients have poles on or outside the unit > >circle and > >will not be stable. Try a higher cutoff frequency or a different > >type/order of filter. > >How can I avoid this? > >Another problem I have concernes the line noise filtering. I would > >like to use > >the dft filter to get rid of the line noise. Using it on the > >segmented trials, > >I still notice residual 50 Hz noise, despite using cfg.padding = > >10. A > >combination of the dft filter and a band stop filter using > >cfg.bsfreq = > >[49:0.1:51 99:0.1:101 149:0.1:151] leads to acceptable filtering of > >the line > >noise. > >The problem I have concerns the order of the filtering steps: I > >would like to > >use the high pass filter described above, given it works, on the > >continuous > >data. If I use the dft filter on the continuous data set, there is > >no effect > >on the averaged trials. Is this trivial or is there a mistake on my > >part? > >However, I can hardly use the dft filter on data that was > >preprocessed as > >continuous and than segmented using ft_redefinetrial, because I can > >not set > >any filter padding (because the data is not read from the dataset). > >Is there something I am overlooking or doing wrong or has someone > >used a > >different approach to a similar problem? > >Thank you in advance for your time and effort, > >Philipp > >_______________________________________________ > >fieldtrip mailing list > >fieldtrip at donders.ru.nl > >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu Jun 28 16:45:54 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 28 Jun 2012 16:45:54 +0200 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: References: Message-ID: <4FEC6E22.1040707@donders.ru.nl> Hi Philipp, > The padding ensures that we only filter out a narrow 1/10 Hz wide > frequency bin. sure, I didn't think about that - that's a pretty good reason to use padding :) However, the estimation of the 50Hz noise will be biased by the padded samples. I don't like the dftfilter anyway, and I am not filtering either (the reason for me is that 50Hz noise should be invariant to the experimental effects. I mostly investigate TFRs). > but looking at averaged timelocked data for the subject, the data looks > identical to the result I get using no filter at all, i.e., contaminated by > strong line noise. I'm gonna look into this to see whether it is a bug or not. I'll let you know soon. Best, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From akiko.ikkai at gmail.com Thu Jun 28 20:30:50 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 28 Jun 2012 14:30:50 -0400 Subject: [FieldTrip] suspiciously high plv Message-ID: Dear FieldTrippers, I've been trying to calculate chan-chan plv, based on the connectivity tutorial ( http://fieldtrip.fcdonders.nl/tutorial/connectivity?s[]=connectivity) and on past mailing-list posts. However, when I plot these plv, some plv are really high, in .8-.9 range sometimes all the way into gamma range. It is especially suspicious when channels that are in the opposite hemispheres, separated in anterior-posterior axis show such high values. Does anyone have any suggestions what might be going wrong? My script is pasted below. I'm using Waveguard cap with 128 channels in Duke layout, sampled at 512 Hz, and average-referenced, and data are analyzed using fieldtrip-20120103 version. Thanks in advance, Akiko %%%% first define variables chans = {'RD7','LL11','RA2','LC3'}; % let's try with these first... testTime = [.8 2.5]; %%%% % choose time range cfg = []; cfg.toilim = testTime; % extract delay period ft_data = ft_redefinetrial(cfg, ft_data); % fourier transform cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.tapsmofrq = 2; cfg.channel = chans; freq = ft_freqanalysis(cfg, ft_data); % plv calc cfg = []; cfg.method = 'plv'; plv = ft_connectivityanalysis(cfg, freq); -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wilsch at cbs.mpg.de Fri Jun 29 11:10:51 2012 From: wilsch at cbs.mpg.de (Anna Wilsch) Date: Fri, 29 Jun 2012 11:10:51 +0200 (CEST) Subject: [FieldTrip] Beamformer: different length of baseline and post baseline interval In-Reply-To: <1376177301.1612.1340961039830.JavaMail.root@zimbra> Message-ID: <1659120385.1619.1340961051346.JavaMail.root@zimbra> Dear Fieldtrippers, I'm trying to beamform my MEG data by building a common filter including three conditions and a baseline for each condition. The baseline intervals have a duration of 500 ms. I was wondering if it is ok if the post-baseline data are longer than that (1000 - 2000 ms). Does it have any negative impact on the cross-spectral-density matrix and/or the common filter? Would that still be a valid operation to do or is it necessary that baseline and post baseline data have the same length? Thank you for your comments. Cheers, Anna Anna Wilsch, Dipl.-Psych. Auditory Cognition Research Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a - Leipzig, Germany (p) +49 (0)341 9940 2641 (e) wilsch at cbs.mpg.de From m_wink10 at uni-muenster.de Fri Jun 29 14:09:47 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Fri, 29 Jun 2012 14:09:47 +0200 Subject: [FieldTrip] GrandAVG and Stats can't be plottet on anatomy or be interpolated on an MRI Message-ID: Hello, I got a kind of big problem as follows. *I can easly normalize, interpolate and plot my LCMV-Beamformer results on an MRI and plot with that anatomy:* template = '/media/sonja1/MatlabAnalysis/ Martin/WFU_PickAtlas/spm8/canonical/single_subj_T1.nii'; template_mri = ft_read_mri(template); cfg = []; % cfg.coordsys = 'spm'; cfg.method = 'fiducial'; %'interactive'; cfg.fiducial.nas = [45 106 17]; %position of nasion cfg.fiducial.lpa = [88 49 11]; %position of LPA cfg.fiducial.rpa = [3 49 11]; %position of RPA mri = ft_volumerealign(cfg, template_mri); load(sourcesOutFile); cfg = []; cfg.downsample = 1; cfg.parameter = {'avg.pow', 'avg.logpowDiff'}; sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri); Works without any problem! And can be plotted afterwords kind of nicely on an anatomy. * Now what doesn't work:* %Load functional data load(['/media/sonja1/Patienten/Parkinson/grandAVG_SourceDiff_OHNEdysphagie__beta.mat']); %avg.avg.pow to avg.pow powtemp = grandavg.avg.avg.pow; grandavg = rmfield(grandavg, 'avg'); grandavg.avg.pow = powtemp; %Load template MRI template = '/media/sonja1/MatlabAnalysis/Martin/WFU_PickAtlas/spm8/canonical/single_subj_T1.nii'; template_mri = ft_read_mri(template); %Segment and Interpolate MRI cfg = []; cfg.method = 'fiducial'; %'interactive'; cfg.fiducial.nas = [45 106 17]; %position of nasion cfg.fiducial.lpa = [88 49 11]; %position of LPA cfg.fiducial.rpa = [3 49 11]; %position of RPA mri_realign = ft_volumerealign(cfg, template_mri); % match up volumetric source result matrix with anatomical volume cfg = []; cfg.downsample = 1; cfg.parameter = 'avg.pow'; sourceDiff_int = ft_sourceinterpolate(cfg, grandavg , mri_realign); %Plot MRI cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; figure; ft_sourceplot(cfg, grandavg); - it starts to interpolate over hours and hours... and the results are worng at the end. *I tried also this way (this worked with another experiment where we got individual MRI's for each subject):* %load GAVG-Results load(['/media/sonja1/Patienten/Parkinson/grandAVG_SourceDiff_OHNEdysphagie__beta.mat']); %Remove the avg.avg field powtemp = grandavg.avg.avg.pow; grandavg = rmfield(grandavg, 'avg'); grandavg.avg.pow = powtemp; %Load an anatomy from the normalized subjects which have been interpolated load(['/media/sonja1/Patienten/Parkinson/P0390/P0390-vol-f.ds/sourceDiffNormalized.mat']); %Plot with anatomy from normalized subject cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; grandavg.anatomy = sourceDiffIntNorm_beta.anatomy; figure; ft_sourceplot(cfg, grandavg); That prints the following error: ??? Attempted to access dim(3); index out of bounds because numel(dim)=2. Error in ==> ft_plot_slice at 207 if all(ori==[0 1 0]), xplane = 1:dim(1); yplane = loc(2); zplane = 1:dim(3); end Error in ==> ft_plot_ortho at 119 hx = ft_plot_slice(dat, varargin{:}); Error in ==> ft_sourceplot at 781 ft_plot_ortho(ana, 'transform', eye(4), 'location', ijk, 'style', 'subplot', 'parents', [h1 h2 h3].*update, 'doscale', false); Error in ==> mw_ft_plot_GrandAVGa at 19 figure; ft_sourceplot(cfg, grandavg); I also upladed the data here: http://www.sendspace.com/file/zkbgqz Does anybody have any suggestions? (I send this to the Email-System and the Bug-System maybe I'm just doing something wrong and somebody faced the same problem some time ago) Thanks, Martin Winkels Universität Münster -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Sat Jun 30 03:09:22 2012 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Fri, 29 Jun 2012 18:09:22 -0700 Subject: [FieldTrip] Questions on High pass and Dft filtering In-Reply-To: <4FEC6E22.1040707@donders.ru.nl> References: <4FEC6E22.1040707@donders.ru.nl> Message-ID: <4FEE51C2.5070304@berkeley.edu> Hi Phillipp and Jörn, I'm pretty sure that the padding for filtering is data padding not zero padding, so this does make sense and should not bias the estimation of the 50Hz noise. My experience with the dft filter is that it works very will when the line noise is stable in amplitude, it sharply (the longer the data/padding the sharper the filter) filters out specifically the line noise. It can do this because the frequency of the line noise is so stable. However, when the amplitude of the line noise varies (which it did in my data), this results in creating noise in frequencies outside 50Hz (if your interested in why, this piece of the FieldTrip wiki sheds some light on that), and the dft filter fails. I'm using a band stop around the line noise frequency and harmonics. I'd recommend plying with the values, and plotting to see which settings are appropriate for your specific circumstances. Below you can find a snipped of code I used to determine my settings. Good luck, Ingrid ------- code snippet ------- widths = [0.5 1 1.5 2 3 5 10]; orders = [2:6]; for iWidth = 1:length(widths) for iOrd = 1:length(orders) width = widths(iWidth); %preprocess data cfg = []; %cfg.event = event; cfg.dataset = [cur_path_MFF, 'NS_EMR_', subjStr, '_', stages{iStage}]; cfg.channel = {'EOG*', 'EMG', 'EEG', '-E1', '-E9', '-E32', '-E8', '-E25', '-E129'}; cfg.demean = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.3; cfg.hpfiltord = 1; cfg.bsfilter = 'yes'; cfg.bsfiltord = orders(iOrd); cfg.bsfreq = [60-width 60+width; 120-width 120+width; 180-width 180+width]; %note I'm in the US so have 60Hz line noise, you might have 50Hz cfg.pad = 0.5; cfg.trl = trl(1:100,:); data_S1_clean = ft_preprocessing(cfg); %do freqanalysis cfg = []; cfg.channel = ['EEG' BadChan]; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [30 200]; freq_S1_clean = ft_freqanalysis(cfg, data_S1_clean); %plot figure; plot(freq_S1_clean.freq,freq_S1_clean.powspctrm(:,:)) print(gcf, '-dpng', '-r300', [cur_path_fig, subjStr, '_', stages{iStage}, '_W', num2str(width*10),'_O', num2str(orders(iOrd))]); close %zoom in around 60 hz; figure; plot(freq_S1_clean.freq(22:41),freq_S1_clean.powspctrm(:,22:41)) print(gcf, '-dpng', '-r300', [cur_path_fig, subjStr, 'zoomed_', stages{iStage}, '_W', num2str(width*10),'_O', num2str(orders(iOrd))]); close end end On 6/28/2012 7:45 AM, "Jörn M. Horschig" wrote: > Hi Philipp, > >> The padding ensures that we only filter out a narrow 1/10 Hz wide >> frequency bin. > > sure, I didn't think about that - that's a pretty good reason to use > padding :) However, the estimation of the 50Hz noise will be biased by > the padded samples. I don't like the dftfilter anyway, and I am not > filtering either (the reason for me is that 50Hz noise should be > invariant to the experimental effects. I mostly investigate TFRs). > >> but looking at averaged timelocked data for the subject, the data >> looks >> identical to the result I get using no filter at all, i.e., >> contaminated by >> strong line noise. > > I'm gonna look into this to see whether it is a bug or not. I'll let > you know soon. > > Best, > Jörn > > > > > -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: