From r.oostenveld at FCDONDERS.RU.NL Wed Sep 1 08:45:32 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 1 Sep 2010 08:45:32 +0200 Subject: Extended deadline: Special Journal Issue on Academic MEG/EEG Software Message-ID: Begin forwarded message: > From: "Baillet, Sylvain" > Date: 31 August 2010 17:44:28 GMT+02:00 > To: "Baillet, Sylvain" > Subject: Extended deadline: Special Journal Issue on Academic MEG/ > EEG Software > > Important notice: Submission deadline has been extended; now: > October 1, 2010. > > Call for Papers > > Academic Software Applications for Electromagnetic Brain Mapping > Using MEG and EEG > > To be published in : Computational Intelligence and Neuroscience > (indexed in MEDLINE, INSPEC, GoogleScholar, etc.) > Full Call for Paper available at: http://www.hindawi.com/journals/cin/osi.html > > The field of Magnetoencephalography (MEG) and Electroencephalography > (EEG) source imaging is maturing rapidly. This scientific growth is > accompanied by a variety of complementary and /or concurrent > software solutions from the academic world. > > The objective of this CIN Special Issue is to help the neuroimaging > obtain an overview of state-of-the-art academic software > applications for MEG/EEG data analysis, how they differ and > interact, and of upcoming methodological trends and technical > developments; the topics to be covered include, but are not limited > to, academic software solutions for: > > · MEG and EEG data acquisition > · Data preprocessing, that is, filtering, > artifact detection, rejection or correction, trial sorting, averaging > · Segmentation and geometrical modeling of head > tissues > · Computational electromagnetics for MEG/EEG > forward modeling > · MEG/EEG source analysis > · Statistical appraisal and inference: > confidence intervals on measures and hypothesis testing > · Identification and evaluation of evoked, > induced event-related brain responses and ongoing brain activity > · Time-frequency decompositions, advanced > spectral analysis, time series modeling > · Estimation of functional and effective > connectivity > Authors should provide detailed information regarding their software > toolbox or application by addressing the following topics: open > source software (yes/no), i/o file formats available, operating > system, Matlab required (yes/no), interoperability with other > software, and so forth. > > Further, the software needs to be available for download free of > charge at the time of manuscript submission, with sufficient > documentation provided online to be able to reproduce the data > analysis featured in the manuscript. > > Before submission authors should carefully read over the journal's > Author Guidelines, which are located at http://www.hindawi.com/journals/cin/guidelines.html > . Prospective authors should submit an electronic copy of their > complete manuscript through the journal Manuscript Tracking System > at http://mts.hindawi.com/ according to the following timetable: > > Manuscript Due > October 1, 2010 September 1, 2010 > First Round of Reviews > December 1, 2010 > Publication Date > March 1, 2011 > Lead Guest Editor > > Sylvain Baillet, Departments of Neurology & Biophysics, Medical > College of Wisconsin, WI, USA > Guest Editors > > Karl Friston, Wellcome Trust Centre for Neuroimaging, London, UK > Robert Oostenveld, Donders Centre for Cognitive Neuroimaging Radboud > University Nijmegen, The Netherlands > > Ps: > > As an open access journal, Computational Intelligence and > Neuroscience requires an Article Processing Charge of $750 USD per > accepted manuscript for both research and review articles. > Since the journal does not collect any subscription or advertising > revenue, and does not have other funding streams, these charges are > necessary in order to make the full text of all published articles > freely available online. Moreover, authors are allowed to retain the > copyright of their work published in the journal. > > As for the number of color figures, there is no limited number of > figures that might be included in each paper whether colored or not > and you can find detailed information about the general format of > Manuscripts that will be submitted to the Special Issue proposals, > the format of references, tables and figures if found at:http://www.hindawi.com/journals/cin/guidelines.html > . > > > > > Sylvain Baillet, PhD > Associate Professor of Neurology & Biophysics > Scientific Director, MEG Program > Department of Neurology > Medical College of Wisconsin > > 9200 W. Wisconsin ave > Milwaukee, WI 53226 > Phone: +1 414 805 1174 > Fax: +1 414 805 1103 > · Home Page > · Our MEG Program > · Follow my Lab on Facebook > > > > > > > > > > > > > > > > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 121 bytes Desc: not available URL: From saskia.haegens at DONDERS.RU.NL Wed Sep 1 13:55:17 2010 From: saskia.haegens at DONDERS.RU.NL (Saskia Haegens) Date: Wed, 1 Sep 2010 13:55:17 +0200 Subject: ft_preprocessinf; ft_preproc_dftfilter In-Reply-To: <1770599948.3434086.1283265763835.JavaMail.fmail@mwmweb056> Message-ID: Hi Michael, ft_preprocessing calls the private function preproc, which does the actual preprocessing (including call to ft_preproc_dftfilter). Hope this answers your question. Best, Saskia > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Michael Wibral > Sent: dinsdag 31 augustus 2010 16:43 > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] ft_preprocessinf; ft_preproc_dftfilter > > Dear listusers, > > I found something strange in FT20100826: > > ft_preprocessing takes cfg.dftfilter = 'yes' as a configuration option > and I think it should then issue a call to ft_preproc_dftfilter. > However this is never done, if I am not mistaken. I guess it slipped > from ft_preprocessing sometiem in the past. Or was it dropped on > purpose because other bandstop filters are preferred? > > Any help on this is appreciated. > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Fri Sep 3 19:35:56 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Fri, 3 Sep 2010 13:35:56 -0400 Subject: neuromag planar gradient Message-ID: Hello, I am new to fieldtrip and am trying to figure out how to visualize the planar gradient for grandaverage neuromag data. I tried to accomplish this by specifying cfg.layout as 'neuromag306planar.lay' but this just produced a distorted version of the conventional ERF topoplot. I would really appreciate anyone's help who may know how to do this. Thanks! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Tue Sep 7 11:01:09 2010 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Tue, 7 Sep 2010 11:01:09 +0200 Subject: AW: [FIELDTRIP] neuromag planar gradient Message-ID: Hi Matt, You can find the layout files in fieldtrip/template. In my case the file is called 'NM306planar.lay'. I have attachted this file to this e-mail, hopefully your data looks better then. Just to be sure, you did do ft_combineplanar before right? Yours, Hanneke -------------------------------------------------- Institut für Klinische Neurowissenschaften und Medizinische Psychologie Gebäude-Nr.: 23.02 Ebene: 03 Zimmer-Nr.: 47 Tel.: +49 211-81-13074 Mail : hanneke.vandijk at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Matt F. Panichello Gesendet: Fr 03.09.2010 19:35 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] neuromag planar gradient Hello, I am new to fieldtrip and am trying to figure out how to visualize the planar gradient for grandaverage neuromag data. I tried to accomplish this by specifying cfg.layout as 'neuromag306planar.lay' but this just produced a distorted version of the conventional ERF topoplot. I would really appreciate anyone's help who may know how to do this. Thanks! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Tue Sep 7 23:00:48 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Tue, 7 Sep 2010 17:00:48 -0400 Subject: AW: [FIELDTRIP] neuromag planar gradient In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B013F04FB@Mail2-UKD.VMED.UKD> Message-ID: Hi Hanneke, Thanks so much for your help! I wasn't sure if I needed to use ft_combineplanar for neuromag data. Using this with the "neuromag306cmb.lay" file did the trick. Best, Matt > Hi Matt, > > You can find the layout files in fieldtrip/template. In my case the file > is called 'NM306planar.lay'. I have attachted this file to this e-mail, > hopefully your data looks better then. > > Just to be sure, you did do ft_combineplanar before right? > > Yours, > > Hanneke > -------------------------------------------------- > Institut für Klinische Neurowissenschaften und Medizinische Psychologie > Gebäude-Nr.: 23.02 > Ebene: 03 Zimmer-Nr.: 47 > Tel.: +49 211-81-13074 > Mail : hanneke.vandijk at med.uni-duesseldorf.de > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Matt F. Panichello > Gesendet: Fr 03.09.2010 19:35 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] neuromag planar gradient > > Hello, > > I am new to fieldtrip and am trying to figure out how to visualize the > planar gradient for grandaverage neuromag data. > > I tried to accomplish this by specifying cfg.layout as > 'neuromag306planar.lay' but this just produced a distorted version of the > conventional ERF topoplot. > > I would really appreciate anyone's help who may know how to do this. > > Thanks! > > Matt > > > > > > 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. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From egarza at GMAIL.COM Wed Sep 8 19:22:49 2010 From: egarza at GMAIL.COM (Eduardo Garza) Date: Wed, 8 Sep 2010 18:22:49 +0100 Subject: Can't read .SMR data into FT Message-ID: Greetings, I did an EEG experiment using CED and the format is standard ".SMR". The data contains 1 Channel (Cz) and 1 Event Channel. When I try to look at the data in FT using: cfg = []; cfg.dataset = 'eduardo_pilot_03_events2.smr'; cfg.trialdef.eventtype = '?'; definetrial(cfg); I get several errors back: Warning: Unable to load this DLL Call ns_SetLibrary first! Process interrupted! ??? Error using ==> read_ced_son at 81 Could not get NeuroShare library info, please use the NS_SETLIBRARY function. Error in ==> ft_read_header at 357 orig = read_ced_son(filename,'readevents','no','readdata','no'); Error in ==> read_header at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> trialfun_general at 50 hdr = read_header(cfg.headerfile); Error in ==> ft_definetrial at 110 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> definetrial at 17 [varargout{1:nargout}] = funhandle(varargin{:}); I checked the "read_ced_son.m" and apparently I need a Neuroshare library to read the data (I thought FT already had that in). So I go to the Neuroshare site and download a ZIP called MATLAB_Import_Filter, which apparently should include several ".m" files and 1 DLL called "mexprog.dll" for 64-bits, but the DLL is not there. The readme.txt shows that I should also include a file called "NeuroshareDLL" in the same directory. I'm not sure where to go from here. Where can I get that NeuroshareDLL and mexprog.dll that should go into the directory? Is my data in the correct format? Thank you Best regards Eduardo -- Eduardo A. Garza Villarreal MD, PhD Student -Center for Functionally Integrative Neuroscience (CFIN), Aarhus University; -Royal Academy of Music, Aarhus, Denmark; -Department of Psychiatry, Warneford Hospital, University of Oxford, UK. DK Office: +45 89494408 DK Mobile: +45 2772 3440 UK Office: +44 1865223918 UK Mobile +44 7879574135 http://person.au.dk/eduardo.garza at ki http://www.cfin.au.dk/menu550-en egarza at gmail.com eduardo at pet.auh.dk eduardo.garzavillarreal at psych.ac.ox.uk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.arena at UVA.NL Wed Sep 8 20:12:46 2010 From: c.arena at UVA.NL (Claudia Arena) Date: Wed, 8 Sep 2010 20:12:46 +0200 Subject: significance of coherence differences Message-ID: Dear Eric Maris, I too am confused about coherence and its statistical analysis..I am trying to calculate the coherence between POz and 47 other channels in a multisubject study (N=19) with a within-subject design to test (1) whether coherence in condition 'Figure' is the same as in condition 'No figure', and (2) whether coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct rejections'. Either way I am not sure about a couple of things: 1) This is maybe a silly question but in your reply to Jan's post you state: "...You apply this test statistic to the condition-specific coherences, obtained by summing and normalizing the trial(taper)-specific cross- spectra..." - You mean averaging the trial-specific cross-spectra (and trial- specific powerspectra) right? Moreover does this mean that cfg.keeptrials can be set to 'no' when calculating the powerspectra and cross-spectra with freqanalysis(_mtmconvol)? This would be great news for me, since the 4D freqdata is too large to save.. 2) Another related question comes from the fact that the experiment had 3 different masking durations, so to combine the powerspectra belonging to the same condition (i.e. the Figs) but different mask durations we calculated weighted averages based on the least amount of trials in each Mask duration group. My question now would be whether the normalization to get the coherence values should be done before or after this weighing (In other words, should I weigh the cross-spectra or the coherence values, or does this not matter?) 3) Now for the statistics. Again in your reply to Jan's post you say: "...For a single channel pair and a single frequency bin, the appropriate statistic is the dependent (paired) samples t-statistic or, in a nonparametric framework, the Wilcoxon signed rank sum test." Does this mean it is not valid to use freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = 'depsamplesT' (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the coherence between POz (my ref.channel) and the 47 other channels is the same in different conditions, using all my frequency and time bins? Do I need to make a selection? Thank you for your time. Sincerely, Claudia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Thu Sep 9 10:02:27 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 9 Sep 2010 10:02:27 +0200 Subject: significance of coherence differences In-Reply-To: Message-ID: Dear Claudia, > I too am confused about coherence and its statistical analysis..I am > trying to > calculate the coherence between POz and 47 other channels in a > multisubject > study (N=19) with a within-subject design to test (1) whether coherence > in > condition 'Figure' is the same as in condition 'No figure', and (2) > whether > coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct > rejections'. > > Either way I am not sure about a couple of things: > > 1) This is maybe a silly question but in your reply to Jan's post you > state: "...You apply this test statistic to the condition-specific > coherences, > obtained by summing and normalizing the trial(taper)-specific cross- > spectra..." - You mean averaging the trial-specific cross-spectra (and > trial- > specific powerspectra) right? Moreover does this mean that > cfg.keeptrials can > be set to 'no' when calculating the powerspectra and cross-spectra with > freqanalysis(_mtmconvol)? This would be great news for me, since the 4D > freqdata is too large to save.. For statistical testing in a within-subjects design (units-of-observation are subjects and not trials) you don't need the trials. So, you can safely put cfg.keeptrials to 'no'. By the way, try using freqanalysis_mtmfft (frequency analysis without time resolution) before freqanalysis_mtmconvol (with time resolutions). This makes life a lot easier and conceptually you're doing the same thing. > > 2) Another related question comes from the fact that the experiment had > 3 > different masking durations, so to combine the powerspectra belonging > to the > same condition (i.e. the Figs) but different mask durations we > calculated > weighted averages based on the least amount of trials in each Mask > duration > group. My question now would be whether the normalization to get the > coherence values should be done before or after this weighing (In other > words, > should I weigh the cross-spectra or the coherence values, or does this > not > matter?) I don't see why you have to deal with the normalization yourself. You can use ft_freqdescriptives or ft_connectivityanalysis to calculate the coherence values taking the freqanalsis output as its input. In any case, to obtain coherence values from the cross-spectra, one should always normalize (i.e., divide) by the square-roots of the power-spectra calculated on the same trials. I may be wrong, but it seems that you are making life more difficult than it should be. > > 3) Now for the statistics. Again in your reply to Jan's post you say: > "...For a > single channel pair and a single frequency bin, the appropriate > statistic is the > dependent (paired) samples t-statistic or, in a nonparametric > framework, the > Wilcoxon signed rank sum test." Does this mean it is not valid to use > freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = > 'depsamplesT' > (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the > coherence > between POz (my ref.channel) and the 47 other channels is the same in > different conditions, using all my frequency and time bins? Do I need > to make a > selection? What you propose IS valid to control for multiple comparisons. However, in my reply to Jan, I consider a single statistical test ("... For a single channel pair and a single frequency bin, ..."); so, no multiple comparisons problem here. Good luck, Eric > > Thank you for your time. > > Sincerely, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Sep 9 16:13:23 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 9 Sep 2010 15:13:23 +0100 Subject: Can't read .SMR data into FT In-Reply-To: Message-ID: Dear Eduardo, The version of Neuroshare included in Fieldtrip should be sufficient although I'm not sure whether it's added automatically to the path. One additional thing you might need is the DLL from CED that can be found at: http://www.ced.co.uk/upnssonu.shtml You can put it in the neuroshare directory. Note that this setup doesn't support SMR files from recent versions of Spike 2 (6 and up). For these versions you can export the data into mat files and these files are supported by fileio. Best, Vladimir On Wed, Sep 8, 2010 at 6:22 PM, Eduardo Garza wrote: > Greetings, > I did an EEG experiment using CED and the format is standard ".SMR". > The data contains 1 Channel (Cz) and 1 Event Channel. > When I try to look at the data in FT using: > cfg = []; > cfg.dataset = 'eduardo_pilot_03_events2.smr'; > cfg.trialdef.eventtype  = '?'; > definetrial(cfg); > I get several errors back: > Warning: Unable to load this DLL > Call ns_SetLibrary first! Process interrupted! > ??? Error using ==> read_ced_son at 81 > Could not get NeuroShare library info, please use the NS_SETLIBRARY > function. > Error in ==> ft_read_header at 357 >     orig = read_ced_son(filename,'readevents','no','readdata','no'); > Error in ==> read_header at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > Error in ==> trialfun_general at 50 > hdr = read_header(cfg.headerfile); > Error in ==> ft_definetrial at 110 >     [trl, event] = feval(cfg.trialfun, cfg); > Error in ==> definetrial at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > I checked the "read_ced_son.m" and apparently I need a Neuroshare library to > read the data (I thought FT already had that in). > So I go to the Neuroshare site and download a ZIP called > MATLAB_Import_Filter, which apparently should include several ".m" files and > 1 DLL called "mexprog.dll" for 64-bits, but the DLL is not there. > The readme.txt shows that I should also include a file called > "NeuroshareDLL" in the same directory. > I'm not sure where to go from here. > Where can I get that NeuroshareDLL and mexprog.dll that should go into the > directory? > Is my data in the correct format? > Thank you > Best regards > Eduardo > -- > Eduardo A. Garza Villarreal > MD, PhD Student > > -Center for Functionally Integrative Neuroscience (CFIN), Aarhus University; > -Royal Academy of Music, Aarhus, Denmark; > -Department of Psychiatry, Warneford Hospital, University of Oxford, UK. > > DK Office:   +45 89494408 > DK Mobile:  +45 2772 3440 > > UK Office:   +44 1865223918 > UK Mobile   +44 7879574135 > > http://person.au.dk/eduardo.garza at ki > http://www.cfin.au.dk/menu550-en > > egarza at gmail.com > eduardo at pet.auh.dk > eduardo.garzavillarreal at psych.ac.ox.uk > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Patricia.Wollstadt at GMX.DE Fri Sep 10 12:17:18 2010 From: Patricia.Wollstadt at GMX.DE (Patricia Wollstadt) Date: Fri, 10 Sep 2010 12:17:18 +0200 Subject: error volumenormalise Message-ID: Dear listusers, I am currently doing source localization on my data and encounter the following problem when using the volumenormalise function: ??? Error using ==> spm_bsplinc spm_bsplinc.c not compiled. Error in ==> spm_write_sn>nonlin_transform at 207 C = spm_bsplinc(V(i),d); Error in ==> spm_write_sn at 118 nonlin_transform(V,prm,x,y,z,mat,flags,msk); Error in ==> volumenormalise at 244 spm_write_sn(char(files),params,flags); % his creates the 'w' prefixed files I'm only using the cfg options as provided in the tutorial on beamformer techniques: cfg = []; cfg.coordinates = 'ctf'; cfg.nonlinear = 'no'; sourceDiffIntN = ft_volumenormalise(cfg, source); Thank you very much for your help, kind regards Patricia Wollstadt -- Achtung Sicherheitswarnung: GMX warnt vor Phishing-Attacken! http://portal.gmx.net/de/go/sicherheitspaket ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Anne.DoLam at UKB.UNI-BONN.DE Fri Sep 10 16:01:20 2010 From: Anne.DoLam at UKB.UNI-BONN.DE (vervang dit voor je naam of door ANONYMOUS) Date: Fri, 10 Sep 2010 16:01:20 +0200 Subject: Anne Do Lam ist au=?ISO-8859-1?Q?=DFer?= Haus. Message-ID: Ich werde ab 10.09.2010 nicht im Büro sein. Ich kehre zurück am 07.10.2010. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From egarza at GMAIL.COM Fri Sep 10 18:57:47 2010 From: egarza at GMAIL.COM (Eduardo Garza) Date: Fri, 10 Sep 2010 18:57:47 +0200 Subject: Can't read .SMR data into FT Message-ID: Dear Vladimir, Thank you for the answer. This didn't work, however, a member of our team Morten J�nsson found out the problem and apparently a bug. First, this doesn't work using MATLAB 64-bit, only 32-bit. Second, this is what Morten suggested: 1. download the newest fieldtrip version 2. download the Matlab-Import-Filter_2_5.zip from www.neuroshare.org 3. download the exe-file from http://www.ced.co.uk/upnssonu.shtml 4. delete the content of the directory "fieldtrip-20100909\external\neuroshare". This is obsolete (at least with respect to smr-files). We should add a bug report about this. 5. unpack the Matlab-Import-Filter_2_5.zip in the folder instead 6. place the nscedson.exe file in the folder and run it. This will generate a nscedson.dll file 7. rename this to nsCedSon.dll After this, Fieldtrip was able to read the SMR file recorded on Spike 7.2. However, we still have some issues with defining trials. If it keeps failing, we will have to do as you said and use the FileIO instead. Thanks again, Best regards Eduardo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 10 20:09:24 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 10 Sep 2010 20:09:24 +0200 Subject: volumerealign error Message-ID: Dear all, Can anyone tell me what to do when the following error happens? 1) First I ran the following code: ------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm [segmentedmri] = ft_volumesegment(cfg, mri); -------------- And the output looks like this : ====================== the input is volume data with dimensions [256 256 150] assuming that the input MRI is already approximately aligned with SPM coordinates performing the segmentation on the specified volume Warning: File 'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' not found. > In ft_volumesegment at 297 ===================== 2) Then I did this: ------------- cfg = []; cfg.method = 'interactive'; [realigned_mri] = ft_volumerealign(cfg, segmentedmri) -------------- And the output error message is: ================ the input is volume data with dimensions [256 256 150] ??? Index exceeds matrix dimensions. Error in ==> ft_volumerealign at 102 cfg.parameter = cfg.parameter{1}; ================ How can this error be fixed? FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My matlab is Version 7.5 but it only has Statistics Toolbox. And I installed SPM8. Could it be that I need other MATLAB toolboxes like "Signal processing toolbox"? Thanks a lot, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sangita.dandekar at GMAIL.COM Fri Sep 10 22:01:37 2010 From: sangita.dandekar at GMAIL.COM (Sangita Dandekar) Date: Fri, 10 Sep 2010 16:01:37 -0400 Subject: Simulations testing MEG planar on Yokogawa system Message-ID: Hi, I've tried to make changes to the megplanar code in FieldTrip so that it can be used for our Yokogawa (axial gradiometer) MEG system. I was wondering if anyone familar with the planar gradient approximation code in megplanar and/or the Yokogawa system could take a quick look at the changes that I've made and the results of simulations that I've done and see if they look reasonable. Output images generated by the simulation code (code pasted below) are at: http://clayspace.psych.nyu.edu/lab-members/sangita-dandekar/planarsims/ The simulation just consisted of pointing dipoles along the major axes and getting planar approximations for every dipole orientation. The output images are at the above link. Also pasted below are changes to segments of the combineplanar and planarchannelset functions that I made for the yokogawa system. (The only change that I ended up making in the original megplanar.m function was to comment out the code that causes an error if the input data is from an MEG system other than the supported ones) The original grad struct that I am using the for the unmodified axial gradiometer data for the yokogawa system looks like this: ftdata.grad ans = pnt: [314x3 double] ori: [314x3 double] tra: [157x314 double] label: {157x1 cell} unit: 'cm' The hope is that I can use the megplanar code (probably using the 'sincos' method) to get the planar gradient approximation, then apply freqanalysis to the horizontal and vertical components separately, and then finally recombine/sum the vertical and horizontal components using combineplanar. Any advice would be appreciated. Thanks in advance for any help! Sangita Dandekar %*******Simulation code to produce axial and planar x, y, and z images as shown at link above cfg.grad=ftdata.grad cfg.dip.pos=[ftdata.grad.pnt(57,1) ftdata.grad.pnt(57, 2) ftdata.grad.pnt(57,3)-5]; %5 cm below lower coil of gradiometer 57 cfg.dip.mom=[0 1 0]; %also varied to point along x ([1 0 0]) and z ([0 0 1]) cfg.vol.r=10; cfg.vol.o=[mean(ftdata.grad.pnt(:,1)) mean(ftdata.grad.pnt(:,2)) mean(ftdata.grad.pnt(:,3))] cfg.dip.signal=[ 1 1 1 ]; data=dipolesimulation(cfg); %get planar approximation: cfg=[]; cfg.planarmethod='sincos'; cfg.channel=ftdata.grad.label; [interp]=megplanar_yokogawa(cfg, data) %recombine horizontal and vertical components: cfg=[]; cfg.combinegrad='yes'; cfg.combmethod='sum'; [interpcomb]=combineplanar_yokogawa(cfg, interp) figure; cfgplot=[]; cfgplot.electrodes='numbers'; avg=timelockanalysis(cfgplot, interpcomb); %plot planar approximation topoplotER(cfgplot, avg) figure avg=timelockanalysis(cfgplot, data); topoplotER(cfgplot, avg) avg=timelockanalysis(cfgplot, data); %plot original axial gradiometer output topoplotER(cfgplot, avg) %*****************CHANGES TO COMBINEPLANAR (combineplanar_yokogawa.m): if strcmp(cfg.combinegrad, 'no') && ~isfield(data, 'grad') % the planar gradiometer definition was already removed % nothing needs to be done here elseif strcmp(cfg.combinegrad, 'no') && isfield(data, 'grad') % remove the planar gradiometer definition since it does not match the data any more data = rmfield(data, 'grad'); elseif strcmp(cfg.combinegrad, 'yes') && ~isfield(data, 'grad') % there is no gradiometer definition, impossible to reconstruct it error('the planar gradiometer definition is missing, cannot convert it back to axial'); elseif strcmp(cfg.combinegrad, 'yes') && isfield(data, 'grad') warning('trying to convert planar to axial gradiometers, this is experimental'); % try to reconstruct the original axial gradiometer array from the planar gradiometer definition orig = data.grad if all(size(orig.pnt)==[314 3]) && ... all(size(orig.pnt)==[314 3]) && ... all(size(orig.tra)==[314 314]) && ... length(orig.label)==314 && ... all(sum(orig.tra~=0,1)>2) % This looks as if it was made using the MEGPLANAR nearest neighbour approach % which means that the coil position and orientation still correspond % with those of the original axial gradiometer. Only the label and tra % have been modified and have to be restored to their original values. axial.pnt = orig.pnt; axial.ori = orig.ori; for i=1:157 axial.label{i} = orig.label{i}(1:(end-3)); end if all(orig.ori(1,:)==orig.ori(158,:)) % orientation is the same, the subtraction should be in "tra" axial.tra = [eye(157) -eye(157)]; else % orientation is opposite, the subtraction should not be in "tra" axial.tra = [eye(157) eye(157)]; end try axial.unit = orig.unit; end else error('cannot convert gradiometer definition back to axial, please contact Robert'); end data.grad = axial; end %*****************CHANGES TO PLANARCHANNELSET %(planarchannelset_yokogawa.m):** case 'meg' planar={ '1_dH' '1_dV' '1' '2_dH' '2_dV' '2' '3_dH' '3_dV' '3' '4_dH' '4_dV' '4' '5_dH' '5_dV' '5' '6_dH' '6_dV' '6' '7_dH' '7_dV' '7' '8_dH' '8_dV' '8' '9_dH' '9_dV' '9' '10_dH' '10_dV' '10' '11_dH' '11_dV' '11' '12_dH' '12_dV' '12' '13_dH' '13_dV' '13' '14_dH' '14_dV' '14' '15_dH' '15_dV' '15' '16_dH' '16_dV' '16' '17_dH' '17_dV' '17' '18_dH' '18_dV' '18' '19_dH' '19_dV' '19' '20_dH' '20_dV' '20' '21_dH' '21_dV' '21' '22_dH' '22_dV' '22' '23_dH' '23_dV' '23' '24_dH' '24_dV' '24' '25_dH' '25_dV' '25' '26_dH' '26_dV' '26' '27_dH' '27_dV' '27' '28_dH' '28_dV' '28' '29_dH' '29_dV' '29' '30_dH' '30_dV' '30' '31_dH' '31_dV' '31' '32_dH' '32_dV' '32' '33_dH' '33_dV' '33' '34_dH' '34_dV' '34' '35_dH' '35_dV' '35' '36_dH' '36_dV' '36' '37_dH' '37_dV' '37' '38_dH' '38_dV' '38' '39_dH' '39_dV' '39' '40_dH' '40_dV' '40' '41_dH' '41_dV' '41' '42_dH' '42_dV' '42' '43_dH' '43_dV' '43' '44_dH' '44_dV' '44' '45_dH' '45_dV' '45' '46_dH' '46_dV' '46' '47_dH' '47_dV' '47' '48_dH' '48_dV' '48' '49_dH' '49_dV' '49' '50_dH' '50_dV' '50' '51_dH' '51_dV' '51' '52_dH' '52_dV' '52' '53_dH' '53_dV' '53' '54_dH' '54_dV' '54' '55_dH' '55_dV' '55' '56_dH' '56_dV' '56' '57_dH' '57_dV' '57' '58_dH' '58_dV' '58' '59_dH' '59_dV' '59' '60_dH' '60_dV' '60' '61_dH' '61_dV' '61' '62_dH' '62_dV' '62' '63_dH' '63_dV' '63' '64_dH' '64_dV' '64' '65_dH' '65_dV' '65' '66_dH' '66_dV' '66' '67_dH' '67_dV' '67' '68_dH' '68_dV' '68' '69_dH' '69_dV' '69' '70_dH' '70_dV' '70' '71_dH' '71_dV' '71' '72_dH' '72_dV' '72' '73_dH' '73_dV' '73' '74_dH' '74_dV' '74' '75_dH' '75_dV' '75' '76_dH' '76_dV' '76' '77_dH' '77_dV' '77' '78_dH' '78_dV' '78' '79_dH' '79_dV' '79' '80_dH' '80_dV' '80' '81_dH' '81_dV' '81' '82_dH' '82_dV' '82' '83_dH' '83_dV' '83' '84_dH' '84_dV' '84' '85_dH' '85_dV' '85' '86_dH' '86_dV' '86' '87_dH' '87_dV' '87' '88_dH' '88_dV' '88' '89_dH' '89_dV' '89' '90_dH' '90_dV' '90' '91_dH' '91_dV' '91' '92_dH' '92_dV' '92' '93_dH' '93_dV' '93' '94_dH' '94_dV' '94' '95_dH' '95_dV' '95' '96_dH' '96_dV' '96' '97_dH' '97_dV' '97' '98_dH' '98_dV' '98' '99_dH' '99_dV' '99' '100_dH' '100_dV' '100' '101_dH' '101_dV' '101' '102_dH' '102_dV' '102' '103_dH' '103_dV' '103' '104_dH' '104_dV' '104' '105_dH' '105_dV' '105' '106_dH' '106_dV' '106' '107_dH' '107_dV' '107' '108_dH' '108_dV' '108' '109_dH' '109_dV' '109' '110_dH' '110_dV' '110' '111_dH' '111_dV' '111' '112_dH' '112_dV' '112' '113_dH' '113_dV' '113' '114_dH' '114_dV' '114' '115_dH' '115_dV' '115' '116_dH' '116_dV' '116' '117_dH' '117_dV' '117' '118_dH' '118_dV' '118' '119_dH' '119_dV' '119' '120_dH' '120_dV' '120' '121_dH' '121_dV' '121' '122_dH' '122_dV' '122' '123_dH' '123_dV' '123' '124_dH' '124_dV' '124' '125_dH' '125_dV' '125' '126_dH' '126_dV' '126' '127_dH' '127_dV' '127' '128_dH' '128_dV' '128' '129_dH' '129_dV' '129' '130_dH' '130_dV' '130' '131_dH' '131_dV' '131' '132_dH' '132_dV' '132' '133_dH' '133_dV' '133' '134_dH' '134_dV' '134' '135_dH' '135_dV' '135' '136_dH' '136_dV' '136' '137_dH' '137_dV' '137' '138_dH' '138_dV' '138' '139_dH' '139_dV' '139' '140_dH' '140_dV' '140' '141_dH' '141_dV' '141' '142_dH' '142_dV' '142' '143_dH' '143_dV' '143' '144_dH' '144_dV' '144' '145_dH' '145_dV' '145' '146_dH' '146_dV' '146' '147_dH' '147_dV' '147' '148_dH' '148_dV' '148' '149_dH' '149_dV' '149' '150_dH' '150_dV' '150' '151_dH' '151_dV' '151' '152_dH' '152_dV' '152' '153_dH' '153_dV' '153' '154_dH' '154_dV' '154' '155_dH' '155_dV' '155' '156_dH' '156_dV' '156' '157_dH' '157_dV' '157' }; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at GMAIL.COM Mon Sep 13 21:02:30 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Mon, 13 Sep 2010 21:02:30 +0200 Subject: volumerealign error Message-ID: Hello, I tried the same commands in a Windows Server 2008 PC with a R2009b MATLAB that has all 4 toolboxes recommended by Fieldtrip. And it has the latest SPM8 and Fieldtrip. I still got the same error message. Any suggestion how to fix the problem? Should I run "ft_volumerealign" first on the "mri" structure, then run "ft_volumesegment" on this realigned data? Thanks, Jim On Fri, 10 Sep 2010 20:09:24 +0200, Jim Li wrote: >Dear all, > >Can anyone tell me what to do when the following error happens? > >1) First I ran the following code: >------------- >mri = ft_read_mri('../2_mri.img'); >cfg = []; >cfg.write = 'no'; >cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm >[segmentedmri] = ft_volumesegment(cfg, mri); >-------------- > >And the output looks like this : >====================== >the input is volume data with dimensions [256 256 150] >assuming that the input MRI is already approximately aligned with SPM >coordinates >performing the segmentation on the specified volume >Warning: File >'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' >not found. >> In ft_volumesegment at 297 >===================== > >2) Then I did this: >------------- >cfg = []; >cfg.method = 'interactive'; >[realigned_mri] = ft_volumerealign(cfg, segmentedmri) >-------------- > >And the output error message is: >================ >the input is volume data with dimensions [256 256 150] >??? Index exceeds matrix dimensions. > >Error in ==> ft_volumerealign at 102 > cfg.parameter = cfg.parameter{1}; >================ > >How can this error be fixed? > >FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My >matlab is Version 7.5 but it only has Statistics Toolbox. And I installed >SPM8. Could it be that I need other MATLAB toolboxes like "Signal >processing toolbox"? > >Thanks a lot, > >Jim > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hannah.schulz at UNI-KONSTANZ.DE Wed Sep 15 13:45:35 2010 From: Hannah.schulz at UNI-KONSTANZ.DE (Hannah Schulz) Date: Wed, 15 Sep 2010 13:45:35 +0200 Subject: trl information in ft_resampledata Message-ID: Hello, I have a problem with a new fieldtrip version (7.9.2010). When I do ft_resampledata after preprocessing and then do a reject visual with cfg.method='summary' I get this warning : the input is raw data with 130 channels and 75 trials Warning: the trial definition in the configuration is inconsistent with the actual data > In public/private/fixtrialdef at 66 In checkdata at 559 In ft_rejectvisual at 159 Warning: failed to create sampleinfo field > In public/private/fixtrialdef at 73 In checkdata at 559 In ft_rejectvisual at 159 I also get an empty trl structure in the "artefact free" dataset . Unfortunately I do need the proper trl structure for my further analysis, could anybody help me how solve that problem? (With an older fieldtrip version it workes fine) Thank you very much in advance, Hannah Schulz Dipl. Psych. Hannah Schulz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: hannah.schulz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From N.A.Kloosterman at UVA.NL Wed Sep 15 16:08:47 2010 From: N.A.Kloosterman at UVA.NL (Niels Kloosterman) Date: Wed, 15 Sep 2010 16:08:47 +0200 Subject: trl information in ft_resampledata In-Reply-To: Message-ID: Hi Hannah, What you need to do is also resample the start and stop indices in the trl, as this still contains the indices relative to the sample rate from before ft_resample. The line of code that did it for me was: data.cfg.trl(:,1:3) = round(data.cfg.trl(:,1:3) * (1/cfg.fsample) * cfg.resamplefs); %resample the trl indices too or visual artifact rejection won't work Where fsample is your original sample rate and resamplefs the sample rate after resampling. If all is well the trl is now also updated as you discard trials during visual artefact rejection. Hope this helps. Best, Niels --- Niels A. Kloosterman MSc.| PhD student | University of Amsterdam | Cognitive Neuroscience Group | Dept. of Psychology | Roetersstraat 15, A614 | 1018 WB Amsterdam | Tel: +31 20 525 6847 On 9/15/10 1:45 PM, "Hannah Schulz" wrote: > Hello, > > I have a problem with a new fieldtrip version (7.9.2010). When I do > ft_resampledata after preprocessing and then do a reject visual with > cfg.method='summary' I get this warning : > > the input is raw data with 130 channels and 75 trials > Warning: the trial definition in the > configuration is inconsistent with the actual > data >> In public/private/fixtrialdef at 66 > In checkdata at 559 > In ft_rejectvisual at 159 > Warning: failed to create sampleinfo field >> In public/private/fixtrialdef at 73 > In checkdata at 559 > In ft_rejectvisual at 159 > > > I also get an empty trl structure in the "artefact free" dataset . > Unfortunately I do need the proper trl structure for my further > analysis, could anybody help me how solve that problem? (With an older > fieldtrip version it workes fine) > Thank you very much in advance, > Hannah Schulz > > > > > > > Dipl. Psych. Hannah Schulz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: hannah.schulz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at GMAIL.COM Wed Sep 15 21:55:33 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 15 Sep 2010 21:55:33 +0200 Subject: Which way is correct? Message-ID: (a) Aha, we found that, even though "mri" has a field called "anatomy", running "[segmentedmri]=ft_volumesegment(cfg, mri)" will drop that"anatomy" field for "segmentedmri" , thus causing trouble for subsequent implementation of "ft_volumerealign(cfg, segmentedmri)". That's why we got the error message. By adding the "anatomy" field to "segmentedmri" before running ""ft_volumerealign(cfg, segmentedmri)", the problem can be solved. Here is the full script that worked now: ----------------------------------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [segmentedmri] = ft_volumesegment(cfg, mri); segmentedmri.anatomy= mri.anatomy; % a newly added line that solved the issue cfg = []; cfg.method = 'interactive'; [realigned_mri] = ft_volumerealign(cfg, segmentedmri) -------------------------------------------- (b) Interestingly, if we swap the above steps (i.e. do "ft_volumerealign" first, then "ft_volumesegment"), it also works fine. Here is the full script that works, too: ----------------------------------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [mri_realign] = ft_volumerealign(cfg, mri) cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [segmentedmri] = ft_volumesegment(cfg, mri_realign); ----------------------------------------- My question is: given these two ways to process data, which one is the correct way? Do "ft_volumesegment" first, then "ft_volumerealign" (i.e. use scripts in (a)) ? Or do "ft_volumerealign" first, then "ft_volumesegment" (i.e. use scripts in (b))? Thanks. Jim On Mon, 13 Sep 2010 21:02:30 +0200, Jim Li wrote: >Hello, > >I tried the same commands in a Windows Server 2008 PC with a R2009b MATLAB >that has all 4 toolboxes recommended by Fieldtrip. And it has the latest >SPM8 and Fieldtrip. I still got the same error message. > >Any suggestion how to fix the problem? Should I run "ft_volumerealign" >first on the "mri" structure, then run "ft_volumesegment" on this realigned >data? > >Thanks, > >Jim > >On Fri, 10 Sep 2010 20:09:24 +0200, Jim Li wrote: > >>Dear all, >> >>Can anyone tell me what to do when the following error happens? >> >>1) First I ran the following code: >>------------- >>mri = ft_read_mri('../2_mri.img'); >>cfg = []; >>cfg.write = 'no'; >>cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm >>[segmentedmri] = ft_volumesegment(cfg, mri); >>-------------- >> >>And the output looks like this : >>====================== >>the input is volume data with dimensions [256 256 150] >>assuming that the input MRI is already approximately aligned with SPM >>coordinates >>performing the segmentation on the specified volume >>Warning: File >>'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' >>not found. >>> In ft_volumesegment at 297 >>===================== >> >>2) Then I did this: >>------------- >>cfg = []; >>cfg.method = 'interactive'; >>[realigned_mri] = ft_volumerealign(cfg, segmentedmri) >>-------------- >> >>And the output error message is: >>================ >>the input is volume data with dimensions [256 256 150] >>??? Index exceeds matrix dimensions. >> >>Error in ==> ft_volumerealign at 102 >> cfg.parameter = cfg.parameter{1}; >>================ >> >>How can this error be fixed? >> >>FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My >>matlab is Version 7.5 but it only has Statistics Toolbox. And I installed >>SPM8. Could it be that I need other MATLAB toolboxes like "Signal >>processing toolbox"? >> >>Thanks a lot, >> >>Jim >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the >FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Thu Sep 16 13:58:26 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Thu, 16 Sep 2010 13:58:26 +0200 Subject: significance of coherence differences Message-ID: Dear Claudia, I have nothing to add really to Eric's mail, just wanted to let you know that I think what you're doing is just fine. During frequency analysis fieldtrip averages spectra over trials automatically (though it is not a weighted average and I didn't quite understand why you want to weight them). The normalization, too, is part of the automatic calculation of coherence by connectivityanalysis. The normalization is actually part of the definition of coherence. And as Eric says, the montecarlo method is appropiate when doing many comparisons (many channels, many frequencies). Maybe you would like think about the test statistic. I have never used the fieldtrip statisics functions but it sounds like your statistic is a traditional t-value. There are other statistics which are commonly used in coherence analysis (z-transform, see e.g. the paper of Maris and Schoffelen on coh diff) which may do a better job in capturing the effect. Though in nonparametric testing the validity of your stats does not depend on the statistic, they are just not all equally effective. Best, Jan -----Original Message----- From: FieldTrip discussion list on behalf of Eric Maris Sent: Thu 9/9/2010 10:02 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] significance of coherence differences Dear Claudia, > I too am confused about coherence and its statistical analysis..I am > trying to > calculate the coherence between POz and 47 other channels in a > multisubject > study (N=19) with a within-subject design to test (1) whether coherence > in > condition 'Figure' is the same as in condition 'No figure', and (2) > whether > coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct > rejections'. > > Either way I am not sure about a couple of things: > > 1) This is maybe a silly question but in your reply to Jan's post you > state: "...You apply this test statistic to the condition-specific > coherences, > obtained by summing and normalizing the trial(taper)-specific cross- > spectra..." - You mean averaging the trial-specific cross-spectra (and > trial- > specific powerspectra) right? Moreover does this mean that > cfg.keeptrials can > be set to 'no' when calculating the powerspectra and cross-spectra with > freqanalysis(_mtmconvol)? This would be great news for me, since the 4D > freqdata is too large to save.. For statistical testing in a within-subjects design (units-of-observation are subjects and not trials) you don't need the trials. So, you can safely put cfg.keeptrials to 'no'. By the way, try using freqanalysis_mtmfft (frequency analysis without time resolution) before freqanalysis_mtmconvol (with time resolutions). This makes life a lot easier and conceptually you're doing the same thing. > > 2) Another related question comes from the fact that the experiment had > 3 > different masking durations, so to combine the powerspectra belonging > to the > same condition (i.e. the Figs) but different mask durations we > calculated > weighted averages based on the least amount of trials in each Mask > duration > group. My question now would be whether the normalization to get the > coherence values should be done before or after this weighing (In other > words, > should I weigh the cross-spectra or the coherence values, or does this > not > matter?) I don't see why you have to deal with the normalization yourself. You can use ft_freqdescriptives or ft_connectivityanalysis to calculate the coherence values taking the freqanalsis output as its input. In any case, to obtain coherence values from the cross-spectra, one should always normalize (i.e., divide) by the square-roots of the power-spectra calculated on the same trials. I may be wrong, but it seems that you are making life more difficult than it should be. > > 3) Now for the statistics. Again in your reply to Jan's post you say: > "...For a > single channel pair and a single frequency bin, the appropriate > statistic is the > dependent (paired) samples t-statistic or, in a nonparametric > framework, the > Wilcoxon signed rank sum test." Does this mean it is not valid to use > freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = > 'depsamplesT' > (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the > coherence > between POz (my ref.channel) and the 47 other channels is the same in > different conditions, using all my frequency and time bins? Do I need > to make a > selection? What you propose IS valid to control for multiple comparisons. However, in my reply to Jan, I consider a single statistical test ("... For a single channel pair and a single frequency bin, ..."); so, no multiple comparisons problem here. Good luck, Eric > > Thank you for your time. > > Sincerely, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Sep 17 14:25:30 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 17 Sep 2010 14:25:30 +0200 Subject: trl information in ft_resampledata In-Reply-To: Message-ID: Dear Hannah, You may want to have a look at the following: http://fieldtrip.fcdonders.nl/faq/is_it_possible_to_keep_track_of_trial-specific_information_in_my_fieldtrip_analysis_pipeline http://fieldtrip.fcdonders.nl/development/ensure_consistend_trial_definition We tried to make things as backward compatible as possible, but there may be some loose ends here and there. Let me know whether the information is helpful and allows you to tweak your analysis pipeline such that it works again. Best, Jan-Mathijs On Sep 15, 2010, at 1:45 PM, Hannah Schulz wrote: > Hello, > > I have a problem with a new fieldtrip version (7.9.2010). When I do > ft_resampledata after preprocessing and then do a reject visual with > cfg.method='summary' I get this warning : > > the input is raw data with 130 channels and 75 trials > Warning: the trial definition in the > configuration is inconsistent with the actual > data > > In public/private/fixtrialdef at 66 > In checkdata at 559 > In ft_rejectvisual at 159 > Warning: failed to create sampleinfo field > > In public/private/fixtrialdef at 73 > In checkdata at 559 > In ft_rejectvisual at 159 > > > I also get an empty trl structure in the "artefact free" dataset . > Unfortunately I do need the proper trl structure for my further > analysis, could anybody help me how solve that problem? (With an > older fieldtrip version it workes fine) > Thank you very much in advance, > Hannah Schulz > > > > > > > Dipl. Psych. Hannah Schulz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: hannah.schulz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Sat Sep 18 00:53:11 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Fri, 17 Sep 2010 18:53:11 -0400 Subject: strange segmentation w/ ft_volumesegment Message-ID: Hi there, I am trying to segment an anatomical MRI. Here's the script: mri = ft_read_mri('test.nii'); %put the mri into the proper orientation cfg = []; mri.anatomy = permute(mri.anatomy,[1 3 2]); mri.anatomy = mri.anatomy(end:-1:1,:,end:-1:1); %segment the mri mri = ft_volumerealign(cfg,mri); cfg.template = '/spm8/templates/T1.nii'; cfg.coordinates = 'spm'; cfg.write = 'yes'; cfg.name = 'test_segment'; [segmentedmri] = ft_volumesegment(cfg, mri) %visualize the results cfg = []; test = segmentedmri; test.avg.pow = test.gray+test.white+test.csf; test.anatomy = mri.anatomy; cfg.funparameter = 'avg.pow'; cfg.interactive = 'yes'; ft_sourceplot(cfg,test); No errors are thrown, but when I visualize the results, the segmentation is clearly incorrect (attached) - it seems to be trying to follow the contour of the head instead of the brain. I've overlaid both test.nii and the template in MRIcron and they are aligned and in the same space; is there any other reason why segmentation may be failing? Thanks in advance! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: segmented.jpg Type: image/jpeg Size: 61138 bytes Desc: not available URL: From r.oostenveld at DONDERS.RU.NL Mon Sep 20 08:45:43 2010 From: r.oostenveld at DONDERS.RU.NL (Robert Oostenveld) Date: Mon, 20 Sep 2010 08:45:43 +0200 Subject: POSTDOC position at ESI in the Human Connectome Project Message-ID: Begin forwarded message: From: "Fries, Pascal" Date: 17 September 2010 11:48:10 GMT+02:00 To: undisclosed-recipients: ; Subject: [ESILIST-FRIES-LAB-ALL] POSTDOC position at ESI in the Human Connectome Project Dear colleagues, at the ESI, we are seeking a postdoc candidate and I would greatly appreciate your help in that! I attach the respective ad and it would be great if you could post it in your lab and/or distribute it through e-mail lists or similar! With kind regards! Pascal Prof. Dr. Pascal Fries Director, Ernst Strüngmann Institute (ESI) in Cooperation with Max Planck Society Deutschordenstr. 46, D-60528 Frankfurt E-mail: pascal.fries at esi-frankfurt.de Fon: 0049 69 96769 501 Fax: 0049 69 96769 555 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ESI HCP postdoc ad.doc Type: application/msword Size: 140288 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ESI HCP postdoc ad.pdf Type: application/pdf Size: 70880 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko at NYU.EDU Mon Sep 20 23:54:46 2010 From: akiko at NYU.EDU (Akiko Ikkai) Date: Mon, 20 Sep 2010 17:54:46 -0400 Subject: megplanar input structure Message-ID: Hello, I'm trying to calculate the planar gradient for my MEG data. I have 2 questions: 1. in tutorial "Event related averaging and planar gradient", (ft_)megplanar appears to call for averaged data created with cfg.keeptrials = 'no'; (how it was calculated earlier in the page), which looks like: (from tutorial) avgFIC = avg: [149x900 double] var: [149x900 double] fsample: 300 numsamples: [77x1 double] time: [1x900 double] dof: [149x900 double] label: {149x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] However, megplanar looks for data.trial (e.g. line 252). If I feed in averaged data with cfg.keeptrials = 'yes'; input structure looks like: (from my data, after timelockanalysis with cfg.keeptrials = 'yes';) timelock = avg: [156x751 double] var: [156x751 double] fsample: 500 time: [1x751 double] dof: [156x751 double] label: {1x156 cell} trial: [72x156x751 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] However, data.trial is matrix instead of cell structure, as megplanar requires (e.g. line 505: interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it crashes here. Also in tutorial, it appears that the sequence of analysis is ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I suspect ft_timelockanalysis should be before calculating planar gradients...? 2. How to deal with bad channels in calculating planar gradient? It is suggested that we do preprocessing, timelockanalysis, megplanar and combineplanar. However, if I have bad channels and reject them in preprocessing, combineplanar crashes @ line 326 if all(size(orig.pnt)==[302 3]) && ... all(size(orig.pnt)==[302 3]) && ... all(size(orig.tra)==[302 302]) && ... length(orig.label)==302 && ... all(sum(orig.tra~=0,1)>2) because length(orig.label) is not going to be 302. Could I simply change these lines to something like: if all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... all(sum(orig.tra~=0,1)>2) If anyone could clarify these issues, I'd greatly appreciate it. Thanks in advance! Akiko ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Tue Sep 21 00:13:24 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Mon, 20 Sep 2010 17:13:24 -0500 Subject: megplanar input structure In-Reply-To: <5860855f6ce91.4c979fe6@mail.nyu.edu> Message-ID: Hi, In response to your second question, there is a function called ft_channelrepair which you can use to repair bad channels prior to using combineplanar. Please see the example code below: cfg = []; cfg.badchannel = {'A153'; 'A154'} [interp] = ft_channelrepair(cfg, data) Good luck! -Tony -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Akiko Ikkai Sent: Monday, September 20, 2010 4:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] megplanar input structure Hello, I'm trying to calculate the planar gradient for my MEG data. I have 2 questions: 1. in tutorial "Event related averaging and planar gradient", (ft_)megplanar appears to call for averaged data created with cfg.keeptrials = 'no'; (how it was calculated earlier in the page), which looks like: (from tutorial) avgFIC = avg: [149x900 double] var: [149x900 double] fsample: 300 numsamples: [77x1 double] time: [1x900 double] dof: [149x900 double] label: {149x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] However, megplanar looks for data.trial (e.g. line 252). If I feed in averaged data with cfg.keeptrials = 'yes'; input structure looks like: (from my data, after timelockanalysis with cfg.keeptrials = 'yes';) timelock = avg: [156x751 double] var: [156x751 double] fsample: 500 time: [1x751 double] dof: [156x751 double] label: {1x156 cell} trial: [72x156x751 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] However, data.trial is matrix instead of cell structure, as megplanar requires (e.g. line 505: interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it crashes here. Also in tutorial, it appears that the sequence of analysis is ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I suspect ft_timelockanalysis should be before calculating planar gradients...? 2. How to deal with bad channels in calculating planar gradient? It is suggested that we do preprocessing, timelockanalysis, megplanar and combineplanar. However, if I have bad channels and reject them in preprocessing, combineplanar crashes @ line 326 if all(size(orig.pnt)==[302 3]) && ... all(size(orig.pnt)==[302 3]) && ... all(size(orig.tra)==[302 302]) && ... length(orig.label)==302 && ... all(sum(orig.tra~=0,1)>2) because length(orig.label) is not going to be 302. Could I simply change these lines to something like: if all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... all(sum(orig.tra~=0,1)>2) If anyone could clarify these issues, I'd greatly appreciate it. Thanks in advance! Akiko ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Sep 21 11:34:10 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 21 Sep 2010 11:34:10 +0200 Subject: strange segmentation w/ ft_volumesegment In-Reply-To: <50434.132.183.137.195.1284763991.squirrel@mail.nmr.mgh.harvard.edu> Message-ID: Dear Matt, From your figure it looks as if there is a coregistration problem causing the segmentation (in SPM8) to return nonsense results. It is important to note the following: the SPM segmentation routine relies on matchin the anatomy of the single subject's MRI to a series of templates. In order for this to work well, the anatomy should be approximately coregistered with these templates. FieldTrip tries to achieve this in ft_volumesegment. This seems to go wrong in your case. Two things are problematic here: permuting and flipping mri.anatomy without changing mri.transform is wrong, because the block of voxels containing the anatomy does not correspond anymore to the voxel to head coordinate system transformation as specified in mri.transform. Next, the convention for anatomical MRIs in EEG/MEG is that the coordinate system which defines 'headspace' is different from the SPM convention. In other words, probably you should change cfg.coordinates into 'ctf' before calling ft_volumesegment, because ft_volumerealign will give you the transformation to headspace as defined by the fiducials. Best wishes, Jan-Mathijs On Sep 18, 2010, at 12:53 AM, Matt F. Panichello wrote: > Hi there, > > I am trying to segment an anatomical MRI. Here's the script: > > mri = ft_read_mri('test.nii'); > > %put the mri into the proper orientation > cfg = []; > mri.anatomy = permute(mri.anatomy,[1 3 2]); > mri.anatomy = mri.anatomy(end:-1:1,:,end:-1:1); > > %segment the mri > mri = ft_volumerealign(cfg,mri); > > cfg.template = '/spm8/templates/T1.nii'; > cfg.coordinates = 'spm'; > cfg.write = 'yes'; > cfg.name = 'test_segment'; > [segmentedmri] = ft_volumesegment(cfg, mri) > > %visualize the results > cfg = []; > test = segmentedmri; > test.avg.pow = test.gray+test.white+test.csf; > test.anatomy = mri.anatomy; > cfg.funparameter = 'avg.pow'; > cfg.interactive = 'yes'; > ft_sourceplot(cfg,test); > > > No errors are thrown, but when I visualize the results, the > segmentation > is clearly incorrect (attached) - it seems to be trying to follow the > contour of the head instead of the brain. I've overlaid both > test.nii and > the template in MRIcron and they are aligned and in the same space; is > there any other reason why segmentation may be failing? Thanks in > advance! > > Matt > > > > > > 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. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Sep 21 11:36:51 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 21 Sep 2010 11:36:51 +0200 Subject: megplanar input structure In-Reply-To: <5860855f6ce91.4c979fe6@mail.nyu.edu> Message-ID: Dear Akiko, I think that your crash may be related to the issue of missing channels. Antony already pointed you to a way how to fix this. As to your first question: ft_megplanar indeed works with data containing a trial field (as cell-array). However, no need for you to worry about this; if your input data is for example a 'timelock' structure, fieldtrip automatically converts this structure into one containing a 'trial'. Best wishes, Jan-Mathijs On Sep 20, 2010, at 11:54 PM, Akiko Ikkai wrote: > Hello, > > I'm trying to calculate the planar gradient for my MEG data. I have > 2 questions: > > 1. in tutorial "Event related averaging and planar gradient", > (ft_)megplanar appears to call for averaged data created with > cfg.keeptrials = 'no'; (how it was calculated earlier in the page), > which looks like: (from tutorial) > > avgFIC = > avg: [149x900 double] > var: [149x900 double] > fsample: 300 > numsamples: [77x1 double] > time: [1x900 double] > dof: [149x900 double] > label: {149x1 cell} > dimord: 'chan_time' > grad: [1x1 struct] > cfg: [1x1 struct] > > However, megplanar looks for data.trial (e.g. line 252). If I feed > in averaged data with cfg.keeptrials = 'yes'; input structure looks > like: (from my data, after timelockanalysis with cfg.keeptrials = > 'yes';) > > timelock = > > avg: [156x751 double] > var: [156x751 double] > fsample: 500 > time: [1x751 double] > dof: [156x751 double] > label: {1x156 cell} > trial: [72x156x751 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > However, data.trial is matrix instead of cell structure, as > megplanar requires (e.g. line 505: > interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it > crashes here. > > Also in tutorial, it appears that the sequence of analysis is > ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I > suspect ft_timelockanalysis should be before calculating planar > gradients...? > > > 2. How to deal with bad channels in calculating planar gradient? It > is suggested that we do preprocessing, timelockanalysis, megplanar > and combineplanar. However, if I have bad channels and reject them > in preprocessing, combineplanar crashes @ line 326 > > if all(size(orig.pnt)==[302 3]) && ... > all(size(orig.pnt)==[302 3]) && ... > all(size(orig.tra)==[302 302]) && ... > length(orig.label)==302 && ... > all(sum(orig.tra~=0,1)>2) > > because length(orig.label) is not going to be 302. Could I simply > change these lines to something like: > > if all(size(orig.pnt)==[length(orig.label) 3]) && ... > all(size(orig.pnt)==[length(orig.label) 3]) && ... > all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... > all(sum(orig.tra~=0,1)>2) > > > If anyone could clarify these issues, I'd greatly appreciate it. > Thanks in advance! Akiko > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From E.vandenBroeke at ANES.UMCN.NL Wed Sep 22 14:30:25 2010 From: E.vandenBroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 22 Sep 2010 14:30:25 +0200 Subject: non-parametric cluster analysis In-Reply-To: Message-ID: Dear dr. Maris, I would like to ask a question regarding your article: Nonparametric statistical testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I hope you will answer it. My question is about the following. I want to use the non-parametric cluster analysis, the one you described in your article, for my ERP analysis. In this article you quantified the difference between the two conditions (congruent and incongruent) by calculating sample specific t-values, based on the t-distribution. These sample specific t-values were calculated based on a two sided test statistic and an alpha of .05. Subsequently clusters were chosen based on the uncorrected critical t-value. This uncorrected critical t-value is also based on a two sided test statistic. Now my question. I understand that this uncorrected critical t-value threshold affects the sensitivity of the statistical test rather than the validity. So is it also possible to calculate the sample specific t-values belonging to the one-sided test statistic, instead of two-sided? The same question accounts for the uncorrected critical t-value used as threshold. Thanks in advance, Best, Emanuel Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.vandenbroeke at ANES.UMCN.NL Wed Sep 22 14:40:27 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 22 Sep 2010 14:40:27 +0200 Subject: non-parametric cluster analysis Message-ID: Dear dr. Maris, I would like to ask a question regarding your article: Nonparametric statistical testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I hope you will answer it. My question is about the following. I want to use the non-parametric cluster analysis, the one you described in your article, for my ERP analysis. In this article you quantified the difference between the two conditions (congruent and incongruent) by calculating sample specific t-values, based on the t-distribution. These sample specific t-values were calculated based on a two sided test statistic and an alpha of .05. Subsequently clusters were chosen based on the uncorrected critical t-value. This uncorrected critical t- value is also based on a two sided test statistic. Now my question. I understand that this uncorrected critical t-value threshold affects the sensitivity of the statistical test rather than the validity. So is it also possible to calculate the sample specific t-values belonging to the one- sided test statistic, instead of two-sided? The same question accounts for the uncorrected critical t-value used as threshold. Thanks in advance, Best, Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 22 22:25:00 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 22 Sep 2010 22:25:00 +0200 Subject: non-parametric cluster analysis In-Reply-To: Message-ID: Dear Emanuel, > I would like to ask a question regarding your article: Nonparametric > statistical > testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I > hope you will answer it. > My question is about the following. I want to use the non-parametric > cluster > analysis, the one you described in your article, for my ERP analysis. > In this article you quantified the difference between the two > conditions > (congruent and incongruent) by calculating sample specific t-values, > based on > the t-distribution. These sample specific t-values were calculated > based on a > two sided test statistic and an alpha of .05. Subsequently clusters > were > chosen based on the uncorrected critical t-value. This uncorrected > critical t- > value is also based on a two sided test statistic. > Now my question. I understand that this uncorrected critical t-value > threshold > affects the sensitivity of the statistical test rather than the > validity. So is it > also possible to calculate the sample specific t-values belonging to > the one- > sided test statistic, instead of two-sided? I guess you mean here whether one may also select samples for subsequent clustering based on whether their t-statistics exceed the critical value of a one-sided statistical test. Yes, this is allowed. However, when you use the cluster-based permutation tests in Fieldtrip, you can do this with the same function that (per default) does the selection on the basis of the critical values for a two-sided statistical test. You only have to double the value of the alphathresh-parameter (e.g., putting it at 0.10 such that it uses 0.05 as the critical p-value for the selection of the samples), and you can evaluate the permutation p-values of the clusters by comparing them with your nominal alpha-level (typically, 0.05). Researchers that, unlike you, are interested in both positive and negative clusters, must compare the permutation p-values with half their nominal alpha-level (typically, 0.025). Good luck, Eric The same question accounts > for the > uncorrected critical t-value used as threshold. > Thanks in advance, > Best, > Emanuel > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Tim.Bardouille at NRC-CNRC.GC.CA Thu Sep 23 00:10:40 2010 From: Tim.Bardouille at NRC-CNRC.GC.CA (Bardouille, Tim) Date: Wed, 22 Sep 2010 15:10:40 -0700 Subject: FieldTrip beamformer with Elekta Neuromag-306 Message-ID: Hi there, I'm just wondering if the Fieldtrip beamformer works with data from the Elekta Neuromag-306? Does the beamformer use the planar gradiometer and magnetometer data? Please let me know. Thanks, Tim. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko at NYU.EDU Thu Sep 23 01:20:19 2010 From: akiko at NYU.EDU (Akiko Ikkai) Date: Wed, 22 Sep 2010 19:20:19 -0400 Subject: megplanar input structure In-Reply-To: <793CFCD3-2ED3-4794-AA0F-8A26CD2C0739@donders.ru.nl> Message-ID: Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input ERF1 = trial: {1x137 cell} label: {157x1 cell} grad: [1x1 struct] fsample: 500 time: {1x137 cell} cfg: [1x1 struct] [stat] = timelockstatistics(cfg, ERF1, ERF2); ??? Reference to non-existent field 'dimord'. Error in ==> prepare_timefreq_data>forcedimord at 577 inputdim = tokenize(input.dimord, '_'); Error in ==> prepare_timefreq_data at 176 [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 318 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> timelockstatistics at 115 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in ==> cluster_ERF_bwTrialtest_planar at 50 [stat] = timelockstatistics(cfg, ERF1, ERF2); 2. manually added dimord to the same input ERF1.dimord = 'rpt_chan_time'; [stat] = timelockstatistics(cfg, ERF1, ERF2); ??? Undefined function or method 'isnan' for input arguments of type 'cell'. Error in ==> prepare_timefreq_data at 215 if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) Error in ==> statistics_wrapper at 318 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> timelockstatistics at 115 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); 3. With timelockanalysis (after megplanar), it crashes during combineplanar ??? Subscripted assignment dimension mismatch. Error in ==> checkdata>raw2timelock at 1136 tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; Error in ==> checkdata at 366 data = raw2timelock(data); Error in ==> combineplanar at 356 data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); ... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. Thanks in advance! Akiko ----- Original Message ----- From: jan-mathijs schoffelen Date: Tuesday, September 21, 2010 5:37 am Subject: Re: [FIELDTRIP] megplanar input structure To: FIELDTRIP at NIC.SURFNET.NL > Dear Akiko, > > I think that your crash may be related to the issue of missing > channels. Antony already pointed you to a way how to fix this. As to > > your first question: ft_megplanar indeed works with data containing a > > trial field (as cell-array). However, no need for you to worry about > > this; if your input data is for example a 'timelock' structure, > fieldtrip automatically converts this structure into one containing a > > 'trial'. > > Best wishes, > > Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From masaki.maruyama at CEA.FR Thu Sep 23 10:45:16 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Thu, 23 Sep 2010 10:45:16 +0200 Subject: FieldTrip beamformer with Elekta Neuromag-306 In-Reply-To: A Message-ID: Dear Dr. Tim, Fieldtrip can do beamforming to each of planar data and magnetometer data. It will be also possible to apply to both data together if we can find out an appropriate method to normalize such different scale of signals in preprocessing. Sincerely, Masaki Maruyama Inserm U.992 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE http://www.unicog.org/ ________________________________ De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Bardouille, Tim Envoyé : jeudi 23 septembre 2010 00:11 À : FIELDTRIP at NIC.SURFNET.NL Objet : [FIELDTRIP] FieldTrip beamformer with Elekta Neuromag-306 Hi there, I'm just wondering if the Fieldtrip beamformer works with data from the Elekta Neuromag-306? Does the beamformer use the planar gradiometer and magnetometer data? Please let me know. Thanks, Tim. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Thu Sep 23 11:12:36 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:12:36 +0200 Subject: megplanar input structure / gerneral usage of plamar gradients fpr ERFs In-Reply-To: <5990feac1d369.4c9a56f3@mail.nyu.edu> Message-ID: Dear Akiko, maybe I can help with the confusion. Not in terms of fieldtrip usage but rather in the logic of using planar gradients for ERFs. When computing ERFs you count on non-repeateable signals to average to zero and on repeatable signals to average to non-zero quantities. This requires that your signals carry a sign (i.e. they're positive and negative). Clearly this is not the case anymore after combineplanar. Hence, any averaging that you do should occur before combineplanar, otherwise averaging to get an ERF-like construct does not make sense. I remeber that putting the gradient structure that you obtain after megplanar into the statistics was sometimes a problem (do not know whetherthis is still the case, though). So you basically have two options: (1) Do everything in axial gradiometers, including ERFS and stats. As a last step you may visualize the raw effect in planar gardients (i.e. do megplanar and combineplanar on your raw effect). See Grützner et al., J Neuroscience, 2010 for an example of what you get that way. (2) Compute the planar gradients as a first thing on the raw signals (but do NOT use combineplanar afterwards), do any averaging and stats that you'd like to do on the full 2xN gradient signals. Afterwards use combineplanar for visualization of the effects. As these two methods only differ in the arrangement of linear processing steps they are fully equivalent. Note that in both cases the nonlinear step (combineplaner) is done last. This is necessary because due to its nonlinear nature it does not commute with any other analysis step without dratsically changig the results and affecting the interpretation of what it is that you see. Michael -----Ursprüngliche Nachricht----- Von: "Akiko Ikkai" Gesendet: Sep 23, 2010 1:20:19 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] megplanar input structure >Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). > >I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. > >My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. > >I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input >ERF1 = > > trial: {1x137 cell} > label: {157x1 cell} > grad: [1x1 struct] > fsample: 500 > time: {1x137 cell} > cfg: [1x1 struct] > >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >??? Reference to non-existent field 'dimord'. > >Error in ==> prepare_timefreq_data>forcedimord at 577 >inputdim = tokenize(input.dimord, '_'); > >Error in ==> prepare_timefreq_data at 176 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > >Error in ==> statistics_wrapper at 318 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > >Error in ==> timelockstatistics at 115 >[stat, cfg] = statistics_wrapper(cfg, varargin{:}); > >Error in ==> cluster_ERF_bwTrialtest_planar at 50 >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >2. manually added dimord to the same input >ERF1.dimord = 'rpt_chan_time'; > >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >??? Undefined function or method 'isnan' for input arguments of type 'cell'. > >Error in ==> prepare_timefreq_data at 215 > if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) > >Error in ==> statistics_wrapper at 318 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > >Error in ==> timelockstatistics at 115 >[stat, cfg] = statistics_wrapper(cfg, varargin{:}); > >3. With timelockanalysis (after megplanar), it crashes during combineplanar > >??? Subscripted assignment dimension mismatch. > >Error in ==> checkdata>raw2timelock at 1136 > tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; > >Error in ==> checkdata at 366 > data = raw2timelock(data); > >Error in ==> combineplanar at 356 > data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); > > >... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. > >Thanks in advance! Akiko > > >----- Original Message ----- >From: jan-mathijs schoffelen >Date: Tuesday, September 21, 2010 5:37 am >Subject: Re: [FIELDTRIP] megplanar input structure >To: FIELDTRIP at NIC.SURFNET.NL > >> Dear Akiko, >> >> I think that your crash may be related to the issue of missing >> channels. Antony already pointed you to a way how to fix this. As to >> >> your first question: ft_megplanar indeed works with data containing a >> >> trial field (as cell-array). However, no need for you to worry about >> >> this; if your input data is for example a 'timelock' structure, >> fieldtrip automatically converts this structure into one containing a >> >> 'trial'. >> >> Best wishes, >> >> Jan-Mathijs > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From michael.wibral at WEB.DE Thu Sep 23 11:18:33 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:18:33 +0200 Subject: UPDATE megplanar input structure / gerneral usage of planar gradients fpr ERFs In-Reply-To: <1949535077.1716100.1285233156078.JavaMail.fmail@mwmweb053> Message-ID: Dear Akiko, I just remebered the problem you get when trying to do stats on planar gradient data: Any corrcetion method that takes spatial distance between sensors into account - such as Eric's cluster based correction - can not handle planar grdaiometer data properly - for fundamental reasons discussed earlier in this forum. But stats with FDR should work on the planar gradient inputs. Perhaps you will have to add a fake grad field (with 2xN entries !) to the output of megplanar.m to make timelockstatistics run. Michael -----Ursprüngliche Nachricht----- Von: "Michael Wibral" Gesendet: Sep 23, 2010 11:12:36 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] megplanar input structure / gerneral usage of plamar gradients fpr ERFs >Dear Akiko, > >maybe I can help with the confusion. Not in terms of fieldtrip usage but rather in the logic of using planar gradients for ERFs. > >When computing ERFs you count on non-repeateable signals to average to zero and on repeatable signals to average to non-zero quantities. This requires that your signals carry a sign (i.e. they're positive and negative). Clearly this is not the case anymore after combineplanar. Hence, any averaging that you do should occur before combineplanar, otherwise averaging to get an ERF-like construct does not make sense. > >I remeber that putting the gradient structure that you obtain after megplanar into the statistics was sometimes a problem (do not know whetherthis is still the case, though). > >So you basically have two options: >(1) Do everything in axial gradiometers, including ERFS and stats. As a last step you may visualize the raw effect in planar gardients (i.e. do megplanar and combineplanar on your raw effect). See Grützner et al., J Neuroscience, 2010 for an example of what you get that way. >(2) Compute the planar gradients as a first thing on the raw signals (but do NOT use combineplanar afterwards), do any averaging and stats that you'd like to do on the full 2xN gradient signals. Afterwards use combineplanar for visualization of the effects. > >As these two methods only differ in the arrangement of linear processing steps they are fully equivalent. Note that in both cases the nonlinear step (combineplaner) is done last. This is necessary because due to its nonlinear nature it does not commute with any other analysis step without dratsically changig the results and affecting the interpretation of what it is that you see. > >Michael > >-----Ursprüngliche Nachricht----- >Von: "Akiko Ikkai" [ >Gesendet: Sep 23, 2010 1:20:19 AM >An: FIELDTRIP at NIC.SURFNET.NL >Betreff: Re: [FIELDTRIP] megplanar input structure > >>Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). >> >>I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. >> >>My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. >> >>I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input >>ERF1 = >> >> trial: {1x137 cell} >> label: {157x1 cell} >> grad: [1x1 struct] >> fsample: 500 >> time: {1x137 cell} >> cfg: [1x1 struct] >> >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>??? Reference to non-existent field 'dimord'. >> >>Error in ==> prepare_timefreq_data>forcedimord at 577 >>inputdim = tokenize(input.dimord, '_'); >> >>Error in ==> prepare_timefreq_data at 176 >> [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); >> >>Error in ==> statistics_wrapper at 318 >> [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); >> >>Error in ==> timelockstatistics at 115 >>[stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> >>Error in ==> cluster_ERF_bwTrialtest_planar at 50 >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>2. manually added dimord to the same input >>ERF1.dimord = 'rpt_chan_time'; >> >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>??? Undefined function or method 'isnan' for input arguments of type 'cell'. >> >>Error in ==> prepare_timefreq_data at 215 >> if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) >> >>Error in ==> statistics_wrapper at 318 >> [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); >> >>Error in ==> timelockstatistics at 115 >>[stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> >>3. With timelockanalysis (after megplanar), it crashes during combineplanar >> >>??? Subscripted assignment dimension mismatch. >> >>Error in ==> checkdata>raw2timelock at 1136 >> tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; >> >>Error in ==> checkdata at 366 >> data = raw2timelock(data); >> >>Error in ==> combineplanar at 356 >> data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); >> >> >>... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. >> >>Thanks in advance! Akiko >> >> >>----- Original Message ----- >>From: jan-mathijs schoffelen >>Date: Tuesday, September 21, 2010 5:37 am >>Subject: Re: [FIELDTRIP] megplanar input structure >>To: FIELDTRIP at NIC.SURFNET.NL >> >>> Dear Akiko, >>> >>> I think that your crash may be related to the issue of missing >>> channels. Antony already pointed you to a way how to fix this. As to >>> >>> your first question: ft_megplanar indeed works with data containing a >>> >>> trial field (as cell-array). However, no need for you to worry about >>> >>> this; if your input data is for example a 'timelock' structure, >>> fieldtrip automatically converts this structure into one containing a >>> >>> 'trial'. >>> >>> Best wishes, >>> >>> Jan-Mathijs >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From michael.wibral at WEB.DE Thu Sep 23 11:51:16 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:51:16 +0200 Subject: Reference for permutation testing for factorial designs Message-ID: Dear Fieldtrip users, I know that every now and then the questions comes up on how to use permutation testing on 2x2 designs (potentially with interactions). On the code side fieldtrip offers the cfg.cvar mechanism to construct restricted permutations. Saskia Helbling pointed me to this reference that explains how to use such restricted permutations properly to 'fake' an ANOVA Anderson MJ and Ter Braak CJF, "PERMUTATION TESTS FOR MULTI-FACTORIAL ANALYSIS OF VARIANCE", J Statistical Computation and Simulation, 2003 Hope you'll find this useful, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.vandenbroeke at ANES.UMCN.NL Thu Sep 23 12:18:04 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Thu, 23 Sep 2010 12:18:04 +0200 Subject: cluster-based analysis Message-ID: Perhaps someone can answer my question? After performing the cluster based analysis of the ERPs one has to do a permutation test. I'm wondering on what data this permutation test is performed? Once you have defined a cluster of adjacent temporal samples you calculate the sum of the t-values within each cluster. For statistical analysis, I understood, you take the cluster with the highest absolute t-value. But on which data does the analysis perfom the permutation test? Is it also possible to calculate the mean ERP activity of the cluster period in each individual ERP and test these values between the two groups? or is the analysis restricted to another way of analysis? Please let me know, Best Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Thu Sep 23 13:53:56 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 13:53:56 +0200 Subject: cluster-based analysis In-Reply-To: Message-ID: Hi Emanuel, I think there may be a slight misunderstanding about what the cluster correction is doing. What is actually done is that for the original data the statistical metric is computed (say depsamples t values), and clusters are identified based on the clusterthreshold you set. Then you sum all t-values in every cluster to obtain one t-value sum per cluster. Note that all of these cluster/t-value sums are kept for later! Then the data are permuted, the statistical metric is computed on the permuted data, clusters are identified, their t-value sums are computed and the maximum t-value sum is kept. This is done again and again (permutation, statistical metric, cluster identification, keeping the max t-sum). All the maximum t-sums obtained in the perumtations together form the maximum distribution under the null. Now you go and sort the t-sums from your clusters obtained from the original data in descending order. For each of these you test how many t-values in distribution of maximum t-sums from the permutations are more extreme. If there are no more than alpha% more extreme t-values in in distribution of maximum t-sums from the permutations you consider the original cluster significant. Note that more than one cluster can be significant. Often, however, the biggest cluster also shows up in some distorted form in the permutations, again with a high t-value sum. Smaller clusters typically have a hard time competing against the t-sums of the permutations of a big cluster. Hence, you often only find one or two clusters. Michael -----Ursprüngliche Nachricht----- Von: "" Gesendet: Sep 23, 2010 12:18:04 PM An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] cluster-based analysis >Perhaps someone can answer my question? > >After performing the cluster based analysis of the ERPs one has to do a >permutation test. I'm wondering on what data this permutation test is >performed? >Once you have defined a cluster of adjacent temporal samples you calculate >the sum of the t-values within each cluster. For statistical analysis, I >understood, you take the cluster with the highest absolute t-value. >But on which data does the analysis perfom the permutation test? Is it also >possible to calculate the mean ERP activity of the cluster period in each >individual ERP and test these values between the two groups? or is the >analysis restricted to another way of analysis? > >Please let me know, > >Best Emanuel > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From suforraxi at GMAIL.COM Thu Sep 23 14:58:54 2010 From: suforraxi at GMAIL.COM (Matteo Demuru) Date: Thu, 23 Sep 2010 14:58:54 +0200 Subject: coherence and inter-trial coherence questions Message-ID: Hi, I have two questions regarding statistical tests: first one regarding coherence differences, second one pertaining testing inter-trial coherence. We are analysing MEG data from an auditory experiment with 5 subjects. We considered the deviant stimulus as the only stimulus in the recordings, while the standard one was considered as baseline activity. We analysed the TFR data in both designs: within-trial and within-subject using respectively "actvsblT" and "depsamplesT" statistics. In both cases we compared a time interval extracted from the baseline versus a time interval from the deviant stimulus response. We wish to assess coherence differences using "indepsampleZcoh" statistic in both single-subject and multiple-subject cases. In a previous postDr. Maris replied that this statistic only works in a between-trial design (for single-subject case) and suggested to compare the different conditions as they were un-paired. We exploited this idea for the single-subject case and we would like to know if it is legitimate to extend the same idea for the multiple-subject situation? Furthermore we would like to know if there is a way to test inter-trial coherence differences in Fieldtrip? In a previous postStephan suggested how to deal with the problem; is it already implemented? Thanks in advance for your time Matteo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From E.vandenBroeke at ANES.UMCN.NL Thu Sep 23 15:29:35 2010 From: E.vandenBroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Thu, 23 Sep 2010 15:29:35 +0200 Subject: cluster-based analysis In-Reply-To: <682389188.1814672.1285242836504.JavaMail.fmail@mwmweb053> Message-ID: Thanks Michael! You helped me a lot, now everything is clear for me! Best Emanuel -----Oorspronkelijk bericht----- Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Michael Wibral Verzonden: donderdag 23 september 2010 13:54 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] cluster-based analysis Hi Emanuel, I think there may be a slight misunderstanding about what the cluster correction is doing. What is actually done is that for the original data the statistical metric is computed (say depsamples t values), and clusters are identified based on the clusterthreshold you set. Then you sum all t-values in every cluster to obtain one t-value sum per cluster. Note that all of these cluster/t-value sums are kept for later! Then the data are permuted, the statistical metric is computed on the permuted data, clusters are identified, their t-value sums are computed and the maximum t-value sum is kept. This is done again and again (permutation, statistical metric, cluster identification, keeping the max t-sum). All the maximum t-sums obtained in the perumtations together form the maximum distribution under the null. Now you go and sort the t-sums from your clusters obtained from the original data in descending order. For each of these you test how many t-values in distribution of maximum t-sums from the permutations are more extreme. If there are no more than alpha% more extreme t-values in in distribution of maximum t-sums from the permutations you consider the original cluster significant. Note that more than one cluster can be significant. Often, however, the biggest cluster also shows up in some distorted form in the permutations, again with a high t-value sum. Smaller clusters typically have a hard time competing against the t-sums of the permutations of a big cluster. Hence, you often only find one or two clusters. Michael -----Ursprüngliche Nachricht----- Von: "" Gesendet: Sep 23, 2010 12:18:04 PM An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] cluster-based analysis >Perhaps someone can answer my question? > >After performing the cluster based analysis of the ERPs one has to do a >permutation test. I'm wondering on what data this permutation test is >performed? >Once you have defined a cluster of adjacent temporal samples you >calculate the sum of the t-values within each cluster. For statistical >analysis, I understood, you take the cluster with the highest absolute t-value. >But on which data does the analysis perfom the permutation test? Is it >also possible to calculate the mean ERP activity of the cluster period >in each individual ERP and test these values between the two groups? or >is the analysis restricted to another way of analysis? > >Please let me know, > >Best Emanuel > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. From Erin.Oakman at NYUMC.ORG Thu Sep 23 16:55:13 2010 From: Erin.Oakman at NYUMC.ORG (Oakman, Erin) Date: Thu, 23 Sep 2010 10:55:13 -0400 Subject: Reference for permutation testing for factorial designs In-Reply-To: <849776673.1740242.1285235476350.JavaMail.fmail@mwmweb053> Message-ID: Thank you for the reference!! Erin ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral [michael.wibral at WEB.DE] Sent: Thursday, September 23, 2010 5:51 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Reference for permutation testing for factorial designs Dear Fieldtrip users, I know that every now and then the questions comes up on how to use permutation testing on 2x2 designs (potentially with interactions). On the code side fieldtrip offers the cfg.cvar mechanism to construct restricted permutations. Saskia Helbling pointed me to this reference that explains how to use such restricted permutations properly to 'fake' an ANOVA Anderson MJ and Ter Braak CJF, "PERMUTATION TESTS FOR MULTI-FACTORIAL ANALYSIS OF VARIANCE", J Statistical Computation and Simulation, 2003 Hope you'll find this useful, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ------------------------------------------------------------ This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email. ================================= ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 24 00:49:39 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 24 Sep 2010 00:49:39 +0200 Subject: question regarding topoplotER Message-ID: Dear all, I have a question about the topoplotER: I like the fact that the cartoon image of the nose and ears are drawn to help visualize the relative position of the sensor and the head. For data collection done in supine position, this works well when the subject's head position is centered in the sensor. But if the head is tilted to the left or right quite a bit (say a patient who can not cooperate), can I still count on such a plot to tell the relative position between patient head and sensor-level activity? My experience seems to tell me "no", but I just want to confirm... Thanks, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at DONDERS.RU.NL Fri Sep 24 13:54:22 2010 From: r.oostenveld at DONDERS.RU.NL (Robert Oostenveld) Date: Fri, 24 Sep 2010 13:54:22 +0200 Subject: question regarding topoplotER In-Reply-To: Message-ID: Dear Jim, The interpretation of the topoplot is usually the least ambiguous for EEG data, in which you know that the electrodes are positioned symmetric relative to the anatomical landmarks on the head, i.e. the nose and ears and where all electrodes are attached to the skin. For MEG data there is indeed the problem that the position of the head relative to the sensor (or vice versa) and the distances are not guaranteed. If the subjects head is rotated in the helmet, then the field of symmetrically located cortical areas will not be picked up by symemtically positioned sensors. If the subject is closer to one side of the helmet, then on that side the fields will be stronger. This problem of strength remains and is not solved by the topoplotting (although ft_megrealign can be used to solve it). Whether the topoplot is correct depends on how you use it: the template layouts (i.e. the fieldtrip/templaye/*.lay files) have all been constructed to be reasonably symmetric. If you are worried about the relative position of the head and helmet, then you should _not_ use the template layout. Instead you should create a custom layout for that single dataset, in which the gradiometer positions -- which are expressed relative to the head -- are used to interpolate the data to create the topography. See ft_prepare_layout. If you don't specify a cfg.layout in the topoplot function, it will create one from the gradiometer positions that are present in the data data, which by construct is a custom one. The triangle indicating the nose and the schematic location of the ears are remain an accurate representation, because the position of the sensors is expressed relative to those (*), not the other way around. For example, on the page http://fieldtrip.fcdonders.nl/tutorial/layout there is one layout http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/easycap32ch-avg.png?id=tutorial%3Alayout which was measured with a Polhemus tracker on a single subject. In this subject, the EEG cap is positioned rather asymmetric, which you can see by the position of the electrodes over the midline and towards O1 and O2. Of course you can test the validity of the topoplot by doing two ERF measurements of e.g. a simple sensory stimulus, one in which the subject is sitting straight and one in which he rotates his/her head. If you record the same ERF for the two locations, you can compare. With the correct (custom) layouts the topoplots should look similar, although the field strength can be different (because of the different distances from brain to sensors in the two measurements). And you should see in the topoplots (with the cfg.marker option) that the channels are shifted relative to the head. best, Robert *) this applies to most MEG systems, but cannot be guaranteed to apply. Local procedures in your MEG lab may differ, so ask your local MEG experts to be sure. On 24 Sep 2010, at 0:49, Jim Li wrote: > Dear all, > > I have a question about the topoplotER: > > I like the fact that the cartoon image of the nose and ears are > drawn to > help visualize the relative position of the sensor and the head. For > data > collection done in supine position, this works well when the > subject's head > position is centered in the sensor. But if the head is tilted to the > left or > right quite a bit (say a patient who can not cooperate), can I still > count > on such a plot to tell the relative position between patient head and > sensor-level activity? My experience seems to tell me "no", but I > just want > to confirm... > > Thanks, > > Jim > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.wollbrink at UNI-MUENSTER.DE Fri Sep 24 14:38:54 2010 From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink) Date: Fri, 24 Sep 2010 14:38:54 +0200 Subject: using ft_sourcegrandaverage with spatio-temporal source reconstructions Message-ID: Hi, I have a question concerning the usage of ft_sourcegrandaverage: Feeding the ft_sourcegrandaverage function with spatio-temporal source reconstruction data (MNE) resulted in the following error message: ??? Subscripted assignment dimension mismatch. Error in ==> ft_sourcegrandaverage at 159 dat(:,i) = tmp(:); I used the following settings: cfg = []; cfg.parameter = 'pow'; cfg.keepindividual = 'yes'; and called ft_sourcegrandaverage(cfg, src1, src2) The two source reconstructions (MNE) I generated using ft_sourceanalysis. Looking into the matlab code (ft_sourcegrandaverage at 159) I realized that the problem seems to be that the matrices src1.avg.pow and src2.avg.pow are two dimensional [Nsources x Nsamples]. By diminishing the source power matrix (avg.pow) to one dimension (Nsources) I succedded using ft_sourcegrandaverage. To perform a source statistic (ft_ft_sourcestatistics) later on it would be nice to have the option to include time information as well (e.g. like in timelockstatistics). Please let me know whether generally it is impossible to use spatio-temporal solutions in ft_sourcegrandaverage (and ft_sourcestatistics). Thanks, Andreas -- ====================================================================== Andreas Wollbrink, Biomedical Engineer Institute for Biomagnetism and Biosignalanalysis Muenster University Hospital Malmedyweg 15 phone: +49-(0)251-83-52546 D-48149 Muenster fax: +49-(0)251-83-56874 Germany e-Mail: a.wollbrink at uni-muenster.de ====================================================================== ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Sep 24 15:19:22 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 24 Sep 2010 15:19:22 +0200 Subject: using ft_sourcegrandaverage with spatio-temporal source reconstructions In-Reply-To: <4C9C9BDE.4010904@uni-muenster.de> Message-ID: Dear Andreas, > Hi, > > I have a question concerning the usage of ft_sourcegrandaverage: > > Feeding the ft_sourcegrandaverage function with spatio-temporal > source reconstruction data (MNE) resulted in the following error > message: > > > ??? Subscripted assignment dimension mismatch. > > Error in ==> ft_sourcegrandaverage at 159 > dat(:,i) = tmp(:); > > > I used the following settings: > > cfg = []; > cfg.parameter = 'pow'; > cfg.keepindividual = 'yes'; > > and called > > ft_sourcegrandaverage(cfg, src1, src2) > > The two source reconstructions (MNE) I generated using > ft_sourceanalysis. > > Looking into the matlab code (ft_sourcegrandaverage at 159) I > realized that the problem seems to be that the matrices src1.avg.pow > and src2.avg.pow are two dimensional [Nsources x Nsamples]. > > By diminishing the source power matrix (avg.pow) to one dimension > (Nsources) I succedded using ft_sourcegrandaverage. > To perform a source statistic (ft_ft_sourcestatistics) later on it > would be nice to have the option to include time information as well > (e.g. like in timelockstatistics). > > Please let me know whether generally it is impossible to use spatio- > temporal solutions in ft_sourcegrandaverage (and ft_sourcestatistics). > > Thanks, > Andreas > -- > Yes, I totally agree that the functionality you would like to have is very useful. At present it is however not yet possible. At the moment we are in the process of restructuring the code dealing with source- level data in order to implement exactly this. However, we are not really proficient in using MNE as inverse method, and are not used to looking at source level time courses (which is exactly the reason why it is not yet implemented). It would be really helpful if you could send us some example data (such as your variables src1 and src2). Have a look here: http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers to see how to send your data. Best wishes, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 24 21:22:07 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 24 Sep 2010 21:22:07 +0200 Subject: question regarding topoplotER Message-ID: Dear Robert, Thanks a lot for your great response. I'll study the examples to try to make my own layout. Cheers, Jim On Fri, 24 Sep 2010 13:54:22 +0200, Robert Oostenveld wrote: >Dear Jim, > >The interpretation of the topoplot is usually the least ambiguous for >EEG data, in which you know that the electrodes are positioned >symmetric relative to the anatomical landmarks on the head, i.e. the >nose and ears and where all electrodes are attached to the skin. For >MEG data there is indeed the problem that the position of the head >relative to the sensor (or vice versa) and the distances are not >guaranteed. > >If the subjects head is rotated in the helmet, then the field of >symmetrically located cortical areas will not be picked up by >symemtically positioned sensors. If the subject is closer to one side >of the helmet, then on that side the fields will be stronger. This >problem of strength remains and is not solved by the topoplotting >(although ft_megrealign can be used to solve it). > >Whether the topoplot is correct depends on how you use it: the >template layouts (i.e. the fieldtrip/templaye/*.lay files) have all >been constructed to be reasonably symmetric. If you are worried about >the relative position of the head and helmet, then you should _not_ >use the template layout. Instead you should create a custom layout for >that single dataset, in which the gradiometer positions -- which are >expressed relative to the head -- are used to interpolate the data to >create the topography. See ft_prepare_layout. If you don't specify a >cfg.layout in the topoplot function, it will create one from the >gradiometer positions that are present in the data data, which by >construct is a custom one. The triangle indicating the nose and the >schematic location of the ears are remain an accurate representation, >because the position of the sensors is expressed relative to those >(*), not the other way around. > >For example, on the page >http://fieldtrip.fcdonders.nl/tutorial/layout >there is one layout >http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/easycap32ch-avg.png?id=tutorial%3Alayout >which was measured with a Polhemus tracker on a single subject. In >this subject, the EEG cap is positioned rather asymmetric, which you >can see by the position of the electrodes over the midline and towards >O1 and O2. > >Of course you can test the validity of the topoplot by doing two ERF >measurements of e.g. a simple sensory stimulus, one in which the >subject is sitting straight and one in which he rotates his/her head. >If you record the same ERF for the two locations, you can compare. >With the correct (custom) layouts the topoplots should look similar, >although the field strength can be different (because of the different >distances from brain to sensors in the two measurements). And you >should see in the topoplots (with the cfg.marker option) that the >channels are shifted relative to the head. > >best, >Robert > >*) this applies to most MEG systems, but cannot be guaranteed to >apply. Local procedures in your MEG lab may differ, so ask your local >MEG experts to be sure. > > > > > >On 24 Sep 2010, at 0:49, Jim Li wrote: > >> Dear all, >> >> I have a question about the topoplotER: >> >> I like the fact that the cartoon image of the nose and ears are >> drawn to >> help visualize the relative position of the sensor and the head. For >> data >> collection done in supine position, this works well when the >> subject's head >> position is centered in the sensor. But if the head is tilted to the >> left or >> right quite a bit (say a patient who can not cooperate), can I still >> count >> on such a plot to tell the relative position between patient head and >> sensor-level activity? My experience seems to tell me "no", but I >> just want >> to confirm... >> >> Thanks, >> >> Jim >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Gregor.Volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE Tue Sep 28 12:41:34 2010 From: Gregor.Volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE (Gregor Volberg) Date: Tue, 28 Sep 2010 12:41:34 +0200 Subject: coordinate mismatch in ASA headmodel and *.nii -files Message-ID: Dear fieldtrippers, thanks a lot for the helfulp comments on my former source analysis questions. This one is maybe not directly related to fieldtrip's source analysis functions: I use individual headmodels generated by ASA software (which reads and segments MRI images in Siemens DICOM format) for source reconstruction. The corresponding anatomical data is in an *nii-file, generated with the DICOM-import function if SPM5. Now, when I plot the individual functional data overlayed on the individual anatomical data, it seems that X and Y coordinates are exchanged, Y ist rotated by 90 or -90 degrees, and Z is shifted into positive direction for functional compared to structural data. I tried to normalize the volume data with ft_volumenormalise using the individual MRI as template file, but this warps both functional and anatomical data so that the mismatch between both is still there. Did some ASA-user have a similar problem - is there maybe a necessary transformation that I have overlooked? Thanks again in advance - Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nathanweisz at MAC.COM Tue Sep 28 13:17:53 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 28 Sep 2010 13:17:53 +0200 Subject: coordinate mismatch in ASA headmodel and *.nii -files In-Reply-To: <4CA1E27E020000570000754A@gwsmtp1.uni-regensburg.de> Message-ID: dear gregor, it seems like you left out some co-registration steps. if you have the ASA vol, the mri (*.mri; read_asa_mri.m) then you still need the co-registered electrode positions. can't you just export those from ASA too? otherwise ft_volumerealign, then apply transformation matrix to you electrode positions so that they are in the same coordinate system as your vol & mri? cheers & good luck, n On 28.09.2010, at 12:41, Gregor Volberg wrote: > Dear fieldtrippers, > > thanks a lot for the helfulp comments on my former source analysis questions. This one is maybe not directly related to fieldtrip's source analysis functions: > I use individual headmodels generated by ASA software (which reads and segments MRI images in Siemens DICOM format) for source reconstruction. The corresponding anatomical data is in an *nii-file, generated with the DICOM-import function if SPM5. Now, when I plot the individual functional data overlayed on the individual anatomical data, it seems that X and Y coordinates are exchanged, Y ist rotated by 90 or -90 degrees, and Z is shifted into positive direction for functional compared to structural data. I tried to normalize the volume data with ft_volumenormalise using the individual MRI as template file, but this warps both functional and anatomical data so that the mismatch between both is still there. > > Did some ASA-user have a similar problem - is there maybe a necessary transformation that I have overlooked? Thanks again in advance - > Gregor > > > > -- > Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sdmuthu at CARDIFF.AC.UK Wed Sep 29 09:05:51 2010 From: sdmuthu at CARDIFF.AC.UK (Suresh Muthukumaraswamy) Date: Wed, 29 Sep 2010 08:05:51 +0100 Subject: Coherence differences and factorial designs Message-ID: Hi FieldtripUsers, In a fixed effects context I have been obtaining coherence estimates. I have been reading Maris et al 2007 and the theory there describes how to test between two different conditions I would like to extend the theory in that paper (2.7.1) to k sample (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was wondering if anyone had attempted such a thing if it can be done, and in particular how one might go about constructing an apprppriate test statistic and surrogate distribution? Prior implementation in fieldtrip isnt needed its more the theory behind it I am asking about Thanks for your help, Dr Suresh Muthukumaraswamy Suresh Muthukumaraswamy, PhD CUBRIC Cardiff University Park Place Cardiff, CF10 3AT United Kingdom email: sdmuthu at cardiff.ac.uk Phone: +44 (0)29 2087 0354 http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumaraswamy-suresh-dr-overview_new.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.vandenbroeke at ANES.UMCN.NL Wed Sep 29 10:43:00 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 29 Sep 2010 10:43:00 +0200 Subject: cluster-based analysis Message-ID: Dear Michael and others, I am thinking about an alternative cluster based statistic, but do not know if this is also valid. The alternative method goes as follows: 1. Calculate t-statistics of two conditions only on the observed data. 2. Determine cluster(s) based on a threshold (critical t-value). 3. Calculate the sum of the cluster(s). 4. Take the cluster with the highest absolute value (Sum-score) if more than 1 clusters are present. 5. Calculate the mean ERP activity, based on the highest cluster, in the individual trials. 6. Use a non-parametric (Wilcoxon, Mann-Withney U, dependent of the type of experiment) test statistic to test whether there is a difference (two sided) between the two group means for this highest cluster. Do you or anybody else think this is also a valid method for identifying and testing relevant ERP activity? Best, Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 29 11:18:06 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 29 Sep 2010 11:18:06 +0200 Subject: Coherence differences and factorial designs In-Reply-To: <4CA2F35F020000AD0004E5A0@zgrw02.cf.ac.uk> Message-ID: Dear Suresh, > In a fixed effects context I have been obtaining coherence > estimates. I have been reading Maris et al 2007 and the theory there > describes how to test between two different conditions > I would like to extend the theory in that paper (2.7.1) to k sample > (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was > wondering if anyone had attempted such a thing if it can be done, and > in particular how one might go about constructing an apprppriate test > statistic and surrogate distribution? Prior implementation in fieldtrip > isnt needed its more the theory behind it I am asking about Statistical comparison of coherence estimates in k samples is discussed by Amjad et al (2007) in J. Neurosc. Methods. In the permutation framework there is no analogue of the factorial ANOVA (involving both main and interaction effects) for the simple reason that the interaction null hypothesis cannot be tested in the permutation framework. There is at least one thread in the Fieldtrip Discussion list that deals with this issue. However, it is possible to test multiple conditional null hypotheses (main effect of one factor separately for each of the levels of another factor) and this comes close to an interaction effect test. Good luck, Eric Maris > Thanks for your help, > Dr Suresh Muthukumaraswamy > > Suresh Muthukumaraswamy, PhD > CUBRIC > Cardiff University > Park Place > Cardiff, CF10 3AT > United Kingdom > email: sdmuthu at cardiff.ac.uk > Phone: +44 (0)29 2087 0354 > http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumarasw > amy-suresh-dr-overview_new.html > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Wed Sep 29 15:09:04 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 29 Sep 2010 15:09:04 +0200 Subject: Permutaion (of residuals) and factorial designs In-Reply-To: <016c01cb5fb7$3cb12f90$b6138eb0$@maris@donders.ru.nl> Message-ID: Dear Eric, dear fieldtrip users, this might sound like nitpicking but, we all routinely seem to analyse the interaction of a factorial design using permutation testing. The example is this: we have two experimental conditions (that we want to compare) and record task and baseline intervals in each. Clearly this is a 2x2 design (task/base and cond1/cond2 are the respective levels of the two factors). What we all do to deal with this is that we compute residuals - either by subtracting the baseline values or normalizing to them and then do a (restricted) permutation between the conditions on these task-base residuals. We are interested in the interaction between the task/base factor and the cond factor. Anything wrong here or anything particular about this case that saves us from the fundamental difficulties of interaction testing? Michael   -----Ursprüngliche Nachricht----- Von: "Eric Maris" Gesendet: Sep 29, 2010 11:18:06 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] Coherence differences and factorial designs >Dear Suresh, > > > >> In a fixed effects context I have been obtaining coherence >> estimates. I have been reading Maris et al 2007 and the theory there >> describes how to test between two different conditions >> I would like to extend the theory in that paper (2.7.1) to k sample >> (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was >> wondering if anyone had attempted such a thing if it can be done, and >> in particular how one might go about constructing an apprppriate test >> statistic and surrogate distribution? Prior implementation in fieldtrip >> isnt needed its more the theory behind it I am asking about > >Statistical comparison of coherence estimates in k samples is discussed by >Amjad et al (2007) in J. Neurosc. Methods. > >In the permutation framework there is no analogue of the factorial ANOVA >(involving both main and interaction effects) for the simple reason that the >interaction null hypothesis cannot be tested in the permutation framework. >There is at least one thread in the Fieldtrip Discussion list that deals >with this issue. However, it is possible to test multiple conditional null >hypotheses (main effect of one factor separately for each of the levels of >another factor) and this comes close to an interaction effect test. > > >Good luck, > >Eric Maris > > > > > > >> Thanks for your help, >> Dr Suresh Muthukumaraswamy >> >> Suresh Muthukumaraswamy, PhD >> CUBRIC >> Cardiff University >> Park Place >> Cardiff, CF10 3AT >> United Kingdom >> email: sdmuthu at cardiff.ac.uk >> Phone: +44 (0)29 2087 0354 >> http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumarasw >> amy-suresh-dr-overview_new.html >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Wed Sep 29 17:25:24 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 29 Sep 2010 17:25:24 +0200 Subject: Permutaion (of residuals) and factorial designs In-Reply-To: <469763189.596482.1285765744039.JavaMail.fmail@mwmweb053> Message-ID: Dear Michael, > this might sound like nitpicking but, we all routinely seem to analyse > the interaction of a factorial design using permutation testing. The > example is this: we have two experimental conditions (that we want to > compare) and record task and baseline intervals in each. Clearly this > is a 2x2 design (task/base and cond1/cond2 are the respective levels of > the two factors). What we all do to deal with this is that we compute > residuals - either by subtracting the baseline values or normalizing to > them and then do a (restricted) permutation between the conditions on > these task-base residuals. We are interested in the interaction between > the task/base factor and the cond factor. > > Anything wrong here or anything particular about this case that saves > us from the fundamental difficulties of interaction testing? This is a very sensible remark that forces me to be explicit about when interaction effect null hypotheses are problematic for permutation tests and when not. What you describe is a mixed between-within unit-of-observation (UO) design. The UOs are trials and there is one between-UO independent variable (the two task conditions) and within-UO independent variable (baseline-versus-activation). In this type of design, permutation tests can be used without problems to test the interaction between the independent variables. The way you do this is exactly as you have described: perform trial-wise subtraction/normalization to construct a new dependent variable that is subsequently compared between the two task conditions, as in a regular between-UO study. This approach does not work anymore in a two-factorial design in which both independent variables are manipulated between-UO. For example, this would be the case in a single subject study with the following independent variables: (1) attend left versus attend right (SIDE), and (2) attend visual versus attend auditory (MODALITY). It cannot be ruled out that there is an interest in the null hypothesis of no interaction between SIDE and MODALITY. (For this example, I find it hard to produce a convincing physiological story that produces this null hypothesis, but this does not have to be always the case.) I do not see how to test this null hypothesis using a permutation test that involves random permutation over the four cells in this two-factorial design. Best, Eric > > Michael > > > > -----Ursprüngliche Nachricht----- > Von: "Eric Maris" > Gesendet: Sep 29, 2010 11:18:06 AM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Coherence differences and factorial designs > > >Dear Suresh, > > > > > > > >> In a fixed effects context I have been obtaining coherence > >> estimates. I have been reading Maris et al 2007 and the theory there > >> describes how to test between two different conditions I would like > >> to extend the theory in that paper (2.7.1) to k sample (one factor > eg > >> 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was wondering if > >> anyone had attempted such a thing if it can be done, and in > >> particular how one might go about constructing an apprppriate test > >> statistic and surrogate distribution? Prior implementation in > >> fieldtrip isnt needed its more the theory behind it I am asking > about > > > >Statistical comparison of coherence estimates in k samples is > discussed > >by Amjad et al (2007) in J. Neurosc. Methods. > > > >In the permutation framework there is no analogue of the factorial > >ANOVA (involving both main and interaction effects) for the simple > >reason that the interaction null hypothesis cannot be tested in the > permutation framework. > >There is at least one thread in the Fieldtrip Discussion list that > >deals with this issue. However, it is possible to test multiple > >conditional null hypotheses (main effect of one factor separately for > >each of the levels of another factor) and this comes close to an > interaction effect test. > > > > > >Good luck, > > > >Eric Maris > > > > > > > > > > > > > >> Thanks for your help, > >> Dr Suresh Muthukumaraswamy > >> > >> Suresh Muthukumaraswamy, PhD > >> CUBRIC > >> Cardiff University > >> Park Place > >> Cardiff, CF10 3AT > >> United Kingdom > >> email: sdmuthu at cardiff.ac.uk > >> Phone: +44 (0)29 2087 0354 > >> > http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumara > >> sw > >> amy-suresh-dr-overview_new.html > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of > >> the FieldTrip toolbox, to share experiences and to discuss new > ideas > >> for MEG and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sreenivasan.r.nadar at GMAIL.COM Wed Sep 29 17:38:18 2010 From: sreenivasan.r.nadar at GMAIL.COM (Dr. Sreenivasan Rajamoni Nadar, Ph.D.) Date: Wed, 29 Sep 2010 11:38:18 -0400 Subject: 3D Wireframe (.3fr) for BEM based source modeling Message-ID: Hello, Anybody has script to use 3D wireframe (generated from EMSE with .3fr extention) for BEM head model to be used in fieldtrip? Thanks, Vasan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Sep 1 08:45:32 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 1 Sep 2010 08:45:32 +0200 Subject: Extended deadline: Special Journal Issue on Academic MEG/EEG Software Message-ID: Begin forwarded message: > From: "Baillet, Sylvain" > Date: 31 August 2010 17:44:28 GMT+02:00 > To: "Baillet, Sylvain" > Subject: Extended deadline: Special Journal Issue on Academic MEG/ > EEG Software > > Important notice: Submission deadline has been extended; now: > October 1, 2010. > > Call for Papers > > Academic Software Applications for Electromagnetic Brain Mapping > Using MEG and EEG > > To be published in : Computational Intelligence and Neuroscience > (indexed in MEDLINE, INSPEC, GoogleScholar, etc.) > Full Call for Paper available at: http://www.hindawi.com/journals/cin/osi.html > > The field of Magnetoencephalography (MEG) and Electroencephalography > (EEG) source imaging is maturing rapidly. This scientific growth is > accompanied by a variety of complementary and /or concurrent > software solutions from the academic world. > > The objective of this CIN Special Issue is to help the neuroimaging > obtain an overview of state-of-the-art academic software > applications for MEG/EEG data analysis, how they differ and > interact, and of upcoming methodological trends and technical > developments; the topics to be covered include, but are not limited > to, academic software solutions for: > > · MEG and EEG data acquisition > · Data preprocessing, that is, filtering, > artifact detection, rejection or correction, trial sorting, averaging > · Segmentation and geometrical modeling of head > tissues > · Computational electromagnetics for MEG/EEG > forward modeling > · MEG/EEG source analysis > · Statistical appraisal and inference: > confidence intervals on measures and hypothesis testing > · Identification and evaluation of evoked, > induced event-related brain responses and ongoing brain activity > · Time-frequency decompositions, advanced > spectral analysis, time series modeling > · Estimation of functional and effective > connectivity > Authors should provide detailed information regarding their software > toolbox or application by addressing the following topics: open > source software (yes/no), i/o file formats available, operating > system, Matlab required (yes/no), interoperability with other > software, and so forth. > > Further, the software needs to be available for download free of > charge at the time of manuscript submission, with sufficient > documentation provided online to be able to reproduce the data > analysis featured in the manuscript. > > Before submission authors should carefully read over the journal's > Author Guidelines, which are located at http://www.hindawi.com/journals/cin/guidelines.html > . Prospective authors should submit an electronic copy of their > complete manuscript through the journal Manuscript Tracking System > at http://mts.hindawi.com/ according to the following timetable: > > Manuscript Due > October 1, 2010 September 1, 2010 > First Round of Reviews > December 1, 2010 > Publication Date > March 1, 2011 > Lead Guest Editor > > Sylvain Baillet, Departments of Neurology & Biophysics, Medical > College of Wisconsin, WI, USA > Guest Editors > > Karl Friston, Wellcome Trust Centre for Neuroimaging, London, UK > Robert Oostenveld, Donders Centre for Cognitive Neuroimaging Radboud > University Nijmegen, The Netherlands > > Ps: > > As an open access journal, Computational Intelligence and > Neuroscience requires an Article Processing Charge of $750 USD per > accepted manuscript for both research and review articles. > Since the journal does not collect any subscription or advertising > revenue, and does not have other funding streams, these charges are > necessary in order to make the full text of all published articles > freely available online. Moreover, authors are allowed to retain the > copyright of their work published in the journal. > > As for the number of color figures, there is no limited number of > figures that might be included in each paper whether colored or not > and you can find detailed information about the general format of > Manuscripts that will be submitted to the Special Issue proposals, > the format of references, tables and figures if found at:http://www.hindawi.com/journals/cin/guidelines.html > . > > > > > Sylvain Baillet, PhD > Associate Professor of Neurology & Biophysics > Scientific Director, MEG Program > Department of Neurology > Medical College of Wisconsin > > 9200 W. Wisconsin ave > Milwaukee, WI 53226 > Phone: +1 414 805 1174 > Fax: +1 414 805 1103 > · Home Page > · Our MEG Program > · Follow my Lab on Facebook > > > > > > > > > > > > > > > > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 121 bytes Desc: not available URL: From saskia.haegens at DONDERS.RU.NL Wed Sep 1 13:55:17 2010 From: saskia.haegens at DONDERS.RU.NL (Saskia Haegens) Date: Wed, 1 Sep 2010 13:55:17 +0200 Subject: ft_preprocessinf; ft_preproc_dftfilter In-Reply-To: <1770599948.3434086.1283265763835.JavaMail.fmail@mwmweb056> Message-ID: Hi Michael, ft_preprocessing calls the private function preproc, which does the actual preprocessing (including call to ft_preproc_dftfilter). Hope this answers your question. Best, Saskia > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Michael Wibral > Sent: dinsdag 31 augustus 2010 16:43 > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] ft_preprocessinf; ft_preproc_dftfilter > > Dear listusers, > > I found something strange in FT20100826: > > ft_preprocessing takes cfg.dftfilter = 'yes' as a configuration option > and I think it should then issue a call to ft_preproc_dftfilter. > However this is never done, if I am not mistaken. I guess it slipped > from ft_preprocessing sometiem in the past. Or was it dropped on > purpose because other bandstop filters are preferred? > > Any help on this is appreciated. > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Fri Sep 3 19:35:56 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Fri, 3 Sep 2010 13:35:56 -0400 Subject: neuromag planar gradient Message-ID: Hello, I am new to fieldtrip and am trying to figure out how to visualize the planar gradient for grandaverage neuromag data. I tried to accomplish this by specifying cfg.layout as 'neuromag306planar.lay' but this just produced a distorted version of the conventional ERF topoplot. I would really appreciate anyone's help who may know how to do this. Thanks! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Tue Sep 7 11:01:09 2010 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Tue, 7 Sep 2010 11:01:09 +0200 Subject: AW: [FIELDTRIP] neuromag planar gradient Message-ID: Hi Matt, You can find the layout files in fieldtrip/template. In my case the file is called 'NM306planar.lay'. I have attachted this file to this e-mail, hopefully your data looks better then. Just to be sure, you did do ft_combineplanar before right? Yours, Hanneke -------------------------------------------------- Institut für Klinische Neurowissenschaften und Medizinische Psychologie Gebäude-Nr.: 23.02 Ebene: 03 Zimmer-Nr.: 47 Tel.: +49 211-81-13074 Mail : hanneke.vandijk at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Matt F. Panichello Gesendet: Fr 03.09.2010 19:35 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] neuromag planar gradient Hello, I am new to fieldtrip and am trying to figure out how to visualize the planar gradient for grandaverage neuromag data. I tried to accomplish this by specifying cfg.layout as 'neuromag306planar.lay' but this just produced a distorted version of the conventional ERF topoplot. I would really appreciate anyone's help who may know how to do this. Thanks! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Tue Sep 7 23:00:48 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Tue, 7 Sep 2010 17:00:48 -0400 Subject: AW: [FIELDTRIP] neuromag planar gradient In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B013F04FB@Mail2-UKD.VMED.UKD> Message-ID: Hi Hanneke, Thanks so much for your help! I wasn't sure if I needed to use ft_combineplanar for neuromag data. Using this with the "neuromag306cmb.lay" file did the trick. Best, Matt > Hi Matt, > > You can find the layout files in fieldtrip/template. In my case the file > is called 'NM306planar.lay'. I have attachted this file to this e-mail, > hopefully your data looks better then. > > Just to be sure, you did do ft_combineplanar before right? > > Yours, > > Hanneke > -------------------------------------------------- > Institut für Klinische Neurowissenschaften und Medizinische Psychologie > Gebäude-Nr.: 23.02 > Ebene: 03 Zimmer-Nr.: 47 > Tel.: +49 211-81-13074 > Mail : hanneke.vandijk at med.uni-duesseldorf.de > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Matt F. Panichello > Gesendet: Fr 03.09.2010 19:35 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] neuromag planar gradient > > Hello, > > I am new to fieldtrip and am trying to figure out how to visualize the > planar gradient for grandaverage neuromag data. > > I tried to accomplish this by specifying cfg.layout as > 'neuromag306planar.lay' but this just produced a distorted version of the > conventional ERF topoplot. > > I would really appreciate anyone's help who may know how to do this. > > Thanks! > > Matt > > > > > > 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. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From egarza at GMAIL.COM Wed Sep 8 19:22:49 2010 From: egarza at GMAIL.COM (Eduardo Garza) Date: Wed, 8 Sep 2010 18:22:49 +0100 Subject: Can't read .SMR data into FT Message-ID: Greetings, I did an EEG experiment using CED and the format is standard ".SMR". The data contains 1 Channel (Cz) and 1 Event Channel. When I try to look at the data in FT using: cfg = []; cfg.dataset = 'eduardo_pilot_03_events2.smr'; cfg.trialdef.eventtype = '?'; definetrial(cfg); I get several errors back: Warning: Unable to load this DLL Call ns_SetLibrary first! Process interrupted! ??? Error using ==> read_ced_son at 81 Could not get NeuroShare library info, please use the NS_SETLIBRARY function. Error in ==> ft_read_header at 357 orig = read_ced_son(filename,'readevents','no','readdata','no'); Error in ==> read_header at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> trialfun_general at 50 hdr = read_header(cfg.headerfile); Error in ==> ft_definetrial at 110 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> definetrial at 17 [varargout{1:nargout}] = funhandle(varargin{:}); I checked the "read_ced_son.m" and apparently I need a Neuroshare library to read the data (I thought FT already had that in). So I go to the Neuroshare site and download a ZIP called MATLAB_Import_Filter, which apparently should include several ".m" files and 1 DLL called "mexprog.dll" for 64-bits, but the DLL is not there. The readme.txt shows that I should also include a file called "NeuroshareDLL" in the same directory. I'm not sure where to go from here. Where can I get that NeuroshareDLL and mexprog.dll that should go into the directory? Is my data in the correct format? Thank you Best regards Eduardo -- Eduardo A. Garza Villarreal MD, PhD Student -Center for Functionally Integrative Neuroscience (CFIN), Aarhus University; -Royal Academy of Music, Aarhus, Denmark; -Department of Psychiatry, Warneford Hospital, University of Oxford, UK. DK Office: +45 89494408 DK Mobile: +45 2772 3440 UK Office: +44 1865223918 UK Mobile +44 7879574135 http://person.au.dk/eduardo.garza at ki http://www.cfin.au.dk/menu550-en egarza at gmail.com eduardo at pet.auh.dk eduardo.garzavillarreal at psych.ac.ox.uk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.arena at UVA.NL Wed Sep 8 20:12:46 2010 From: c.arena at UVA.NL (Claudia Arena) Date: Wed, 8 Sep 2010 20:12:46 +0200 Subject: significance of coherence differences Message-ID: Dear Eric Maris, I too am confused about coherence and its statistical analysis..I am trying to calculate the coherence between POz and 47 other channels in a multisubject study (N=19) with a within-subject design to test (1) whether coherence in condition 'Figure' is the same as in condition 'No figure', and (2) whether coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct rejections'. Either way I am not sure about a couple of things: 1) This is maybe a silly question but in your reply to Jan's post you state: "...You apply this test statistic to the condition-specific coherences, obtained by summing and normalizing the trial(taper)-specific cross- spectra..." - You mean averaging the trial-specific cross-spectra (and trial- specific powerspectra) right? Moreover does this mean that cfg.keeptrials can be set to 'no' when calculating the powerspectra and cross-spectra with freqanalysis(_mtmconvol)? This would be great news for me, since the 4D freqdata is too large to save.. 2) Another related question comes from the fact that the experiment had 3 different masking durations, so to combine the powerspectra belonging to the same condition (i.e. the Figs) but different mask durations we calculated weighted averages based on the least amount of trials in each Mask duration group. My question now would be whether the normalization to get the coherence values should be done before or after this weighing (In other words, should I weigh the cross-spectra or the coherence values, or does this not matter?) 3) Now for the statistics. Again in your reply to Jan's post you say: "...For a single channel pair and a single frequency bin, the appropriate statistic is the dependent (paired) samples t-statistic or, in a nonparametric framework, the Wilcoxon signed rank sum test." Does this mean it is not valid to use freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = 'depsamplesT' (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the coherence between POz (my ref.channel) and the 47 other channels is the same in different conditions, using all my frequency and time bins? Do I need to make a selection? Thank you for your time. Sincerely, Claudia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Thu Sep 9 10:02:27 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 9 Sep 2010 10:02:27 +0200 Subject: significance of coherence differences In-Reply-To: Message-ID: Dear Claudia, > I too am confused about coherence and its statistical analysis..I am > trying to > calculate the coherence between POz and 47 other channels in a > multisubject > study (N=19) with a within-subject design to test (1) whether coherence > in > condition 'Figure' is the same as in condition 'No figure', and (2) > whether > coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct > rejections'. > > Either way I am not sure about a couple of things: > > 1) This is maybe a silly question but in your reply to Jan's post you > state: "...You apply this test statistic to the condition-specific > coherences, > obtained by summing and normalizing the trial(taper)-specific cross- > spectra..." - You mean averaging the trial-specific cross-spectra (and > trial- > specific powerspectra) right? Moreover does this mean that > cfg.keeptrials can > be set to 'no' when calculating the powerspectra and cross-spectra with > freqanalysis(_mtmconvol)? This would be great news for me, since the 4D > freqdata is too large to save.. For statistical testing in a within-subjects design (units-of-observation are subjects and not trials) you don't need the trials. So, you can safely put cfg.keeptrials to 'no'. By the way, try using freqanalysis_mtmfft (frequency analysis without time resolution) before freqanalysis_mtmconvol (with time resolutions). This makes life a lot easier and conceptually you're doing the same thing. > > 2) Another related question comes from the fact that the experiment had > 3 > different masking durations, so to combine the powerspectra belonging > to the > same condition (i.e. the Figs) but different mask durations we > calculated > weighted averages based on the least amount of trials in each Mask > duration > group. My question now would be whether the normalization to get the > coherence values should be done before or after this weighing (In other > words, > should I weigh the cross-spectra or the coherence values, or does this > not > matter?) I don't see why you have to deal with the normalization yourself. You can use ft_freqdescriptives or ft_connectivityanalysis to calculate the coherence values taking the freqanalsis output as its input. In any case, to obtain coherence values from the cross-spectra, one should always normalize (i.e., divide) by the square-roots of the power-spectra calculated on the same trials. I may be wrong, but it seems that you are making life more difficult than it should be. > > 3) Now for the statistics. Again in your reply to Jan's post you say: > "...For a > single channel pair and a single frequency bin, the appropriate > statistic is the > dependent (paired) samples t-statistic or, in a nonparametric > framework, the > Wilcoxon signed rank sum test." Does this mean it is not valid to use > freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = > 'depsamplesT' > (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the > coherence > between POz (my ref.channel) and the 47 other channels is the same in > different conditions, using all my frequency and time bins? Do I need > to make a > selection? What you propose IS valid to control for multiple comparisons. However, in my reply to Jan, I consider a single statistical test ("... For a single channel pair and a single frequency bin, ..."); so, no multiple comparisons problem here. Good luck, Eric > > Thank you for your time. > > Sincerely, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Sep 9 16:13:23 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 9 Sep 2010 15:13:23 +0100 Subject: Can't read .SMR data into FT In-Reply-To: Message-ID: Dear Eduardo, The version of Neuroshare included in Fieldtrip should be sufficient although I'm not sure whether it's added automatically to the path. One additional thing you might need is the DLL from CED that can be found at: http://www.ced.co.uk/upnssonu.shtml You can put it in the neuroshare directory. Note that this setup doesn't support SMR files from recent versions of Spike 2 (6 and up). For these versions you can export the data into mat files and these files are supported by fileio. Best, Vladimir On Wed, Sep 8, 2010 at 6:22 PM, Eduardo Garza wrote: > Greetings, > I did an EEG experiment using CED and the format is standard ".SMR". > The data contains 1 Channel (Cz) and 1 Event Channel. > When I try to look at the data in FT using: > cfg = []; > cfg.dataset = 'eduardo_pilot_03_events2.smr'; > cfg.trialdef.eventtype  = '?'; > definetrial(cfg); > I get several errors back: > Warning: Unable to load this DLL > Call ns_SetLibrary first! Process interrupted! > ??? Error using ==> read_ced_son at 81 > Could not get NeuroShare library info, please use the NS_SETLIBRARY > function. > Error in ==> ft_read_header at 357 >     orig = read_ced_son(filename,'readevents','no','readdata','no'); > Error in ==> read_header at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > Error in ==> trialfun_general at 50 > hdr = read_header(cfg.headerfile); > Error in ==> ft_definetrial at 110 >     [trl, event] = feval(cfg.trialfun, cfg); > Error in ==> definetrial at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > I checked the "read_ced_son.m" and apparently I need a Neuroshare library to > read the data (I thought FT already had that in). > So I go to the Neuroshare site and download a ZIP called > MATLAB_Import_Filter, which apparently should include several ".m" files and > 1 DLL called "mexprog.dll" for 64-bits, but the DLL is not there. > The readme.txt shows that I should also include a file called > "NeuroshareDLL" in the same directory. > I'm not sure where to go from here. > Where can I get that NeuroshareDLL and mexprog.dll that should go into the > directory? > Is my data in the correct format? > Thank you > Best regards > Eduardo > -- > Eduardo A. Garza Villarreal > MD, PhD Student > > -Center for Functionally Integrative Neuroscience (CFIN), Aarhus University; > -Royal Academy of Music, Aarhus, Denmark; > -Department of Psychiatry, Warneford Hospital, University of Oxford, UK. > > DK Office:   +45 89494408 > DK Mobile:  +45 2772 3440 > > UK Office:   +44 1865223918 > UK Mobile   +44 7879574135 > > http://person.au.dk/eduardo.garza at ki > http://www.cfin.au.dk/menu550-en > > egarza at gmail.com > eduardo at pet.auh.dk > eduardo.garzavillarreal at psych.ac.ox.uk > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Patricia.Wollstadt at GMX.DE Fri Sep 10 12:17:18 2010 From: Patricia.Wollstadt at GMX.DE (Patricia Wollstadt) Date: Fri, 10 Sep 2010 12:17:18 +0200 Subject: error volumenormalise Message-ID: Dear listusers, I am currently doing source localization on my data and encounter the following problem when using the volumenormalise function: ??? Error using ==> spm_bsplinc spm_bsplinc.c not compiled. Error in ==> spm_write_sn>nonlin_transform at 207 C = spm_bsplinc(V(i),d); Error in ==> spm_write_sn at 118 nonlin_transform(V,prm,x,y,z,mat,flags,msk); Error in ==> volumenormalise at 244 spm_write_sn(char(files),params,flags); % his creates the 'w' prefixed files I'm only using the cfg options as provided in the tutorial on beamformer techniques: cfg = []; cfg.coordinates = 'ctf'; cfg.nonlinear = 'no'; sourceDiffIntN = ft_volumenormalise(cfg, source); Thank you very much for your help, kind regards Patricia Wollstadt -- Achtung Sicherheitswarnung: GMX warnt vor Phishing-Attacken! http://portal.gmx.net/de/go/sicherheitspaket ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Anne.DoLam at UKB.UNI-BONN.DE Fri Sep 10 16:01:20 2010 From: Anne.DoLam at UKB.UNI-BONN.DE (vervang dit voor je naam of door ANONYMOUS) Date: Fri, 10 Sep 2010 16:01:20 +0200 Subject: Anne Do Lam ist au=?ISO-8859-1?Q?=DFer?= Haus. Message-ID: Ich werde ab 10.09.2010 nicht im Büro sein. Ich kehre zurück am 07.10.2010. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From egarza at GMAIL.COM Fri Sep 10 18:57:47 2010 From: egarza at GMAIL.COM (Eduardo Garza) Date: Fri, 10 Sep 2010 18:57:47 +0200 Subject: Can't read .SMR data into FT Message-ID: Dear Vladimir, Thank you for the answer. This didn't work, however, a member of our team Morten J�nsson found out the problem and apparently a bug. First, this doesn't work using MATLAB 64-bit, only 32-bit. Second, this is what Morten suggested: 1. download the newest fieldtrip version 2. download the Matlab-Import-Filter_2_5.zip from www.neuroshare.org 3. download the exe-file from http://www.ced.co.uk/upnssonu.shtml 4. delete the content of the directory "fieldtrip-20100909\external\neuroshare". This is obsolete (at least with respect to smr-files). We should add a bug report about this. 5. unpack the Matlab-Import-Filter_2_5.zip in the folder instead 6. place the nscedson.exe file in the folder and run it. This will generate a nscedson.dll file 7. rename this to nsCedSon.dll After this, Fieldtrip was able to read the SMR file recorded on Spike 7.2. However, we still have some issues with defining trials. If it keeps failing, we will have to do as you said and use the FileIO instead. Thanks again, Best regards Eduardo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 10 20:09:24 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 10 Sep 2010 20:09:24 +0200 Subject: volumerealign error Message-ID: Dear all, Can anyone tell me what to do when the following error happens? 1) First I ran the following code: ------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm [segmentedmri] = ft_volumesegment(cfg, mri); -------------- And the output looks like this : ====================== the input is volume data with dimensions [256 256 150] assuming that the input MRI is already approximately aligned with SPM coordinates performing the segmentation on the specified volume Warning: File 'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' not found. > In ft_volumesegment at 297 ===================== 2) Then I did this: ------------- cfg = []; cfg.method = 'interactive'; [realigned_mri] = ft_volumerealign(cfg, segmentedmri) -------------- And the output error message is: ================ the input is volume data with dimensions [256 256 150] ??? Index exceeds matrix dimensions. Error in ==> ft_volumerealign at 102 cfg.parameter = cfg.parameter{1}; ================ How can this error be fixed? FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My matlab is Version 7.5 but it only has Statistics Toolbox. And I installed SPM8. Could it be that I need other MATLAB toolboxes like "Signal processing toolbox"? Thanks a lot, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sangita.dandekar at GMAIL.COM Fri Sep 10 22:01:37 2010 From: sangita.dandekar at GMAIL.COM (Sangita Dandekar) Date: Fri, 10 Sep 2010 16:01:37 -0400 Subject: Simulations testing MEG planar on Yokogawa system Message-ID: Hi, I've tried to make changes to the megplanar code in FieldTrip so that it can be used for our Yokogawa (axial gradiometer) MEG system. I was wondering if anyone familar with the planar gradient approximation code in megplanar and/or the Yokogawa system could take a quick look at the changes that I've made and the results of simulations that I've done and see if they look reasonable. Output images generated by the simulation code (code pasted below) are at: http://clayspace.psych.nyu.edu/lab-members/sangita-dandekar/planarsims/ The simulation just consisted of pointing dipoles along the major axes and getting planar approximations for every dipole orientation. The output images are at the above link. Also pasted below are changes to segments of the combineplanar and planarchannelset functions that I made for the yokogawa system. (The only change that I ended up making in the original megplanar.m function was to comment out the code that causes an error if the input data is from an MEG system other than the supported ones) The original grad struct that I am using the for the unmodified axial gradiometer data for the yokogawa system looks like this: ftdata.grad ans = pnt: [314x3 double] ori: [314x3 double] tra: [157x314 double] label: {157x1 cell} unit: 'cm' The hope is that I can use the megplanar code (probably using the 'sincos' method) to get the planar gradient approximation, then apply freqanalysis to the horizontal and vertical components separately, and then finally recombine/sum the vertical and horizontal components using combineplanar. Any advice would be appreciated. Thanks in advance for any help! Sangita Dandekar %*******Simulation code to produce axial and planar x, y, and z images as shown at link above cfg.grad=ftdata.grad cfg.dip.pos=[ftdata.grad.pnt(57,1) ftdata.grad.pnt(57, 2) ftdata.grad.pnt(57,3)-5]; %5 cm below lower coil of gradiometer 57 cfg.dip.mom=[0 1 0]; %also varied to point along x ([1 0 0]) and z ([0 0 1]) cfg.vol.r=10; cfg.vol.o=[mean(ftdata.grad.pnt(:,1)) mean(ftdata.grad.pnt(:,2)) mean(ftdata.grad.pnt(:,3))] cfg.dip.signal=[ 1 1 1 ]; data=dipolesimulation(cfg); %get planar approximation: cfg=[]; cfg.planarmethod='sincos'; cfg.channel=ftdata.grad.label; [interp]=megplanar_yokogawa(cfg, data) %recombine horizontal and vertical components: cfg=[]; cfg.combinegrad='yes'; cfg.combmethod='sum'; [interpcomb]=combineplanar_yokogawa(cfg, interp) figure; cfgplot=[]; cfgplot.electrodes='numbers'; avg=timelockanalysis(cfgplot, interpcomb); %plot planar approximation topoplotER(cfgplot, avg) figure avg=timelockanalysis(cfgplot, data); topoplotER(cfgplot, avg) avg=timelockanalysis(cfgplot, data); %plot original axial gradiometer output topoplotER(cfgplot, avg) %*****************CHANGES TO COMBINEPLANAR (combineplanar_yokogawa.m): if strcmp(cfg.combinegrad, 'no') && ~isfield(data, 'grad') % the planar gradiometer definition was already removed % nothing needs to be done here elseif strcmp(cfg.combinegrad, 'no') && isfield(data, 'grad') % remove the planar gradiometer definition since it does not match the data any more data = rmfield(data, 'grad'); elseif strcmp(cfg.combinegrad, 'yes') && ~isfield(data, 'grad') % there is no gradiometer definition, impossible to reconstruct it error('the planar gradiometer definition is missing, cannot convert it back to axial'); elseif strcmp(cfg.combinegrad, 'yes') && isfield(data, 'grad') warning('trying to convert planar to axial gradiometers, this is experimental'); % try to reconstruct the original axial gradiometer array from the planar gradiometer definition orig = data.grad if all(size(orig.pnt)==[314 3]) && ... all(size(orig.pnt)==[314 3]) && ... all(size(orig.tra)==[314 314]) && ... length(orig.label)==314 && ... all(sum(orig.tra~=0,1)>2) % This looks as if it was made using the MEGPLANAR nearest neighbour approach % which means that the coil position and orientation still correspond % with those of the original axial gradiometer. Only the label and tra % have been modified and have to be restored to their original values. axial.pnt = orig.pnt; axial.ori = orig.ori; for i=1:157 axial.label{i} = orig.label{i}(1:(end-3)); end if all(orig.ori(1,:)==orig.ori(158,:)) % orientation is the same, the subtraction should be in "tra" axial.tra = [eye(157) -eye(157)]; else % orientation is opposite, the subtraction should not be in "tra" axial.tra = [eye(157) eye(157)]; end try axial.unit = orig.unit; end else error('cannot convert gradiometer definition back to axial, please contact Robert'); end data.grad = axial; end %*****************CHANGES TO PLANARCHANNELSET %(planarchannelset_yokogawa.m):** case 'meg' planar={ '1_dH' '1_dV' '1' '2_dH' '2_dV' '2' '3_dH' '3_dV' '3' '4_dH' '4_dV' '4' '5_dH' '5_dV' '5' '6_dH' '6_dV' '6' '7_dH' '7_dV' '7' '8_dH' '8_dV' '8' '9_dH' '9_dV' '9' '10_dH' '10_dV' '10' '11_dH' '11_dV' '11' '12_dH' '12_dV' '12' '13_dH' '13_dV' '13' '14_dH' '14_dV' '14' '15_dH' '15_dV' '15' '16_dH' '16_dV' '16' '17_dH' '17_dV' '17' '18_dH' '18_dV' '18' '19_dH' '19_dV' '19' '20_dH' '20_dV' '20' '21_dH' '21_dV' '21' '22_dH' '22_dV' '22' '23_dH' '23_dV' '23' '24_dH' '24_dV' '24' '25_dH' '25_dV' '25' '26_dH' '26_dV' '26' '27_dH' '27_dV' '27' '28_dH' '28_dV' '28' '29_dH' '29_dV' '29' '30_dH' '30_dV' '30' '31_dH' '31_dV' '31' '32_dH' '32_dV' '32' '33_dH' '33_dV' '33' '34_dH' '34_dV' '34' '35_dH' '35_dV' '35' '36_dH' '36_dV' '36' '37_dH' '37_dV' '37' '38_dH' '38_dV' '38' '39_dH' '39_dV' '39' '40_dH' '40_dV' '40' '41_dH' '41_dV' '41' '42_dH' '42_dV' '42' '43_dH' '43_dV' '43' '44_dH' '44_dV' '44' '45_dH' '45_dV' '45' '46_dH' '46_dV' '46' '47_dH' '47_dV' '47' '48_dH' '48_dV' '48' '49_dH' '49_dV' '49' '50_dH' '50_dV' '50' '51_dH' '51_dV' '51' '52_dH' '52_dV' '52' '53_dH' '53_dV' '53' '54_dH' '54_dV' '54' '55_dH' '55_dV' '55' '56_dH' '56_dV' '56' '57_dH' '57_dV' '57' '58_dH' '58_dV' '58' '59_dH' '59_dV' '59' '60_dH' '60_dV' '60' '61_dH' '61_dV' '61' '62_dH' '62_dV' '62' '63_dH' '63_dV' '63' '64_dH' '64_dV' '64' '65_dH' '65_dV' '65' '66_dH' '66_dV' '66' '67_dH' '67_dV' '67' '68_dH' '68_dV' '68' '69_dH' '69_dV' '69' '70_dH' '70_dV' '70' '71_dH' '71_dV' '71' '72_dH' '72_dV' '72' '73_dH' '73_dV' '73' '74_dH' '74_dV' '74' '75_dH' '75_dV' '75' '76_dH' '76_dV' '76' '77_dH' '77_dV' '77' '78_dH' '78_dV' '78' '79_dH' '79_dV' '79' '80_dH' '80_dV' '80' '81_dH' '81_dV' '81' '82_dH' '82_dV' '82' '83_dH' '83_dV' '83' '84_dH' '84_dV' '84' '85_dH' '85_dV' '85' '86_dH' '86_dV' '86' '87_dH' '87_dV' '87' '88_dH' '88_dV' '88' '89_dH' '89_dV' '89' '90_dH' '90_dV' '90' '91_dH' '91_dV' '91' '92_dH' '92_dV' '92' '93_dH' '93_dV' '93' '94_dH' '94_dV' '94' '95_dH' '95_dV' '95' '96_dH' '96_dV' '96' '97_dH' '97_dV' '97' '98_dH' '98_dV' '98' '99_dH' '99_dV' '99' '100_dH' '100_dV' '100' '101_dH' '101_dV' '101' '102_dH' '102_dV' '102' '103_dH' '103_dV' '103' '104_dH' '104_dV' '104' '105_dH' '105_dV' '105' '106_dH' '106_dV' '106' '107_dH' '107_dV' '107' '108_dH' '108_dV' '108' '109_dH' '109_dV' '109' '110_dH' '110_dV' '110' '111_dH' '111_dV' '111' '112_dH' '112_dV' '112' '113_dH' '113_dV' '113' '114_dH' '114_dV' '114' '115_dH' '115_dV' '115' '116_dH' '116_dV' '116' '117_dH' '117_dV' '117' '118_dH' '118_dV' '118' '119_dH' '119_dV' '119' '120_dH' '120_dV' '120' '121_dH' '121_dV' '121' '122_dH' '122_dV' '122' '123_dH' '123_dV' '123' '124_dH' '124_dV' '124' '125_dH' '125_dV' '125' '126_dH' '126_dV' '126' '127_dH' '127_dV' '127' '128_dH' '128_dV' '128' '129_dH' '129_dV' '129' '130_dH' '130_dV' '130' '131_dH' '131_dV' '131' '132_dH' '132_dV' '132' '133_dH' '133_dV' '133' '134_dH' '134_dV' '134' '135_dH' '135_dV' '135' '136_dH' '136_dV' '136' '137_dH' '137_dV' '137' '138_dH' '138_dV' '138' '139_dH' '139_dV' '139' '140_dH' '140_dV' '140' '141_dH' '141_dV' '141' '142_dH' '142_dV' '142' '143_dH' '143_dV' '143' '144_dH' '144_dV' '144' '145_dH' '145_dV' '145' '146_dH' '146_dV' '146' '147_dH' '147_dV' '147' '148_dH' '148_dV' '148' '149_dH' '149_dV' '149' '150_dH' '150_dV' '150' '151_dH' '151_dV' '151' '152_dH' '152_dV' '152' '153_dH' '153_dV' '153' '154_dH' '154_dV' '154' '155_dH' '155_dV' '155' '156_dH' '156_dV' '156' '157_dH' '157_dV' '157' }; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at GMAIL.COM Mon Sep 13 21:02:30 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Mon, 13 Sep 2010 21:02:30 +0200 Subject: volumerealign error Message-ID: Hello, I tried the same commands in a Windows Server 2008 PC with a R2009b MATLAB that has all 4 toolboxes recommended by Fieldtrip. And it has the latest SPM8 and Fieldtrip. I still got the same error message. Any suggestion how to fix the problem? Should I run "ft_volumerealign" first on the "mri" structure, then run "ft_volumesegment" on this realigned data? Thanks, Jim On Fri, 10 Sep 2010 20:09:24 +0200, Jim Li wrote: >Dear all, > >Can anyone tell me what to do when the following error happens? > >1) First I ran the following code: >------------- >mri = ft_read_mri('../2_mri.img'); >cfg = []; >cfg.write = 'no'; >cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm >[segmentedmri] = ft_volumesegment(cfg, mri); >-------------- > >And the output looks like this : >====================== >the input is volume data with dimensions [256 256 150] >assuming that the input MRI is already approximately aligned with SPM >coordinates >performing the segmentation on the specified volume >Warning: File >'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' >not found. >> In ft_volumesegment at 297 >===================== > >2) Then I did this: >------------- >cfg = []; >cfg.method = 'interactive'; >[realigned_mri] = ft_volumerealign(cfg, segmentedmri) >-------------- > >And the output error message is: >================ >the input is volume data with dimensions [256 256 150] >??? Index exceeds matrix dimensions. > >Error in ==> ft_volumerealign at 102 > cfg.parameter = cfg.parameter{1}; >================ > >How can this error be fixed? > >FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My >matlab is Version 7.5 but it only has Statistics Toolbox. And I installed >SPM8. Could it be that I need other MATLAB toolboxes like "Signal >processing toolbox"? > >Thanks a lot, > >Jim > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hannah.schulz at UNI-KONSTANZ.DE Wed Sep 15 13:45:35 2010 From: Hannah.schulz at UNI-KONSTANZ.DE (Hannah Schulz) Date: Wed, 15 Sep 2010 13:45:35 +0200 Subject: trl information in ft_resampledata Message-ID: Hello, I have a problem with a new fieldtrip version (7.9.2010). When I do ft_resampledata after preprocessing and then do a reject visual with cfg.method='summary' I get this warning : the input is raw data with 130 channels and 75 trials Warning: the trial definition in the configuration is inconsistent with the actual data > In public/private/fixtrialdef at 66 In checkdata at 559 In ft_rejectvisual at 159 Warning: failed to create sampleinfo field > In public/private/fixtrialdef at 73 In checkdata at 559 In ft_rejectvisual at 159 I also get an empty trl structure in the "artefact free" dataset . Unfortunately I do need the proper trl structure for my further analysis, could anybody help me how solve that problem? (With an older fieldtrip version it workes fine) Thank you very much in advance, Hannah Schulz Dipl. Psych. Hannah Schulz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: hannah.schulz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From N.A.Kloosterman at UVA.NL Wed Sep 15 16:08:47 2010 From: N.A.Kloosterman at UVA.NL (Niels Kloosterman) Date: Wed, 15 Sep 2010 16:08:47 +0200 Subject: trl information in ft_resampledata In-Reply-To: Message-ID: Hi Hannah, What you need to do is also resample the start and stop indices in the trl, as this still contains the indices relative to the sample rate from before ft_resample. The line of code that did it for me was: data.cfg.trl(:,1:3) = round(data.cfg.trl(:,1:3) * (1/cfg.fsample) * cfg.resamplefs); %resample the trl indices too or visual artifact rejection won't work Where fsample is your original sample rate and resamplefs the sample rate after resampling. If all is well the trl is now also updated as you discard trials during visual artefact rejection. Hope this helps. Best, Niels --- Niels A. Kloosterman MSc.| PhD student | University of Amsterdam | Cognitive Neuroscience Group | Dept. of Psychology | Roetersstraat 15, A614 | 1018 WB Amsterdam | Tel: +31 20 525 6847 On 9/15/10 1:45 PM, "Hannah Schulz" wrote: > Hello, > > I have a problem with a new fieldtrip version (7.9.2010). When I do > ft_resampledata after preprocessing and then do a reject visual with > cfg.method='summary' I get this warning : > > the input is raw data with 130 channels and 75 trials > Warning: the trial definition in the > configuration is inconsistent with the actual > data >> In public/private/fixtrialdef at 66 > In checkdata at 559 > In ft_rejectvisual at 159 > Warning: failed to create sampleinfo field >> In public/private/fixtrialdef at 73 > In checkdata at 559 > In ft_rejectvisual at 159 > > > I also get an empty trl structure in the "artefact free" dataset . > Unfortunately I do need the proper trl structure for my further > analysis, could anybody help me how solve that problem? (With an older > fieldtrip version it workes fine) > Thank you very much in advance, > Hannah Schulz > > > > > > > Dipl. Psych. Hannah Schulz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: hannah.schulz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at GMAIL.COM Wed Sep 15 21:55:33 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 15 Sep 2010 21:55:33 +0200 Subject: Which way is correct? Message-ID: (a) Aha, we found that, even though "mri" has a field called "anatomy", running "[segmentedmri]=ft_volumesegment(cfg, mri)" will drop that"anatomy" field for "segmentedmri" , thus causing trouble for subsequent implementation of "ft_volumerealign(cfg, segmentedmri)". That's why we got the error message. By adding the "anatomy" field to "segmentedmri" before running ""ft_volumerealign(cfg, segmentedmri)", the problem can be solved. Here is the full script that worked now: ----------------------------------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [segmentedmri] = ft_volumesegment(cfg, mri); segmentedmri.anatomy= mri.anatomy; % a newly added line that solved the issue cfg = []; cfg.method = 'interactive'; [realigned_mri] = ft_volumerealign(cfg, segmentedmri) -------------------------------------------- (b) Interestingly, if we swap the above steps (i.e. do "ft_volumerealign" first, then "ft_volumesegment"), it also works fine. Here is the full script that works, too: ----------------------------------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [mri_realign] = ft_volumerealign(cfg, mri) cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [segmentedmri] = ft_volumesegment(cfg, mri_realign); ----------------------------------------- My question is: given these two ways to process data, which one is the correct way? Do "ft_volumesegment" first, then "ft_volumerealign" (i.e. use scripts in (a)) ? Or do "ft_volumerealign" first, then "ft_volumesegment" (i.e. use scripts in (b))? Thanks. Jim On Mon, 13 Sep 2010 21:02:30 +0200, Jim Li wrote: >Hello, > >I tried the same commands in a Windows Server 2008 PC with a R2009b MATLAB >that has all 4 toolboxes recommended by Fieldtrip. And it has the latest >SPM8 and Fieldtrip. I still got the same error message. > >Any suggestion how to fix the problem? Should I run "ft_volumerealign" >first on the "mri" structure, then run "ft_volumesegment" on this realigned >data? > >Thanks, > >Jim > >On Fri, 10 Sep 2010 20:09:24 +0200, Jim Li wrote: > >>Dear all, >> >>Can anyone tell me what to do when the following error happens? >> >>1) First I ran the following code: >>------------- >>mri = ft_read_mri('../2_mri.img'); >>cfg = []; >>cfg.write = 'no'; >>cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm >>[segmentedmri] = ft_volumesegment(cfg, mri); >>-------------- >> >>And the output looks like this : >>====================== >>the input is volume data with dimensions [256 256 150] >>assuming that the input MRI is already approximately aligned with SPM >>coordinates >>performing the segmentation on the specified volume >>Warning: File >>'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' >>not found. >>> In ft_volumesegment at 297 >>===================== >> >>2) Then I did this: >>------------- >>cfg = []; >>cfg.method = 'interactive'; >>[realigned_mri] = ft_volumerealign(cfg, segmentedmri) >>-------------- >> >>And the output error message is: >>================ >>the input is volume data with dimensions [256 256 150] >>??? Index exceeds matrix dimensions. >> >>Error in ==> ft_volumerealign at 102 >> cfg.parameter = cfg.parameter{1}; >>================ >> >>How can this error be fixed? >> >>FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My >>matlab is Version 7.5 but it only has Statistics Toolbox. And I installed >>SPM8. Could it be that I need other MATLAB toolboxes like "Signal >>processing toolbox"? >> >>Thanks a lot, >> >>Jim >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the >FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Thu Sep 16 13:58:26 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Thu, 16 Sep 2010 13:58:26 +0200 Subject: significance of coherence differences Message-ID: Dear Claudia, I have nothing to add really to Eric's mail, just wanted to let you know that I think what you're doing is just fine. During frequency analysis fieldtrip averages spectra over trials automatically (though it is not a weighted average and I didn't quite understand why you want to weight them). The normalization, too, is part of the automatic calculation of coherence by connectivityanalysis. The normalization is actually part of the definition of coherence. And as Eric says, the montecarlo method is appropiate when doing many comparisons (many channels, many frequencies). Maybe you would like think about the test statistic. I have never used the fieldtrip statisics functions but it sounds like your statistic is a traditional t-value. There are other statistics which are commonly used in coherence analysis (z-transform, see e.g. the paper of Maris and Schoffelen on coh diff) which may do a better job in capturing the effect. Though in nonparametric testing the validity of your stats does not depend on the statistic, they are just not all equally effective. Best, Jan -----Original Message----- From: FieldTrip discussion list on behalf of Eric Maris Sent: Thu 9/9/2010 10:02 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] significance of coherence differences Dear Claudia, > I too am confused about coherence and its statistical analysis..I am > trying to > calculate the coherence between POz and 47 other channels in a > multisubject > study (N=19) with a within-subject design to test (1) whether coherence > in > condition 'Figure' is the same as in condition 'No figure', and (2) > whether > coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct > rejections'. > > Either way I am not sure about a couple of things: > > 1) This is maybe a silly question but in your reply to Jan's post you > state: "...You apply this test statistic to the condition-specific > coherences, > obtained by summing and normalizing the trial(taper)-specific cross- > spectra..." - You mean averaging the trial-specific cross-spectra (and > trial- > specific powerspectra) right? Moreover does this mean that > cfg.keeptrials can > be set to 'no' when calculating the powerspectra and cross-spectra with > freqanalysis(_mtmconvol)? This would be great news for me, since the 4D > freqdata is too large to save.. For statistical testing in a within-subjects design (units-of-observation are subjects and not trials) you don't need the trials. So, you can safely put cfg.keeptrials to 'no'. By the way, try using freqanalysis_mtmfft (frequency analysis without time resolution) before freqanalysis_mtmconvol (with time resolutions). This makes life a lot easier and conceptually you're doing the same thing. > > 2) Another related question comes from the fact that the experiment had > 3 > different masking durations, so to combine the powerspectra belonging > to the > same condition (i.e. the Figs) but different mask durations we > calculated > weighted averages based on the least amount of trials in each Mask > duration > group. My question now would be whether the normalization to get the > coherence values should be done before or after this weighing (In other > words, > should I weigh the cross-spectra or the coherence values, or does this > not > matter?) I don't see why you have to deal with the normalization yourself. You can use ft_freqdescriptives or ft_connectivityanalysis to calculate the coherence values taking the freqanalsis output as its input. In any case, to obtain coherence values from the cross-spectra, one should always normalize (i.e., divide) by the square-roots of the power-spectra calculated on the same trials. I may be wrong, but it seems that you are making life more difficult than it should be. > > 3) Now for the statistics. Again in your reply to Jan's post you say: > "...For a > single channel pair and a single frequency bin, the appropriate > statistic is the > dependent (paired) samples t-statistic or, in a nonparametric > framework, the > Wilcoxon signed rank sum test." Does this mean it is not valid to use > freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = > 'depsamplesT' > (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the > coherence > between POz (my ref.channel) and the 47 other channels is the same in > different conditions, using all my frequency and time bins? Do I need > to make a > selection? What you propose IS valid to control for multiple comparisons. However, in my reply to Jan, I consider a single statistical test ("... For a single channel pair and a single frequency bin, ..."); so, no multiple comparisons problem here. Good luck, Eric > > Thank you for your time. > > Sincerely, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Sep 17 14:25:30 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 17 Sep 2010 14:25:30 +0200 Subject: trl information in ft_resampledata In-Reply-To: Message-ID: Dear Hannah, You may want to have a look at the following: http://fieldtrip.fcdonders.nl/faq/is_it_possible_to_keep_track_of_trial-specific_information_in_my_fieldtrip_analysis_pipeline http://fieldtrip.fcdonders.nl/development/ensure_consistend_trial_definition We tried to make things as backward compatible as possible, but there may be some loose ends here and there. Let me know whether the information is helpful and allows you to tweak your analysis pipeline such that it works again. Best, Jan-Mathijs On Sep 15, 2010, at 1:45 PM, Hannah Schulz wrote: > Hello, > > I have a problem with a new fieldtrip version (7.9.2010). When I do > ft_resampledata after preprocessing and then do a reject visual with > cfg.method='summary' I get this warning : > > the input is raw data with 130 channels and 75 trials > Warning: the trial definition in the > configuration is inconsistent with the actual > data > > In public/private/fixtrialdef at 66 > In checkdata at 559 > In ft_rejectvisual at 159 > Warning: failed to create sampleinfo field > > In public/private/fixtrialdef at 73 > In checkdata at 559 > In ft_rejectvisual at 159 > > > I also get an empty trl structure in the "artefact free" dataset . > Unfortunately I do need the proper trl structure for my further > analysis, could anybody help me how solve that problem? (With an > older fieldtrip version it workes fine) > Thank you very much in advance, > Hannah Schulz > > > > > > > Dipl. Psych. Hannah Schulz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: hannah.schulz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Sat Sep 18 00:53:11 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Fri, 17 Sep 2010 18:53:11 -0400 Subject: strange segmentation w/ ft_volumesegment Message-ID: Hi there, I am trying to segment an anatomical MRI. Here's the script: mri = ft_read_mri('test.nii'); %put the mri into the proper orientation cfg = []; mri.anatomy = permute(mri.anatomy,[1 3 2]); mri.anatomy = mri.anatomy(end:-1:1,:,end:-1:1); %segment the mri mri = ft_volumerealign(cfg,mri); cfg.template = '/spm8/templates/T1.nii'; cfg.coordinates = 'spm'; cfg.write = 'yes'; cfg.name = 'test_segment'; [segmentedmri] = ft_volumesegment(cfg, mri) %visualize the results cfg = []; test = segmentedmri; test.avg.pow = test.gray+test.white+test.csf; test.anatomy = mri.anatomy; cfg.funparameter = 'avg.pow'; cfg.interactive = 'yes'; ft_sourceplot(cfg,test); No errors are thrown, but when I visualize the results, the segmentation is clearly incorrect (attached) - it seems to be trying to follow the contour of the head instead of the brain. I've overlaid both test.nii and the template in MRIcron and they are aligned and in the same space; is there any other reason why segmentation may be failing? Thanks in advance! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: segmented.jpg Type: image/jpeg Size: 61138 bytes Desc: not available URL: From r.oostenveld at DONDERS.RU.NL Mon Sep 20 08:45:43 2010 From: r.oostenveld at DONDERS.RU.NL (Robert Oostenveld) Date: Mon, 20 Sep 2010 08:45:43 +0200 Subject: POSTDOC position at ESI in the Human Connectome Project Message-ID: Begin forwarded message: From: "Fries, Pascal" Date: 17 September 2010 11:48:10 GMT+02:00 To: undisclosed-recipients: ; Subject: [ESILIST-FRIES-LAB-ALL] POSTDOC position at ESI in the Human Connectome Project Dear colleagues, at the ESI, we are seeking a postdoc candidate and I would greatly appreciate your help in that! I attach the respective ad and it would be great if you could post it in your lab and/or distribute it through e-mail lists or similar! With kind regards! Pascal Prof. Dr. Pascal Fries Director, Ernst Strüngmann Institute (ESI) in Cooperation with Max Planck Society Deutschordenstr. 46, D-60528 Frankfurt E-mail: pascal.fries at esi-frankfurt.de Fon: 0049 69 96769 501 Fax: 0049 69 96769 555 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ESI HCP postdoc ad.doc Type: application/msword Size: 140288 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ESI HCP postdoc ad.pdf Type: application/pdf Size: 70880 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko at NYU.EDU Mon Sep 20 23:54:46 2010 From: akiko at NYU.EDU (Akiko Ikkai) Date: Mon, 20 Sep 2010 17:54:46 -0400 Subject: megplanar input structure Message-ID: Hello, I'm trying to calculate the planar gradient for my MEG data. I have 2 questions: 1. in tutorial "Event related averaging and planar gradient", (ft_)megplanar appears to call for averaged data created with cfg.keeptrials = 'no'; (how it was calculated earlier in the page), which looks like: (from tutorial) avgFIC = avg: [149x900 double] var: [149x900 double] fsample: 300 numsamples: [77x1 double] time: [1x900 double] dof: [149x900 double] label: {149x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] However, megplanar looks for data.trial (e.g. line 252). If I feed in averaged data with cfg.keeptrials = 'yes'; input structure looks like: (from my data, after timelockanalysis with cfg.keeptrials = 'yes';) timelock = avg: [156x751 double] var: [156x751 double] fsample: 500 time: [1x751 double] dof: [156x751 double] label: {1x156 cell} trial: [72x156x751 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] However, data.trial is matrix instead of cell structure, as megplanar requires (e.g. line 505: interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it crashes here. Also in tutorial, it appears that the sequence of analysis is ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I suspect ft_timelockanalysis should be before calculating planar gradients...? 2. How to deal with bad channels in calculating planar gradient? It is suggested that we do preprocessing, timelockanalysis, megplanar and combineplanar. However, if I have bad channels and reject them in preprocessing, combineplanar crashes @ line 326 if all(size(orig.pnt)==[302 3]) && ... all(size(orig.pnt)==[302 3]) && ... all(size(orig.tra)==[302 302]) && ... length(orig.label)==302 && ... all(sum(orig.tra~=0,1)>2) because length(orig.label) is not going to be 302. Could I simply change these lines to something like: if all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... all(sum(orig.tra~=0,1)>2) If anyone could clarify these issues, I'd greatly appreciate it. Thanks in advance! Akiko ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Tue Sep 21 00:13:24 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Mon, 20 Sep 2010 17:13:24 -0500 Subject: megplanar input structure In-Reply-To: <5860855f6ce91.4c979fe6@mail.nyu.edu> Message-ID: Hi, In response to your second question, there is a function called ft_channelrepair which you can use to repair bad channels prior to using combineplanar. Please see the example code below: cfg = []; cfg.badchannel = {'A153'; 'A154'} [interp] = ft_channelrepair(cfg, data) Good luck! -Tony -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Akiko Ikkai Sent: Monday, September 20, 2010 4:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] megplanar input structure Hello, I'm trying to calculate the planar gradient for my MEG data. I have 2 questions: 1. in tutorial "Event related averaging and planar gradient", (ft_)megplanar appears to call for averaged data created with cfg.keeptrials = 'no'; (how it was calculated earlier in the page), which looks like: (from tutorial) avgFIC = avg: [149x900 double] var: [149x900 double] fsample: 300 numsamples: [77x1 double] time: [1x900 double] dof: [149x900 double] label: {149x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] However, megplanar looks for data.trial (e.g. line 252). If I feed in averaged data with cfg.keeptrials = 'yes'; input structure looks like: (from my data, after timelockanalysis with cfg.keeptrials = 'yes';) timelock = avg: [156x751 double] var: [156x751 double] fsample: 500 time: [1x751 double] dof: [156x751 double] label: {1x156 cell} trial: [72x156x751 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] However, data.trial is matrix instead of cell structure, as megplanar requires (e.g. line 505: interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it crashes here. Also in tutorial, it appears that the sequence of analysis is ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I suspect ft_timelockanalysis should be before calculating planar gradients...? 2. How to deal with bad channels in calculating planar gradient? It is suggested that we do preprocessing, timelockanalysis, megplanar and combineplanar. However, if I have bad channels and reject them in preprocessing, combineplanar crashes @ line 326 if all(size(orig.pnt)==[302 3]) && ... all(size(orig.pnt)==[302 3]) && ... all(size(orig.tra)==[302 302]) && ... length(orig.label)==302 && ... all(sum(orig.tra~=0,1)>2) because length(orig.label) is not going to be 302. Could I simply change these lines to something like: if all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... all(sum(orig.tra~=0,1)>2) If anyone could clarify these issues, I'd greatly appreciate it. Thanks in advance! Akiko ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Sep 21 11:34:10 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 21 Sep 2010 11:34:10 +0200 Subject: strange segmentation w/ ft_volumesegment In-Reply-To: <50434.132.183.137.195.1284763991.squirrel@mail.nmr.mgh.harvard.edu> Message-ID: Dear Matt, From your figure it looks as if there is a coregistration problem causing the segmentation (in SPM8) to return nonsense results. It is important to note the following: the SPM segmentation routine relies on matchin the anatomy of the single subject's MRI to a series of templates. In order for this to work well, the anatomy should be approximately coregistered with these templates. FieldTrip tries to achieve this in ft_volumesegment. This seems to go wrong in your case. Two things are problematic here: permuting and flipping mri.anatomy without changing mri.transform is wrong, because the block of voxels containing the anatomy does not correspond anymore to the voxel to head coordinate system transformation as specified in mri.transform. Next, the convention for anatomical MRIs in EEG/MEG is that the coordinate system which defines 'headspace' is different from the SPM convention. In other words, probably you should change cfg.coordinates into 'ctf' before calling ft_volumesegment, because ft_volumerealign will give you the transformation to headspace as defined by the fiducials. Best wishes, Jan-Mathijs On Sep 18, 2010, at 12:53 AM, Matt F. Panichello wrote: > Hi there, > > I am trying to segment an anatomical MRI. Here's the script: > > mri = ft_read_mri('test.nii'); > > %put the mri into the proper orientation > cfg = []; > mri.anatomy = permute(mri.anatomy,[1 3 2]); > mri.anatomy = mri.anatomy(end:-1:1,:,end:-1:1); > > %segment the mri > mri = ft_volumerealign(cfg,mri); > > cfg.template = '/spm8/templates/T1.nii'; > cfg.coordinates = 'spm'; > cfg.write = 'yes'; > cfg.name = 'test_segment'; > [segmentedmri] = ft_volumesegment(cfg, mri) > > %visualize the results > cfg = []; > test = segmentedmri; > test.avg.pow = test.gray+test.white+test.csf; > test.anatomy = mri.anatomy; > cfg.funparameter = 'avg.pow'; > cfg.interactive = 'yes'; > ft_sourceplot(cfg,test); > > > No errors are thrown, but when I visualize the results, the > segmentation > is clearly incorrect (attached) - it seems to be trying to follow the > contour of the head instead of the brain. I've overlaid both > test.nii and > the template in MRIcron and they are aligned and in the same space; is > there any other reason why segmentation may be failing? Thanks in > advance! > > Matt > > > > > > 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. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Sep 21 11:36:51 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 21 Sep 2010 11:36:51 +0200 Subject: megplanar input structure In-Reply-To: <5860855f6ce91.4c979fe6@mail.nyu.edu> Message-ID: Dear Akiko, I think that your crash may be related to the issue of missing channels. Antony already pointed you to a way how to fix this. As to your first question: ft_megplanar indeed works with data containing a trial field (as cell-array). However, no need for you to worry about this; if your input data is for example a 'timelock' structure, fieldtrip automatically converts this structure into one containing a 'trial'. Best wishes, Jan-Mathijs On Sep 20, 2010, at 11:54 PM, Akiko Ikkai wrote: > Hello, > > I'm trying to calculate the planar gradient for my MEG data. I have > 2 questions: > > 1. in tutorial "Event related averaging and planar gradient", > (ft_)megplanar appears to call for averaged data created with > cfg.keeptrials = 'no'; (how it was calculated earlier in the page), > which looks like: (from tutorial) > > avgFIC = > avg: [149x900 double] > var: [149x900 double] > fsample: 300 > numsamples: [77x1 double] > time: [1x900 double] > dof: [149x900 double] > label: {149x1 cell} > dimord: 'chan_time' > grad: [1x1 struct] > cfg: [1x1 struct] > > However, megplanar looks for data.trial (e.g. line 252). If I feed > in averaged data with cfg.keeptrials = 'yes'; input structure looks > like: (from my data, after timelockanalysis with cfg.keeptrials = > 'yes';) > > timelock = > > avg: [156x751 double] > var: [156x751 double] > fsample: 500 > time: [1x751 double] > dof: [156x751 double] > label: {1x156 cell} > trial: [72x156x751 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > However, data.trial is matrix instead of cell structure, as > megplanar requires (e.g. line 505: > interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it > crashes here. > > Also in tutorial, it appears that the sequence of analysis is > ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I > suspect ft_timelockanalysis should be before calculating planar > gradients...? > > > 2. How to deal with bad channels in calculating planar gradient? It > is suggested that we do preprocessing, timelockanalysis, megplanar > and combineplanar. However, if I have bad channels and reject them > in preprocessing, combineplanar crashes @ line 326 > > if all(size(orig.pnt)==[302 3]) && ... > all(size(orig.pnt)==[302 3]) && ... > all(size(orig.tra)==[302 302]) && ... > length(orig.label)==302 && ... > all(sum(orig.tra~=0,1)>2) > > because length(orig.label) is not going to be 302. Could I simply > change these lines to something like: > > if all(size(orig.pnt)==[length(orig.label) 3]) && ... > all(size(orig.pnt)==[length(orig.label) 3]) && ... > all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... > all(sum(orig.tra~=0,1)>2) > > > If anyone could clarify these issues, I'd greatly appreciate it. > Thanks in advance! Akiko > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From E.vandenBroeke at ANES.UMCN.NL Wed Sep 22 14:30:25 2010 From: E.vandenBroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 22 Sep 2010 14:30:25 +0200 Subject: non-parametric cluster analysis In-Reply-To: Message-ID: Dear dr. Maris, I would like to ask a question regarding your article: Nonparametric statistical testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I hope you will answer it. My question is about the following. I want to use the non-parametric cluster analysis, the one you described in your article, for my ERP analysis. In this article you quantified the difference between the two conditions (congruent and incongruent) by calculating sample specific t-values, based on the t-distribution. These sample specific t-values were calculated based on a two sided test statistic and an alpha of .05. Subsequently clusters were chosen based on the uncorrected critical t-value. This uncorrected critical t-value is also based on a two sided test statistic. Now my question. I understand that this uncorrected critical t-value threshold affects the sensitivity of the statistical test rather than the validity. So is it also possible to calculate the sample specific t-values belonging to the one-sided test statistic, instead of two-sided? The same question accounts for the uncorrected critical t-value used as threshold. Thanks in advance, Best, Emanuel Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.vandenbroeke at ANES.UMCN.NL Wed Sep 22 14:40:27 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 22 Sep 2010 14:40:27 +0200 Subject: non-parametric cluster analysis Message-ID: Dear dr. Maris, I would like to ask a question regarding your article: Nonparametric statistical testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I hope you will answer it. My question is about the following. I want to use the non-parametric cluster analysis, the one you described in your article, for my ERP analysis. In this article you quantified the difference between the two conditions (congruent and incongruent) by calculating sample specific t-values, based on the t-distribution. These sample specific t-values were calculated based on a two sided test statistic and an alpha of .05. Subsequently clusters were chosen based on the uncorrected critical t-value. This uncorrected critical t- value is also based on a two sided test statistic. Now my question. I understand that this uncorrected critical t-value threshold affects the sensitivity of the statistical test rather than the validity. So is it also possible to calculate the sample specific t-values belonging to the one- sided test statistic, instead of two-sided? The same question accounts for the uncorrected critical t-value used as threshold. Thanks in advance, Best, Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 22 22:25:00 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 22 Sep 2010 22:25:00 +0200 Subject: non-parametric cluster analysis In-Reply-To: Message-ID: Dear Emanuel, > I would like to ask a question regarding your article: Nonparametric > statistical > testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I > hope you will answer it. > My question is about the following. I want to use the non-parametric > cluster > analysis, the one you described in your article, for my ERP analysis. > In this article you quantified the difference between the two > conditions > (congruent and incongruent) by calculating sample specific t-values, > based on > the t-distribution. These sample specific t-values were calculated > based on a > two sided test statistic and an alpha of .05. Subsequently clusters > were > chosen based on the uncorrected critical t-value. This uncorrected > critical t- > value is also based on a two sided test statistic. > Now my question. I understand that this uncorrected critical t-value > threshold > affects the sensitivity of the statistical test rather than the > validity. So is it > also possible to calculate the sample specific t-values belonging to > the one- > sided test statistic, instead of two-sided? I guess you mean here whether one may also select samples for subsequent clustering based on whether their t-statistics exceed the critical value of a one-sided statistical test. Yes, this is allowed. However, when you use the cluster-based permutation tests in Fieldtrip, you can do this with the same function that (per default) does the selection on the basis of the critical values for a two-sided statistical test. You only have to double the value of the alphathresh-parameter (e.g., putting it at 0.10 such that it uses 0.05 as the critical p-value for the selection of the samples), and you can evaluate the permutation p-values of the clusters by comparing them with your nominal alpha-level (typically, 0.05). Researchers that, unlike you, are interested in both positive and negative clusters, must compare the permutation p-values with half their nominal alpha-level (typically, 0.025). Good luck, Eric The same question accounts > for the > uncorrected critical t-value used as threshold. > Thanks in advance, > Best, > Emanuel > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Tim.Bardouille at NRC-CNRC.GC.CA Thu Sep 23 00:10:40 2010 From: Tim.Bardouille at NRC-CNRC.GC.CA (Bardouille, Tim) Date: Wed, 22 Sep 2010 15:10:40 -0700 Subject: FieldTrip beamformer with Elekta Neuromag-306 Message-ID: Hi there, I'm just wondering if the Fieldtrip beamformer works with data from the Elekta Neuromag-306? Does the beamformer use the planar gradiometer and magnetometer data? Please let me know. Thanks, Tim. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko at NYU.EDU Thu Sep 23 01:20:19 2010 From: akiko at NYU.EDU (Akiko Ikkai) Date: Wed, 22 Sep 2010 19:20:19 -0400 Subject: megplanar input structure In-Reply-To: <793CFCD3-2ED3-4794-AA0F-8A26CD2C0739@donders.ru.nl> Message-ID: Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input ERF1 = trial: {1x137 cell} label: {157x1 cell} grad: [1x1 struct] fsample: 500 time: {1x137 cell} cfg: [1x1 struct] [stat] = timelockstatistics(cfg, ERF1, ERF2); ??? Reference to non-existent field 'dimord'. Error in ==> prepare_timefreq_data>forcedimord at 577 inputdim = tokenize(input.dimord, '_'); Error in ==> prepare_timefreq_data at 176 [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 318 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> timelockstatistics at 115 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in ==> cluster_ERF_bwTrialtest_planar at 50 [stat] = timelockstatistics(cfg, ERF1, ERF2); 2. manually added dimord to the same input ERF1.dimord = 'rpt_chan_time'; [stat] = timelockstatistics(cfg, ERF1, ERF2); ??? Undefined function or method 'isnan' for input arguments of type 'cell'. Error in ==> prepare_timefreq_data at 215 if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) Error in ==> statistics_wrapper at 318 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> timelockstatistics at 115 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); 3. With timelockanalysis (after megplanar), it crashes during combineplanar ??? Subscripted assignment dimension mismatch. Error in ==> checkdata>raw2timelock at 1136 tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; Error in ==> checkdata at 366 data = raw2timelock(data); Error in ==> combineplanar at 356 data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); ... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. Thanks in advance! Akiko ----- Original Message ----- From: jan-mathijs schoffelen Date: Tuesday, September 21, 2010 5:37 am Subject: Re: [FIELDTRIP] megplanar input structure To: FIELDTRIP at NIC.SURFNET.NL > Dear Akiko, > > I think that your crash may be related to the issue of missing > channels. Antony already pointed you to a way how to fix this. As to > > your first question: ft_megplanar indeed works with data containing a > > trial field (as cell-array). However, no need for you to worry about > > this; if your input data is for example a 'timelock' structure, > fieldtrip automatically converts this structure into one containing a > > 'trial'. > > Best wishes, > > Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From masaki.maruyama at CEA.FR Thu Sep 23 10:45:16 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Thu, 23 Sep 2010 10:45:16 +0200 Subject: FieldTrip beamformer with Elekta Neuromag-306 In-Reply-To: A Message-ID: Dear Dr. Tim, Fieldtrip can do beamforming to each of planar data and magnetometer data. It will be also possible to apply to both data together if we can find out an appropriate method to normalize such different scale of signals in preprocessing. Sincerely, Masaki Maruyama Inserm U.992 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE http://www.unicog.org/ ________________________________ De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Bardouille, Tim Envoyé : jeudi 23 septembre 2010 00:11 À : FIELDTRIP at NIC.SURFNET.NL Objet : [FIELDTRIP] FieldTrip beamformer with Elekta Neuromag-306 Hi there, I'm just wondering if the Fieldtrip beamformer works with data from the Elekta Neuromag-306? Does the beamformer use the planar gradiometer and magnetometer data? Please let me know. Thanks, Tim. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Thu Sep 23 11:12:36 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:12:36 +0200 Subject: megplanar input structure / gerneral usage of plamar gradients fpr ERFs In-Reply-To: <5990feac1d369.4c9a56f3@mail.nyu.edu> Message-ID: Dear Akiko, maybe I can help with the confusion. Not in terms of fieldtrip usage but rather in the logic of using planar gradients for ERFs. When computing ERFs you count on non-repeateable signals to average to zero and on repeatable signals to average to non-zero quantities. This requires that your signals carry a sign (i.e. they're positive and negative). Clearly this is not the case anymore after combineplanar. Hence, any averaging that you do should occur before combineplanar, otherwise averaging to get an ERF-like construct does not make sense. I remeber that putting the gradient structure that you obtain after megplanar into the statistics was sometimes a problem (do not know whetherthis is still the case, though). So you basically have two options: (1) Do everything in axial gradiometers, including ERFS and stats. As a last step you may visualize the raw effect in planar gardients (i.e. do megplanar and combineplanar on your raw effect). See Grützner et al., J Neuroscience, 2010 for an example of what you get that way. (2) Compute the planar gradients as a first thing on the raw signals (but do NOT use combineplanar afterwards), do any averaging and stats that you'd like to do on the full 2xN gradient signals. Afterwards use combineplanar for visualization of the effects. As these two methods only differ in the arrangement of linear processing steps they are fully equivalent. Note that in both cases the nonlinear step (combineplaner) is done last. This is necessary because due to its nonlinear nature it does not commute with any other analysis step without dratsically changig the results and affecting the interpretation of what it is that you see. Michael -----Ursprüngliche Nachricht----- Von: "Akiko Ikkai" Gesendet: Sep 23, 2010 1:20:19 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] megplanar input structure >Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). > >I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. > >My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. > >I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input >ERF1 = > > trial: {1x137 cell} > label: {157x1 cell} > grad: [1x1 struct] > fsample: 500 > time: {1x137 cell} > cfg: [1x1 struct] > >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >??? Reference to non-existent field 'dimord'. > >Error in ==> prepare_timefreq_data>forcedimord at 577 >inputdim = tokenize(input.dimord, '_'); > >Error in ==> prepare_timefreq_data at 176 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > >Error in ==> statistics_wrapper at 318 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > >Error in ==> timelockstatistics at 115 >[stat, cfg] = statistics_wrapper(cfg, varargin{:}); > >Error in ==> cluster_ERF_bwTrialtest_planar at 50 >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >2. manually added dimord to the same input >ERF1.dimord = 'rpt_chan_time'; > >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >??? Undefined function or method 'isnan' for input arguments of type 'cell'. > >Error in ==> prepare_timefreq_data at 215 > if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) > >Error in ==> statistics_wrapper at 318 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > >Error in ==> timelockstatistics at 115 >[stat, cfg] = statistics_wrapper(cfg, varargin{:}); > >3. With timelockanalysis (after megplanar), it crashes during combineplanar > >??? Subscripted assignment dimension mismatch. > >Error in ==> checkdata>raw2timelock at 1136 > tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; > >Error in ==> checkdata at 366 > data = raw2timelock(data); > >Error in ==> combineplanar at 356 > data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); > > >... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. > >Thanks in advance! Akiko > > >----- Original Message ----- >From: jan-mathijs schoffelen >Date: Tuesday, September 21, 2010 5:37 am >Subject: Re: [FIELDTRIP] megplanar input structure >To: FIELDTRIP at NIC.SURFNET.NL > >> Dear Akiko, >> >> I think that your crash may be related to the issue of missing >> channels. Antony already pointed you to a way how to fix this. As to >> >> your first question: ft_megplanar indeed works with data containing a >> >> trial field (as cell-array). However, no need for you to worry about >> >> this; if your input data is for example a 'timelock' structure, >> fieldtrip automatically converts this structure into one containing a >> >> 'trial'. >> >> Best wishes, >> >> Jan-Mathijs > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From michael.wibral at WEB.DE Thu Sep 23 11:18:33 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:18:33 +0200 Subject: UPDATE megplanar input structure / gerneral usage of planar gradients fpr ERFs In-Reply-To: <1949535077.1716100.1285233156078.JavaMail.fmail@mwmweb053> Message-ID: Dear Akiko, I just remebered the problem you get when trying to do stats on planar gradient data: Any corrcetion method that takes spatial distance between sensors into account - such as Eric's cluster based correction - can not handle planar grdaiometer data properly - for fundamental reasons discussed earlier in this forum. But stats with FDR should work on the planar gradient inputs. Perhaps you will have to add a fake grad field (with 2xN entries !) to the output of megplanar.m to make timelockstatistics run. Michael -----Ursprüngliche Nachricht----- Von: "Michael Wibral" Gesendet: Sep 23, 2010 11:12:36 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] megplanar input structure / gerneral usage of plamar gradients fpr ERFs >Dear Akiko, > >maybe I can help with the confusion. Not in terms of fieldtrip usage but rather in the logic of using planar gradients for ERFs. > >When computing ERFs you count on non-repeateable signals to average to zero and on repeatable signals to average to non-zero quantities. This requires that your signals carry a sign (i.e. they're positive and negative). Clearly this is not the case anymore after combineplanar. Hence, any averaging that you do should occur before combineplanar, otherwise averaging to get an ERF-like construct does not make sense. > >I remeber that putting the gradient structure that you obtain after megplanar into the statistics was sometimes a problem (do not know whetherthis is still the case, though). > >So you basically have two options: >(1) Do everything in axial gradiometers, including ERFS and stats. As a last step you may visualize the raw effect in planar gardients (i.e. do megplanar and combineplanar on your raw effect). See Grützner et al., J Neuroscience, 2010 for an example of what you get that way. >(2) Compute the planar gradients as a first thing on the raw signals (but do NOT use combineplanar afterwards), do any averaging and stats that you'd like to do on the full 2xN gradient signals. Afterwards use combineplanar for visualization of the effects. > >As these two methods only differ in the arrangement of linear processing steps they are fully equivalent. Note that in both cases the nonlinear step (combineplaner) is done last. This is necessary because due to its nonlinear nature it does not commute with any other analysis step without dratsically changig the results and affecting the interpretation of what it is that you see. > >Michael > >-----Ursprüngliche Nachricht----- >Von: "Akiko Ikkai" [ >Gesendet: Sep 23, 2010 1:20:19 AM >An: FIELDTRIP at NIC.SURFNET.NL >Betreff: Re: [FIELDTRIP] megplanar input structure > >>Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). >> >>I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. >> >>My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. >> >>I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input >>ERF1 = >> >> trial: {1x137 cell} >> label: {157x1 cell} >> grad: [1x1 struct] >> fsample: 500 >> time: {1x137 cell} >> cfg: [1x1 struct] >> >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>??? Reference to non-existent field 'dimord'. >> >>Error in ==> prepare_timefreq_data>forcedimord at 577 >>inputdim = tokenize(input.dimord, '_'); >> >>Error in ==> prepare_timefreq_data at 176 >> [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); >> >>Error in ==> statistics_wrapper at 318 >> [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); >> >>Error in ==> timelockstatistics at 115 >>[stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> >>Error in ==> cluster_ERF_bwTrialtest_planar at 50 >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>2. manually added dimord to the same input >>ERF1.dimord = 'rpt_chan_time'; >> >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>??? Undefined function or method 'isnan' for input arguments of type 'cell'. >> >>Error in ==> prepare_timefreq_data at 215 >> if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) >> >>Error in ==> statistics_wrapper at 318 >> [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); >> >>Error in ==> timelockstatistics at 115 >>[stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> >>3. With timelockanalysis (after megplanar), it crashes during combineplanar >> >>??? Subscripted assignment dimension mismatch. >> >>Error in ==> checkdata>raw2timelock at 1136 >> tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; >> >>Error in ==> checkdata at 366 >> data = raw2timelock(data); >> >>Error in ==> combineplanar at 356 >> data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); >> >> >>... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. >> >>Thanks in advance! Akiko >> >> >>----- Original Message ----- >>From: jan-mathijs schoffelen >>Date: Tuesday, September 21, 2010 5:37 am >>Subject: Re: [FIELDTRIP] megplanar input structure >>To: FIELDTRIP at NIC.SURFNET.NL >> >>> Dear Akiko, >>> >>> I think that your crash may be related to the issue of missing >>> channels. Antony already pointed you to a way how to fix this. As to >>> >>> your first question: ft_megplanar indeed works with data containing a >>> >>> trial field (as cell-array). However, no need for you to worry about >>> >>> this; if your input data is for example a 'timelock' structure, >>> fieldtrip automatically converts this structure into one containing a >>> >>> 'trial'. >>> >>> Best wishes, >>> >>> Jan-Mathijs >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From michael.wibral at WEB.DE Thu Sep 23 11:51:16 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:51:16 +0200 Subject: Reference for permutation testing for factorial designs Message-ID: Dear Fieldtrip users, I know that every now and then the questions comes up on how to use permutation testing on 2x2 designs (potentially with interactions). On the code side fieldtrip offers the cfg.cvar mechanism to construct restricted permutations. Saskia Helbling pointed me to this reference that explains how to use such restricted permutations properly to 'fake' an ANOVA Anderson MJ and Ter Braak CJF, "PERMUTATION TESTS FOR MULTI-FACTORIAL ANALYSIS OF VARIANCE", J Statistical Computation and Simulation, 2003 Hope you'll find this useful, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.vandenbroeke at ANES.UMCN.NL Thu Sep 23 12:18:04 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Thu, 23 Sep 2010 12:18:04 +0200 Subject: cluster-based analysis Message-ID: Perhaps someone can answer my question? After performing the cluster based analysis of the ERPs one has to do a permutation test. I'm wondering on what data this permutation test is performed? Once you have defined a cluster of adjacent temporal samples you calculate the sum of the t-values within each cluster. For statistical analysis, I understood, you take the cluster with the highest absolute t-value. But on which data does the analysis perfom the permutation test? Is it also possible to calculate the mean ERP activity of the cluster period in each individual ERP and test these values between the two groups? or is the analysis restricted to another way of analysis? Please let me know, Best Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Thu Sep 23 13:53:56 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 13:53:56 +0200 Subject: cluster-based analysis In-Reply-To: Message-ID: Hi Emanuel, I think there may be a slight misunderstanding about what the cluster correction is doing. What is actually done is that for the original data the statistical metric is computed (say depsamples t values), and clusters are identified based on the clusterthreshold you set. Then you sum all t-values in every cluster to obtain one t-value sum per cluster. Note that all of these cluster/t-value sums are kept for later! Then the data are permuted, the statistical metric is computed on the permuted data, clusters are identified, their t-value sums are computed and the maximum t-value sum is kept. This is done again and again (permutation, statistical metric, cluster identification, keeping the max t-sum). All the maximum t-sums obtained in the perumtations together form the maximum distribution under the null. Now you go and sort the t-sums from your clusters obtained from the original data in descending order. For each of these you test how many t-values in distribution of maximum t-sums from the permutations are more extreme. If there are no more than alpha% more extreme t-values in in distribution of maximum t-sums from the permutations you consider the original cluster significant. Note that more than one cluster can be significant. Often, however, the biggest cluster also shows up in some distorted form in the permutations, again with a high t-value sum. Smaller clusters typically have a hard time competing against the t-sums of the permutations of a big cluster. Hence, you often only find one or two clusters. Michael -----Ursprüngliche Nachricht----- Von: "" Gesendet: Sep 23, 2010 12:18:04 PM An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] cluster-based analysis >Perhaps someone can answer my question? > >After performing the cluster based analysis of the ERPs one has to do a >permutation test. I'm wondering on what data this permutation test is >performed? >Once you have defined a cluster of adjacent temporal samples you calculate >the sum of the t-values within each cluster. For statistical analysis, I >understood, you take the cluster with the highest absolute t-value. >But on which data does the analysis perfom the permutation test? Is it also >possible to calculate the mean ERP activity of the cluster period in each >individual ERP and test these values between the two groups? or is the >analysis restricted to another way of analysis? > >Please let me know, > >Best Emanuel > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From suforraxi at GMAIL.COM Thu Sep 23 14:58:54 2010 From: suforraxi at GMAIL.COM (Matteo Demuru) Date: Thu, 23 Sep 2010 14:58:54 +0200 Subject: coherence and inter-trial coherence questions Message-ID: Hi, I have two questions regarding statistical tests: first one regarding coherence differences, second one pertaining testing inter-trial coherence. We are analysing MEG data from an auditory experiment with 5 subjects. We considered the deviant stimulus as the only stimulus in the recordings, while the standard one was considered as baseline activity. We analysed the TFR data in both designs: within-trial and within-subject using respectively "actvsblT" and "depsamplesT" statistics. In both cases we compared a time interval extracted from the baseline versus a time interval from the deviant stimulus response. We wish to assess coherence differences using "indepsampleZcoh" statistic in both single-subject and multiple-subject cases. In a previous postDr. Maris replied that this statistic only works in a between-trial design (for single-subject case) and suggested to compare the different conditions as they were un-paired. We exploited this idea for the single-subject case and we would like to know if it is legitimate to extend the same idea for the multiple-subject situation? Furthermore we would like to know if there is a way to test inter-trial coherence differences in Fieldtrip? In a previous postStephan suggested how to deal with the problem; is it already implemented? Thanks in advance for your time Matteo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From E.vandenBroeke at ANES.UMCN.NL Thu Sep 23 15:29:35 2010 From: E.vandenBroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Thu, 23 Sep 2010 15:29:35 +0200 Subject: cluster-based analysis In-Reply-To: <682389188.1814672.1285242836504.JavaMail.fmail@mwmweb053> Message-ID: Thanks Michael! You helped me a lot, now everything is clear for me! Best Emanuel -----Oorspronkelijk bericht----- Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Michael Wibral Verzonden: donderdag 23 september 2010 13:54 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] cluster-based analysis Hi Emanuel, I think there may be a slight misunderstanding about what the cluster correction is doing. What is actually done is that for the original data the statistical metric is computed (say depsamples t values), and clusters are identified based on the clusterthreshold you set. Then you sum all t-values in every cluster to obtain one t-value sum per cluster. Note that all of these cluster/t-value sums are kept for later! Then the data are permuted, the statistical metric is computed on the permuted data, clusters are identified, their t-value sums are computed and the maximum t-value sum is kept. This is done again and again (permutation, statistical metric, cluster identification, keeping the max t-sum). All the maximum t-sums obtained in the perumtations together form the maximum distribution under the null. Now you go and sort the t-sums from your clusters obtained from the original data in descending order. For each of these you test how many t-values in distribution of maximum t-sums from the permutations are more extreme. If there are no more than alpha% more extreme t-values in in distribution of maximum t-sums from the permutations you consider the original cluster significant. Note that more than one cluster can be significant. Often, however, the biggest cluster also shows up in some distorted form in the permutations, again with a high t-value sum. Smaller clusters typically have a hard time competing against the t-sums of the permutations of a big cluster. Hence, you often only find one or two clusters. Michael -----Ursprüngliche Nachricht----- Von: "" Gesendet: Sep 23, 2010 12:18:04 PM An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] cluster-based analysis >Perhaps someone can answer my question? > >After performing the cluster based analysis of the ERPs one has to do a >permutation test. I'm wondering on what data this permutation test is >performed? >Once you have defined a cluster of adjacent temporal samples you >calculate the sum of the t-values within each cluster. For statistical >analysis, I understood, you take the cluster with the highest absolute t-value. >But on which data does the analysis perfom the permutation test? Is it >also possible to calculate the mean ERP activity of the cluster period >in each individual ERP and test these values between the two groups? or >is the analysis restricted to another way of analysis? > >Please let me know, > >Best Emanuel > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. From Erin.Oakman at NYUMC.ORG Thu Sep 23 16:55:13 2010 From: Erin.Oakman at NYUMC.ORG (Oakman, Erin) Date: Thu, 23 Sep 2010 10:55:13 -0400 Subject: Reference for permutation testing for factorial designs In-Reply-To: <849776673.1740242.1285235476350.JavaMail.fmail@mwmweb053> Message-ID: Thank you for the reference!! Erin ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral [michael.wibral at WEB.DE] Sent: Thursday, September 23, 2010 5:51 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Reference for permutation testing for factorial designs Dear Fieldtrip users, I know that every now and then the questions comes up on how to use permutation testing on 2x2 designs (potentially with interactions). On the code side fieldtrip offers the cfg.cvar mechanism to construct restricted permutations. Saskia Helbling pointed me to this reference that explains how to use such restricted permutations properly to 'fake' an ANOVA Anderson MJ and Ter Braak CJF, "PERMUTATION TESTS FOR MULTI-FACTORIAL ANALYSIS OF VARIANCE", J Statistical Computation and Simulation, 2003 Hope you'll find this useful, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ------------------------------------------------------------ This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email. ================================= ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 24 00:49:39 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 24 Sep 2010 00:49:39 +0200 Subject: question regarding topoplotER Message-ID: Dear all, I have a question about the topoplotER: I like the fact that the cartoon image of the nose and ears are drawn to help visualize the relative position of the sensor and the head. For data collection done in supine position, this works well when the subject's head position is centered in the sensor. But if the head is tilted to the left or right quite a bit (say a patient who can not cooperate), can I still count on such a plot to tell the relative position between patient head and sensor-level activity? My experience seems to tell me "no", but I just want to confirm... Thanks, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at DONDERS.RU.NL Fri Sep 24 13:54:22 2010 From: r.oostenveld at DONDERS.RU.NL (Robert Oostenveld) Date: Fri, 24 Sep 2010 13:54:22 +0200 Subject: question regarding topoplotER In-Reply-To: Message-ID: Dear Jim, The interpretation of the topoplot is usually the least ambiguous for EEG data, in which you know that the electrodes are positioned symmetric relative to the anatomical landmarks on the head, i.e. the nose and ears and where all electrodes are attached to the skin. For MEG data there is indeed the problem that the position of the head relative to the sensor (or vice versa) and the distances are not guaranteed. If the subjects head is rotated in the helmet, then the field of symmetrically located cortical areas will not be picked up by symemtically positioned sensors. If the subject is closer to one side of the helmet, then on that side the fields will be stronger. This problem of strength remains and is not solved by the topoplotting (although ft_megrealign can be used to solve it). Whether the topoplot is correct depends on how you use it: the template layouts (i.e. the fieldtrip/templaye/*.lay files) have all been constructed to be reasonably symmetric. If you are worried about the relative position of the head and helmet, then you should _not_ use the template layout. Instead you should create a custom layout for that single dataset, in which the gradiometer positions -- which are expressed relative to the head -- are used to interpolate the data to create the topography. See ft_prepare_layout. If you don't specify a cfg.layout in the topoplot function, it will create one from the gradiometer positions that are present in the data data, which by construct is a custom one. The triangle indicating the nose and the schematic location of the ears are remain an accurate representation, because the position of the sensors is expressed relative to those (*), not the other way around. For example, on the page http://fieldtrip.fcdonders.nl/tutorial/layout there is one layout http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/easycap32ch-avg.png?id=tutorial%3Alayout which was measured with a Polhemus tracker on a single subject. In this subject, the EEG cap is positioned rather asymmetric, which you can see by the position of the electrodes over the midline and towards O1 and O2. Of course you can test the validity of the topoplot by doing two ERF measurements of e.g. a simple sensory stimulus, one in which the subject is sitting straight and one in which he rotates his/her head. If you record the same ERF for the two locations, you can compare. With the correct (custom) layouts the topoplots should look similar, although the field strength can be different (because of the different distances from brain to sensors in the two measurements). And you should see in the topoplots (with the cfg.marker option) that the channels are shifted relative to the head. best, Robert *) this applies to most MEG systems, but cannot be guaranteed to apply. Local procedures in your MEG lab may differ, so ask your local MEG experts to be sure. On 24 Sep 2010, at 0:49, Jim Li wrote: > Dear all, > > I have a question about the topoplotER: > > I like the fact that the cartoon image of the nose and ears are > drawn to > help visualize the relative position of the sensor and the head. For > data > collection done in supine position, this works well when the > subject's head > position is centered in the sensor. But if the head is tilted to the > left or > right quite a bit (say a patient who can not cooperate), can I still > count > on such a plot to tell the relative position between patient head and > sensor-level activity? My experience seems to tell me "no", but I > just want > to confirm... > > Thanks, > > Jim > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.wollbrink at UNI-MUENSTER.DE Fri Sep 24 14:38:54 2010 From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink) Date: Fri, 24 Sep 2010 14:38:54 +0200 Subject: using ft_sourcegrandaverage with spatio-temporal source reconstructions Message-ID: Hi, I have a question concerning the usage of ft_sourcegrandaverage: Feeding the ft_sourcegrandaverage function with spatio-temporal source reconstruction data (MNE) resulted in the following error message: ??? Subscripted assignment dimension mismatch. Error in ==> ft_sourcegrandaverage at 159 dat(:,i) = tmp(:); I used the following settings: cfg = []; cfg.parameter = 'pow'; cfg.keepindividual = 'yes'; and called ft_sourcegrandaverage(cfg, src1, src2) The two source reconstructions (MNE) I generated using ft_sourceanalysis. Looking into the matlab code (ft_sourcegrandaverage at 159) I realized that the problem seems to be that the matrices src1.avg.pow and src2.avg.pow are two dimensional [Nsources x Nsamples]. By diminishing the source power matrix (avg.pow) to one dimension (Nsources) I succedded using ft_sourcegrandaverage. To perform a source statistic (ft_ft_sourcestatistics) later on it would be nice to have the option to include time information as well (e.g. like in timelockstatistics). Please let me know whether generally it is impossible to use spatio-temporal solutions in ft_sourcegrandaverage (and ft_sourcestatistics). Thanks, Andreas -- ====================================================================== Andreas Wollbrink, Biomedical Engineer Institute for Biomagnetism and Biosignalanalysis Muenster University Hospital Malmedyweg 15 phone: +49-(0)251-83-52546 D-48149 Muenster fax: +49-(0)251-83-56874 Germany e-Mail: a.wollbrink at uni-muenster.de ====================================================================== ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Sep 24 15:19:22 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 24 Sep 2010 15:19:22 +0200 Subject: using ft_sourcegrandaverage with spatio-temporal source reconstructions In-Reply-To: <4C9C9BDE.4010904@uni-muenster.de> Message-ID: Dear Andreas, > Hi, > > I have a question concerning the usage of ft_sourcegrandaverage: > > Feeding the ft_sourcegrandaverage function with spatio-temporal > source reconstruction data (MNE) resulted in the following error > message: > > > ??? Subscripted assignment dimension mismatch. > > Error in ==> ft_sourcegrandaverage at 159 > dat(:,i) = tmp(:); > > > I used the following settings: > > cfg = []; > cfg.parameter = 'pow'; > cfg.keepindividual = 'yes'; > > and called > > ft_sourcegrandaverage(cfg, src1, src2) > > The two source reconstructions (MNE) I generated using > ft_sourceanalysis. > > Looking into the matlab code (ft_sourcegrandaverage at 159) I > realized that the problem seems to be that the matrices src1.avg.pow > and src2.avg.pow are two dimensional [Nsources x Nsamples]. > > By diminishing the source power matrix (avg.pow) to one dimension > (Nsources) I succedded using ft_sourcegrandaverage. > To perform a source statistic (ft_ft_sourcestatistics) later on it > would be nice to have the option to include time information as well > (e.g. like in timelockstatistics). > > Please let me know whether generally it is impossible to use spatio- > temporal solutions in ft_sourcegrandaverage (and ft_sourcestatistics). > > Thanks, > Andreas > -- > Yes, I totally agree that the functionality you would like to have is very useful. At present it is however not yet possible. At the moment we are in the process of restructuring the code dealing with source- level data in order to implement exactly this. However, we are not really proficient in using MNE as inverse method, and are not used to looking at source level time courses (which is exactly the reason why it is not yet implemented). It would be really helpful if you could send us some example data (such as your variables src1 and src2). Have a look here: http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers to see how to send your data. Best wishes, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 24 21:22:07 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 24 Sep 2010 21:22:07 +0200 Subject: question regarding topoplotER Message-ID: Dear Robert, Thanks a lot for your great response. I'll study the examples to try to make my own layout. Cheers, Jim On Fri, 24 Sep 2010 13:54:22 +0200, Robert Oostenveld wrote: >Dear Jim, > >The interpretation of the topoplot is usually the least ambiguous for >EEG data, in which you know that the electrodes are positioned >symmetric relative to the anatomical landmarks on the head, i.e. the >nose and ears and where all electrodes are attached to the skin. For >MEG data there is indeed the problem that the position of the head >relative to the sensor (or vice versa) and the distances are not >guaranteed. > >If the subjects head is rotated in the helmet, then the field of >symmetrically located cortical areas will not be picked up by >symemtically positioned sensors. If the subject is closer to one side >of the helmet, then on that side the fields will be stronger. This >problem of strength remains and is not solved by the topoplotting >(although ft_megrealign can be used to solve it). > >Whether the topoplot is correct depends on how you use it: the >template layouts (i.e. the fieldtrip/templaye/*.lay files) have all >been constructed to be reasonably symmetric. If you are worried about >the relative position of the head and helmet, then you should _not_ >use the template layout. Instead you should create a custom layout for >that single dataset, in which the gradiometer positions -- which are >expressed relative to the head -- are used to interpolate the data to >create the topography. See ft_prepare_layout. If you don't specify a >cfg.layout in the topoplot function, it will create one from the >gradiometer positions that are present in the data data, which by >construct is a custom one. The triangle indicating the nose and the >schematic location of the ears are remain an accurate representation, >because the position of the sensors is expressed relative to those >(*), not the other way around. > >For example, on the page >http://fieldtrip.fcdonders.nl/tutorial/layout >there is one layout >http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/easycap32ch-avg.png?id=tutorial%3Alayout >which was measured with a Polhemus tracker on a single subject. In >this subject, the EEG cap is positioned rather asymmetric, which you >can see by the position of the electrodes over the midline and towards >O1 and O2. > >Of course you can test the validity of the topoplot by doing two ERF >measurements of e.g. a simple sensory stimulus, one in which the >subject is sitting straight and one in which he rotates his/her head. >If you record the same ERF for the two locations, you can compare. >With the correct (custom) layouts the topoplots should look similar, >although the field strength can be different (because of the different >distances from brain to sensors in the two measurements). And you >should see in the topoplots (with the cfg.marker option) that the >channels are shifted relative to the head. > >best, >Robert > >*) this applies to most MEG systems, but cannot be guaranteed to >apply. Local procedures in your MEG lab may differ, so ask your local >MEG experts to be sure. > > > > > >On 24 Sep 2010, at 0:49, Jim Li wrote: > >> Dear all, >> >> I have a question about the topoplotER: >> >> I like the fact that the cartoon image of the nose and ears are >> drawn to >> help visualize the relative position of the sensor and the head. For >> data >> collection done in supine position, this works well when the >> subject's head >> position is centered in the sensor. But if the head is tilted to the >> left or >> right quite a bit (say a patient who can not cooperate), can I still >> count >> on such a plot to tell the relative position between patient head and >> sensor-level activity? My experience seems to tell me "no", but I >> just want >> to confirm... >> >> Thanks, >> >> Jim >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Gregor.Volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE Tue Sep 28 12:41:34 2010 From: Gregor.Volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE (Gregor Volberg) Date: Tue, 28 Sep 2010 12:41:34 +0200 Subject: coordinate mismatch in ASA headmodel and *.nii -files Message-ID: Dear fieldtrippers, thanks a lot for the helfulp comments on my former source analysis questions. This one is maybe not directly related to fieldtrip's source analysis functions: I use individual headmodels generated by ASA software (which reads and segments MRI images in Siemens DICOM format) for source reconstruction. The corresponding anatomical data is in an *nii-file, generated with the DICOM-import function if SPM5. Now, when I plot the individual functional data overlayed on the individual anatomical data, it seems that X and Y coordinates are exchanged, Y ist rotated by 90 or -90 degrees, and Z is shifted into positive direction for functional compared to structural data. I tried to normalize the volume data with ft_volumenormalise using the individual MRI as template file, but this warps both functional and anatomical data so that the mismatch between both is still there. Did some ASA-user have a similar problem - is there maybe a necessary transformation that I have overlooked? Thanks again in advance - Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nathanweisz at MAC.COM Tue Sep 28 13:17:53 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 28 Sep 2010 13:17:53 +0200 Subject: coordinate mismatch in ASA headmodel and *.nii -files In-Reply-To: <4CA1E27E020000570000754A@gwsmtp1.uni-regensburg.de> Message-ID: dear gregor, it seems like you left out some co-registration steps. if you have the ASA vol, the mri (*.mri; read_asa_mri.m) then you still need the co-registered electrode positions. can't you just export those from ASA too? otherwise ft_volumerealign, then apply transformation matrix to you electrode positions so that they are in the same coordinate system as your vol & mri? cheers & good luck, n On 28.09.2010, at 12:41, Gregor Volberg wrote: > Dear fieldtrippers, > > thanks a lot for the helfulp comments on my former source analysis questions. This one is maybe not directly related to fieldtrip's source analysis functions: > I use individual headmodels generated by ASA software (which reads and segments MRI images in Siemens DICOM format) for source reconstruction. The corresponding anatomical data is in an *nii-file, generated with the DICOM-import function if SPM5. Now, when I plot the individual functional data overlayed on the individual anatomical data, it seems that X and Y coordinates are exchanged, Y ist rotated by 90 or -90 degrees, and Z is shifted into positive direction for functional compared to structural data. I tried to normalize the volume data with ft_volumenormalise using the individual MRI as template file, but this warps both functional and anatomical data so that the mismatch between both is still there. > > Did some ASA-user have a similar problem - is there maybe a necessary transformation that I have overlooked? Thanks again in advance - > Gregor > > > > -- > Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sdmuthu at CARDIFF.AC.UK Wed Sep 29 09:05:51 2010 From: sdmuthu at CARDIFF.AC.UK (Suresh Muthukumaraswamy) Date: Wed, 29 Sep 2010 08:05:51 +0100 Subject: Coherence differences and factorial designs Message-ID: Hi FieldtripUsers, In a fixed effects context I have been obtaining coherence estimates. I have been reading Maris et al 2007 and the theory there describes how to test between two different conditions I would like to extend the theory in that paper (2.7.1) to k sample (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was wondering if anyone had attempted such a thing if it can be done, and in particular how one might go about constructing an apprppriate test statistic and surrogate distribution? Prior implementation in fieldtrip isnt needed its more the theory behind it I am asking about Thanks for your help, Dr Suresh Muthukumaraswamy Suresh Muthukumaraswamy, PhD CUBRIC Cardiff University Park Place Cardiff, CF10 3AT United Kingdom email: sdmuthu at cardiff.ac.uk Phone: +44 (0)29 2087 0354 http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumaraswamy-suresh-dr-overview_new.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.vandenbroeke at ANES.UMCN.NL Wed Sep 29 10:43:00 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 29 Sep 2010 10:43:00 +0200 Subject: cluster-based analysis Message-ID: Dear Michael and others, I am thinking about an alternative cluster based statistic, but do not know if this is also valid. The alternative method goes as follows: 1. Calculate t-statistics of two conditions only on the observed data. 2. Determine cluster(s) based on a threshold (critical t-value). 3. Calculate the sum of the cluster(s). 4. Take the cluster with the highest absolute value (Sum-score) if more than 1 clusters are present. 5. Calculate the mean ERP activity, based on the highest cluster, in the individual trials. 6. Use a non-parametric (Wilcoxon, Mann-Withney U, dependent of the type of experiment) test statistic to test whether there is a difference (two sided) between the two group means for this highest cluster. Do you or anybody else think this is also a valid method for identifying and testing relevant ERP activity? Best, Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 29 11:18:06 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 29 Sep 2010 11:18:06 +0200 Subject: Coherence differences and factorial designs In-Reply-To: <4CA2F35F020000AD0004E5A0@zgrw02.cf.ac.uk> Message-ID: Dear Suresh, > In a fixed effects context I have been obtaining coherence > estimates. I have been reading Maris et al 2007 and the theory there > describes how to test between two different conditions > I would like to extend the theory in that paper (2.7.1) to k sample > (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was > wondering if anyone had attempted such a thing if it can be done, and > in particular how one might go about constructing an apprppriate test > statistic and surrogate distribution? Prior implementation in fieldtrip > isnt needed its more the theory behind it I am asking about Statistical comparison of coherence estimates in k samples is discussed by Amjad et al (2007) in J. Neurosc. Methods. In the permutation framework there is no analogue of the factorial ANOVA (involving both main and interaction effects) for the simple reason that the interaction null hypothesis cannot be tested in the permutation framework. There is at least one thread in the Fieldtrip Discussion list that deals with this issue. However, it is possible to test multiple conditional null hypotheses (main effect of one factor separately for each of the levels of another factor) and this comes close to an interaction effect test. Good luck, Eric Maris > Thanks for your help, > Dr Suresh Muthukumaraswamy > > Suresh Muthukumaraswamy, PhD > CUBRIC > Cardiff University > Park Place > Cardiff, CF10 3AT > United Kingdom > email: sdmuthu at cardiff.ac.uk > Phone: +44 (0)29 2087 0354 > http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumarasw > amy-suresh-dr-overview_new.html > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Wed Sep 29 15:09:04 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 29 Sep 2010 15:09:04 +0200 Subject: Permutaion (of residuals) and factorial designs In-Reply-To: <016c01cb5fb7$3cb12f90$b6138eb0$@maris@donders.ru.nl> Message-ID: Dear Eric, dear fieldtrip users, this might sound like nitpicking but, we all routinely seem to analyse the interaction of a factorial design using permutation testing. The example is this: we have two experimental conditions (that we want to compare) and record task and baseline intervals in each. Clearly this is a 2x2 design (task/base and cond1/cond2 are the respective levels of the two factors). What we all do to deal with this is that we compute residuals - either by subtracting the baseline values or normalizing to them and then do a (restricted) permutation between the conditions on these task-base residuals. We are interested in the interaction between the task/base factor and the cond factor. Anything wrong here or anything particular about this case that saves us from the fundamental difficulties of interaction testing? Michael   -----Ursprüngliche Nachricht----- Von: "Eric Maris" Gesendet: Sep 29, 2010 11:18:06 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] Coherence differences and factorial designs >Dear Suresh, > > > >> In a fixed effects context I have been obtaining coherence >> estimates. I have been reading Maris et al 2007 and the theory there >> describes how to test between two different conditions >> I would like to extend the theory in that paper (2.7.1) to k sample >> (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was >> wondering if anyone had attempted such a thing if it can be done, and >> in particular how one might go about constructing an apprppriate test >> statistic and surrogate distribution? Prior implementation in fieldtrip >> isnt needed its more the theory behind it I am asking about > >Statistical comparison of coherence estimates in k samples is discussed by >Amjad et al (2007) in J. Neurosc. Methods. > >In the permutation framework there is no analogue of the factorial ANOVA >(involving both main and interaction effects) for the simple reason that the >interaction null hypothesis cannot be tested in the permutation framework. >There is at least one thread in the Fieldtrip Discussion list that deals >with this issue. However, it is possible to test multiple conditional null >hypotheses (main effect of one factor separately for each of the levels of >another factor) and this comes close to an interaction effect test. > > >Good luck, > >Eric Maris > > > > > > >> Thanks for your help, >> Dr Suresh Muthukumaraswamy >> >> Suresh Muthukumaraswamy, PhD >> CUBRIC >> Cardiff University >> Park Place >> Cardiff, CF10 3AT >> United Kingdom >> email: sdmuthu at cardiff.ac.uk >> Phone: +44 (0)29 2087 0354 >> http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumarasw >> amy-suresh-dr-overview_new.html >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Wed Sep 29 17:25:24 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 29 Sep 2010 17:25:24 +0200 Subject: Permutaion (of residuals) and factorial designs In-Reply-To: <469763189.596482.1285765744039.JavaMail.fmail@mwmweb053> Message-ID: Dear Michael, > this might sound like nitpicking but, we all routinely seem to analyse > the interaction of a factorial design using permutation testing. The > example is this: we have two experimental conditions (that we want to > compare) and record task and baseline intervals in each. Clearly this > is a 2x2 design (task/base and cond1/cond2 are the respective levels of > the two factors). What we all do to deal with this is that we compute > residuals - either by subtracting the baseline values or normalizing to > them and then do a (restricted) permutation between the conditions on > these task-base residuals. We are interested in the interaction between > the task/base factor and the cond factor. > > Anything wrong here or anything particular about this case that saves > us from the fundamental difficulties of interaction testing? This is a very sensible remark that forces me to be explicit about when interaction effect null hypotheses are problematic for permutation tests and when not. What you describe is a mixed between-within unit-of-observation (UO) design. The UOs are trials and there is one between-UO independent variable (the two task conditions) and within-UO independent variable (baseline-versus-activation). In this type of design, permutation tests can be used without problems to test the interaction between the independent variables. The way you do this is exactly as you have described: perform trial-wise subtraction/normalization to construct a new dependent variable that is subsequently compared between the two task conditions, as in a regular between-UO study. This approach does not work anymore in a two-factorial design in which both independent variables are manipulated between-UO. For example, this would be the case in a single subject study with the following independent variables: (1) attend left versus attend right (SIDE), and (2) attend visual versus attend auditory (MODALITY). It cannot be ruled out that there is an interest in the null hypothesis of no interaction between SIDE and MODALITY. (For this example, I find it hard to produce a convincing physiological story that produces this null hypothesis, but this does not have to be always the case.) I do not see how to test this null hypothesis using a permutation test that involves random permutation over the four cells in this two-factorial design. Best, Eric > > Michael > > > > -----Ursprüngliche Nachricht----- > Von: "Eric Maris" > Gesendet: Sep 29, 2010 11:18:06 AM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Coherence differences and factorial designs > > >Dear Suresh, > > > > > > > >> In a fixed effects context I have been obtaining coherence > >> estimates. I have been reading Maris et al 2007 and the theory there > >> describes how to test between two different conditions I would like > >> to extend the theory in that paper (2.7.1) to k sample (one factor > eg > >> 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was wondering if > >> anyone had attempted such a thing if it can be done, and in > >> particular how one might go about constructing an apprppriate test > >> statistic and surrogate distribution? Prior implementation in > >> fieldtrip isnt needed its more the theory behind it I am asking > about > > > >Statistical comparison of coherence estimates in k samples is > discussed > >by Amjad et al (2007) in J. Neurosc. Methods. > > > >In the permutation framework there is no analogue of the factorial > >ANOVA (involving both main and interaction effects) for the simple > >reason that the interaction null hypothesis cannot be tested in the > permutation framework. > >There is at least one thread in the Fieldtrip Discussion list that > >deals with this issue. However, it is possible to test multiple > >conditional null hypotheses (main effect of one factor separately for > >each of the levels of another factor) and this comes close to an > interaction effect test. > > > > > >Good luck, > > > >Eric Maris > > > > > > > > > > > > > >> Thanks for your help, > >> Dr Suresh Muthukumaraswamy > >> > >> Suresh Muthukumaraswamy, PhD > >> CUBRIC > >> Cardiff University > >> Park Place > >> Cardiff, CF10 3AT > >> United Kingdom > >> email: sdmuthu at cardiff.ac.uk > >> Phone: +44 (0)29 2087 0354 > >> > http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumara > >> sw > >> amy-suresh-dr-overview_new.html > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of > >> the FieldTrip toolbox, to share experiences and to discuss new > ideas > >> for MEG and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sreenivasan.r.nadar at GMAIL.COM Wed Sep 29 17:38:18 2010 From: sreenivasan.r.nadar at GMAIL.COM (Dr. Sreenivasan Rajamoni Nadar, Ph.D.) Date: Wed, 29 Sep 2010 11:38:18 -0400 Subject: 3D Wireframe (.3fr) for BEM based source modeling Message-ID: Hello, Anybody has script to use 3D wireframe (generated from EMSE with .3fr extention) for BEM head model to be used in fieldtrip? Thanks, Vasan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Sep 1 08:45:32 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 1 Sep 2010 08:45:32 +0200 Subject: Extended deadline: Special Journal Issue on Academic MEG/EEG Software Message-ID: Begin forwarded message: > From: "Baillet, Sylvain" > Date: 31 August 2010 17:44:28 GMT+02:00 > To: "Baillet, Sylvain" > Subject: Extended deadline: Special Journal Issue on Academic MEG/ > EEG Software > > Important notice: Submission deadline has been extended; now: > October 1, 2010. > > Call for Papers > > Academic Software Applications for Electromagnetic Brain Mapping > Using MEG and EEG > > To be published in : Computational Intelligence and Neuroscience > (indexed in MEDLINE, INSPEC, GoogleScholar, etc.) > Full Call for Paper available at: http://www.hindawi.com/journals/cin/osi.html > > The field of Magnetoencephalography (MEG) and Electroencephalography > (EEG) source imaging is maturing rapidly. This scientific growth is > accompanied by a variety of complementary and /or concurrent > software solutions from the academic world. > > The objective of this CIN Special Issue is to help the neuroimaging > obtain an overview of state-of-the-art academic software > applications for MEG/EEG data analysis, how they differ and > interact, and of upcoming methodological trends and technical > developments; the topics to be covered include, but are not limited > to, academic software solutions for: > > · MEG and EEG data acquisition > · Data preprocessing, that is, filtering, > artifact detection, rejection or correction, trial sorting, averaging > · Segmentation and geometrical modeling of head > tissues > · Computational electromagnetics for MEG/EEG > forward modeling > · MEG/EEG source analysis > · Statistical appraisal and inference: > confidence intervals on measures and hypothesis testing > · Identification and evaluation of evoked, > induced event-related brain responses and ongoing brain activity > · Time-frequency decompositions, advanced > spectral analysis, time series modeling > · Estimation of functional and effective > connectivity > Authors should provide detailed information regarding their software > toolbox or application by addressing the following topics: open > source software (yes/no), i/o file formats available, operating > system, Matlab required (yes/no), interoperability with other > software, and so forth. > > Further, the software needs to be available for download free of > charge at the time of manuscript submission, with sufficient > documentation provided online to be able to reproduce the data > analysis featured in the manuscript. > > Before submission authors should carefully read over the journal's > Author Guidelines, which are located at http://www.hindawi.com/journals/cin/guidelines.html > . Prospective authors should submit an electronic copy of their > complete manuscript through the journal Manuscript Tracking System > at http://mts.hindawi.com/ according to the following timetable: > > Manuscript Due > October 1, 2010 September 1, 2010 > First Round of Reviews > December 1, 2010 > Publication Date > March 1, 2011 > Lead Guest Editor > > Sylvain Baillet, Departments of Neurology & Biophysics, Medical > College of Wisconsin, WI, USA > Guest Editors > > Karl Friston, Wellcome Trust Centre for Neuroimaging, London, UK > Robert Oostenveld, Donders Centre for Cognitive Neuroimaging Radboud > University Nijmegen, The Netherlands > > Ps: > > As an open access journal, Computational Intelligence and > Neuroscience requires an Article Processing Charge of $750 USD per > accepted manuscript for both research and review articles. > Since the journal does not collect any subscription or advertising > revenue, and does not have other funding streams, these charges are > necessary in order to make the full text of all published articles > freely available online. Moreover, authors are allowed to retain the > copyright of their work published in the journal. > > As for the number of color figures, there is no limited number of > figures that might be included in each paper whether colored or not > and you can find detailed information about the general format of > Manuscripts that will be submitted to the Special Issue proposals, > the format of references, tables and figures if found at:http://www.hindawi.com/journals/cin/guidelines.html > . > > > > > Sylvain Baillet, PhD > Associate Professor of Neurology & Biophysics > Scientific Director, MEG Program > Department of Neurology > Medical College of Wisconsin > > 9200 W. Wisconsin ave > Milwaukee, WI 53226 > Phone: +1 414 805 1174 > Fax: +1 414 805 1103 > · Home Page > · Our MEG Program > · Follow my Lab on Facebook > > > > > > > > > > > > > > > > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 121 bytes Desc: not available URL: From saskia.haegens at DONDERS.RU.NL Wed Sep 1 13:55:17 2010 From: saskia.haegens at DONDERS.RU.NL (Saskia Haegens) Date: Wed, 1 Sep 2010 13:55:17 +0200 Subject: ft_preprocessinf; ft_preproc_dftfilter In-Reply-To: <1770599948.3434086.1283265763835.JavaMail.fmail@mwmweb056> Message-ID: Hi Michael, ft_preprocessing calls the private function preproc, which does the actual preprocessing (including call to ft_preproc_dftfilter). Hope this answers your question. Best, Saskia > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Michael Wibral > Sent: dinsdag 31 augustus 2010 16:43 > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] ft_preprocessinf; ft_preproc_dftfilter > > Dear listusers, > > I found something strange in FT20100826: > > ft_preprocessing takes cfg.dftfilter = 'yes' as a configuration option > and I think it should then issue a call to ft_preproc_dftfilter. > However this is never done, if I am not mistaken. I guess it slipped > from ft_preprocessing sometiem in the past. Or was it dropped on > purpose because other bandstop filters are preferred? > > Any help on this is appreciated. > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Fri Sep 3 19:35:56 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Fri, 3 Sep 2010 13:35:56 -0400 Subject: neuromag planar gradient Message-ID: Hello, I am new to fieldtrip and am trying to figure out how to visualize the planar gradient for grandaverage neuromag data. I tried to accomplish this by specifying cfg.layout as 'neuromag306planar.lay' but this just produced a distorted version of the conventional ERF topoplot. I would really appreciate anyone's help who may know how to do this. Thanks! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE Tue Sep 7 11:01:09 2010 From: Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE (Hanneke Van Dijk) Date: Tue, 7 Sep 2010 11:01:09 +0200 Subject: AW: [FIELDTRIP] neuromag planar gradient Message-ID: Hi Matt, You can find the layout files in fieldtrip/template. In my case the file is called 'NM306planar.lay'. I have attachted this file to this e-mail, hopefully your data looks better then. Just to be sure, you did do ft_combineplanar before right? Yours, Hanneke -------------------------------------------------- Institut für Klinische Neurowissenschaften und Medizinische Psychologie Gebäude-Nr.: 23.02 Ebene: 03 Zimmer-Nr.: 47 Tel.: +49 211-81-13074 Mail : hanneke.vandijk at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html -----Ursprüngliche Nachricht----- Von: FieldTrip discussion list im Auftrag von Matt F. Panichello Gesendet: Fr 03.09.2010 19:35 An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] neuromag planar gradient Hello, I am new to fieldtrip and am trying to figure out how to visualize the planar gradient for grandaverage neuromag data. I tried to accomplish this by specifying cfg.layout as 'neuromag306planar.lay' but this just produced a distorted version of the conventional ERF topoplot. I would really appreciate anyone's help who may know how to do this. Thanks! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Tue Sep 7 23:00:48 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Tue, 7 Sep 2010 17:00:48 -0400 Subject: AW: [FIELDTRIP] neuromag planar gradient In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B013F04FB@Mail2-UKD.VMED.UKD> Message-ID: Hi Hanneke, Thanks so much for your help! I wasn't sure if I needed to use ft_combineplanar for neuromag data. Using this with the "neuromag306cmb.lay" file did the trick. Best, Matt > Hi Matt, > > You can find the layout files in fieldtrip/template. In my case the file > is called 'NM306planar.lay'. I have attachted this file to this e-mail, > hopefully your data looks better then. > > Just to be sure, you did do ft_combineplanar before right? > > Yours, > > Hanneke > -------------------------------------------------- > Institut für Klinische Neurowissenschaften und Medizinische Psychologie > Gebäude-Nr.: 23.02 > Ebene: 03 Zimmer-Nr.: 47 > Tel.: +49 211-81-13074 > Mail : hanneke.vandijk at med.uni-duesseldorf.de > http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html > > > > -----Ursprüngliche Nachricht----- > Von: FieldTrip discussion list im Auftrag von Matt F. Panichello > Gesendet: Fr 03.09.2010 19:35 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] neuromag planar gradient > > Hello, > > I am new to fieldtrip and am trying to figure out how to visualize the > planar gradient for grandaverage neuromag data. > > I tried to accomplish this by specifying cfg.layout as > 'neuromag306planar.lay' but this just produced a distorted version of the > conventional ERF topoplot. > > I would really appreciate anyone's help who may know how to do this. > > Thanks! > > Matt > > > > > > 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. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From egarza at GMAIL.COM Wed Sep 8 19:22:49 2010 From: egarza at GMAIL.COM (Eduardo Garza) Date: Wed, 8 Sep 2010 18:22:49 +0100 Subject: Can't read .SMR data into FT Message-ID: Greetings, I did an EEG experiment using CED and the format is standard ".SMR". The data contains 1 Channel (Cz) and 1 Event Channel. When I try to look at the data in FT using: cfg = []; cfg.dataset = 'eduardo_pilot_03_events2.smr'; cfg.trialdef.eventtype = '?'; definetrial(cfg); I get several errors back: Warning: Unable to load this DLL Call ns_SetLibrary first! Process interrupted! ??? Error using ==> read_ced_son at 81 Could not get NeuroShare library info, please use the NS_SETLIBRARY function. Error in ==> ft_read_header at 357 orig = read_ced_son(filename,'readevents','no','readdata','no'); Error in ==> read_header at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> trialfun_general at 50 hdr = read_header(cfg.headerfile); Error in ==> ft_definetrial at 110 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> definetrial at 17 [varargout{1:nargout}] = funhandle(varargin{:}); I checked the "read_ced_son.m" and apparently I need a Neuroshare library to read the data (I thought FT already had that in). So I go to the Neuroshare site and download a ZIP called MATLAB_Import_Filter, which apparently should include several ".m" files and 1 DLL called "mexprog.dll" for 64-bits, but the DLL is not there. The readme.txt shows that I should also include a file called "NeuroshareDLL" in the same directory. I'm not sure where to go from here. Where can I get that NeuroshareDLL and mexprog.dll that should go into the directory? Is my data in the correct format? Thank you Best regards Eduardo -- Eduardo A. Garza Villarreal MD, PhD Student -Center for Functionally Integrative Neuroscience (CFIN), Aarhus University; -Royal Academy of Music, Aarhus, Denmark; -Department of Psychiatry, Warneford Hospital, University of Oxford, UK. DK Office: +45 89494408 DK Mobile: +45 2772 3440 UK Office: +44 1865223918 UK Mobile +44 7879574135 http://person.au.dk/eduardo.garza at ki http://www.cfin.au.dk/menu550-en egarza at gmail.com eduardo at pet.auh.dk eduardo.garzavillarreal at psych.ac.ox.uk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.arena at UVA.NL Wed Sep 8 20:12:46 2010 From: c.arena at UVA.NL (Claudia Arena) Date: Wed, 8 Sep 2010 20:12:46 +0200 Subject: significance of coherence differences Message-ID: Dear Eric Maris, I too am confused about coherence and its statistical analysis..I am trying to calculate the coherence between POz and 47 other channels in a multisubject study (N=19) with a within-subject design to test (1) whether coherence in condition 'Figure' is the same as in condition 'No figure', and (2) whether coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct rejections'. Either way I am not sure about a couple of things: 1) This is maybe a silly question but in your reply to Jan's post you state: "...You apply this test statistic to the condition-specific coherences, obtained by summing and normalizing the trial(taper)-specific cross- spectra..." - You mean averaging the trial-specific cross-spectra (and trial- specific powerspectra) right? Moreover does this mean that cfg.keeptrials can be set to 'no' when calculating the powerspectra and cross-spectra with freqanalysis(_mtmconvol)? This would be great news for me, since the 4D freqdata is too large to save.. 2) Another related question comes from the fact that the experiment had 3 different masking durations, so to combine the powerspectra belonging to the same condition (i.e. the Figs) but different mask durations we calculated weighted averages based on the least amount of trials in each Mask duration group. My question now would be whether the normalization to get the coherence values should be done before or after this weighing (In other words, should I weigh the cross-spectra or the coherence values, or does this not matter?) 3) Now for the statistics. Again in your reply to Jan's post you say: "...For a single channel pair and a single frequency bin, the appropriate statistic is the dependent (paired) samples t-statistic or, in a nonparametric framework, the Wilcoxon signed rank sum test." Does this mean it is not valid to use freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = 'depsamplesT' (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the coherence between POz (my ref.channel) and the 47 other channels is the same in different conditions, using all my frequency and time bins? Do I need to make a selection? Thank you for your time. Sincerely, Claudia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Thu Sep 9 10:02:27 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Thu, 9 Sep 2010 10:02:27 +0200 Subject: significance of coherence differences In-Reply-To: Message-ID: Dear Claudia, > I too am confused about coherence and its statistical analysis..I am > trying to > calculate the coherence between POz and 47 other channels in a > multisubject > study (N=19) with a within-subject design to test (1) whether coherence > in > condition 'Figure' is the same as in condition 'No figure', and (2) > whether > coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct > rejections'. > > Either way I am not sure about a couple of things: > > 1) This is maybe a silly question but in your reply to Jan's post you > state: "...You apply this test statistic to the condition-specific > coherences, > obtained by summing and normalizing the trial(taper)-specific cross- > spectra..." - You mean averaging the trial-specific cross-spectra (and > trial- > specific powerspectra) right? Moreover does this mean that > cfg.keeptrials can > be set to 'no' when calculating the powerspectra and cross-spectra with > freqanalysis(_mtmconvol)? This would be great news for me, since the 4D > freqdata is too large to save.. For statistical testing in a within-subjects design (units-of-observation are subjects and not trials) you don't need the trials. So, you can safely put cfg.keeptrials to 'no'. By the way, try using freqanalysis_mtmfft (frequency analysis without time resolution) before freqanalysis_mtmconvol (with time resolutions). This makes life a lot easier and conceptually you're doing the same thing. > > 2) Another related question comes from the fact that the experiment had > 3 > different masking durations, so to combine the powerspectra belonging > to the > same condition (i.e. the Figs) but different mask durations we > calculated > weighted averages based on the least amount of trials in each Mask > duration > group. My question now would be whether the normalization to get the > coherence values should be done before or after this weighing (In other > words, > should I weigh the cross-spectra or the coherence values, or does this > not > matter?) I don't see why you have to deal with the normalization yourself. You can use ft_freqdescriptives or ft_connectivityanalysis to calculate the coherence values taking the freqanalsis output as its input. In any case, to obtain coherence values from the cross-spectra, one should always normalize (i.e., divide) by the square-roots of the power-spectra calculated on the same trials. I may be wrong, but it seems that you are making life more difficult than it should be. > > 3) Now for the statistics. Again in your reply to Jan's post you say: > "...For a > single channel pair and a single frequency bin, the appropriate > statistic is the > dependent (paired) samples t-statistic or, in a nonparametric > framework, the > Wilcoxon signed rank sum test." Does this mean it is not valid to use > freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = > 'depsamplesT' > (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the > coherence > between POz (my ref.channel) and the 47 other channels is the same in > different conditions, using all my frequency and time bins? Do I need > to make a > selection? What you propose IS valid to control for multiple comparisons. However, in my reply to Jan, I consider a single statistical test ("... For a single channel pair and a single frequency bin, ..."); so, no multiple comparisons problem here. Good luck, Eric > > Thank you for your time. > > Sincerely, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Sep 9 16:13:23 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 9 Sep 2010 15:13:23 +0100 Subject: Can't read .SMR data into FT In-Reply-To: Message-ID: Dear Eduardo, The version of Neuroshare included in Fieldtrip should be sufficient although I'm not sure whether it's added automatically to the path. One additional thing you might need is the DLL from CED that can be found at: http://www.ced.co.uk/upnssonu.shtml You can put it in the neuroshare directory. Note that this setup doesn't support SMR files from recent versions of Spike 2 (6 and up). For these versions you can export the data into mat files and these files are supported by fileio. Best, Vladimir On Wed, Sep 8, 2010 at 6:22 PM, Eduardo Garza wrote: > Greetings, > I did an EEG experiment using CED and the format is standard ".SMR". > The data contains 1 Channel (Cz) and 1 Event Channel. > When I try to look at the data in FT using: > cfg = []; > cfg.dataset = 'eduardo_pilot_03_events2.smr'; > cfg.trialdef.eventtype  = '?'; > definetrial(cfg); > I get several errors back: > Warning: Unable to load this DLL > Call ns_SetLibrary first! Process interrupted! > ??? Error using ==> read_ced_son at 81 > Could not get NeuroShare library info, please use the NS_SETLIBRARY > function. > Error in ==> ft_read_header at 357 >     orig = read_ced_son(filename,'readevents','no','readdata','no'); > Error in ==> read_header at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > Error in ==> trialfun_general at 50 > hdr = read_header(cfg.headerfile); > Error in ==> ft_definetrial at 110 >     [trl, event] = feval(cfg.trialfun, cfg); > Error in ==> definetrial at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > I checked the "read_ced_son.m" and apparently I need a Neuroshare library to > read the data (I thought FT already had that in). > So I go to the Neuroshare site and download a ZIP called > MATLAB_Import_Filter, which apparently should include several ".m" files and > 1 DLL called "mexprog.dll" for 64-bits, but the DLL is not there. > The readme.txt shows that I should also include a file called > "NeuroshareDLL" in the same directory. > I'm not sure where to go from here. > Where can I get that NeuroshareDLL and mexprog.dll that should go into the > directory? > Is my data in the correct format? > Thank you > Best regards > Eduardo > -- > Eduardo A. Garza Villarreal > MD, PhD Student > > -Center for Functionally Integrative Neuroscience (CFIN), Aarhus University; > -Royal Academy of Music, Aarhus, Denmark; > -Department of Psychiatry, Warneford Hospital, University of Oxford, UK. > > DK Office:   +45 89494408 > DK Mobile:  +45 2772 3440 > > UK Office:   +44 1865223918 > UK Mobile   +44 7879574135 > > http://person.au.dk/eduardo.garza at ki > http://www.cfin.au.dk/menu550-en > > egarza at gmail.com > eduardo at pet.auh.dk > eduardo.garzavillarreal at psych.ac.ox.uk > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Patricia.Wollstadt at GMX.DE Fri Sep 10 12:17:18 2010 From: Patricia.Wollstadt at GMX.DE (Patricia Wollstadt) Date: Fri, 10 Sep 2010 12:17:18 +0200 Subject: error volumenormalise Message-ID: Dear listusers, I am currently doing source localization on my data and encounter the following problem when using the volumenormalise function: ??? Error using ==> spm_bsplinc spm_bsplinc.c not compiled. Error in ==> spm_write_sn>nonlin_transform at 207 C = spm_bsplinc(V(i),d); Error in ==> spm_write_sn at 118 nonlin_transform(V,prm,x,y,z,mat,flags,msk); Error in ==> volumenormalise at 244 spm_write_sn(char(files),params,flags); % his creates the 'w' prefixed files I'm only using the cfg options as provided in the tutorial on beamformer techniques: cfg = []; cfg.coordinates = 'ctf'; cfg.nonlinear = 'no'; sourceDiffIntN = ft_volumenormalise(cfg, source); Thank you very much for your help, kind regards Patricia Wollstadt -- Achtung Sicherheitswarnung: GMX warnt vor Phishing-Attacken! http://portal.gmx.net/de/go/sicherheitspaket ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Anne.DoLam at UKB.UNI-BONN.DE Fri Sep 10 16:01:20 2010 From: Anne.DoLam at UKB.UNI-BONN.DE (vervang dit voor je naam of door ANONYMOUS) Date: Fri, 10 Sep 2010 16:01:20 +0200 Subject: Anne Do Lam ist au=?ISO-8859-1?Q?=DFer?= Haus. Message-ID: Ich werde ab 10.09.2010 nicht im Büro sein. Ich kehre zurück am 07.10.2010. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From egarza at GMAIL.COM Fri Sep 10 18:57:47 2010 From: egarza at GMAIL.COM (Eduardo Garza) Date: Fri, 10 Sep 2010 18:57:47 +0200 Subject: Can't read .SMR data into FT Message-ID: Dear Vladimir, Thank you for the answer. This didn't work, however, a member of our team Morten J�nsson found out the problem and apparently a bug. First, this doesn't work using MATLAB 64-bit, only 32-bit. Second, this is what Morten suggested: 1. download the newest fieldtrip version 2. download the Matlab-Import-Filter_2_5.zip from www.neuroshare.org 3. download the exe-file from http://www.ced.co.uk/upnssonu.shtml 4. delete the content of the directory "fieldtrip-20100909\external\neuroshare". This is obsolete (at least with respect to smr-files). We should add a bug report about this. 5. unpack the Matlab-Import-Filter_2_5.zip in the folder instead 6. place the nscedson.exe file in the folder and run it. This will generate a nscedson.dll file 7. rename this to nsCedSon.dll After this, Fieldtrip was able to read the SMR file recorded on Spike 7.2. However, we still have some issues with defining trials. If it keeps failing, we will have to do as you said and use the FileIO instead. Thanks again, Best regards Eduardo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 10 20:09:24 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 10 Sep 2010 20:09:24 +0200 Subject: volumerealign error Message-ID: Dear all, Can anyone tell me what to do when the following error happens? 1) First I ran the following code: ------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm [segmentedmri] = ft_volumesegment(cfg, mri); -------------- And the output looks like this : ====================== the input is volume data with dimensions [256 256 150] assuming that the input MRI is already approximately aligned with SPM coordinates performing the segmentation on the specified volume Warning: File 'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' not found. > In ft_volumesegment at 297 ===================== 2) Then I did this: ------------- cfg = []; cfg.method = 'interactive'; [realigned_mri] = ft_volumerealign(cfg, segmentedmri) -------------- And the output error message is: ================ the input is volume data with dimensions [256 256 150] ??? Index exceeds matrix dimensions. Error in ==> ft_volumerealign at 102 cfg.parameter = cfg.parameter{1}; ================ How can this error be fixed? FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My matlab is Version 7.5 but it only has Statistics Toolbox. And I installed SPM8. Could it be that I need other MATLAB toolboxes like "Signal processing toolbox"? Thanks a lot, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sangita.dandekar at GMAIL.COM Fri Sep 10 22:01:37 2010 From: sangita.dandekar at GMAIL.COM (Sangita Dandekar) Date: Fri, 10 Sep 2010 16:01:37 -0400 Subject: Simulations testing MEG planar on Yokogawa system Message-ID: Hi, I've tried to make changes to the megplanar code in FieldTrip so that it can be used for our Yokogawa (axial gradiometer) MEG system. I was wondering if anyone familar with the planar gradient approximation code in megplanar and/or the Yokogawa system could take a quick look at the changes that I've made and the results of simulations that I've done and see if they look reasonable. Output images generated by the simulation code (code pasted below) are at: http://clayspace.psych.nyu.edu/lab-members/sangita-dandekar/planarsims/ The simulation just consisted of pointing dipoles along the major axes and getting planar approximations for every dipole orientation. The output images are at the above link. Also pasted below are changes to segments of the combineplanar and planarchannelset functions that I made for the yokogawa system. (The only change that I ended up making in the original megplanar.m function was to comment out the code that causes an error if the input data is from an MEG system other than the supported ones) The original grad struct that I am using the for the unmodified axial gradiometer data for the yokogawa system looks like this: ftdata.grad ans = pnt: [314x3 double] ori: [314x3 double] tra: [157x314 double] label: {157x1 cell} unit: 'cm' The hope is that I can use the megplanar code (probably using the 'sincos' method) to get the planar gradient approximation, then apply freqanalysis to the horizontal and vertical components separately, and then finally recombine/sum the vertical and horizontal components using combineplanar. Any advice would be appreciated. Thanks in advance for any help! Sangita Dandekar %*******Simulation code to produce axial and planar x, y, and z images as shown at link above cfg.grad=ftdata.grad cfg.dip.pos=[ftdata.grad.pnt(57,1) ftdata.grad.pnt(57, 2) ftdata.grad.pnt(57,3)-5]; %5 cm below lower coil of gradiometer 57 cfg.dip.mom=[0 1 0]; %also varied to point along x ([1 0 0]) and z ([0 0 1]) cfg.vol.r=10; cfg.vol.o=[mean(ftdata.grad.pnt(:,1)) mean(ftdata.grad.pnt(:,2)) mean(ftdata.grad.pnt(:,3))] cfg.dip.signal=[ 1 1 1 ]; data=dipolesimulation(cfg); %get planar approximation: cfg=[]; cfg.planarmethod='sincos'; cfg.channel=ftdata.grad.label; [interp]=megplanar_yokogawa(cfg, data) %recombine horizontal and vertical components: cfg=[]; cfg.combinegrad='yes'; cfg.combmethod='sum'; [interpcomb]=combineplanar_yokogawa(cfg, interp) figure; cfgplot=[]; cfgplot.electrodes='numbers'; avg=timelockanalysis(cfgplot, interpcomb); %plot planar approximation topoplotER(cfgplot, avg) figure avg=timelockanalysis(cfgplot, data); topoplotER(cfgplot, avg) avg=timelockanalysis(cfgplot, data); %plot original axial gradiometer output topoplotER(cfgplot, avg) %*****************CHANGES TO COMBINEPLANAR (combineplanar_yokogawa.m): if strcmp(cfg.combinegrad, 'no') && ~isfield(data, 'grad') % the planar gradiometer definition was already removed % nothing needs to be done here elseif strcmp(cfg.combinegrad, 'no') && isfield(data, 'grad') % remove the planar gradiometer definition since it does not match the data any more data = rmfield(data, 'grad'); elseif strcmp(cfg.combinegrad, 'yes') && ~isfield(data, 'grad') % there is no gradiometer definition, impossible to reconstruct it error('the planar gradiometer definition is missing, cannot convert it back to axial'); elseif strcmp(cfg.combinegrad, 'yes') && isfield(data, 'grad') warning('trying to convert planar to axial gradiometers, this is experimental'); % try to reconstruct the original axial gradiometer array from the planar gradiometer definition orig = data.grad if all(size(orig.pnt)==[314 3]) && ... all(size(orig.pnt)==[314 3]) && ... all(size(orig.tra)==[314 314]) && ... length(orig.label)==314 && ... all(sum(orig.tra~=0,1)>2) % This looks as if it was made using the MEGPLANAR nearest neighbour approach % which means that the coil position and orientation still correspond % with those of the original axial gradiometer. Only the label and tra % have been modified and have to be restored to their original values. axial.pnt = orig.pnt; axial.ori = orig.ori; for i=1:157 axial.label{i} = orig.label{i}(1:(end-3)); end if all(orig.ori(1,:)==orig.ori(158,:)) % orientation is the same, the subtraction should be in "tra" axial.tra = [eye(157) -eye(157)]; else % orientation is opposite, the subtraction should not be in "tra" axial.tra = [eye(157) eye(157)]; end try axial.unit = orig.unit; end else error('cannot convert gradiometer definition back to axial, please contact Robert'); end data.grad = axial; end %*****************CHANGES TO PLANARCHANNELSET %(planarchannelset_yokogawa.m):** case 'meg' planar={ '1_dH' '1_dV' '1' '2_dH' '2_dV' '2' '3_dH' '3_dV' '3' '4_dH' '4_dV' '4' '5_dH' '5_dV' '5' '6_dH' '6_dV' '6' '7_dH' '7_dV' '7' '8_dH' '8_dV' '8' '9_dH' '9_dV' '9' '10_dH' '10_dV' '10' '11_dH' '11_dV' '11' '12_dH' '12_dV' '12' '13_dH' '13_dV' '13' '14_dH' '14_dV' '14' '15_dH' '15_dV' '15' '16_dH' '16_dV' '16' '17_dH' '17_dV' '17' '18_dH' '18_dV' '18' '19_dH' '19_dV' '19' '20_dH' '20_dV' '20' '21_dH' '21_dV' '21' '22_dH' '22_dV' '22' '23_dH' '23_dV' '23' '24_dH' '24_dV' '24' '25_dH' '25_dV' '25' '26_dH' '26_dV' '26' '27_dH' '27_dV' '27' '28_dH' '28_dV' '28' '29_dH' '29_dV' '29' '30_dH' '30_dV' '30' '31_dH' '31_dV' '31' '32_dH' '32_dV' '32' '33_dH' '33_dV' '33' '34_dH' '34_dV' '34' '35_dH' '35_dV' '35' '36_dH' '36_dV' '36' '37_dH' '37_dV' '37' '38_dH' '38_dV' '38' '39_dH' '39_dV' '39' '40_dH' '40_dV' '40' '41_dH' '41_dV' '41' '42_dH' '42_dV' '42' '43_dH' '43_dV' '43' '44_dH' '44_dV' '44' '45_dH' '45_dV' '45' '46_dH' '46_dV' '46' '47_dH' '47_dV' '47' '48_dH' '48_dV' '48' '49_dH' '49_dV' '49' '50_dH' '50_dV' '50' '51_dH' '51_dV' '51' '52_dH' '52_dV' '52' '53_dH' '53_dV' '53' '54_dH' '54_dV' '54' '55_dH' '55_dV' '55' '56_dH' '56_dV' '56' '57_dH' '57_dV' '57' '58_dH' '58_dV' '58' '59_dH' '59_dV' '59' '60_dH' '60_dV' '60' '61_dH' '61_dV' '61' '62_dH' '62_dV' '62' '63_dH' '63_dV' '63' '64_dH' '64_dV' '64' '65_dH' '65_dV' '65' '66_dH' '66_dV' '66' '67_dH' '67_dV' '67' '68_dH' '68_dV' '68' '69_dH' '69_dV' '69' '70_dH' '70_dV' '70' '71_dH' '71_dV' '71' '72_dH' '72_dV' '72' '73_dH' '73_dV' '73' '74_dH' '74_dV' '74' '75_dH' '75_dV' '75' '76_dH' '76_dV' '76' '77_dH' '77_dV' '77' '78_dH' '78_dV' '78' '79_dH' '79_dV' '79' '80_dH' '80_dV' '80' '81_dH' '81_dV' '81' '82_dH' '82_dV' '82' '83_dH' '83_dV' '83' '84_dH' '84_dV' '84' '85_dH' '85_dV' '85' '86_dH' '86_dV' '86' '87_dH' '87_dV' '87' '88_dH' '88_dV' '88' '89_dH' '89_dV' '89' '90_dH' '90_dV' '90' '91_dH' '91_dV' '91' '92_dH' '92_dV' '92' '93_dH' '93_dV' '93' '94_dH' '94_dV' '94' '95_dH' '95_dV' '95' '96_dH' '96_dV' '96' '97_dH' '97_dV' '97' '98_dH' '98_dV' '98' '99_dH' '99_dV' '99' '100_dH' '100_dV' '100' '101_dH' '101_dV' '101' '102_dH' '102_dV' '102' '103_dH' '103_dV' '103' '104_dH' '104_dV' '104' '105_dH' '105_dV' '105' '106_dH' '106_dV' '106' '107_dH' '107_dV' '107' '108_dH' '108_dV' '108' '109_dH' '109_dV' '109' '110_dH' '110_dV' '110' '111_dH' '111_dV' '111' '112_dH' '112_dV' '112' '113_dH' '113_dV' '113' '114_dH' '114_dV' '114' '115_dH' '115_dV' '115' '116_dH' '116_dV' '116' '117_dH' '117_dV' '117' '118_dH' '118_dV' '118' '119_dH' '119_dV' '119' '120_dH' '120_dV' '120' '121_dH' '121_dV' '121' '122_dH' '122_dV' '122' '123_dH' '123_dV' '123' '124_dH' '124_dV' '124' '125_dH' '125_dV' '125' '126_dH' '126_dV' '126' '127_dH' '127_dV' '127' '128_dH' '128_dV' '128' '129_dH' '129_dV' '129' '130_dH' '130_dV' '130' '131_dH' '131_dV' '131' '132_dH' '132_dV' '132' '133_dH' '133_dV' '133' '134_dH' '134_dV' '134' '135_dH' '135_dV' '135' '136_dH' '136_dV' '136' '137_dH' '137_dV' '137' '138_dH' '138_dV' '138' '139_dH' '139_dV' '139' '140_dH' '140_dV' '140' '141_dH' '141_dV' '141' '142_dH' '142_dV' '142' '143_dH' '143_dV' '143' '144_dH' '144_dV' '144' '145_dH' '145_dV' '145' '146_dH' '146_dV' '146' '147_dH' '147_dV' '147' '148_dH' '148_dV' '148' '149_dH' '149_dV' '149' '150_dH' '150_dV' '150' '151_dH' '151_dV' '151' '152_dH' '152_dV' '152' '153_dH' '153_dV' '153' '154_dH' '154_dV' '154' '155_dH' '155_dV' '155' '156_dH' '156_dV' '156' '157_dH' '157_dV' '157' }; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at GMAIL.COM Mon Sep 13 21:02:30 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Mon, 13 Sep 2010 21:02:30 +0200 Subject: volumerealign error Message-ID: Hello, I tried the same commands in a Windows Server 2008 PC with a R2009b MATLAB that has all 4 toolboxes recommended by Fieldtrip. And it has the latest SPM8 and Fieldtrip. I still got the same error message. Any suggestion how to fix the problem? Should I run "ft_volumerealign" first on the "mri" structure, then run "ft_volumesegment" on this realigned data? Thanks, Jim On Fri, 10 Sep 2010 20:09:24 +0200, Jim Li wrote: >Dear all, > >Can anyone tell me what to do when the following error happens? > >1) First I ran the following code: >------------- >mri = ft_read_mri('../2_mri.img'); >cfg = []; >cfg.write = 'no'; >cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm >[segmentedmri] = ft_volumesegment(cfg, mri); >-------------- > >And the output looks like this : >====================== >the input is volume data with dimensions [256 256 150] >assuming that the input MRI is already approximately aligned with SPM >coordinates >performing the segmentation on the specified volume >Warning: File >'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' >not found. >> In ft_volumesegment at 297 >===================== > >2) Then I did this: >------------- >cfg = []; >cfg.method = 'interactive'; >[realigned_mri] = ft_volumerealign(cfg, segmentedmri) >-------------- > >And the output error message is: >================ >the input is volume data with dimensions [256 256 150] >??? Index exceeds matrix dimensions. > >Error in ==> ft_volumerealign at 102 > cfg.parameter = cfg.parameter{1}; >================ > >How can this error be fixed? > >FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My >matlab is Version 7.5 but it only has Statistics Toolbox. And I installed >SPM8. Could it be that I need other MATLAB toolboxes like "Signal >processing toolbox"? > >Thanks a lot, > >Jim > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Hannah.schulz at UNI-KONSTANZ.DE Wed Sep 15 13:45:35 2010 From: Hannah.schulz at UNI-KONSTANZ.DE (Hannah Schulz) Date: Wed, 15 Sep 2010 13:45:35 +0200 Subject: trl information in ft_resampledata Message-ID: Hello, I have a problem with a new fieldtrip version (7.9.2010). When I do ft_resampledata after preprocessing and then do a reject visual with cfg.method='summary' I get this warning : the input is raw data with 130 channels and 75 trials Warning: the trial definition in the configuration is inconsistent with the actual data > In public/private/fixtrialdef at 66 In checkdata at 559 In ft_rejectvisual at 159 Warning: failed to create sampleinfo field > In public/private/fixtrialdef at 73 In checkdata at 559 In ft_rejectvisual at 159 I also get an empty trl structure in the "artefact free" dataset . Unfortunately I do need the proper trl structure for my further analysis, could anybody help me how solve that problem? (With an older fieldtrip version it workes fine) Thank you very much in advance, Hannah Schulz Dipl. Psych. Hannah Schulz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: hannah.schulz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From N.A.Kloosterman at UVA.NL Wed Sep 15 16:08:47 2010 From: N.A.Kloosterman at UVA.NL (Niels Kloosterman) Date: Wed, 15 Sep 2010 16:08:47 +0200 Subject: trl information in ft_resampledata In-Reply-To: Message-ID: Hi Hannah, What you need to do is also resample the start and stop indices in the trl, as this still contains the indices relative to the sample rate from before ft_resample. The line of code that did it for me was: data.cfg.trl(:,1:3) = round(data.cfg.trl(:,1:3) * (1/cfg.fsample) * cfg.resamplefs); %resample the trl indices too or visual artifact rejection won't work Where fsample is your original sample rate and resamplefs the sample rate after resampling. If all is well the trl is now also updated as you discard trials during visual artefact rejection. Hope this helps. Best, Niels --- Niels A. Kloosterman MSc.| PhD student | University of Amsterdam | Cognitive Neuroscience Group | Dept. of Psychology | Roetersstraat 15, A614 | 1018 WB Amsterdam | Tel: +31 20 525 6847 On 9/15/10 1:45 PM, "Hannah Schulz" wrote: > Hello, > > I have a problem with a new fieldtrip version (7.9.2010). When I do > ft_resampledata after preprocessing and then do a reject visual with > cfg.method='summary' I get this warning : > > the input is raw data with 130 channels and 75 trials > Warning: the trial definition in the > configuration is inconsistent with the actual > data >> In public/private/fixtrialdef at 66 > In checkdata at 559 > In ft_rejectvisual at 159 > Warning: failed to create sampleinfo field >> In public/private/fixtrialdef at 73 > In checkdata at 559 > In ft_rejectvisual at 159 > > > I also get an empty trl structure in the "artefact free" dataset . > Unfortunately I do need the proper trl structure for my further > analysis, could anybody help me how solve that problem? (With an older > fieldtrip version it workes fine) > Thank you very much in advance, > Hannah Schulz > > > > > > > Dipl. Psych. Hannah Schulz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: hannah.schulz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From megjim1 at GMAIL.COM Wed Sep 15 21:55:33 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 15 Sep 2010 21:55:33 +0200 Subject: Which way is correct? Message-ID: (a) Aha, we found that, even though "mri" has a field called "anatomy", running "[segmentedmri]=ft_volumesegment(cfg, mri)" will drop that"anatomy" field for "segmentedmri" , thus causing trouble for subsequent implementation of "ft_volumerealign(cfg, segmentedmri)". That's why we got the error message. By adding the "anatomy" field to "segmentedmri" before running ""ft_volumerealign(cfg, segmentedmri)", the problem can be solved. Here is the full script that worked now: ----------------------------------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [segmentedmri] = ft_volumesegment(cfg, mri); segmentedmri.anatomy= mri.anatomy; % a newly added line that solved the issue cfg = []; cfg.method = 'interactive'; [realigned_mri] = ft_volumerealign(cfg, segmentedmri) -------------------------------------------- (b) Interestingly, if we swap the above steps (i.e. do "ft_volumerealign" first, then "ft_volumesegment"), it also works fine. Here is the full script that works, too: ----------------------------------------- mri = ft_read_mri('../2_mri.img'); cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [mri_realign] = ft_volumerealign(cfg, mri) cfg = []; cfg.write = 'no'; cfg.coordinates = 'spm'; [segmentedmri] = ft_volumesegment(cfg, mri_realign); ----------------------------------------- My question is: given these two ways to process data, which one is the correct way? Do "ft_volumesegment" first, then "ft_volumerealign" (i.e. use scripts in (a)) ? Or do "ft_volumerealign" first, then "ft_volumesegment" (i.e. use scripts in (b))? Thanks. Jim On Mon, 13 Sep 2010 21:02:30 +0200, Jim Li wrote: >Hello, > >I tried the same commands in a Windows Server 2008 PC with a R2009b MATLAB >that has all 4 toolboxes recommended by Fieldtrip. And it has the latest >SPM8 and Fieldtrip. I still got the same error message. > >Any suggestion how to fix the problem? Should I run "ft_volumerealign" >first on the "mri" structure, then run "ft_volumesegment" on this realigned >data? > >Thanks, > >Jim > >On Fri, 10 Sep 2010 20:09:24 +0200, Jim Li wrote: > >>Dear all, >> >>Can anyone tell me what to do when the following error happens? >> >>1) First I ran the following code: >>------------- >>mri = ft_read_mri('../2_mri.img'); >>cfg = []; >>cfg.write = 'no'; >>cfg.coordinates = 'spm'; %x/ears is ctf; y/ant com is spm >>[segmentedmri] = ft_volumesegment(cfg, mri); >>-------------- >> >>And the output looks like this : >>====================== >>the input is volume data with dimensions [256 256 150] >>assuming that the input MRI is already approximately aligned with SPM >>coordinates >>performing the segmentation on the specified volume >>Warning: File >>'C:\Users\x\AppData\Local\Temp\2\tpf8737ef1_d83d_410c_876b_4cf1db904445.mat' >>not found. >>> In ft_volumesegment at 297 >>===================== >> >>2) Then I did this: >>------------- >>cfg = []; >>cfg.method = 'interactive'; >>[realigned_mri] = ft_volumerealign(cfg, segmentedmri) >>-------------- >> >>And the output error message is: >>================ >>the input is volume data with dimensions [256 256 150] >>??? Index exceeds matrix dimensions. >> >>Error in ==> ft_volumerealign at 102 >> cfg.parameter = cfg.parameter{1}; >>================ >> >>How can this error be fixed? >> >>FYI, my PC is a 64bit machine with Windows Server 2008 R2 standard. My >>matlab is Version 7.5 but it only has Statistics Toolbox. And I installed >>SPM8. Could it be that I need other MATLAB toolboxes like "Signal >>processing toolbox"? >> >>Thanks a lot, >> >>Jim >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the >FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Thu Sep 16 13:58:26 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Thu, 16 Sep 2010 13:58:26 +0200 Subject: significance of coherence differences Message-ID: Dear Claudia, I have nothing to add really to Eric's mail, just wanted to let you know that I think what you're doing is just fine. During frequency analysis fieldtrip averages spectra over trials automatically (though it is not a weighted average and I didn't quite understand why you want to weight them). The normalization, too, is part of the automatic calculation of coherence by connectivityanalysis. The normalization is actually part of the definition of coherence. And as Eric says, the montecarlo method is appropiate when doing many comparisons (many channels, many frequencies). Maybe you would like think about the test statistic. I have never used the fieldtrip statisics functions but it sounds like your statistic is a traditional t-value. There are other statistics which are commonly used in coherence analysis (z-transform, see e.g. the paper of Maris and Schoffelen on coh diff) which may do a better job in capturing the effect. Though in nonparametric testing the validity of your stats does not depend on the statistic, they are just not all equally effective. Best, Jan -----Original Message----- From: FieldTrip discussion list on behalf of Eric Maris Sent: Thu 9/9/2010 10:02 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] significance of coherence differences Dear Claudia, > I too am confused about coherence and its statistical analysis..I am > trying to > calculate the coherence between POz and 47 other channels in a > multisubject > study (N=19) with a within-subject design to test (1) whether coherence > in > condition 'Figure' is the same as in condition 'No figure', and (2) > whether > coherence differs between 3 conditions 'Hits', 'Misses' and 'Correct > rejections'. > > Either way I am not sure about a couple of things: > > 1) This is maybe a silly question but in your reply to Jan's post you > state: "...You apply this test statistic to the condition-specific > coherences, > obtained by summing and normalizing the trial(taper)-specific cross- > spectra..." - You mean averaging the trial-specific cross-spectra (and > trial- > specific powerspectra) right? Moreover does this mean that > cfg.keeptrials can > be set to 'no' when calculating the powerspectra and cross-spectra with > freqanalysis(_mtmconvol)? This would be great news for me, since the 4D > freqdata is too large to save.. For statistical testing in a within-subjects design (units-of-observation are subjects and not trials) you don't need the trials. So, you can safely put cfg.keeptrials to 'no'. By the way, try using freqanalysis_mtmfft (frequency analysis without time resolution) before freqanalysis_mtmconvol (with time resolutions). This makes life a lot easier and conceptually you're doing the same thing. > > 2) Another related question comes from the fact that the experiment had > 3 > different masking durations, so to combine the powerspectra belonging > to the > same condition (i.e. the Figs) but different mask durations we > calculated > weighted averages based on the least amount of trials in each Mask > duration > group. My question now would be whether the normalization to get the > coherence values should be done before or after this weighing (In other > words, > should I weigh the cross-spectra or the coherence values, or does this > not > matter?) I don't see why you have to deal with the normalization yourself. You can use ft_freqdescriptives or ft_connectivityanalysis to calculate the coherence values taking the freqanalsis output as its input. In any case, to obtain coherence values from the cross-spectra, one should always normalize (i.e., divide) by the square-roots of the power-spectra calculated on the same trials. I may be wrong, but it seems that you are making life more difficult than it should be. > > 3) Now for the statistics. Again in your reply to Jan's post you say: > "...For a > single channel pair and a single frequency bin, the appropriate > statistic is the > dependent (paired) samples t-statistic or, in a nonparametric > framework, the > Wilcoxon signed rank sum test." Does this mean it is not valid to use > freqstatistics with cfg.method = 'montecarlo' and cfg.statistic = > 'depsamplesT' > (and cfg.correctm = 'fdr' or 'cluster') if I want to test whether the > coherence > between POz (my ref.channel) and the 47 other channels is the same in > different conditions, using all my frequency and time bins? Do I need > to make a > selection? What you propose IS valid to control for multiple comparisons. However, in my reply to Jan, I consider a single statistical test ("... For a single channel pair and a single frequency bin, ..."); so, no multiple comparisons problem here. Good luck, Eric > > Thank you for your time. > > Sincerely, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Sep 17 14:25:30 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 17 Sep 2010 14:25:30 +0200 Subject: trl information in ft_resampledata In-Reply-To: Message-ID: Dear Hannah, You may want to have a look at the following: http://fieldtrip.fcdonders.nl/faq/is_it_possible_to_keep_track_of_trial-specific_information_in_my_fieldtrip_analysis_pipeline http://fieldtrip.fcdonders.nl/development/ensure_consistend_trial_definition We tried to make things as backward compatible as possible, but there may be some loose ends here and there. Let me know whether the information is helpful and allows you to tweak your analysis pipeline such that it works again. Best, Jan-Mathijs On Sep 15, 2010, at 1:45 PM, Hannah Schulz wrote: > Hello, > > I have a problem with a new fieldtrip version (7.9.2010). When I do > ft_resampledata after preprocessing and then do a reject visual with > cfg.method='summary' I get this warning : > > the input is raw data with 130 channels and 75 trials > Warning: the trial definition in the > configuration is inconsistent with the actual > data > > In public/private/fixtrialdef at 66 > In checkdata at 559 > In ft_rejectvisual at 159 > Warning: failed to create sampleinfo field > > In public/private/fixtrialdef at 73 > In checkdata at 559 > In ft_rejectvisual at 159 > > > I also get an empty trl structure in the "artefact free" dataset . > Unfortunately I do need the proper trl structure for my further > analysis, could anybody help me how solve that problem? (With an > older fieldtrip version it workes fine) > Thank you very much in advance, > Hannah Schulz > > > > > > > Dipl. Psych. Hannah Schulz > > OBOB-Lab > University of Konstanz > Department of Psychology > P.O. Box D25 > 78457 Konstanz > Germany > > Tel: ++49 - (0)7531 - 88 42 50 > Fax: ++49 - (0)7531 - 88 28 91 > Email: hannah.schulz at uni-konstanz.de > Homepage: http://www.uni-konstanz.de/obob > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From panichem at NMR.MGH.HARVARD.EDU Sat Sep 18 00:53:11 2010 From: panichem at NMR.MGH.HARVARD.EDU (Matt F. Panichello) Date: Fri, 17 Sep 2010 18:53:11 -0400 Subject: strange segmentation w/ ft_volumesegment Message-ID: Hi there, I am trying to segment an anatomical MRI. Here's the script: mri = ft_read_mri('test.nii'); %put the mri into the proper orientation cfg = []; mri.anatomy = permute(mri.anatomy,[1 3 2]); mri.anatomy = mri.anatomy(end:-1:1,:,end:-1:1); %segment the mri mri = ft_volumerealign(cfg,mri); cfg.template = '/spm8/templates/T1.nii'; cfg.coordinates = 'spm'; cfg.write = 'yes'; cfg.name = 'test_segment'; [segmentedmri] = ft_volumesegment(cfg, mri) %visualize the results cfg = []; test = segmentedmri; test.avg.pow = test.gray+test.white+test.csf; test.anatomy = mri.anatomy; cfg.funparameter = 'avg.pow'; cfg.interactive = 'yes'; ft_sourceplot(cfg,test); No errors are thrown, but when I visualize the results, the segmentation is clearly incorrect (attached) - it seems to be trying to follow the contour of the head instead of the brain. I've overlaid both test.nii and the template in MRIcron and they are aligned and in the same space; is there any other reason why segmentation may be failing? Thanks in advance! Matt 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: segmented.jpg Type: image/jpeg Size: 61138 bytes Desc: not available URL: From r.oostenveld at DONDERS.RU.NL Mon Sep 20 08:45:43 2010 From: r.oostenveld at DONDERS.RU.NL (Robert Oostenveld) Date: Mon, 20 Sep 2010 08:45:43 +0200 Subject: POSTDOC position at ESI in the Human Connectome Project Message-ID: Begin forwarded message: From: "Fries, Pascal" Date: 17 September 2010 11:48:10 GMT+02:00 To: undisclosed-recipients: ; Subject: [ESILIST-FRIES-LAB-ALL] POSTDOC position at ESI in the Human Connectome Project Dear colleagues, at the ESI, we are seeking a postdoc candidate and I would greatly appreciate your help in that! I attach the respective ad and it would be great if you could post it in your lab and/or distribute it through e-mail lists or similar! With kind regards! Pascal Prof. Dr. Pascal Fries Director, Ernst Strüngmann Institute (ESI) in Cooperation with Max Planck Society Deutschordenstr. 46, D-60528 Frankfurt E-mail: pascal.fries at esi-frankfurt.de Fon: 0049 69 96769 501 Fax: 0049 69 96769 555 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ESI HCP postdoc ad.doc Type: application/msword Size: 140288 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ESI HCP postdoc ad.pdf Type: application/pdf Size: 70880 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko at NYU.EDU Mon Sep 20 23:54:46 2010 From: akiko at NYU.EDU (Akiko Ikkai) Date: Mon, 20 Sep 2010 17:54:46 -0400 Subject: megplanar input structure Message-ID: Hello, I'm trying to calculate the planar gradient for my MEG data. I have 2 questions: 1. in tutorial "Event related averaging and planar gradient", (ft_)megplanar appears to call for averaged data created with cfg.keeptrials = 'no'; (how it was calculated earlier in the page), which looks like: (from tutorial) avgFIC = avg: [149x900 double] var: [149x900 double] fsample: 300 numsamples: [77x1 double] time: [1x900 double] dof: [149x900 double] label: {149x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] However, megplanar looks for data.trial (e.g. line 252). If I feed in averaged data with cfg.keeptrials = 'yes'; input structure looks like: (from my data, after timelockanalysis with cfg.keeptrials = 'yes';) timelock = avg: [156x751 double] var: [156x751 double] fsample: 500 time: [1x751 double] dof: [156x751 double] label: {1x156 cell} trial: [72x156x751 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] However, data.trial is matrix instead of cell structure, as megplanar requires (e.g. line 505: interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it crashes here. Also in tutorial, it appears that the sequence of analysis is ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I suspect ft_timelockanalysis should be before calculating planar gradients...? 2. How to deal with bad channels in calculating planar gradient? It is suggested that we do preprocessing, timelockanalysis, megplanar and combineplanar. However, if I have bad channels and reject them in preprocessing, combineplanar crashes @ line 326 if all(size(orig.pnt)==[302 3]) && ... all(size(orig.pnt)==[302 3]) && ... all(size(orig.tra)==[302 302]) && ... length(orig.label)==302 && ... all(sum(orig.tra~=0,1)>2) because length(orig.label) is not going to be 302. Could I simply change these lines to something like: if all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... all(sum(orig.tra~=0,1)>2) If anyone could clarify these issues, I'd greatly appreciate it. Thanks in advance! Akiko ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Antony.Passaro at UTH.TMC.EDU Tue Sep 21 00:13:24 2010 From: Antony.Passaro at UTH.TMC.EDU (Passaro, Antony D) Date: Mon, 20 Sep 2010 17:13:24 -0500 Subject: megplanar input structure In-Reply-To: <5860855f6ce91.4c979fe6@mail.nyu.edu> Message-ID: Hi, In response to your second question, there is a function called ft_channelrepair which you can use to repair bad channels prior to using combineplanar. Please see the example code below: cfg = []; cfg.badchannel = {'A153'; 'A154'} [interp] = ft_channelrepair(cfg, data) Good luck! -Tony -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Akiko Ikkai Sent: Monday, September 20, 2010 4:55 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] megplanar input structure Hello, I'm trying to calculate the planar gradient for my MEG data. I have 2 questions: 1. in tutorial "Event related averaging and planar gradient", (ft_)megplanar appears to call for averaged data created with cfg.keeptrials = 'no'; (how it was calculated earlier in the page), which looks like: (from tutorial) avgFIC = avg: [149x900 double] var: [149x900 double] fsample: 300 numsamples: [77x1 double] time: [1x900 double] dof: [149x900 double] label: {149x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] However, megplanar looks for data.trial (e.g. line 252). If I feed in averaged data with cfg.keeptrials = 'yes'; input structure looks like: (from my data, after timelockanalysis with cfg.keeptrials = 'yes';) timelock = avg: [156x751 double] var: [156x751 double] fsample: 500 time: [1x751 double] dof: [156x751 double] label: {1x156 cell} trial: [72x156x751 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] However, data.trial is matrix instead of cell structure, as megplanar requires (e.g. line 505: interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it crashes here. Also in tutorial, it appears that the sequence of analysis is ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I suspect ft_timelockanalysis should be before calculating planar gradients...? 2. How to deal with bad channels in calculating planar gradient? It is suggested that we do preprocessing, timelockanalysis, megplanar and combineplanar. However, if I have bad channels and reject them in preprocessing, combineplanar crashes @ line 326 if all(size(orig.pnt)==[302 3]) && ... all(size(orig.pnt)==[302 3]) && ... all(size(orig.tra)==[302 302]) && ... length(orig.label)==302 && ... all(sum(orig.tra~=0,1)>2) because length(orig.label) is not going to be 302. Could I simply change these lines to something like: if all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.pnt)==[length(orig.label) 3]) && ... all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... all(sum(orig.tra~=0,1)>2) If anyone could clarify these issues, I'd greatly appreciate it. Thanks in advance! Akiko ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Sep 21 11:34:10 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 21 Sep 2010 11:34:10 +0200 Subject: strange segmentation w/ ft_volumesegment In-Reply-To: <50434.132.183.137.195.1284763991.squirrel@mail.nmr.mgh.harvard.edu> Message-ID: Dear Matt, From your figure it looks as if there is a coregistration problem causing the segmentation (in SPM8) to return nonsense results. It is important to note the following: the SPM segmentation routine relies on matchin the anatomy of the single subject's MRI to a series of templates. In order for this to work well, the anatomy should be approximately coregistered with these templates. FieldTrip tries to achieve this in ft_volumesegment. This seems to go wrong in your case. Two things are problematic here: permuting and flipping mri.anatomy without changing mri.transform is wrong, because the block of voxels containing the anatomy does not correspond anymore to the voxel to head coordinate system transformation as specified in mri.transform. Next, the convention for anatomical MRIs in EEG/MEG is that the coordinate system which defines 'headspace' is different from the SPM convention. In other words, probably you should change cfg.coordinates into 'ctf' before calling ft_volumesegment, because ft_volumerealign will give you the transformation to headspace as defined by the fiducials. Best wishes, Jan-Mathijs On Sep 18, 2010, at 12:53 AM, Matt F. Panichello wrote: > Hi there, > > I am trying to segment an anatomical MRI. Here's the script: > > mri = ft_read_mri('test.nii'); > > %put the mri into the proper orientation > cfg = []; > mri.anatomy = permute(mri.anatomy,[1 3 2]); > mri.anatomy = mri.anatomy(end:-1:1,:,end:-1:1); > > %segment the mri > mri = ft_volumerealign(cfg,mri); > > cfg.template = '/spm8/templates/T1.nii'; > cfg.coordinates = 'spm'; > cfg.write = 'yes'; > cfg.name = 'test_segment'; > [segmentedmri] = ft_volumesegment(cfg, mri) > > %visualize the results > cfg = []; > test = segmentedmri; > test.avg.pow = test.gray+test.white+test.csf; > test.anatomy = mri.anatomy; > cfg.funparameter = 'avg.pow'; > cfg.interactive = 'yes'; > ft_sourceplot(cfg,test); > > > No errors are thrown, but when I visualize the results, the > segmentation > is clearly incorrect (attached) - it seems to be trying to follow the > contour of the head instead of the brain. I've overlaid both > test.nii and > the template in MRIcron and they are aligned and in the same space; is > there any other reason why segmentation may be failing? Thanks in > advance! > > Matt > > > > > > 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. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Tue Sep 21 11:36:51 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 21 Sep 2010 11:36:51 +0200 Subject: megplanar input structure In-Reply-To: <5860855f6ce91.4c979fe6@mail.nyu.edu> Message-ID: Dear Akiko, I think that your crash may be related to the issue of missing channels. Antony already pointed you to a way how to fix this. As to your first question: ft_megplanar indeed works with data containing a trial field (as cell-array). However, no need for you to worry about this; if your input data is for example a 'timelock' structure, fieldtrip automatically converts this structure into one containing a 'trial'. Best wishes, Jan-Mathijs On Sep 20, 2010, at 11:54 PM, Akiko Ikkai wrote: > Hello, > > I'm trying to calculate the planar gradient for my MEG data. I have > 2 questions: > > 1. in tutorial "Event related averaging and planar gradient", > (ft_)megplanar appears to call for averaged data created with > cfg.keeptrials = 'no'; (how it was calculated earlier in the page), > which looks like: (from tutorial) > > avgFIC = > avg: [149x900 double] > var: [149x900 double] > fsample: 300 > numsamples: [77x1 double] > time: [1x900 double] > dof: [149x900 double] > label: {149x1 cell} > dimord: 'chan_time' > grad: [1x1 struct] > cfg: [1x1 struct] > > However, megplanar looks for data.trial (e.g. line 252). If I feed > in averaged data with cfg.keeptrials = 'yes'; input structure looks > like: (from my data, after timelockanalysis with cfg.keeptrials = > 'yes';) > > timelock = > > avg: [156x751 double] > var: [156x751 double] > fsample: 500 > time: [1x751 double] > dof: [156x751 double] > label: {1x156 cell} > trial: [72x156x751 double] > dimord: 'rpt_chan_time' > cfg: [1x1 struct] > > However, data.trial is matrix instead of cell structure, as > megplanar requires (e.g. line 505: > interp.trial{i} = transform * data.trial{i}(dataindx,:); ), it > crashes here. > > Also in tutorial, it appears that the sequence of analysis is > ft_megplanar -> ft_timelockanalysis -> ft_combineplanar, where I > suspect ft_timelockanalysis should be before calculating planar > gradients...? > > > 2. How to deal with bad channels in calculating planar gradient? It > is suggested that we do preprocessing, timelockanalysis, megplanar > and combineplanar. However, if I have bad channels and reject them > in preprocessing, combineplanar crashes @ line 326 > > if all(size(orig.pnt)==[302 3]) && ... > all(size(orig.pnt)==[302 3]) && ... > all(size(orig.tra)==[302 302]) && ... > length(orig.label)==302 && ... > all(sum(orig.tra~=0,1)>2) > > because length(orig.label) is not going to be 302. Could I simply > change these lines to something like: > > if all(size(orig.pnt)==[length(orig.label) 3]) && ... > all(size(orig.pnt)==[length(orig.label) 3]) && ... > all(size(orig.tra)==[length(orig.label) length(orig.label)]) && ... > all(sum(orig.tra~=0,1)>2) > > > If anyone could clarify these issues, I'd greatly appreciate it. > Thanks in advance! Akiko > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From E.vandenBroeke at ANES.UMCN.NL Wed Sep 22 14:30:25 2010 From: E.vandenBroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 22 Sep 2010 14:30:25 +0200 Subject: non-parametric cluster analysis In-Reply-To: Message-ID: Dear dr. Maris, I would like to ask a question regarding your article: Nonparametric statistical testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I hope you will answer it. My question is about the following. I want to use the non-parametric cluster analysis, the one you described in your article, for my ERP analysis. In this article you quantified the difference between the two conditions (congruent and incongruent) by calculating sample specific t-values, based on the t-distribution. These sample specific t-values were calculated based on a two sided test statistic and an alpha of .05. Subsequently clusters were chosen based on the uncorrected critical t-value. This uncorrected critical t-value is also based on a two sided test statistic. Now my question. I understand that this uncorrected critical t-value threshold affects the sensitivity of the statistical test rather than the validity. So is it also possible to calculate the sample specific t-values belonging to the one-sided test statistic, instead of two-sided? The same question accounts for the uncorrected critical t-value used as threshold. Thanks in advance, Best, Emanuel Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.vandenbroeke at ANES.UMCN.NL Wed Sep 22 14:40:27 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 22 Sep 2010 14:40:27 +0200 Subject: non-parametric cluster analysis Message-ID: Dear dr. Maris, I would like to ask a question regarding your article: Nonparametric statistical testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I hope you will answer it. My question is about the following. I want to use the non-parametric cluster analysis, the one you described in your article, for my ERP analysis. In this article you quantified the difference between the two conditions (congruent and incongruent) by calculating sample specific t-values, based on the t-distribution. These sample specific t-values were calculated based on a two sided test statistic and an alpha of .05. Subsequently clusters were chosen based on the uncorrected critical t-value. This uncorrected critical t- value is also based on a two sided test statistic. Now my question. I understand that this uncorrected critical t-value threshold affects the sensitivity of the statistical test rather than the validity. So is it also possible to calculate the sample specific t-values belonging to the one- sided test statistic, instead of two-sided? The same question accounts for the uncorrected critical t-value used as threshold. Thanks in advance, Best, Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 22 22:25:00 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 22 Sep 2010 22:25:00 +0200 Subject: non-parametric cluster analysis In-Reply-To: Message-ID: Dear Emanuel, > I would like to ask a question regarding your article: Nonparametric > statistical > testing of EEG- and MEG-data in Journal of Neuroscience Methods 2007. I > hope you will answer it. > My question is about the following. I want to use the non-parametric > cluster > analysis, the one you described in your article, for my ERP analysis. > In this article you quantified the difference between the two > conditions > (congruent and incongruent) by calculating sample specific t-values, > based on > the t-distribution. These sample specific t-values were calculated > based on a > two sided test statistic and an alpha of .05. Subsequently clusters > were > chosen based on the uncorrected critical t-value. This uncorrected > critical t- > value is also based on a two sided test statistic. > Now my question. I understand that this uncorrected critical t-value > threshold > affects the sensitivity of the statistical test rather than the > validity. So is it > also possible to calculate the sample specific t-values belonging to > the one- > sided test statistic, instead of two-sided? I guess you mean here whether one may also select samples for subsequent clustering based on whether their t-statistics exceed the critical value of a one-sided statistical test. Yes, this is allowed. However, when you use the cluster-based permutation tests in Fieldtrip, you can do this with the same function that (per default) does the selection on the basis of the critical values for a two-sided statistical test. You only have to double the value of the alphathresh-parameter (e.g., putting it at 0.10 such that it uses 0.05 as the critical p-value for the selection of the samples), and you can evaluate the permutation p-values of the clusters by comparing them with your nominal alpha-level (typically, 0.05). Researchers that, unlike you, are interested in both positive and negative clusters, must compare the permutation p-values with half their nominal alpha-level (typically, 0.025). Good luck, Eric The same question accounts > for the > uncorrected critical t-value used as threshold. > Thanks in advance, > Best, > Emanuel > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Tim.Bardouille at NRC-CNRC.GC.CA Thu Sep 23 00:10:40 2010 From: Tim.Bardouille at NRC-CNRC.GC.CA (Bardouille, Tim) Date: Wed, 22 Sep 2010 15:10:40 -0700 Subject: FieldTrip beamformer with Elekta Neuromag-306 Message-ID: Hi there, I'm just wondering if the Fieldtrip beamformer works with data from the Elekta Neuromag-306? Does the beamformer use the planar gradiometer and magnetometer data? Please let me know. Thanks, Tim. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko at NYU.EDU Thu Sep 23 01:20:19 2010 From: akiko at NYU.EDU (Akiko Ikkai) Date: Wed, 22 Sep 2010 19:20:19 -0400 Subject: megplanar input structure In-Reply-To: <793CFCD3-2ED3-4794-AA0F-8A26CD2C0739@donders.ru.nl> Message-ID: Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input ERF1 = trial: {1x137 cell} label: {157x1 cell} grad: [1x1 struct] fsample: 500 time: {1x137 cell} cfg: [1x1 struct] [stat] = timelockstatistics(cfg, ERF1, ERF2); ??? Reference to non-existent field 'dimord'. Error in ==> prepare_timefreq_data>forcedimord at 577 inputdim = tokenize(input.dimord, '_'); Error in ==> prepare_timefreq_data at 176 [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 318 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> timelockstatistics at 115 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in ==> cluster_ERF_bwTrialtest_planar at 50 [stat] = timelockstatistics(cfg, ERF1, ERF2); 2. manually added dimord to the same input ERF1.dimord = 'rpt_chan_time'; [stat] = timelockstatistics(cfg, ERF1, ERF2); ??? Undefined function or method 'isnan' for input arguments of type 'cell'. Error in ==> prepare_timefreq_data at 215 if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) Error in ==> statistics_wrapper at 318 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> timelockstatistics at 115 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); 3. With timelockanalysis (after megplanar), it crashes during combineplanar ??? Subscripted assignment dimension mismatch. Error in ==> checkdata>raw2timelock at 1136 tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; Error in ==> checkdata at 366 data = raw2timelock(data); Error in ==> combineplanar at 356 data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); ... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. Thanks in advance! Akiko ----- Original Message ----- From: jan-mathijs schoffelen Date: Tuesday, September 21, 2010 5:37 am Subject: Re: [FIELDTRIP] megplanar input structure To: FIELDTRIP at NIC.SURFNET.NL > Dear Akiko, > > I think that your crash may be related to the issue of missing > channels. Antony already pointed you to a way how to fix this. As to > > your first question: ft_megplanar indeed works with data containing a > > trial field (as cell-array). However, no need for you to worry about > > this; if your input data is for example a 'timelock' structure, > fieldtrip automatically converts this structure into one containing a > > 'trial'. > > Best wishes, > > Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From masaki.maruyama at CEA.FR Thu Sep 23 10:45:16 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Thu, 23 Sep 2010 10:45:16 +0200 Subject: FieldTrip beamformer with Elekta Neuromag-306 In-Reply-To: A Message-ID: Dear Dr. Tim, Fieldtrip can do beamforming to each of planar data and magnetometer data. It will be also possible to apply to both data together if we can find out an appropriate method to normalize such different scale of signals in preprocessing. Sincerely, Masaki Maruyama Inserm U.992 - Neuroimagerie Cognitive CEA/SAC/DSV/I2BM/NeuroSpin Bât 145, Point Courrier 156 F-91191 GIF/YVETTE, FRANCE http://www.unicog.org/ ________________________________ De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Bardouille, Tim Envoyé : jeudi 23 septembre 2010 00:11 À : FIELDTRIP at NIC.SURFNET.NL Objet : [FIELDTRIP] FieldTrip beamformer with Elekta Neuromag-306 Hi there, I'm just wondering if the Fieldtrip beamformer works with data from the Elekta Neuromag-306? Does the beamformer use the planar gradiometer and magnetometer data? Please let me know. Thanks, Tim. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at WEB.DE Thu Sep 23 11:12:36 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:12:36 +0200 Subject: megplanar input structure / gerneral usage of plamar gradients fpr ERFs In-Reply-To: <5990feac1d369.4c9a56f3@mail.nyu.edu> Message-ID: Dear Akiko, maybe I can help with the confusion. Not in terms of fieldtrip usage but rather in the logic of using planar gradients for ERFs. When computing ERFs you count on non-repeateable signals to average to zero and on repeatable signals to average to non-zero quantities. This requires that your signals carry a sign (i.e. they're positive and negative). Clearly this is not the case anymore after combineplanar. Hence, any averaging that you do should occur before combineplanar, otherwise averaging to get an ERF-like construct does not make sense. I remeber that putting the gradient structure that you obtain after megplanar into the statistics was sometimes a problem (do not know whetherthis is still the case, though). So you basically have two options: (1) Do everything in axial gradiometers, including ERFS and stats. As a last step you may visualize the raw effect in planar gardients (i.e. do megplanar and combineplanar on your raw effect). See Grützner et al., J Neuroscience, 2010 for an example of what you get that way. (2) Compute the planar gradients as a first thing on the raw signals (but do NOT use combineplanar afterwards), do any averaging and stats that you'd like to do on the full 2xN gradient signals. Afterwards use combineplanar for visualization of the effects. As these two methods only differ in the arrangement of linear processing steps they are fully equivalent. Note that in both cases the nonlinear step (combineplaner) is done last. This is necessary because due to its nonlinear nature it does not commute with any other analysis step without dratsically changig the results and affecting the interpretation of what it is that you see. Michael -----Ursprüngliche Nachricht----- Von: "Akiko Ikkai" Gesendet: Sep 23, 2010 1:20:19 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] megplanar input structure >Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). > >I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. > >My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. > >I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input >ERF1 = > > trial: {1x137 cell} > label: {157x1 cell} > grad: [1x1 struct] > fsample: 500 > time: {1x137 cell} > cfg: [1x1 struct] > >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >??? Reference to non-existent field 'dimord'. > >Error in ==> prepare_timefreq_data>forcedimord at 577 >inputdim = tokenize(input.dimord, '_'); > >Error in ==> prepare_timefreq_data at 176 > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > >Error in ==> statistics_wrapper at 318 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > >Error in ==> timelockstatistics at 115 >[stat, cfg] = statistics_wrapper(cfg, varargin{:}); > >Error in ==> cluster_ERF_bwTrialtest_planar at 50 >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >2. manually added dimord to the same input >ERF1.dimord = 'rpt_chan_time'; > >[stat] = timelockstatistics(cfg, ERF1, ERF2); > >??? Undefined function or method 'isnan' for input arguments of type 'cell'. > >Error in ==> prepare_timefreq_data at 215 > if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) > >Error in ==> statistics_wrapper at 318 > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > >Error in ==> timelockstatistics at 115 >[stat, cfg] = statistics_wrapper(cfg, varargin{:}); > >3. With timelockanalysis (after megplanar), it crashes during combineplanar > >??? Subscripted assignment dimension mismatch. > >Error in ==> checkdata>raw2timelock at 1136 > tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; > >Error in ==> checkdata at 366 > data = raw2timelock(data); > >Error in ==> combineplanar at 356 > data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); > > >... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. > >Thanks in advance! Akiko > > >----- Original Message ----- >From: jan-mathijs schoffelen >Date: Tuesday, September 21, 2010 5:37 am >Subject: Re: [FIELDTRIP] megplanar input structure >To: FIELDTRIP at NIC.SURFNET.NL > >> Dear Akiko, >> >> I think that your crash may be related to the issue of missing >> channels. Antony already pointed you to a way how to fix this. As to >> >> your first question: ft_megplanar indeed works with data containing a >> >> trial field (as cell-array). However, no need for you to worry about >> >> this; if your input data is for example a 'timelock' structure, >> fieldtrip automatically converts this structure into one containing a >> >> 'trial'. >> >> Best wishes, >> >> Jan-Mathijs > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From michael.wibral at WEB.DE Thu Sep 23 11:18:33 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:18:33 +0200 Subject: UPDATE megplanar input structure / gerneral usage of planar gradients fpr ERFs In-Reply-To: <1949535077.1716100.1285233156078.JavaMail.fmail@mwmweb053> Message-ID: Dear Akiko, I just remebered the problem you get when trying to do stats on planar gradient data: Any corrcetion method that takes spatial distance between sensors into account - such as Eric's cluster based correction - can not handle planar grdaiometer data properly - for fundamental reasons discussed earlier in this forum. But stats with FDR should work on the planar gradient inputs. Perhaps you will have to add a fake grad field (with 2xN entries !) to the output of megplanar.m to make timelockstatistics run. Michael -----Ursprüngliche Nachricht----- Von: "Michael Wibral" Gesendet: Sep 23, 2010 11:12:36 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] megplanar input structure / gerneral usage of plamar gradients fpr ERFs >Dear Akiko, > >maybe I can help with the confusion. Not in terms of fieldtrip usage but rather in the logic of using planar gradients for ERFs. > >When computing ERFs you count on non-repeateable signals to average to zero and on repeatable signals to average to non-zero quantities. This requires that your signals carry a sign (i.e. they're positive and negative). Clearly this is not the case anymore after combineplanar. Hence, any averaging that you do should occur before combineplanar, otherwise averaging to get an ERF-like construct does not make sense. > >I remeber that putting the gradient structure that you obtain after megplanar into the statistics was sometimes a problem (do not know whetherthis is still the case, though). > >So you basically have two options: >(1) Do everything in axial gradiometers, including ERFS and stats. As a last step you may visualize the raw effect in planar gardients (i.e. do megplanar and combineplanar on your raw effect). See Grützner et al., J Neuroscience, 2010 for an example of what you get that way. >(2) Compute the planar gradients as a first thing on the raw signals (but do NOT use combineplanar afterwards), do any averaging and stats that you'd like to do on the full 2xN gradient signals. Afterwards use combineplanar for visualization of the effects. > >As these two methods only differ in the arrangement of linear processing steps they are fully equivalent. Note that in both cases the nonlinear step (combineplaner) is done last. This is necessary because due to its nonlinear nature it does not commute with any other analysis step without dratsically changig the results and affecting the interpretation of what it is that you see. > >Michael > >-----Ursprüngliche Nachricht----- >Von: "Akiko Ikkai" [ >Gesendet: Sep 23, 2010 1:20:19 AM >An: FIELDTRIP at NIC.SURFNET.NL >Betreff: Re: [FIELDTRIP] megplanar input structure > >>Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';). >> >>I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like. >> >>My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar. >> >>I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input >>ERF1 = >> >> trial: {1x137 cell} >> label: {157x1 cell} >> grad: [1x1 struct] >> fsample: 500 >> time: {1x137 cell} >> cfg: [1x1 struct] >> >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>??? Reference to non-existent field 'dimord'. >> >>Error in ==> prepare_timefreq_data>forcedimord at 577 >>inputdim = tokenize(input.dimord, '_'); >> >>Error in ==> prepare_timefreq_data at 176 >> [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); >> >>Error in ==> statistics_wrapper at 318 >> [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); >> >>Error in ==> timelockstatistics at 115 >>[stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> >>Error in ==> cluster_ERF_bwTrialtest_planar at 50 >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>2. manually added dimord to the same input >>ERF1.dimord = 'rpt_chan_time'; >> >>[stat] = timelockstatistics(cfg, ERF1, ERF2); >> >>??? Undefined function or method 'isnan' for input arguments of type 'cell'. >> >>Error in ==> prepare_timefreq_data at 215 >> if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time)) >> >>Error in ==> statistics_wrapper at 318 >> [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); >> >>Error in ==> timelockstatistics at 115 >>[stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> >>3. With timelockanalysis (after megplanar), it crashes during combineplanar >> >>??? Subscripted assignment dimension mismatch. >> >>Error in ==> checkdata>raw2timelock at 1136 >> tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i}; >> >>Error in ==> checkdata at 366 >> data = raw2timelock(data); >> >>Error in ==> combineplanar at 356 >> data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes'); >> >> >>... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem. >> >>Thanks in advance! Akiko >> >> >>----- Original Message ----- >>From: jan-mathijs schoffelen >>Date: Tuesday, September 21, 2010 5:37 am >>Subject: Re: [FIELDTRIP] megplanar input structure >>To: FIELDTRIP at NIC.SURFNET.NL >> >>> Dear Akiko, >>> >>> I think that your crash may be related to the issue of missing >>> channels. Antony already pointed you to a way how to fix this. As to >>> >>> your first question: ft_megplanar indeed works with data containing a >>> >>> trial field (as cell-array). However, no need for you to worry about >>> >>> this; if your input data is for example a 'timelock' structure, >>> fieldtrip automatically converts this structure into one containing a >>> >>> 'trial'. >>> >>> Best wishes, >>> >>> Jan-Mathijs >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From michael.wibral at WEB.DE Thu Sep 23 11:51:16 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 11:51:16 +0200 Subject: Reference for permutation testing for factorial designs Message-ID: Dear Fieldtrip users, I know that every now and then the questions comes up on how to use permutation testing on 2x2 designs (potentially with interactions). On the code side fieldtrip offers the cfg.cvar mechanism to construct restricted permutations. Saskia Helbling pointed me to this reference that explains how to use such restricted permutations properly to 'fake' an ANOVA Anderson MJ and Ter Braak CJF, "PERMUTATION TESTS FOR MULTI-FACTORIAL ANALYSIS OF VARIANCE", J Statistical Computation and Simulation, 2003 Hope you'll find this useful, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.vandenbroeke at ANES.UMCN.NL Thu Sep 23 12:18:04 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Thu, 23 Sep 2010 12:18:04 +0200 Subject: cluster-based analysis Message-ID: Perhaps someone can answer my question? After performing the cluster based analysis of the ERPs one has to do a permutation test. I'm wondering on what data this permutation test is performed? Once you have defined a cluster of adjacent temporal samples you calculate the sum of the t-values within each cluster. For statistical analysis, I understood, you take the cluster with the highest absolute t-value. But on which data does the analysis perfom the permutation test? Is it also possible to calculate the mean ERP activity of the cluster period in each individual ERP and test these values between the two groups? or is the analysis restricted to another way of analysis? Please let me know, Best Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Thu Sep 23 13:53:56 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 23 Sep 2010 13:53:56 +0200 Subject: cluster-based analysis In-Reply-To: Message-ID: Hi Emanuel, I think there may be a slight misunderstanding about what the cluster correction is doing. What is actually done is that for the original data the statistical metric is computed (say depsamples t values), and clusters are identified based on the clusterthreshold you set. Then you sum all t-values in every cluster to obtain one t-value sum per cluster. Note that all of these cluster/t-value sums are kept for later! Then the data are permuted, the statistical metric is computed on the permuted data, clusters are identified, their t-value sums are computed and the maximum t-value sum is kept. This is done again and again (permutation, statistical metric, cluster identification, keeping the max t-sum). All the maximum t-sums obtained in the perumtations together form the maximum distribution under the null. Now you go and sort the t-sums from your clusters obtained from the original data in descending order. For each of these you test how many t-values in distribution of maximum t-sums from the permutations are more extreme. If there are no more than alpha% more extreme t-values in in distribution of maximum t-sums from the permutations you consider the original cluster significant. Note that more than one cluster can be significant. Often, however, the biggest cluster also shows up in some distorted form in the permutations, again with a high t-value sum. Smaller clusters typically have a hard time competing against the t-sums of the permutations of a big cluster. Hence, you often only find one or two clusters. Michael -----Ursprüngliche Nachricht----- Von: "" Gesendet: Sep 23, 2010 12:18:04 PM An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] cluster-based analysis >Perhaps someone can answer my question? > >After performing the cluster based analysis of the ERPs one has to do a >permutation test. I'm wondering on what data this permutation test is >performed? >Once you have defined a cluster of adjacent temporal samples you calculate >the sum of the t-values within each cluster. For statistical analysis, I >understood, you take the cluster with the highest absolute t-value. >But on which data does the analysis perfom the permutation test? Is it also >possible to calculate the mean ERP activity of the cluster period in each >individual ERP and test these values between the two groups? or is the >analysis restricted to another way of analysis? > >Please let me know, > >Best Emanuel > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From suforraxi at GMAIL.COM Thu Sep 23 14:58:54 2010 From: suforraxi at GMAIL.COM (Matteo Demuru) Date: Thu, 23 Sep 2010 14:58:54 +0200 Subject: coherence and inter-trial coherence questions Message-ID: Hi, I have two questions regarding statistical tests: first one regarding coherence differences, second one pertaining testing inter-trial coherence. We are analysing MEG data from an auditory experiment with 5 subjects. We considered the deviant stimulus as the only stimulus in the recordings, while the standard one was considered as baseline activity. We analysed the TFR data in both designs: within-trial and within-subject using respectively "actvsblT" and "depsamplesT" statistics. In both cases we compared a time interval extracted from the baseline versus a time interval from the deviant stimulus response. We wish to assess coherence differences using "indepsampleZcoh" statistic in both single-subject and multiple-subject cases. In a previous postDr. Maris replied that this statistic only works in a between-trial design (for single-subject case) and suggested to compare the different conditions as they were un-paired. We exploited this idea for the single-subject case and we would like to know if it is legitimate to extend the same idea for the multiple-subject situation? Furthermore we would like to know if there is a way to test inter-trial coherence differences in Fieldtrip? In a previous postStephan suggested how to deal with the problem; is it already implemented? Thanks in advance for your time Matteo ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From E.vandenBroeke at ANES.UMCN.NL Thu Sep 23 15:29:35 2010 From: E.vandenBroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Thu, 23 Sep 2010 15:29:35 +0200 Subject: cluster-based analysis In-Reply-To: <682389188.1814672.1285242836504.JavaMail.fmail@mwmweb053> Message-ID: Thanks Michael! You helped me a lot, now everything is clear for me! Best Emanuel -----Oorspronkelijk bericht----- Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens Michael Wibral Verzonden: donderdag 23 september 2010 13:54 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] cluster-based analysis Hi Emanuel, I think there may be a slight misunderstanding about what the cluster correction is doing. What is actually done is that for the original data the statistical metric is computed (say depsamples t values), and clusters are identified based on the clusterthreshold you set. Then you sum all t-values in every cluster to obtain one t-value sum per cluster. Note that all of these cluster/t-value sums are kept for later! Then the data are permuted, the statistical metric is computed on the permuted data, clusters are identified, their t-value sums are computed and the maximum t-value sum is kept. This is done again and again (permutation, statistical metric, cluster identification, keeping the max t-sum). All the maximum t-sums obtained in the perumtations together form the maximum distribution under the null. Now you go and sort the t-sums from your clusters obtained from the original data in descending order. For each of these you test how many t-values in distribution of maximum t-sums from the permutations are more extreme. If there are no more than alpha% more extreme t-values in in distribution of maximum t-sums from the permutations you consider the original cluster significant. Note that more than one cluster can be significant. Often, however, the biggest cluster also shows up in some distorted form in the permutations, again with a high t-value sum. Smaller clusters typically have a hard time competing against the t-sums of the permutations of a big cluster. Hence, you often only find one or two clusters. Michael -----Ursprüngliche Nachricht----- Von: "" Gesendet: Sep 23, 2010 12:18:04 PM An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] cluster-based analysis >Perhaps someone can answer my question? > >After performing the cluster based analysis of the ERPs one has to do a >permutation test. I'm wondering on what data this permutation test is >performed? >Once you have defined a cluster of adjacent temporal samples you >calculate the sum of the t-values within each cluster. For statistical >analysis, I understood, you take the cluster with the highest absolute t-value. >But on which data does the analysis perfom the permutation test? Is it >also possible to calculate the mean ERP activity of the cluster period >in each individual ERP and test these values between the two groups? or >is the analysis restricted to another way of analysis? > >Please let me know, > >Best Emanuel > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. From Erin.Oakman at NYUMC.ORG Thu Sep 23 16:55:13 2010 From: Erin.Oakman at NYUMC.ORG (Oakman, Erin) Date: Thu, 23 Sep 2010 10:55:13 -0400 Subject: Reference for permutation testing for factorial designs In-Reply-To: <849776673.1740242.1285235476350.JavaMail.fmail@mwmweb053> Message-ID: Thank you for the reference!! Erin ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral [michael.wibral at WEB.DE] Sent: Thursday, September 23, 2010 5:51 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Reference for permutation testing for factorial designs Dear Fieldtrip users, I know that every now and then the questions comes up on how to use permutation testing on 2x2 designs (potentially with interactions). On the code side fieldtrip offers the cfg.cvar mechanism to construct restricted permutations. Saskia Helbling pointed me to this reference that explains how to use such restricted permutations properly to 'fake' an ANOVA Anderson MJ and Ter Braak CJF, "PERMUTATION TESTS FOR MULTI-FACTORIAL ANALYSIS OF VARIANCE", J Statistical Computation and Simulation, 2003 Hope you'll find this useful, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ------------------------------------------------------------ This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email. ================================= ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 24 00:49:39 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 24 Sep 2010 00:49:39 +0200 Subject: question regarding topoplotER Message-ID: Dear all, I have a question about the topoplotER: I like the fact that the cartoon image of the nose and ears are drawn to help visualize the relative position of the sensor and the head. For data collection done in supine position, this works well when the subject's head position is centered in the sensor. But if the head is tilted to the left or right quite a bit (say a patient who can not cooperate), can I still count on such a plot to tell the relative position between patient head and sensor-level activity? My experience seems to tell me "no", but I just want to confirm... Thanks, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at DONDERS.RU.NL Fri Sep 24 13:54:22 2010 From: r.oostenveld at DONDERS.RU.NL (Robert Oostenveld) Date: Fri, 24 Sep 2010 13:54:22 +0200 Subject: question regarding topoplotER In-Reply-To: Message-ID: Dear Jim, The interpretation of the topoplot is usually the least ambiguous for EEG data, in which you know that the electrodes are positioned symmetric relative to the anatomical landmarks on the head, i.e. the nose and ears and where all electrodes are attached to the skin. For MEG data there is indeed the problem that the position of the head relative to the sensor (or vice versa) and the distances are not guaranteed. If the subjects head is rotated in the helmet, then the field of symmetrically located cortical areas will not be picked up by symemtically positioned sensors. If the subject is closer to one side of the helmet, then on that side the fields will be stronger. This problem of strength remains and is not solved by the topoplotting (although ft_megrealign can be used to solve it). Whether the topoplot is correct depends on how you use it: the template layouts (i.e. the fieldtrip/templaye/*.lay files) have all been constructed to be reasonably symmetric. If you are worried about the relative position of the head and helmet, then you should _not_ use the template layout. Instead you should create a custom layout for that single dataset, in which the gradiometer positions -- which are expressed relative to the head -- are used to interpolate the data to create the topography. See ft_prepare_layout. If you don't specify a cfg.layout in the topoplot function, it will create one from the gradiometer positions that are present in the data data, which by construct is a custom one. The triangle indicating the nose and the schematic location of the ears are remain an accurate representation, because the position of the sensors is expressed relative to those (*), not the other way around. For example, on the page http://fieldtrip.fcdonders.nl/tutorial/layout there is one layout http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/easycap32ch-avg.png?id=tutorial%3Alayout which was measured with a Polhemus tracker on a single subject. In this subject, the EEG cap is positioned rather asymmetric, which you can see by the position of the electrodes over the midline and towards O1 and O2. Of course you can test the validity of the topoplot by doing two ERF measurements of e.g. a simple sensory stimulus, one in which the subject is sitting straight and one in which he rotates his/her head. If you record the same ERF for the two locations, you can compare. With the correct (custom) layouts the topoplots should look similar, although the field strength can be different (because of the different distances from brain to sensors in the two measurements). And you should see in the topoplots (with the cfg.marker option) that the channels are shifted relative to the head. best, Robert *) this applies to most MEG systems, but cannot be guaranteed to apply. Local procedures in your MEG lab may differ, so ask your local MEG experts to be sure. On 24 Sep 2010, at 0:49, Jim Li wrote: > Dear all, > > I have a question about the topoplotER: > > I like the fact that the cartoon image of the nose and ears are > drawn to > help visualize the relative position of the sensor and the head. For > data > collection done in supine position, this works well when the > subject's head > position is centered in the sensor. But if the head is tilted to the > left or > right quite a bit (say a patient who can not cooperate), can I still > count > on such a plot to tell the relative position between patient head and > sensor-level activity? My experience seems to tell me "no", but I > just want > to confirm... > > Thanks, > > Jim > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.wollbrink at UNI-MUENSTER.DE Fri Sep 24 14:38:54 2010 From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink) Date: Fri, 24 Sep 2010 14:38:54 +0200 Subject: using ft_sourcegrandaverage with spatio-temporal source reconstructions Message-ID: Hi, I have a question concerning the usage of ft_sourcegrandaverage: Feeding the ft_sourcegrandaverage function with spatio-temporal source reconstruction data (MNE) resulted in the following error message: ??? Subscripted assignment dimension mismatch. Error in ==> ft_sourcegrandaverage at 159 dat(:,i) = tmp(:); I used the following settings: cfg = []; cfg.parameter = 'pow'; cfg.keepindividual = 'yes'; and called ft_sourcegrandaverage(cfg, src1, src2) The two source reconstructions (MNE) I generated using ft_sourceanalysis. Looking into the matlab code (ft_sourcegrandaverage at 159) I realized that the problem seems to be that the matrices src1.avg.pow and src2.avg.pow are two dimensional [Nsources x Nsamples]. By diminishing the source power matrix (avg.pow) to one dimension (Nsources) I succedded using ft_sourcegrandaverage. To perform a source statistic (ft_ft_sourcestatistics) later on it would be nice to have the option to include time information as well (e.g. like in timelockstatistics). Please let me know whether generally it is impossible to use spatio-temporal solutions in ft_sourcegrandaverage (and ft_sourcestatistics). Thanks, Andreas -- ====================================================================== Andreas Wollbrink, Biomedical Engineer Institute for Biomagnetism and Biosignalanalysis Muenster University Hospital Malmedyweg 15 phone: +49-(0)251-83-52546 D-48149 Muenster fax: +49-(0)251-83-56874 Germany e-Mail: a.wollbrink at uni-muenster.de ====================================================================== ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Fri Sep 24 15:19:22 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 24 Sep 2010 15:19:22 +0200 Subject: using ft_sourcegrandaverage with spatio-temporal source reconstructions In-Reply-To: <4C9C9BDE.4010904@uni-muenster.de> Message-ID: Dear Andreas, > Hi, > > I have a question concerning the usage of ft_sourcegrandaverage: > > Feeding the ft_sourcegrandaverage function with spatio-temporal > source reconstruction data (MNE) resulted in the following error > message: > > > ??? Subscripted assignment dimension mismatch. > > Error in ==> ft_sourcegrandaverage at 159 > dat(:,i) = tmp(:); > > > I used the following settings: > > cfg = []; > cfg.parameter = 'pow'; > cfg.keepindividual = 'yes'; > > and called > > ft_sourcegrandaverage(cfg, src1, src2) > > The two source reconstructions (MNE) I generated using > ft_sourceanalysis. > > Looking into the matlab code (ft_sourcegrandaverage at 159) I > realized that the problem seems to be that the matrices src1.avg.pow > and src2.avg.pow are two dimensional [Nsources x Nsamples]. > > By diminishing the source power matrix (avg.pow) to one dimension > (Nsources) I succedded using ft_sourcegrandaverage. > To perform a source statistic (ft_ft_sourcestatistics) later on it > would be nice to have the option to include time information as well > (e.g. like in timelockstatistics). > > Please let me know whether generally it is impossible to use spatio- > temporal solutions in ft_sourcegrandaverage (and ft_sourcestatistics). > > Thanks, > Andreas > -- > Yes, I totally agree that the functionality you would like to have is very useful. At present it is however not yet possible. At the moment we are in the process of restructuring the code dealing with source- level data in order to implement exactly this. However, we are not really proficient in using MNE as inverse method, and are not used to looking at source level time courses (which is exactly the reason why it is not yet implemented). It would be really helpful if you could send us some example data (such as your variables src1 and src2). Have a look here: http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers to see how to send your data. Best wishes, Jan-Mathijs Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri Sep 24 21:22:07 2010 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 24 Sep 2010 21:22:07 +0200 Subject: question regarding topoplotER Message-ID: Dear Robert, Thanks a lot for your great response. I'll study the examples to try to make my own layout. Cheers, Jim On Fri, 24 Sep 2010 13:54:22 +0200, Robert Oostenveld wrote: >Dear Jim, > >The interpretation of the topoplot is usually the least ambiguous for >EEG data, in which you know that the electrodes are positioned >symmetric relative to the anatomical landmarks on the head, i.e. the >nose and ears and where all electrodes are attached to the skin. For >MEG data there is indeed the problem that the position of the head >relative to the sensor (or vice versa) and the distances are not >guaranteed. > >If the subjects head is rotated in the helmet, then the field of >symmetrically located cortical areas will not be picked up by >symemtically positioned sensors. If the subject is closer to one side >of the helmet, then on that side the fields will be stronger. This >problem of strength remains and is not solved by the topoplotting >(although ft_megrealign can be used to solve it). > >Whether the topoplot is correct depends on how you use it: the >template layouts (i.e. the fieldtrip/templaye/*.lay files) have all >been constructed to be reasonably symmetric. If you are worried about >the relative position of the head and helmet, then you should _not_ >use the template layout. Instead you should create a custom layout for >that single dataset, in which the gradiometer positions -- which are >expressed relative to the head -- are used to interpolate the data to >create the topography. See ft_prepare_layout. If you don't specify a >cfg.layout in the topoplot function, it will create one from the >gradiometer positions that are present in the data data, which by >construct is a custom one. The triangle indicating the nose and the >schematic location of the ears are remain an accurate representation, >because the position of the sensors is expressed relative to those >(*), not the other way around. > >For example, on the page >http://fieldtrip.fcdonders.nl/tutorial/layout >there is one layout >http://fieldtrip.fcdonders.nl/_detail/tutorial/layout/easycap32ch-avg.png?id=tutorial%3Alayout >which was measured with a Polhemus tracker on a single subject. In >this subject, the EEG cap is positioned rather asymmetric, which you >can see by the position of the electrodes over the midline and towards >O1 and O2. > >Of course you can test the validity of the topoplot by doing two ERF >measurements of e.g. a simple sensory stimulus, one in which the >subject is sitting straight and one in which he rotates his/her head. >If you record the same ERF for the two locations, you can compare. >With the correct (custom) layouts the topoplots should look similar, >although the field strength can be different (because of the different >distances from brain to sensors in the two measurements). And you >should see in the topoplots (with the cfg.marker option) that the >channels are shifted relative to the head. > >best, >Robert > >*) this applies to most MEG systems, but cannot be guaranteed to >apply. Local procedures in your MEG lab may differ, so ask your local >MEG experts to be sure. > > > > > >On 24 Sep 2010, at 0:49, Jim Li wrote: > >> Dear all, >> >> I have a question about the topoplotER: >> >> I like the fact that the cartoon image of the nose and ears are >> drawn to >> help visualize the relative position of the sensor and the head. For >> data >> collection done in supine position, this works well when the >> subject's head >> position is centered in the sensor. But if the head is tilted to the >> left or >> right quite a bit (say a patient who can not cooperate), can I still >> count >> on such a plot to tell the relative position between patient head and >> sensor-level activity? My experience seems to tell me "no", but I >> just want >> to confirm... >> >> Thanks, >> >> Jim >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Gregor.Volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE Tue Sep 28 12:41:34 2010 From: Gregor.Volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE (Gregor Volberg) Date: Tue, 28 Sep 2010 12:41:34 +0200 Subject: coordinate mismatch in ASA headmodel and *.nii -files Message-ID: Dear fieldtrippers, thanks a lot for the helfulp comments on my former source analysis questions. This one is maybe not directly related to fieldtrip's source analysis functions: I use individual headmodels generated by ASA software (which reads and segments MRI images in Siemens DICOM format) for source reconstruction. The corresponding anatomical data is in an *nii-file, generated with the DICOM-import function if SPM5. Now, when I plot the individual functional data overlayed on the individual anatomical data, it seems that X and Y coordinates are exchanged, Y ist rotated by 90 or -90 degrees, and Z is shifted into positive direction for functional compared to structural data. I tried to normalize the volume data with ft_volumenormalise using the individual MRI as template file, but this warps both functional and anatomical data so that the mismatch between both is still there. Did some ASA-user have a similar problem - is there maybe a necessary transformation that I have overlooked? Thanks again in advance - Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nathanweisz at MAC.COM Tue Sep 28 13:17:53 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 28 Sep 2010 13:17:53 +0200 Subject: coordinate mismatch in ASA headmodel and *.nii -files In-Reply-To: <4CA1E27E020000570000754A@gwsmtp1.uni-regensburg.de> Message-ID: dear gregor, it seems like you left out some co-registration steps. if you have the ASA vol, the mri (*.mri; read_asa_mri.m) then you still need the co-registered electrode positions. can't you just export those from ASA too? otherwise ft_volumerealign, then apply transformation matrix to you electrode positions so that they are in the same coordinate system as your vol & mri? cheers & good luck, n On 28.09.2010, at 12:41, Gregor Volberg wrote: > Dear fieldtrippers, > > thanks a lot for the helfulp comments on my former source analysis questions. This one is maybe not directly related to fieldtrip's source analysis functions: > I use individual headmodels generated by ASA software (which reads and segments MRI images in Siemens DICOM format) for source reconstruction. The corresponding anatomical data is in an *nii-file, generated with the DICOM-import function if SPM5. Now, when I plot the individual functional data overlayed on the individual anatomical data, it seems that X and Y coordinates are exchanged, Y ist rotated by 90 or -90 degrees, and Z is shifted into positive direction for functional compared to structural data. I tried to normalize the volume data with ft_volumenormalise using the individual MRI as template file, but this warps both functional and anatomical data so that the mismatch between both is still there. > > Did some ASA-user have a similar problem - is there maybe a necessary transformation that I have overlooked? Thanks again in advance - > Gregor > > > > -- > Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sdmuthu at CARDIFF.AC.UK Wed Sep 29 09:05:51 2010 From: sdmuthu at CARDIFF.AC.UK (Suresh Muthukumaraswamy) Date: Wed, 29 Sep 2010 08:05:51 +0100 Subject: Coherence differences and factorial designs Message-ID: Hi FieldtripUsers, In a fixed effects context I have been obtaining coherence estimates. I have been reading Maris et al 2007 and the theory there describes how to test between two different conditions I would like to extend the theory in that paper (2.7.1) to k sample (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was wondering if anyone had attempted such a thing if it can be done, and in particular how one might go about constructing an apprppriate test statistic and surrogate distribution? Prior implementation in fieldtrip isnt needed its more the theory behind it I am asking about Thanks for your help, Dr Suresh Muthukumaraswamy Suresh Muthukumaraswamy, PhD CUBRIC Cardiff University Park Place Cardiff, CF10 3AT United Kingdom email: sdmuthu at cardiff.ac.uk Phone: +44 (0)29 2087 0354 http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumaraswamy-suresh-dr-overview_new.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.vandenbroeke at ANES.UMCN.NL Wed Sep 29 10:43:00 2010 From: e.vandenbroeke at ANES.UMCN.NL (Emanuel van den Broeke) Date: Wed, 29 Sep 2010 10:43:00 +0200 Subject: cluster-based analysis Message-ID: Dear Michael and others, I am thinking about an alternative cluster based statistic, but do not know if this is also valid. The alternative method goes as follows: 1. Calculate t-statistics of two conditions only on the observed data. 2. Determine cluster(s) based on a threshold (critical t-value). 3. Calculate the sum of the cluster(s). 4. Take the cluster with the highest absolute value (Sum-score) if more than 1 clusters are present. 5. Calculate the mean ERP activity, based on the highest cluster, in the individual trials. 6. Use a non-parametric (Wilcoxon, Mann-Withney U, dependent of the type of experiment) test statistic to test whether there is a difference (two sided) between the two group means for this highest cluster. Do you or anybody else think this is also a valid method for identifying and testing relevant ERP activity? Best, Emanuel ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Wed Sep 29 11:18:06 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 29 Sep 2010 11:18:06 +0200 Subject: Coherence differences and factorial designs In-Reply-To: <4CA2F35F020000AD0004E5A0@zgrw02.cf.ac.uk> Message-ID: Dear Suresh, > In a fixed effects context I have been obtaining coherence > estimates. I have been reading Maris et al 2007 and the theory there > describes how to test between two different conditions > I would like to extend the theory in that paper (2.7.1) to k sample > (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was > wondering if anyone had attempted such a thing if it can be done, and > in particular how one might go about constructing an apprppriate test > statistic and surrogate distribution? Prior implementation in fieldtrip > isnt needed its more the theory behind it I am asking about Statistical comparison of coherence estimates in k samples is discussed by Amjad et al (2007) in J. Neurosc. Methods. In the permutation framework there is no analogue of the factorial ANOVA (involving both main and interaction effects) for the simple reason that the interaction null hypothesis cannot be tested in the permutation framework. There is at least one thread in the Fieldtrip Discussion list that deals with this issue. However, it is possible to test multiple conditional null hypotheses (main effect of one factor separately for each of the levels of another factor) and this comes close to an interaction effect test. Good luck, Eric Maris > Thanks for your help, > Dr Suresh Muthukumaraswamy > > Suresh Muthukumaraswamy, PhD > CUBRIC > Cardiff University > Park Place > Cardiff, CF10 3AT > United Kingdom > email: sdmuthu at cardiff.ac.uk > Phone: +44 (0)29 2087 0354 > http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumarasw > amy-suresh-dr-overview_new.html > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Wed Sep 29 15:09:04 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 29 Sep 2010 15:09:04 +0200 Subject: Permutaion (of residuals) and factorial designs In-Reply-To: <016c01cb5fb7$3cb12f90$b6138eb0$@maris@donders.ru.nl> Message-ID: Dear Eric, dear fieldtrip users, this might sound like nitpicking but, we all routinely seem to analyse the interaction of a factorial design using permutation testing. The example is this: we have two experimental conditions (that we want to compare) and record task and baseline intervals in each. Clearly this is a 2x2 design (task/base and cond1/cond2 are the respective levels of the two factors). What we all do to deal with this is that we compute residuals - either by subtracting the baseline values or normalizing to them and then do a (restricted) permutation between the conditions on these task-base residuals. We are interested in the interaction between the task/base factor and the cond factor. Anything wrong here or anything particular about this case that saves us from the fundamental difficulties of interaction testing? Michael   -----Ursprüngliche Nachricht----- Von: "Eric Maris" Gesendet: Sep 29, 2010 11:18:06 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] Coherence differences and factorial designs >Dear Suresh, > > > >> In a fixed effects context I have been obtaining coherence >> estimates. I have been reading Maris et al 2007 and the theory there >> describes how to test between two different conditions >> I would like to extend the theory in that paper (2.7.1) to k sample >> (one factor eg 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was >> wondering if anyone had attempted such a thing if it can be done, and >> in particular how one might go about constructing an apprppriate test >> statistic and surrogate distribution? Prior implementation in fieldtrip >> isnt needed its more the theory behind it I am asking about > >Statistical comparison of coherence estimates in k samples is discussed by >Amjad et al (2007) in J. Neurosc. Methods. > >In the permutation framework there is no analogue of the factorial ANOVA >(involving both main and interaction effects) for the simple reason that the >interaction null hypothesis cannot be tested in the permutation framework. >There is at least one thread in the Fieldtrip Discussion list that deals >with this issue. However, it is possible to test multiple conditional null >hypotheses (main effect of one factor separately for each of the levels of >another factor) and this comes close to an interaction effect test. > > >Good luck, > >Eric Maris > > > > > > >> Thanks for your help, >> Dr Suresh Muthukumaraswamy >> >> Suresh Muthukumaraswamy, PhD >> CUBRIC >> Cardiff University >> Park Place >> Cardiff, CF10 3AT >> United Kingdom >> email: sdmuthu at cardiff.ac.uk >> Phone: +44 (0)29 2087 0354 >> http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumarasw >> amy-suresh-dr-overview_new.html >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Wed Sep 29 17:25:24 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 29 Sep 2010 17:25:24 +0200 Subject: Permutaion (of residuals) and factorial designs In-Reply-To: <469763189.596482.1285765744039.JavaMail.fmail@mwmweb053> Message-ID: Dear Michael, > this might sound like nitpicking but, we all routinely seem to analyse > the interaction of a factorial design using permutation testing. The > example is this: we have two experimental conditions (that we want to > compare) and record task and baseline intervals in each. Clearly this > is a 2x2 design (task/base and cond1/cond2 are the respective levels of > the two factors). What we all do to deal with this is that we compute > residuals - either by subtracting the baseline values or normalizing to > them and then do a (restricted) permutation between the conditions on > these task-base residuals. We are interested in the interaction between > the task/base factor and the cond factor. > > Anything wrong here or anything particular about this case that saves > us from the fundamental difficulties of interaction testing? This is a very sensible remark that forces me to be explicit about when interaction effect null hypotheses are problematic for permutation tests and when not. What you describe is a mixed between-within unit-of-observation (UO) design. The UOs are trials and there is one between-UO independent variable (the two task conditions) and within-UO independent variable (baseline-versus-activation). In this type of design, permutation tests can be used without problems to test the interaction between the independent variables. The way you do this is exactly as you have described: perform trial-wise subtraction/normalization to construct a new dependent variable that is subsequently compared between the two task conditions, as in a regular between-UO study. This approach does not work anymore in a two-factorial design in which both independent variables are manipulated between-UO. For example, this would be the case in a single subject study with the following independent variables: (1) attend left versus attend right (SIDE), and (2) attend visual versus attend auditory (MODALITY). It cannot be ruled out that there is an interest in the null hypothesis of no interaction between SIDE and MODALITY. (For this example, I find it hard to produce a convincing physiological story that produces this null hypothesis, but this does not have to be always the case.) I do not see how to test this null hypothesis using a permutation test that involves random permutation over the four cells in this two-factorial design. Best, Eric > > Michael > > > > -----Ursprüngliche Nachricht----- > Von: "Eric Maris" > Gesendet: Sep 29, 2010 11:18:06 AM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Coherence differences and factorial designs > > >Dear Suresh, > > > > > > > >> In a fixed effects context I have been obtaining coherence > >> estimates. I have been reading Maris et al 2007 and the theory there > >> describes how to test between two different conditions I would like > >> to extend the theory in that paper (2.7.1) to k sample (one factor > eg > >> 1 x 3 ANOVA) and two-way (e.,g. 2 x 2 designs). I was wondering if > >> anyone had attempted such a thing if it can be done, and in > >> particular how one might go about constructing an apprppriate test > >> statistic and surrogate distribution? Prior implementation in > >> fieldtrip isnt needed its more the theory behind it I am asking > about > > > >Statistical comparison of coherence estimates in k samples is > discussed > >by Amjad et al (2007) in J. Neurosc. Methods. > > > >In the permutation framework there is no analogue of the factorial > >ANOVA (involving both main and interaction effects) for the simple > >reason that the interaction null hypothesis cannot be tested in the > permutation framework. > >There is at least one thread in the Fieldtrip Discussion list that > >deals with this issue. However, it is possible to test multiple > >conditional null hypotheses (main effect of one factor separately for > >each of the levels of another factor) and this comes close to an > interaction effect test. > > > > > >Good luck, > > > >Eric Maris > > > > > > > > > > > > > >> Thanks for your help, > >> Dr Suresh Muthukumaraswamy > >> > >> Suresh Muthukumaraswamy, PhD > >> CUBRIC > >> Cardiff University > >> Park Place > >> Cardiff, CF10 3AT > >> United Kingdom > >> email: sdmuthu at cardiff.ac.uk > >> Phone: +44 (0)29 2087 0354 > >> > http://www.cf.ac.uk/psych/contactsandpeople/researchstaff/muthukumara > >> sw > >> amy-suresh-dr-overview_new.html > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of > >> the FieldTrip toolbox, to share experiences and to discuss new > ideas > >> for MEG and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sreenivasan.r.nadar at GMAIL.COM Wed Sep 29 17:38:18 2010 From: sreenivasan.r.nadar at GMAIL.COM (Dr. Sreenivasan Rajamoni Nadar, Ph.D.) Date: Wed, 29 Sep 2010 11:38:18 -0400 Subject: 3D Wireframe (.3fr) for BEM based source modeling Message-ID: Hello, Anybody has script to use 3D wireframe (generated from EMSE with .3fr extention) for BEM head model to be used in fieldtrip? Thanks, Vasan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: