From j.poort at NIN.KNAW.NL Wed May 2 16:21:38 2007 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Wed, 2 May 2007 16:21:38 +0200 Subject: sampling of data Message-ID: Hi all, I have some general questions about data sampling: 1 usually the sampling frequency is some nice round number, but I've got some data with a sampling frequency of 762.9395. Can non-integer sampling frequencies give problems in FieldTrip? Is it possible to downsample the data? 2 I have some data recorded with a sequential recording system: e.g. the 1st sample of chn 1 is recorded at 0.001, 1st smp of chn 2 at 0.002, 1st smp chn 3 at 0.003, then 2nd sample of chn 1 at 0.004 and so on; is it possibly to interpolate so that all channels have the same time axis? Thanks in advance, best, Jasper ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marcel.Bastiaansen at FCDONDERS.RU.NL Fri May 4 15:38:44 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Fri, 4 May 2007 15:38:44 +0200 Subject: what's the planar gradient unit? Message-ID: Hi, can anyone tell me what the unit is for planar gradients? Is that fT / square meter, or something else? Thanks, Marcel -- dr. Marcel C.M. Bastiaansen. Max Planck Institute for Psycholinguistics Visiting Adress: Wundtlaan 1, 6525 XD Nijmegen, the Netherlands Mailing adress: P.O. Box 310, 6500 AH Nijmegen, the Netherlands phone: +31 24 3521 347 fax: +31 24 3521 213 mail: marcel.bastiaansen at mpi.nl web: http://www.mpi.nl/Members/MarcelBastiaansen and FC Donders Centre for Cognitive Neuroimaging Visiting address: Kapittelweg 29, 6525 EN Nijmegen, the Netherlands Mailing address: PO Box 9101, 6500 HB Nijmegen, the Netherlands phone: + 31 24 3610 882 fax: + 31 24 3610 989 mail: marcel.bastiaansen at fcdonders.ru.nl web: http://www.ru.nl/aspx/get.aspx?xdl=/views/run/xdl/page&ItmIdt=20592&SitIdt=119&VarIdt=96 -- ---------------------------------- The aim of this list 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/ From litvak at TECHUNIX.TECHNION.AC.IL Fri May 4 20:24:35 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 4 May 2007 19:24:35 +0100 Subject: Two questions about topoplot Message-ID: Dear all, 1) What are the presently implemented options to visualize significant channels-time/channels-frequency clusters in topoplot? I looked in the help of topoplotTFR but haven't found anything. In the help of topoplot there is some obscure cfg.mask option, but it doesn't seem to do anything. 2) For MEG, if I put grad in the cfg for topoplotTFR rather than specifying the layout file, does it mean that the recorded subject's head position is taken into account while generating the layout? Thanks, Vladimir ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.stoegbauer at GMAIL.COM Mon May 7 08:55:35 2007 From: h.stoegbauer at GMAIL.COM (Harald Stoegbauer) Date: Sun, 6 May 2007 23:55:35 -0700 Subject: channel selection in timelockanalysis Message-ID: Dear fieldtripper, 'timelockanalysis' works fine when all subjects have exactly the same electrodes. When some subjects have 'bad channels' (missing) it doesn't work. Trying to narrow the channel selection with cfg.channel doesn't seem to work, too. (RAB_U_A is a cell which contains serveral subjects datasets) cfg =[]; cfg.keepindividual = 'no' cfg.channel={'E101'}; RUA = timelockgrandaverage(cfg, RAB_U_A{:}); ??? Index exceeds matrix dimensions. Error in ==> timelockgrandaverage at 125 avgmat(s, :, :) = varargin{s}.avg(:, ResultsTimeSelectCases); Thanks, Harald ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon May 7 11:25:21 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 7 May 2007 11:25:21 +0200 Subject: channel selection in timelockanalysis In-Reply-To: <5bbfdea0705062355m2afd5e4cm8e51b84435354d55@mail.gmail.com> Message-ID: Dear Harald, It is not fully clear what you are trying to do. I think you mean timelockGRANDAVERAGE doesn't work when the subjects have different channels? (First you speak of timelockANALYSIS, but I assume that's a typo?) I looked into the code and there is an area that deals with the problem when not all subjects have the same channels (edit timelockgrandaverage: it says DETERMINE WHICH CHANNELS ARE AVAILABLE FOR ALL SUBJECTS). So I think that the problem doesn't lie in the fact that your subjects do not have the same channels. That also explains why you still get an error when you only use the 'E101' channel. You could try to find out with the debugger which matrix it is that exceeds its dimension; it seems that it might have to do with time ResultsTimeSelectCases Hop this help you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Harald Stoegbauer Sent: Monday, May 07, 2007 8:56 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] channel selection in timelockanalysis Dear fieldtripper, 'timelockanalysis' works fine when all subjects have exactly the same electrodes. When some subjects have 'bad channels' (missing) it doesn't work. Trying to narrow the channel selection with cfg.channel doesn't seem to work, too. (RAB_U_A is a cell which contains serveral subjects datasets) cfg =[]; cfg.keepindividual = 'no' cfg.channel={'E101'} ; RUA = timelockgrandaverage(cfg, RAB_U_A{:}); ??? Index exceeds matrix dimensions. Error in ==> timelockgrandaverage at 125 avgmat(s, :, :) = varargin{s}.avg(:, ResultsTimeSelectCases); Thanks, Harald ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon May 7 11:38:21 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 7 May 2007 11:38:21 +0200 Subject: dics method for coherence analysis In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B01C9A415@NIHCESMLBX8.nih.gov> Message-ID: Dear Feng, You can save yourself some time by running sourceanalysis twice. The first time you should specify cfg.keepfilter = 'yes' (and keep cfg.randomization = 'no'). This will yield a source-structure containing a field called 'filter'. These filters are computed using the cross-spectral density averaged across all replications. Subsequently you should plug these filters into the dipole grid by specifying cfg.grid.filter = source.filter (could also be source.avg.filter, I'm not sure, but it's easily checked by running the previous step). Then you should additionally specify cfg.rawtrial = 'yes'. If I'm not mistaken, when you then run sourceanalysis, this yields a source-structure containing a field called 'trial', which contains for each replication the source-reconstructed data, so it has dimensionality 1x the number of trials. Each trial itself will be a structure containing the fields csd (which in your case will contain the cross spectral density between the dipole at that particular location, and the reference), and the field pow, which contains the power at that location (not the reference). In subsequent analysis steps you can test whether coherence is different across conditions. This can be done parametrically, or non-parametrically. Either way, I'd advise you to collaps your data across the two conditions prior to computing your filters (so prior to calling sourceanalysis for the first time). This yields so-called 'common filters', which as I said before typically yield more robust results. The most convenient point to achieve this, is already concatenating the data of your two conditions prior to frequency analysis (so it should be done after preprocessing), by calling appenddata: dataall = appenddata([], data1, data2). You could then proceed to compute the filters, using the concatenated data. Afterwards, you could call sourceanalysis twice using the frequency-data for each of the conditions separately, yielding source structures for each of the conditions. These can then be used as an input to sourcedescriptives (should also be called twice). This will yield two source structures containing an estimate of the coherence, and an estimate of the sem of the coherence. This can then be tested parametrically with a t-test using sourcestatistics. (It would be more correct if you correct for the bias in the coherence estimate by applying some normalizing transform to the coherence, see Bokil et al. J. Neurosci Methods 159(2): 337-345.) You could also test non-parametrically. For this, I'd advise you to first have a thorough look at the statistics-tutorial on the fieldtrip-website. Moreover, you could consult Maris et al. J. Neurosci Methods 163(1): 161-175 for a way of testing coherence differences non-parametrically. However, doing this on the source-level is not yet supported by fieldtrip in a standard way. Hope this already points you in the good direction. Yours, Jan-Mathijs _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rong, Feng (NIH/NIDCD) [V] Sent: Monday, April 30, 2007 6:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] dics method for coherence analysis Jan-Mathijs, Thanks for the comprehensive feedback. It is really helpful. I have downloaded the new version and will try. As you have predicted, this procedure is time-consuming. May I know what can I do to revise the script so that I can save some time? Best, Feng _______________________________________________ The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.mazaheri at FCDONDERS.RU.NL Mon May 7 13:40:56 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Mon, 7 May 2007 13:40:56 +0200 Subject: read_fcdc_mri Message-ID: Hello, I am coming across this error when I use the read_fcdc_mri {Undefined function or variable "orientation" mri=ipermute(mri,orientation) This happens only for some of my MRI files... and not others.. which makes me think that there is a step somewhere I am missing when making my MRI files ( I use the instruction provided) any suggestions/remedies would be greatly appreciated. Ali ---------------------------------- The aim of this list 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/ From Jan.Schoffelen at FCDONDERS.RU.NL Mon May 7 13:48:36 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 7 May 2007 13:48:36 +0200 Subject: read_fcdc_mri In-Reply-To: <463F1048.5070700@fcdonders.ru.nl> Message-ID: Dear Ali, Could you be a bit more specific? The in-house version of fieldtrip's read_fcdc_mri doesn't contain the line you specify in your message. Could it be you are using an old version? Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ali Mazaheri Sent: Monday, May 07, 2007 1:41 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] read_fcdc_mri Hello, I am coming across this error when I use the read_fcdc_mri {Undefined function or variable "orientation" mri=ipermute(mri,orientation) This happens only for some of my MRI files... and not others.. which makes me think that there is a step somewhere I am missing when making my MRI files ( I use the instruction provided) any suggestions/remedies would be greatly appreciated. Ali ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ From r.oostenveld at FCDONDERS.RU.NL Mon May 7 13:56:40 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 13:56:40 +0200 Subject: read_fcdc_mri In-Reply-To: <463F1048.5070700@fcdonders.ru.nl> Message-ID: Hi Ali On 7 May 2007, at 13:40, Ali Mazaheri wrote: > I am coming across this error when I use the read_fcdc_mri > > {Undefined function or variable "orientation" > mri=ipermute(mri,orientation) > > This happens only for some of my MRI files... and not others.. > which makes me think that there is a step > somewhere I am missing when making my MRI files ( I use the > instruction provided) > > any suggestions/remedies would be greatly appreciated. Searching for the code that relates to your error message, I only see fcdc-roboos> grep ipermute *.m read_asa_mri.m:mri = ipermute(mri, orientation); read_asa_mri.m:seg = ipermute(seg, orientation); So it seems that you are trying to read ASA format *.mri files, which I know that you are not doing. The file format detection (fieldtrip/private/filetype.m) automatically determines the format, and read_fcdc_mri then uses the corresponding low-level function (in this case for ASA). The likely cause is that you are using a file with extension *.mri which is not being recognized as CTF MRI file. That can be the case if the binary file does not start with the string 'CTF_MRI_FORMAT VER 2.2'. Please open the mri file in a robust text editor or type "strings " on the linux prompt and see whether that is the case. The new version of MRIConverter/MRIViewer can write files in a new CTF format (probably what you have) and in the old v2.2 format (which the code seems to support). I don't know the difference between the formats. You might try read_ctf_mri on the file directly. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ From ali.mazaheri at FCDONDERS.RU.NL Mon May 7 14:06:38 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Mon, 7 May 2007 14:06:38 +0200 Subject: read_fcdc_mri In-Reply-To: <1AC9527E-8414-44DF-9D53-6C32F27BC59F@fcdonders.ru.nl> Message-ID: Thanks Robert, I think you are correct.... it appears the problem is the new versions of MRIViewer, If you save it as the default .MRI file it can't be read into fieldtrip. However, when I convert it to CTF v2 it works perfectly. All the files that didn't open were actually made quite recently..so this further explains things. so.... problem solved. Thanks a bunch ! ali Robert Oostenveld wrote: > Hi Ali > > On 7 May 2007, at 13:40, Ali Mazaheri wrote: >> I am coming across this error when I use the read_fcdc_mri >> >> {Undefined function or variable "orientation" >> mri=ipermute(mri,orientation) >> >> This happens only for some of my MRI files... and not others.. which >> makes me think that there is a step >> somewhere I am missing when making my MRI files ( I use the >> instruction provided) >> >> any suggestions/remedies would be greatly appreciated. > > Searching for the code that relates to your error message, I only see > fcdc-roboos> grep ipermute *.m > read_asa_mri.m:mri = ipermute(mri, orientation); > read_asa_mri.m:seg = ipermute(seg, orientation); > > So it seems that you are trying to read ASA format *.mri files, which > I know that you are not doing. > > The file format detection (fieldtrip/private/filetype.m) automatically > determines the format, and read_fcdc_mri then uses the corresponding > low-level function (in this case for ASA). The likely cause is that > you are using a file with extension *.mri which is not being > recognized as CTF MRI file. That can be the case if the binary file > does not start with the string 'CTF_MRI_FORMAT VER 2.2'. Please open > the mri file in a robust text editor or type "strings " on > the linux prompt and see whether that is the case. > > The new version of MRIConverter/MRIViewer can write files in a new CTF > format (probably what you have) and in the old v2.2 format (which the > code seems to support). I don't know the difference between the > formats. You might try read_ctf_mri on the file directly. > > Robert > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:12:56 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:12:56 +0200 Subject: SPM2 related error message when doing volumesegment In-Reply-To: Message-ID: On 17 Apr 2007, at 18:14, Y Chen wrote: > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.template = 'D:\mat\toolbox\spm2\templates\T1.mnc'; > ... > > ??? Error using ==> spm_vol>subfunc1 > Can't get volume information > for '/home/common/matlab/spm2/templates/T1.mnc' that is weird, since cfg.template is used as the filename to read. Please have a look at the code on volumesegment at line 235 where the error occurs. You can use the matlab debugger there (or type "dbsop if error" and repeat the error). Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:21:01 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:21:01 +0200 Subject: definetrial In-Reply-To: Message-ID: On 26 Apr 2007, at 14:08, Diederick Stoffers wrote: > The CTF dataset has been modified and now contains 160 trials with > a length > of 3.2 seconds and two markers (stimulus onset and trialtype) at 1 > second > into the trial as well as a marker for artefacts. > > Could anyone please advice what to include in mytrialfun.m ? Is it > only > possible to use triggers (in that case I will have to convert > markers to > triggers) or can I also use the information in MarkerFile.mrk? I have > attached a trialfun.m file which holds some of the information. Hi Diederick, There was no attachement to your mail. Please do event = read_fcdc_event(datasetdir) and then for i=1:length(event) disp(event(i)); end What you will see is a long list of events, both with type=trial and type=trigger. So not only the triggers but also the trials are listed as events. You can combine them: i.e. for each trial-event look into the corresponding trigger event and determine based on the trigger value whether to include the trial. Also marker events (which are stored in the CTF directory in a seperate file) thaht contain artifacts will be listed as events. An example trialfun is on http://www2.ru.nl/fcdonders/fieldtrip/ doku.php? id=fieldtrip:documentation:making_your_own_trialfun_for_conditional_tria l_definition Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:33:16 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:33:16 +0200 Subject: using prepare_layout and gradfile to generate mags and planar layout In-Reply-To: Message-ID: Hi Sameer On 19 Apr 2007, at 23:22, Sameer Walawalkar wrote: > Usually this meant lay.labels did not have MEG in them. In the > past, I have taken care of these errors by making changes to > Topoplot and multiplot and adding the MEG to the labels. Why don't you make a couple of layout files yourself with the selection of channels that you are interested in for plotting? With the matlab editor and some search-and-replace it is easy to change the channel labels to either include the "MEG " part or not (takes care of your deviant channel names). Knowing that they are systematically ordered, it is also easy to remove every second and third line in the file (takes care of the subset selection of planar or magnetometer channels). Editing these files in a text editor will only take you 5-10 minutes or so. > But with each version of changes being made, it becomes tougher and > tougher to keep up with this. That is why it is helpfull to use your own layout files instead of changing the code, since they do not change (assuming that you name them differently and keep them in a place where they are not overwritten by FT upgrades). > Incidently, my most currently download (april 18) is giving this > weird error for mags.lay : > > cfg.layout = NM306mags.lay; > reading layout from file NM306all.lay > ??? Trouble reading floating point number from file (row 1, field > 1) ==> MATLAB 5.0 MAT-file, Platform: You are not using Matlab 5.0 are you? It seems to be a matlab error, or your layout file not detected as being an ascii file. Since I do not know what is your file "NM306mags.lay", it might also be that your file is corrupt. Fieldtrip does include a file with the name NM306mag.lay, without the 's'. You can try that one. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Brian.Roach at YALE.EDU Mon May 7 15:04:55 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 7 May 2007 09:04:55 -0400 Subject: Fwd: [FIELDTRIP] source analysis example images Message-ID: > >fieldTrip users, > >I've run a source analysis using the DICS method and EEG data. Here is >the code the leads me to the attached sourceplot results: > >cfg.output = 'powandcsd'; >cfg.method = 'mtmfft'; >cfg.tapsmofrq = 2; >cfg.foilim = [80 81]; >freq = freqanalysis(cfg, data); >cfg.method = 'dics'; >cfg.frequency = 80; >cfg.hdmfile = '/home/bjr39/FTsource/vol.mat'; >cfg.resolution = 2; >cfg.projectnoise= 'yes'; >tic;source = sourceanalysis(cfg, freq);toc >cfg.mriunits = 'mm'; >cfg.sourceunits = 'mm'; >cfg.funparameter = 'nai'; >sourceD = sourcedescriptives([], source); >mriFile = '/home/bjr39/FTsource/t1_icbm_normal_1mm_pn0_rf0.mnc'; >tic; sourceF = source2full(sourceD); toc >tic; sourceInterp = sourceinterpolate(cfg, sourceF, mriFile); toc >sourceplot(cfg, sourceInterp) > >I am wondering if this type of result seems reasonable (if it looks as >though I have not made any huge mistakes)? If so, I would run another >condition for the same subject and try to use the statistics functions. > >Also, what does this color scale describe? What are its units? > >thanks, >Brian > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: naiOutput2.png Type: application/octet-stream Size: 98772 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: naiOutput.png Type: application/octet-stream Size: 106585 bytes Desc: not available URL: -------------- next part -------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 21:42:47 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 21:42:47 +0200 Subject: Fwd: [FIELDTRIP] source analysis example images In-Reply-To: <6.1.2.0.2.20070507090423.042c04f0@email.med.yale.edu> Message-ID: Hi Brian On 7 May 2007, at 15:04, Brian Roach wrote: >> I am wondering if this type of result seems reasonable (if it >> looks as though I have not made any huge mistakes)? If so, I >> would run another condition for the same subject and try to use >> the statistics functions. >> >> Also, what does this color scale describe? What are its units? The ratio between projected power and projected noise, where the noise estimate is based on the smallest singular value of the cross- spectral density matrix. See van Veen 1997. It is dimensionless. Note that the magnitude strongly depends on the noise estimate. But given that you are able to estimate NAI with EEG without specifying cfg.lambda makes me suspicious: The following code from "private/beamformer_dics.m" (around line 164) should apply if projectnoise % estimate the noise power, which is further assumed to be equal and uncorrelated over channels if isrankdeficient % estimated noise floor is equal to or higher than lambda noise = lambda; else % estimate the noise level in the covariance matrix by the smallest singular value noise = svd(Cf); noise = noise(end); % estimated noise floor is equal to or higher than lambda noise = max(noise, lambda); end end You did not specify lambda, hence the mallest singular value of the cross-spectral density matrix will be used (second part of the code). But in case of averaged referenced EEG, that should be zero. Hence the noise estimate is zero, resulting in NAI = source power divided by zero, which should be infinite. You should ensure that your EEG data is average referenced over teh channels on which you want to base your source reconstruction prior to computing freqanalysis and sourceanalysis. If the EEG data is average reference and you specify cfg.lambda=0 in sourceanalysis, you should see a warning about the cross-spectral density matrix being rank deficient and your nai should be infinite. Hence you have to specify a manual estimate of the noise floor (in cfg.lambda). Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:04:51 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:04:51 +0200 Subject: another help request for *.tfc files In-Reply-To: Message-ID: Hi Andrew, On 19 Apr 2007, at 0:28, Andrew Smart wrote: > In prepare_timefreq_data I changed: > > output.label = input.label; > > to > > output.label = input.labelcmb; > > To accomodate the labelcmb field in the fieldtrip structure. This > gets me by > the errors about the field 'label' not existing. The input data selection in freqanalysis depends on prepare_timefreq_data, but then that subfunction is not smart enough to work with bivariate measures (i.e. coherence depends on channel pairs and is bivariate, whereas power is univariate). I suggest that you change the code in freqstatistics by the code below. That renames both cohspctrm and labelcmb into something that the remainder of the code should be able to support. subsequently the low-level code should behave as if it is univariate data. Please let me know if it works. best regards, Robert ---- function [stat] = freqstatistics(cfg, varargin) % here is the help % the low-level data selection function does not know how to deal with other parameters, so work around it if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') % use the power spectrum, this is the default elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') % use the cross spectrum, this might work as well (but has not been tested) elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') % for testing coherence on group level: % rename cohspctrm->powspctrm and labelcmb->label for i=1:length(varargin) dat = varargin{i}.cohspctrm; labcmb = varargin{i}.labelcmb; for j=1:size(labcmb) lab{j,1} = sprintf('%s - %s', labcmb{j,1}, labcmb{j,2}); end varargin{i} = rmsubfield(varargin{i}, 'cohspctrm'); varargin{i} = rmsubfield(varargin{i}, 'labelcmb'); varargin{i} = setsubfield(varargin{i}, 'powspctrm', dat); varargin{i} = setsubfield(varargin{i}, 'label', lab); end else % rename the desired parameter to powspctrm fprintf('renaming parameter ''%s'' into ''powspctrm''\n', cfg.parameter); for i=1:length(varargin) dat = getsubfield(varargin{i}, cfg.parameter); varargin{i} = rmsubfield (varargin{i}, cfg.parameter); varargin{i} = setsubfield(varargin{i}, 'powspctrm', dat); end end % call the general function [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:12:09 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:12:09 +0200 Subject: source coherence in one condition In-Reply-To: Message-ID: On 26 Apr 2007, at 0:35, Andrew Smart wrote: > I would like to try to compute whether there is significant > coherence across > subjects but within one condition and between two dipoles. This code > generates graphs but I am unclear about what they mean: Hi Andrew, It is unclear to me what the comparison is in the statistical test that you want to perform. There should be a hypothesis like "coherence is larger in XXX than YYY", which rephrased would be H0: the coherence is the same. Based on the H0, the probablility can be computed and H0 can (perhaps) be rejected. You cannot say that "coherence is significant" just like that. If the hypotheis is that coherence between one dipole pair is larger than between the other dipole pair, then I am affraid that you cannot test that using a permutation approach. With a permutation or randomizarion test you test the hypothesis that the data in two observed conditions is exchangeable. Simple differences in power in one of the 4 sources underlying the two dipole pairs would already be enough to reject the null-hypothesis that the data is exchangeable, but those power differences do not have to mean that there is a coherence difference. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:17:11 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:17:11 +0200 Subject: loreta2fieldtrip output In-Reply-To: Message-ID: Hi Christian On 24 Apr 2007, at 14:22, Christian Rosenau wrote: > this is the struct which is created by loreta2fieldtrip > > dim: [37 44 36] > xgrid: [1x29 double] > ygrid: [1x34 double] > zgrid: [1x24 double] > and this is the error message > ??? Error using ==> fieldtrip-20070402\private\grid2transform > dimensions do not correspond > There is a problem with your data as outputted by loreta2fieldtrip. The data specifies that the dimension is 37x44x36, but at the same time the volume coordinate axes (xgrid, ygrid, zgrid) are specified as 29x34x24. That does not correspond. Please try to debug the code in loreta2fieldtrip, since there the format (and dimensions) of the Loreta files is hardcoded. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From andrew.smart at NYU.EDU Tue May 8 03:36:01 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Mon, 7 May 2007 20:36:01 -0500 Subject: source coherence in one condition In-Reply-To: Message-ID: Hi Robert, Thank you very much for the code and the answers. It helps to clarify things alot. My understanding of coherence was that if the phase difference between two signals is confined to within 2pi over some time interval, they are phase locked, ie the temporal variations in the signals tend to follow each other. But that this is regardless of their differences in amplitudes. When amplitude also covaries then there is 'true' coherence. I thought that you could test for signifant coherence between two signals. For example in BESA you can do permutation tests on individual subjects for 'significant' coherence between a reference dipole and the rest of the dipoles in a model in one condition. I might be misunderstanding something though becuase I was wondering if one could do this on a group level by importing the coherence data from BESA into fieldtrip. I suppose this would be coherence relative to some baseline, but I am not sure if that makes any sense. I don't know exactly how BESA calculates coherence. So I guess H0 would be that there is no coherence between two dipoles that is not due to chance in a particular condition - is that a possible null hypothesis for coherence? Thank you again for all your help! andy ----- Original Message ----- From: Robert Oostenveld Date: Monday, May 7, 2007 3:12 pm Subject: Re: [FIELDTRIP] source coherence in one condition To: FIELDTRIP at NIC.SURFNET.NL > On 26 Apr 2007, at 0:35, Andrew Smart wrote: > > > I would like to try to compute whether there is significant > > coherence across > > subjects but within one condition and between two dipoles. This code > > generates graphs but I am unclear about what they mean: > > Hi Andrew, > > It is unclear to me what the comparison is in the statistical test > that you want to perform. There should be a hypothesis like > "coherence is larger in XXX than YYY", which rephrased would be H0: > > the coherence is the same. Based on the H0, the probablility can be > > computed and H0 can (perhaps) be rejected. You cannot say that > "coherence is significant" just like that. > > If the hypotheis is that coherence between one dipole pair is larger > > than between the other dipole pair, then I am affraid that you cannot > > test that using a permutation approach. With a permutation or > randomizarion test you test the hypothesis that the data in two > observed conditions is exchangeable. Simple differences in power in > > one of the 4 sources underlying the two dipole pairs would already be > > enough to reject the null-hypothesis that the data is exchangeable, > > but those power differences do not have to mean that there is a > coherence difference. > > Robert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue May 8 13:30:28 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 8 May 2007 13:30:28 +0200 Subject: source coherence in one condition In-Reply-To: Message-ID: Dear Andrew, > Thank you very much for the code and the answers. It helps to clarify things alot. > My understanding of coherence was that if the phase difference between two signals > is confined to within 2pi over some time interval, they are phase locked, ie the > temporal variations in the signals tend to follow each other. But that this is > regardless of their differences in amplitudes. When amplitude also covaries then > there is 'true' coherence. I thought that you could test for signifant coherence > between two signals. I would forget about the influence of amplitude covariation on coherence (on top of phase consistency). This is a side-issue for the problem that you are addressing (testing for significant coherence in a single condition). > > For example in BESA you can do permutation tests on individual subjects for > 'significant' coherence between a reference dipole and the rest of the dipoles in a > model in one condition. I might be misunderstanding something though becuase I > was wondering if one could do this on a group level by importing the coherence data > from BESA into fieldtrip. I suppose this would be coherence relative to some > baseline, but I am not sure if that makes any sense. I don't know exactly how BESA > calculates coherence. > > So I guess H0 would be that there is no coherence between two dipoles that is not > due to chance in a particular condition - is that a possible null hypothesis for > coherence? In my opinion, it does not make sense to test the null hypothesis that coherence between two EEG/MEG-channels is equal to zero. The reason for this is biophysical: due to volume conduction, the activity produced by a given source will be picked up by all EEG/MEG-channels, and therefore it does not make sense to test the null hypothesis that coherence is zero. Testing coherence relative to baseline certainly makes sense, and is possible in Fieldtrip, although it is not documented very well. (I remember a work-around posted by Jan-Mathijs Schoffelen for testing coherence differences in within-subjects designs.) However, you should keep in mind that significant coherence-differences can also be produced by differences in power. This is because coherence not only measures the phase consistency between the signals at the source level but also the signal-to-noise ratio (SNR) at the different sensors: For a fixed source-level phase consistency, the larger the SNR, the larger the coherence. Greetings, dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thank you again for all your help! > > andy > > ----- Original Message ----- > From: Robert Oostenveld > Date: Monday, May 7, 2007 3:12 pm > Subject: Re: [FIELDTRIP] source coherence in one condition > To: FIELDTRIP at NIC.SURFNET.NL > > > > On 26 Apr 2007, at 0:35, Andrew Smart wrote: > > > > > I would like to try to compute whether there is significant > > > coherence across > > > subjects but within one condition and between two dipoles. This code > > > generates graphs but I am unclear about what they mean: > > > > Hi Andrew, > > > > It is unclear to me what the comparison is in the statistical test > > that you want to perform. There should be a hypothesis like > > "coherence is larger in XXX than YYY", which rephrased would be H0: > > > > the coherence is the same. Based on the H0, the probablility can be > > > > computed and H0 can (perhaps) be rejected. You cannot say that > > "coherence is significant" just like that. > > > > If the hypotheis is that coherence between one dipole pair is larger > > > > than between the other dipole pair, then I am affraid that you cannot > > > > test that using a permutation approach. With a permutation or > > randomizarion test you test the hypothesis that the data in two > > observed conditions is exchangeable. Simple differences in power in > > > > one of the 4 sources underlying the two dipole pairs would already be > > > > enough to reject the null-hypothesis that the data is exchangeable, > > > > but those power differences do not have to mean that there is a > > coherence difference. > > > > Robert > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > > the FieldTrip toolbox, to share experiences and to discuss new ideas > > for MEG and EEG analysis. See also http://www.ru.nl/fcdonders/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:05:20 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:05:20 -0400 Subject: appenddata Message-ID: Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:39:38 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:39:38 -0400 Subject: appenddata: correction to question appenddata Message-ID: Sorry, for the error in the earlier email, dataset and headerfile are also different (same subject). trialdef and datatype are the same. so to restate the question, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where cfg.dataset, cfg.headerfile, and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are the same, will data = appenddata(cfg1,data1,data2,data3) work correctly? sameer ---------- Forwarded message ---------- Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) From: Sameer Walawalkar To: FIELDTRIP at NIC.SURFNET.NL Subject: appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue May 8 18:44:37 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 8 May 2007 18:44:37 +0200 Subject: appenddata In-Reply-To: Message-ID: Hello Sameer, Yes it will work correctly. The only thing the function does with the .trl is concatenate that too. line 172 in newest version: % also concatenate the trial specification cfg.trl = cat(1, trl{:}); It doesn't care about dataset, headerfile, datatype and trialdef as long as you have the same channels in all datasets it works. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, May 08, 2007 6:05 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue May 8 18:48:38 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 8 May 2007 18:48:38 +0200 Subject: appenddata: correction to question appenddata In-Reply-To: Message-ID: It doesn't matter if it are different datasets/headerfiles you can just concatenate. But keep in mind that if the different datasets are measured in different sessions, and the electrodes (when EEG) or sensors/headposition (when MEG) is different in the two datasets, the same channel in the concatenated dataset can measure a different brain area. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, May 08, 2007 6:40 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] appenddata: correction to question appenddata Sorry, for the error in the earlier email, dataset and headerfile are also different (same subject). trialdef and datatype are the same. so to restate the question, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where cfg.dataset, cfg.headerfile, and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are the same, will data = appenddata(cfg1,data1,data2,data3) work correctly? sameer ---------- Forwarded message ---------- Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) From: Sameer Walawalkar To: FIELDTRIP at NIC.SURFNET.NL Subject: appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:55:55 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:55:55 -0400 Subject: appenddata: correction to question appenddata In-Reply-To: <00fa01c79190$ba1ab8a0$642dae83@fcdonders.nl> Message-ID: thanks a lot Ingrid. I am aware of that, and I think I can do it because Neuromag has a software (MaxMove) which will take care of exactly such changes. I restrict myself to appending data from trials for only one subject within one session and ensure that MaxMove is applied to the dataset before I extract data. sameer On Tue, 8 May 2007, Ingrid Nieuwenhuis wrote: > It doesn't matter if it are different datasets/headerfiles you can just > concatenate. But keep in mind that if the different datasets are measured in > different sessions, and the electrodes (when EEG) or sensors/headposition > (when MEG) is different in the two datasets, the same channel in the > concatenated dataset can measure a different brain area. > > Bests Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, May 08, 2007 6:40 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] appenddata: correction to question appenddata > > Sorry, for the error in the earlier email, dataset and headerfile are also > different (same subject). trialdef and datatype are the same. > > so to restate the question, > > The usage for appenddata is > data = appenddata(cfg,data1,data2,data3) > > I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, > cfg3, corresponding to data1, data2, data3, where cfg.dataset, > cfg.headerfile, > and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are > > the same, will > data = appenddata(cfg1,data1,data2,data3) work correctly? > > sameer > > ---------- Forwarded message ---------- > Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) > From: Sameer Walawalkar > To: FIELDTRIP at NIC.SURFNET.NL > Subject: appenddata > > > Hello, > > The usage for appenddata is > data = appenddata(cfg,data1,data2,data3) > > I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, > cfg3, corresponding to data1, data2, data3, where dataset, headerfile, > datatype and trialdef are the same and the only difference is ofcourse in > the > .trl field, will > data = appenddata(cfg1,data1,data2,data3) work correctly? > > Thanks for your reply, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 8 21:14:02 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 May 2007 21:14:02 +0200 Subject: appenddata In-Reply-To: Message-ID: Hi Sameer, On 8 May 2007, at 18:05, Sameer Walawalkar wrote: > I can see that appenddata does look for cfg.trl etc. If I have > cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where > dataset, headerfile, datatype and trialdef are the same and the > only difference is ofcourse in the .trl field, will > data = appenddata(cfg1,data1,data2,data3) work correctly? The reason for concatenating the cfg.trl in the different datasets is for keeping reference to the sections of data. The trl matrix and the event structure (read_fcdc_event) can be used afterwards to reconstruct the events on which the data was selected, even after partial and complete artifact removal. In your case, where the data comes from different datafiles, the concatenated dataset does not relate any more to either one of the files and as such the concatenated trl is not usefull any more. Note that this is only implemented to support rather exotic applications, so probably you don't have to worry too much about the concatenating of cfg.trl. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 8 21:24:06 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 May 2007 21:24:06 +0200 Subject: Fwd: [Fieldtrip] createlayout Message-ID: Begin forwarded message: > From: Nicolas Robitaille > Date: 8 May 2007 17:34:46 GMT+02:00 > > In the script "Use independent component analysis (ICA) to remove > ECG artifacts", there is mention of the function createlayout > > % look at the spatial topography of the components > % note that this requires that the fieldtrip/private function > "createlayout" to be available on your path > lay = createlayout('CTF151.lay'); > figure; > subplot(2,3,1);topoplot([], lay.prj(1:151,1), lay.prj(1:151,2), > comp.topo(:,1));title(num2str(1)); > subplot( ....... > > However, I can't find this function in fieldtrip/private. The > function prepare_layout.m did not create a lay.prj field. So, can I > plot topographic map of components without createlayout? Or where > can I find it? Hi Nicolas The example script refers to functions that have been updated considerably and renamed in the meantime: you should indeed use prepare_layout function. The output contains a lay.pos = [X Y]; lay.width = Width; lay.height = Height; lay.label = Lbl; You should use lay.pos instead of lay.prj. I have updated the wiki page with the example script. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tillmann at MPIH-FRANKFURT.MPG.DE Thu May 10 11:49:27 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Thu, 10 May 2007 11:49:27 +0200 Subject: clustering parameters Message-ID: Hi all, I'm wondering which parameters I should use for determining the way the clusters are formed in the freqstatistics; in the tutorials, I only found 'cfg.minnbchan' to specify the minimum number of neighborhood channels for a cluster, but in an older example script I also found 'cfg.neighbourdist' to determine the min. distance between neighborhood channels... and if 'cfg.neighbourdist' is used, is the value specified in mm or cm? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu May 10 12:37:32 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 10 May 2007 12:37:32 +0200 Subject: clustering parameters In-Reply-To: <07051011492728_2800013E@mpih-frankfurt.mpg.de> Message-ID: Christine, > I'm wondering which parameters I should use for determining the way the > clusters are formed in the freqstatistics; > > in the tutorials, I only found 'cfg.minnbchan' to specify the minimum > number of neighborhood channels for a cluster, but in an older example > script I also found 'cfg.neighbourdist' to determine the min. distance > between neighborhood channels... The two fields have very different functionalities. 1. The field cfg.neighbourdist is used to determine which channel pairs are neighbouring channels. See neighbourselection.m. 2. The field cfg.minnbchan is used to determine whether a (channel,frequency,time)-triplet (or (channel,time)-pair, or channel-singleton) that exceeds the threshold should be included in the clustering algorithm or not. Tip: start with the default value (cfg.minnbchan=0) and watch what happens if you change its value. Don't worry too much, cfg.minnbchan is a tuning parameter for which there is no theoretical rationale (contrary to the permutation test itself, which has a beautiful theoretical rationale). That's why I get so many questions about it... I have seriously considered removing it from the Fieldtrip code, but it still in, so you can play with it... > and if 'cfg.neighbourdist' is used, is the value specified in mm or cm? You should specify it in the scale as the coordinates of your channel configuration. Remember that you must run neighbourselection.m to construct your neighbourhood structure. Greetings, dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/> > Thanks, > Christine > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From muthuraman10 at HOTMAIL.COM Tue May 15 11:37:08 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 15 May 2007 09:37:08 +0000 Subject: Dynamical Coherence! Message-ID: Hello Fieldtrippers, Is there a way in the TopoplotTFR function to specify the time interval for plotting the coherence, inroder to get the dynamical coherence at specified time intervals between EEG and EMG channels. The Cfg.xlim when specified only acts as a labelling in the plot. Thanking you With regards M.Muthuraman. _________________________________________________________________ Voice your questions and our experts will answer them http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From nicola.ray at DPAG.OX.AC.UK Wed May 16 19:04:56 2007 From: nicola.ray at DPAG.OX.AC.UK (Niki Ray) Date: Wed, 16 May 2007 19:04:56 +0200 Subject: custom define trial to remove BAD data Message-ID: Hi, I would like to remove data which i have marked as BAD using CTF software, before using preprocessing. Is there anywhere I can find an example mytrialfun script that would do this? I'm a beginner matlab programmer, so can't seem to work it out for myself!! Many thanks Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From enteka at HOTMAIL.COM Wed May 16 19:18:42 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Wed, 16 May 2007 17:18:42 +0000 Subject: custom define trial to remove BAD data Message-ID: Hello Niki I wrote a litte function to do exacly this. You need to call it after "definetrial" and before "preprocessing". It will modify the cfg structure outputted from definetrial. Use: cfg = nr_fieldtrip_removeMarkedBad(cfg); Hope this help Nic ************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ ----Original Message Follows---- From: Niki Ray Reply-To: FieldTrip discussion list To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] custom define trial to remove BAD data Date: Wed, 16 May 2007 19:04:56 +0200 Hi, I would like to remove data which i have marked as BAD using CTF software, before using preprocessing. Is there anywhere I can find an example mytrialfun script that would do this? I'm a beginner matlab programmer, so can't seem to work it out for myself!! Many thanks Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. _________________________________________________________________ Windows Live Hotmail est la prochaine génération de MSN Hotmail. Il est rapide, simple et plus sûr que jamais. Mais surtout il est toujours gratuit. www.nouveauhotmail.ca?icid=WLHMFRCA119 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From alotof_xd at YAHOO.COM Mon May 28 19:20:03 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Mon, 28 May 2007 10:20:03 -0700 Subject: value of triggers Message-ID: Hi, FieldTrip experts, I met a problem on value of triggers. I don't know if you have similar experience. The steps I used were correct but some values missed. i.e., I set triggers with 1,2,3,5 values but only 5 can be found. The data collected from latest NeuroMag 306 Vectorview system. The script was wrote in E-Prime. The command I used in FieldTrip as followed: [event(find(strcmp('STI101', {event.type}))).value] The number and sample of triggers whose value is 5 are correct. But triggers whose value is 1, 2 or 3 are miss. No trigger value in other channel like STI201 and STI301. I have no idea where the key is to the problem. I don't think that FieldTrip cannot read triggers whose value is less than 5. Is that any tricks needed on E-Prime? Or anythng need to be noticed during data collection? Thaks in advance. Best, Eve --------------------------------- Pinpoint customers who are looking for what you sell. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Tue May 29 05:16:25 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Mon, 28 May 2007 20:16:25 -0700 Subject: again value of triggers Message-ID: Hi, FieldTrip experts, I tried the data in SPM5 and found SPM5 could read out other trigger values from STI101 channel. So it might be something wrong with my steps. But I couldn't find out where the problem might be. I read .fif data head with command: hdr = read_fcdc_header(filename); I also read the event with command: [event]=read_fcdc_event(filename); then I checked the trigger: [event(find(strcmp('STI101', {event.type}))).value] Why it miss some triggers with different values? Thanks in advance. Best, Eve alotof eve wrote: Date: Mon, 28 May 2007 10:20:03 -0700 From: alotof eve Subject: [FIELDTRIP] value of triggers To: FIELDTRIP at NIC.SURFNET.NL Hi, FieldTrip experts, I met a problem on value of triggers. I don't know if you have similar experience. The steps I used were correct but some values missed. i.e., I set triggers with 1,2,3,5 values but only 5 can be found. The data collected from latest NeuroMag 306 Vectorview system. The script was wrote in E-Prime. The command I used in FieldTrip as followed: [event(find(strcmp('STI101', {event.type}))).value] The number and sample of triggers whose value is 5 are correct. But triggers whose value is 1, 2 or 3 are miss. No trigger value in other channel like STI201 and STI301. I have no idea where the key is to the problem. I don't think that FieldTrip cannot read triggers whose value is less than 5. Is that any tricks needed on E-Prime? Or anythng need to be noticed during data collection? Thaks in advance. Best, Eve --------------------------------- Pinpoint customers who are looking for what you sell. ---------------------------------- The aim of this list 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/ --------------------------------- Shape Yahoo! in your own image. Join our Network Research Panel today! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.poort at NIN.KNAW.NL Wed May 2 16:21:38 2007 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Wed, 2 May 2007 16:21:38 +0200 Subject: sampling of data Message-ID: Hi all, I have some general questions about data sampling: 1 usually the sampling frequency is some nice round number, but I've got some data with a sampling frequency of 762.9395. Can non-integer sampling frequencies give problems in FieldTrip? Is it possible to downsample the data? 2 I have some data recorded with a sequential recording system: e.g. the 1st sample of chn 1 is recorded at 0.001, 1st smp of chn 2 at 0.002, 1st smp chn 3 at 0.003, then 2nd sample of chn 1 at 0.004 and so on; is it possibly to interpolate so that all channels have the same time axis? Thanks in advance, best, Jasper ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marcel.Bastiaansen at FCDONDERS.RU.NL Fri May 4 15:38:44 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Fri, 4 May 2007 15:38:44 +0200 Subject: what's the planar gradient unit? Message-ID: Hi, can anyone tell me what the unit is for planar gradients? Is that fT / square meter, or something else? Thanks, Marcel -- dr. Marcel C.M. Bastiaansen. Max Planck Institute for Psycholinguistics Visiting Adress: Wundtlaan 1, 6525 XD Nijmegen, the Netherlands Mailing adress: P.O. Box 310, 6500 AH Nijmegen, the Netherlands phone: +31 24 3521 347 fax: +31 24 3521 213 mail: marcel.bastiaansen at mpi.nl web: http://www.mpi.nl/Members/MarcelBastiaansen and FC Donders Centre for Cognitive Neuroimaging Visiting address: Kapittelweg 29, 6525 EN Nijmegen, the Netherlands Mailing address: PO Box 9101, 6500 HB Nijmegen, the Netherlands phone: + 31 24 3610 882 fax: + 31 24 3610 989 mail: marcel.bastiaansen at fcdonders.ru.nl web: http://www.ru.nl/aspx/get.aspx?xdl=/views/run/xdl/page&ItmIdt=20592&SitIdt=119&VarIdt=96 -- ---------------------------------- The aim of this list 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/ From litvak at TECHUNIX.TECHNION.AC.IL Fri May 4 20:24:35 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 4 May 2007 19:24:35 +0100 Subject: Two questions about topoplot Message-ID: Dear all, 1) What are the presently implemented options to visualize significant channels-time/channels-frequency clusters in topoplot? I looked in the help of topoplotTFR but haven't found anything. In the help of topoplot there is some obscure cfg.mask option, but it doesn't seem to do anything. 2) For MEG, if I put grad in the cfg for topoplotTFR rather than specifying the layout file, does it mean that the recorded subject's head position is taken into account while generating the layout? Thanks, Vladimir ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.stoegbauer at GMAIL.COM Mon May 7 08:55:35 2007 From: h.stoegbauer at GMAIL.COM (Harald Stoegbauer) Date: Sun, 6 May 2007 23:55:35 -0700 Subject: channel selection in timelockanalysis Message-ID: Dear fieldtripper, 'timelockanalysis' works fine when all subjects have exactly the same electrodes. When some subjects have 'bad channels' (missing) it doesn't work. Trying to narrow the channel selection with cfg.channel doesn't seem to work, too. (RAB_U_A is a cell which contains serveral subjects datasets) cfg =[]; cfg.keepindividual = 'no' cfg.channel={'E101'}; RUA = timelockgrandaverage(cfg, RAB_U_A{:}); ??? Index exceeds matrix dimensions. Error in ==> timelockgrandaverage at 125 avgmat(s, :, :) = varargin{s}.avg(:, ResultsTimeSelectCases); Thanks, Harald ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon May 7 11:25:21 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 7 May 2007 11:25:21 +0200 Subject: channel selection in timelockanalysis In-Reply-To: <5bbfdea0705062355m2afd5e4cm8e51b84435354d55@mail.gmail.com> Message-ID: Dear Harald, It is not fully clear what you are trying to do. I think you mean timelockGRANDAVERAGE doesn't work when the subjects have different channels? (First you speak of timelockANALYSIS, but I assume that's a typo?) I looked into the code and there is an area that deals with the problem when not all subjects have the same channels (edit timelockgrandaverage: it says DETERMINE WHICH CHANNELS ARE AVAILABLE FOR ALL SUBJECTS). So I think that the problem doesn't lie in the fact that your subjects do not have the same channels. That also explains why you still get an error when you only use the 'E101' channel. You could try to find out with the debugger which matrix it is that exceeds its dimension; it seems that it might have to do with time ResultsTimeSelectCases Hop this help you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Harald Stoegbauer Sent: Monday, May 07, 2007 8:56 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] channel selection in timelockanalysis Dear fieldtripper, 'timelockanalysis' works fine when all subjects have exactly the same electrodes. When some subjects have 'bad channels' (missing) it doesn't work. Trying to narrow the channel selection with cfg.channel doesn't seem to work, too. (RAB_U_A is a cell which contains serveral subjects datasets) cfg =[]; cfg.keepindividual = 'no' cfg.channel={'E101'} ; RUA = timelockgrandaverage(cfg, RAB_U_A{:}); ??? Index exceeds matrix dimensions. Error in ==> timelockgrandaverage at 125 avgmat(s, :, :) = varargin{s}.avg(:, ResultsTimeSelectCases); Thanks, Harald ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon May 7 11:38:21 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 7 May 2007 11:38:21 +0200 Subject: dics method for coherence analysis In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B01C9A415@NIHCESMLBX8.nih.gov> Message-ID: Dear Feng, You can save yourself some time by running sourceanalysis twice. The first time you should specify cfg.keepfilter = 'yes' (and keep cfg.randomization = 'no'). This will yield a source-structure containing a field called 'filter'. These filters are computed using the cross-spectral density averaged across all replications. Subsequently you should plug these filters into the dipole grid by specifying cfg.grid.filter = source.filter (could also be source.avg.filter, I'm not sure, but it's easily checked by running the previous step). Then you should additionally specify cfg.rawtrial = 'yes'. If I'm not mistaken, when you then run sourceanalysis, this yields a source-structure containing a field called 'trial', which contains for each replication the source-reconstructed data, so it has dimensionality 1x the number of trials. Each trial itself will be a structure containing the fields csd (which in your case will contain the cross spectral density between the dipole at that particular location, and the reference), and the field pow, which contains the power at that location (not the reference). In subsequent analysis steps you can test whether coherence is different across conditions. This can be done parametrically, or non-parametrically. Either way, I'd advise you to collaps your data across the two conditions prior to computing your filters (so prior to calling sourceanalysis for the first time). This yields so-called 'common filters', which as I said before typically yield more robust results. The most convenient point to achieve this, is already concatenating the data of your two conditions prior to frequency analysis (so it should be done after preprocessing), by calling appenddata: dataall = appenddata([], data1, data2). You could then proceed to compute the filters, using the concatenated data. Afterwards, you could call sourceanalysis twice using the frequency-data for each of the conditions separately, yielding source structures for each of the conditions. These can then be used as an input to sourcedescriptives (should also be called twice). This will yield two source structures containing an estimate of the coherence, and an estimate of the sem of the coherence. This can then be tested parametrically with a t-test using sourcestatistics. (It would be more correct if you correct for the bias in the coherence estimate by applying some normalizing transform to the coherence, see Bokil et al. J. Neurosci Methods 159(2): 337-345.) You could also test non-parametrically. For this, I'd advise you to first have a thorough look at the statistics-tutorial on the fieldtrip-website. Moreover, you could consult Maris et al. J. Neurosci Methods 163(1): 161-175 for a way of testing coherence differences non-parametrically. However, doing this on the source-level is not yet supported by fieldtrip in a standard way. Hope this already points you in the good direction. Yours, Jan-Mathijs _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rong, Feng (NIH/NIDCD) [V] Sent: Monday, April 30, 2007 6:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] dics method for coherence analysis Jan-Mathijs, Thanks for the comprehensive feedback. It is really helpful. I have downloaded the new version and will try. As you have predicted, this procedure is time-consuming. May I know what can I do to revise the script so that I can save some time? Best, Feng _______________________________________________ The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.mazaheri at FCDONDERS.RU.NL Mon May 7 13:40:56 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Mon, 7 May 2007 13:40:56 +0200 Subject: read_fcdc_mri Message-ID: Hello, I am coming across this error when I use the read_fcdc_mri {Undefined function or variable "orientation" mri=ipermute(mri,orientation) This happens only for some of my MRI files... and not others.. which makes me think that there is a step somewhere I am missing when making my MRI files ( I use the instruction provided) any suggestions/remedies would be greatly appreciated. Ali ---------------------------------- The aim of this list 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/ From Jan.Schoffelen at FCDONDERS.RU.NL Mon May 7 13:48:36 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 7 May 2007 13:48:36 +0200 Subject: read_fcdc_mri In-Reply-To: <463F1048.5070700@fcdonders.ru.nl> Message-ID: Dear Ali, Could you be a bit more specific? The in-house version of fieldtrip's read_fcdc_mri doesn't contain the line you specify in your message. Could it be you are using an old version? Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ali Mazaheri Sent: Monday, May 07, 2007 1:41 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] read_fcdc_mri Hello, I am coming across this error when I use the read_fcdc_mri {Undefined function or variable "orientation" mri=ipermute(mri,orientation) This happens only for some of my MRI files... and not others.. which makes me think that there is a step somewhere I am missing when making my MRI files ( I use the instruction provided) any suggestions/remedies would be greatly appreciated. Ali ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ From r.oostenveld at FCDONDERS.RU.NL Mon May 7 13:56:40 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 13:56:40 +0200 Subject: read_fcdc_mri In-Reply-To: <463F1048.5070700@fcdonders.ru.nl> Message-ID: Hi Ali On 7 May 2007, at 13:40, Ali Mazaheri wrote: > I am coming across this error when I use the read_fcdc_mri > > {Undefined function or variable "orientation" > mri=ipermute(mri,orientation) > > This happens only for some of my MRI files... and not others.. > which makes me think that there is a step > somewhere I am missing when making my MRI files ( I use the > instruction provided) > > any suggestions/remedies would be greatly appreciated. Searching for the code that relates to your error message, I only see fcdc-roboos> grep ipermute *.m read_asa_mri.m:mri = ipermute(mri, orientation); read_asa_mri.m:seg = ipermute(seg, orientation); So it seems that you are trying to read ASA format *.mri files, which I know that you are not doing. The file format detection (fieldtrip/private/filetype.m) automatically determines the format, and read_fcdc_mri then uses the corresponding low-level function (in this case for ASA). The likely cause is that you are using a file with extension *.mri which is not being recognized as CTF MRI file. That can be the case if the binary file does not start with the string 'CTF_MRI_FORMAT VER 2.2'. Please open the mri file in a robust text editor or type "strings " on the linux prompt and see whether that is the case. The new version of MRIConverter/MRIViewer can write files in a new CTF format (probably what you have) and in the old v2.2 format (which the code seems to support). I don't know the difference between the formats. You might try read_ctf_mri on the file directly. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ From ali.mazaheri at FCDONDERS.RU.NL Mon May 7 14:06:38 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Mon, 7 May 2007 14:06:38 +0200 Subject: read_fcdc_mri In-Reply-To: <1AC9527E-8414-44DF-9D53-6C32F27BC59F@fcdonders.ru.nl> Message-ID: Thanks Robert, I think you are correct.... it appears the problem is the new versions of MRIViewer, If you save it as the default .MRI file it can't be read into fieldtrip. However, when I convert it to CTF v2 it works perfectly. All the files that didn't open were actually made quite recently..so this further explains things. so.... problem solved. Thanks a bunch ! ali Robert Oostenveld wrote: > Hi Ali > > On 7 May 2007, at 13:40, Ali Mazaheri wrote: >> I am coming across this error when I use the read_fcdc_mri >> >> {Undefined function or variable "orientation" >> mri=ipermute(mri,orientation) >> >> This happens only for some of my MRI files... and not others.. which >> makes me think that there is a step >> somewhere I am missing when making my MRI files ( I use the >> instruction provided) >> >> any suggestions/remedies would be greatly appreciated. > > Searching for the code that relates to your error message, I only see > fcdc-roboos> grep ipermute *.m > read_asa_mri.m:mri = ipermute(mri, orientation); > read_asa_mri.m:seg = ipermute(seg, orientation); > > So it seems that you are trying to read ASA format *.mri files, which > I know that you are not doing. > > The file format detection (fieldtrip/private/filetype.m) automatically > determines the format, and read_fcdc_mri then uses the corresponding > low-level function (in this case for ASA). The likely cause is that > you are using a file with extension *.mri which is not being > recognized as CTF MRI file. That can be the case if the binary file > does not start with the string 'CTF_MRI_FORMAT VER 2.2'. Please open > the mri file in a robust text editor or type "strings " on > the linux prompt and see whether that is the case. > > The new version of MRIConverter/MRIViewer can write files in a new CTF > format (probably what you have) and in the old v2.2 format (which the > code seems to support). I don't know the difference between the > formats. You might try read_ctf_mri on the file directly. > > Robert > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:12:56 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:12:56 +0200 Subject: SPM2 related error message when doing volumesegment In-Reply-To: Message-ID: On 17 Apr 2007, at 18:14, Y Chen wrote: > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.template = 'D:\mat\toolbox\spm2\templates\T1.mnc'; > ... > > ??? Error using ==> spm_vol>subfunc1 > Can't get volume information > for '/home/common/matlab/spm2/templates/T1.mnc' that is weird, since cfg.template is used as the filename to read. Please have a look at the code on volumesegment at line 235 where the error occurs. You can use the matlab debugger there (or type "dbsop if error" and repeat the error). Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:21:01 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:21:01 +0200 Subject: definetrial In-Reply-To: Message-ID: On 26 Apr 2007, at 14:08, Diederick Stoffers wrote: > The CTF dataset has been modified and now contains 160 trials with > a length > of 3.2 seconds and two markers (stimulus onset and trialtype) at 1 > second > into the trial as well as a marker for artefacts. > > Could anyone please advice what to include in mytrialfun.m ? Is it > only > possible to use triggers (in that case I will have to convert > markers to > triggers) or can I also use the information in MarkerFile.mrk? I have > attached a trialfun.m file which holds some of the information. Hi Diederick, There was no attachement to your mail. Please do event = read_fcdc_event(datasetdir) and then for i=1:length(event) disp(event(i)); end What you will see is a long list of events, both with type=trial and type=trigger. So not only the triggers but also the trials are listed as events. You can combine them: i.e. for each trial-event look into the corresponding trigger event and determine based on the trigger value whether to include the trial. Also marker events (which are stored in the CTF directory in a seperate file) thaht contain artifacts will be listed as events. An example trialfun is on http://www2.ru.nl/fcdonders/fieldtrip/ doku.php? id=fieldtrip:documentation:making_your_own_trialfun_for_conditional_tria l_definition Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:33:16 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:33:16 +0200 Subject: using prepare_layout and gradfile to generate mags and planar layout In-Reply-To: Message-ID: Hi Sameer On 19 Apr 2007, at 23:22, Sameer Walawalkar wrote: > Usually this meant lay.labels did not have MEG in them. In the > past, I have taken care of these errors by making changes to > Topoplot and multiplot and adding the MEG to the labels. Why don't you make a couple of layout files yourself with the selection of channels that you are interested in for plotting? With the matlab editor and some search-and-replace it is easy to change the channel labels to either include the "MEG " part or not (takes care of your deviant channel names). Knowing that they are systematically ordered, it is also easy to remove every second and third line in the file (takes care of the subset selection of planar or magnetometer channels). Editing these files in a text editor will only take you 5-10 minutes or so. > But with each version of changes being made, it becomes tougher and > tougher to keep up with this. That is why it is helpfull to use your own layout files instead of changing the code, since they do not change (assuming that you name them differently and keep them in a place where they are not overwritten by FT upgrades). > Incidently, my most currently download (april 18) is giving this > weird error for mags.lay : > > cfg.layout = NM306mags.lay; > reading layout from file NM306all.lay > ??? Trouble reading floating point number from file (row 1, field > 1) ==> MATLAB 5.0 MAT-file, Platform: You are not using Matlab 5.0 are you? It seems to be a matlab error, or your layout file not detected as being an ascii file. Since I do not know what is your file "NM306mags.lay", it might also be that your file is corrupt. Fieldtrip does include a file with the name NM306mag.lay, without the 's'. You can try that one. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Brian.Roach at YALE.EDU Mon May 7 15:04:55 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 7 May 2007 09:04:55 -0400 Subject: Fwd: [FIELDTRIP] source analysis example images Message-ID: > >fieldTrip users, > >I've run a source analysis using the DICS method and EEG data. Here is >the code the leads me to the attached sourceplot results: > >cfg.output = 'powandcsd'; >cfg.method = 'mtmfft'; >cfg.tapsmofrq = 2; >cfg.foilim = [80 81]; >freq = freqanalysis(cfg, data); >cfg.method = 'dics'; >cfg.frequency = 80; >cfg.hdmfile = '/home/bjr39/FTsource/vol.mat'; >cfg.resolution = 2; >cfg.projectnoise= 'yes'; >tic;source = sourceanalysis(cfg, freq);toc >cfg.mriunits = 'mm'; >cfg.sourceunits = 'mm'; >cfg.funparameter = 'nai'; >sourceD = sourcedescriptives([], source); >mriFile = '/home/bjr39/FTsource/t1_icbm_normal_1mm_pn0_rf0.mnc'; >tic; sourceF = source2full(sourceD); toc >tic; sourceInterp = sourceinterpolate(cfg, sourceF, mriFile); toc >sourceplot(cfg, sourceInterp) > >I am wondering if this type of result seems reasonable (if it looks as >though I have not made any huge mistakes)? If so, I would run another >condition for the same subject and try to use the statistics functions. > >Also, what does this color scale describe? What are its units? > >thanks, >Brian > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: naiOutput2.png Type: application/octet-stream Size: 98772 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: naiOutput.png Type: application/octet-stream Size: 106585 bytes Desc: not available URL: -------------- next part -------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 21:42:47 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 21:42:47 +0200 Subject: Fwd: [FIELDTRIP] source analysis example images In-Reply-To: <6.1.2.0.2.20070507090423.042c04f0@email.med.yale.edu> Message-ID: Hi Brian On 7 May 2007, at 15:04, Brian Roach wrote: >> I am wondering if this type of result seems reasonable (if it >> looks as though I have not made any huge mistakes)? If so, I >> would run another condition for the same subject and try to use >> the statistics functions. >> >> Also, what does this color scale describe? What are its units? The ratio between projected power and projected noise, where the noise estimate is based on the smallest singular value of the cross- spectral density matrix. See van Veen 1997. It is dimensionless. Note that the magnitude strongly depends on the noise estimate. But given that you are able to estimate NAI with EEG without specifying cfg.lambda makes me suspicious: The following code from "private/beamformer_dics.m" (around line 164) should apply if projectnoise % estimate the noise power, which is further assumed to be equal and uncorrelated over channels if isrankdeficient % estimated noise floor is equal to or higher than lambda noise = lambda; else % estimate the noise level in the covariance matrix by the smallest singular value noise = svd(Cf); noise = noise(end); % estimated noise floor is equal to or higher than lambda noise = max(noise, lambda); end end You did not specify lambda, hence the mallest singular value of the cross-spectral density matrix will be used (second part of the code). But in case of averaged referenced EEG, that should be zero. Hence the noise estimate is zero, resulting in NAI = source power divided by zero, which should be infinite. You should ensure that your EEG data is average referenced over teh channels on which you want to base your source reconstruction prior to computing freqanalysis and sourceanalysis. If the EEG data is average reference and you specify cfg.lambda=0 in sourceanalysis, you should see a warning about the cross-spectral density matrix being rank deficient and your nai should be infinite. Hence you have to specify a manual estimate of the noise floor (in cfg.lambda). Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:04:51 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:04:51 +0200 Subject: another help request for *.tfc files In-Reply-To: Message-ID: Hi Andrew, On 19 Apr 2007, at 0:28, Andrew Smart wrote: > In prepare_timefreq_data I changed: > > output.label = input.label; > > to > > output.label = input.labelcmb; > > To accomodate the labelcmb field in the fieldtrip structure. This > gets me by > the errors about the field 'label' not existing. The input data selection in freqanalysis depends on prepare_timefreq_data, but then that subfunction is not smart enough to work with bivariate measures (i.e. coherence depends on channel pairs and is bivariate, whereas power is univariate). I suggest that you change the code in freqstatistics by the code below. That renames both cohspctrm and labelcmb into something that the remainder of the code should be able to support. subsequently the low-level code should behave as if it is univariate data. Please let me know if it works. best regards, Robert ---- function [stat] = freqstatistics(cfg, varargin) % here is the help % the low-level data selection function does not know how to deal with other parameters, so work around it if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') % use the power spectrum, this is the default elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') % use the cross spectrum, this might work as well (but has not been tested) elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') % for testing coherence on group level: % rename cohspctrm->powspctrm and labelcmb->label for i=1:length(varargin) dat = varargin{i}.cohspctrm; labcmb = varargin{i}.labelcmb; for j=1:size(labcmb) lab{j,1} = sprintf('%s - %s', labcmb{j,1}, labcmb{j,2}); end varargin{i} = rmsubfield(varargin{i}, 'cohspctrm'); varargin{i} = rmsubfield(varargin{i}, 'labelcmb'); varargin{i} = setsubfield(varargin{i}, 'powspctrm', dat); varargin{i} = setsubfield(varargin{i}, 'label', lab); end else % rename the desired parameter to powspctrm fprintf('renaming parameter ''%s'' into ''powspctrm''\n', cfg.parameter); for i=1:length(varargin) dat = getsubfield(varargin{i}, cfg.parameter); varargin{i} = rmsubfield (varargin{i}, cfg.parameter); varargin{i} = setsubfield(varargin{i}, 'powspctrm', dat); end end % call the general function [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:12:09 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:12:09 +0200 Subject: source coherence in one condition In-Reply-To: Message-ID: On 26 Apr 2007, at 0:35, Andrew Smart wrote: > I would like to try to compute whether there is significant > coherence across > subjects but within one condition and between two dipoles. This code > generates graphs but I am unclear about what they mean: Hi Andrew, It is unclear to me what the comparison is in the statistical test that you want to perform. There should be a hypothesis like "coherence is larger in XXX than YYY", which rephrased would be H0: the coherence is the same. Based on the H0, the probablility can be computed and H0 can (perhaps) be rejected. You cannot say that "coherence is significant" just like that. If the hypotheis is that coherence between one dipole pair is larger than between the other dipole pair, then I am affraid that you cannot test that using a permutation approach. With a permutation or randomizarion test you test the hypothesis that the data in two observed conditions is exchangeable. Simple differences in power in one of the 4 sources underlying the two dipole pairs would already be enough to reject the null-hypothesis that the data is exchangeable, but those power differences do not have to mean that there is a coherence difference. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:17:11 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:17:11 +0200 Subject: loreta2fieldtrip output In-Reply-To: Message-ID: Hi Christian On 24 Apr 2007, at 14:22, Christian Rosenau wrote: > this is the struct which is created by loreta2fieldtrip > > dim: [37 44 36] > xgrid: [1x29 double] > ygrid: [1x34 double] > zgrid: [1x24 double] > and this is the error message > ??? Error using ==> fieldtrip-20070402\private\grid2transform > dimensions do not correspond > There is a problem with your data as outputted by loreta2fieldtrip. The data specifies that the dimension is 37x44x36, but at the same time the volume coordinate axes (xgrid, ygrid, zgrid) are specified as 29x34x24. That does not correspond. Please try to debug the code in loreta2fieldtrip, since there the format (and dimensions) of the Loreta files is hardcoded. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From andrew.smart at NYU.EDU Tue May 8 03:36:01 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Mon, 7 May 2007 20:36:01 -0500 Subject: source coherence in one condition In-Reply-To: Message-ID: Hi Robert, Thank you very much for the code and the answers. It helps to clarify things alot. My understanding of coherence was that if the phase difference between two signals is confined to within 2pi over some time interval, they are phase locked, ie the temporal variations in the signals tend to follow each other. But that this is regardless of their differences in amplitudes. When amplitude also covaries then there is 'true' coherence. I thought that you could test for signifant coherence between two signals. For example in BESA you can do permutation tests on individual subjects for 'significant' coherence between a reference dipole and the rest of the dipoles in a model in one condition. I might be misunderstanding something though becuase I was wondering if one could do this on a group level by importing the coherence data from BESA into fieldtrip. I suppose this would be coherence relative to some baseline, but I am not sure if that makes any sense. I don't know exactly how BESA calculates coherence. So I guess H0 would be that there is no coherence between two dipoles that is not due to chance in a particular condition - is that a possible null hypothesis for coherence? Thank you again for all your help! andy ----- Original Message ----- From: Robert Oostenveld Date: Monday, May 7, 2007 3:12 pm Subject: Re: [FIELDTRIP] source coherence in one condition To: FIELDTRIP at NIC.SURFNET.NL > On 26 Apr 2007, at 0:35, Andrew Smart wrote: > > > I would like to try to compute whether there is significant > > coherence across > > subjects but within one condition and between two dipoles. This code > > generates graphs but I am unclear about what they mean: > > Hi Andrew, > > It is unclear to me what the comparison is in the statistical test > that you want to perform. There should be a hypothesis like > "coherence is larger in XXX than YYY", which rephrased would be H0: > > the coherence is the same. Based on the H0, the probablility can be > > computed and H0 can (perhaps) be rejected. You cannot say that > "coherence is significant" just like that. > > If the hypotheis is that coherence between one dipole pair is larger > > than between the other dipole pair, then I am affraid that you cannot > > test that using a permutation approach. With a permutation or > randomizarion test you test the hypothesis that the data in two > observed conditions is exchangeable. Simple differences in power in > > one of the 4 sources underlying the two dipole pairs would already be > > enough to reject the null-hypothesis that the data is exchangeable, > > but those power differences do not have to mean that there is a > coherence difference. > > Robert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue May 8 13:30:28 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 8 May 2007 13:30:28 +0200 Subject: source coherence in one condition In-Reply-To: Message-ID: Dear Andrew, > Thank you very much for the code and the answers. It helps to clarify things alot. > My understanding of coherence was that if the phase difference between two signals > is confined to within 2pi over some time interval, they are phase locked, ie the > temporal variations in the signals tend to follow each other. But that this is > regardless of their differences in amplitudes. When amplitude also covaries then > there is 'true' coherence. I thought that you could test for signifant coherence > between two signals. I would forget about the influence of amplitude covariation on coherence (on top of phase consistency). This is a side-issue for the problem that you are addressing (testing for significant coherence in a single condition). > > For example in BESA you can do permutation tests on individual subjects for > 'significant' coherence between a reference dipole and the rest of the dipoles in a > model in one condition. I might be misunderstanding something though becuase I > was wondering if one could do this on a group level by importing the coherence data > from BESA into fieldtrip. I suppose this would be coherence relative to some > baseline, but I am not sure if that makes any sense. I don't know exactly how BESA > calculates coherence. > > So I guess H0 would be that there is no coherence between two dipoles that is not > due to chance in a particular condition - is that a possible null hypothesis for > coherence? In my opinion, it does not make sense to test the null hypothesis that coherence between two EEG/MEG-channels is equal to zero. The reason for this is biophysical: due to volume conduction, the activity produced by a given source will be picked up by all EEG/MEG-channels, and therefore it does not make sense to test the null hypothesis that coherence is zero. Testing coherence relative to baseline certainly makes sense, and is possible in Fieldtrip, although it is not documented very well. (I remember a work-around posted by Jan-Mathijs Schoffelen for testing coherence differences in within-subjects designs.) However, you should keep in mind that significant coherence-differences can also be produced by differences in power. This is because coherence not only measures the phase consistency between the signals at the source level but also the signal-to-noise ratio (SNR) at the different sensors: For a fixed source-level phase consistency, the larger the SNR, the larger the coherence. Greetings, dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thank you again for all your help! > > andy > > ----- Original Message ----- > From: Robert Oostenveld > Date: Monday, May 7, 2007 3:12 pm > Subject: Re: [FIELDTRIP] source coherence in one condition > To: FIELDTRIP at NIC.SURFNET.NL > > > > On 26 Apr 2007, at 0:35, Andrew Smart wrote: > > > > > I would like to try to compute whether there is significant > > > coherence across > > > subjects but within one condition and between two dipoles. This code > > > generates graphs but I am unclear about what they mean: > > > > Hi Andrew, > > > > It is unclear to me what the comparison is in the statistical test > > that you want to perform. There should be a hypothesis like > > "coherence is larger in XXX than YYY", which rephrased would be H0: > > > > the coherence is the same. Based on the H0, the probablility can be > > > > computed and H0 can (perhaps) be rejected. You cannot say that > > "coherence is significant" just like that. > > > > If the hypotheis is that coherence between one dipole pair is larger > > > > than between the other dipole pair, then I am affraid that you cannot > > > > test that using a permutation approach. With a permutation or > > randomizarion test you test the hypothesis that the data in two > > observed conditions is exchangeable. Simple differences in power in > > > > one of the 4 sources underlying the two dipole pairs would already be > > > > enough to reject the null-hypothesis that the data is exchangeable, > > > > but those power differences do not have to mean that there is a > > coherence difference. > > > > Robert > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > > the FieldTrip toolbox, to share experiences and to discuss new ideas > > for MEG and EEG analysis. See also http://www.ru.nl/fcdonders/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:05:20 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:05:20 -0400 Subject: appenddata Message-ID: Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:39:38 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:39:38 -0400 Subject: appenddata: correction to question appenddata Message-ID: Sorry, for the error in the earlier email, dataset and headerfile are also different (same subject). trialdef and datatype are the same. so to restate the question, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where cfg.dataset, cfg.headerfile, and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are the same, will data = appenddata(cfg1,data1,data2,data3) work correctly? sameer ---------- Forwarded message ---------- Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) From: Sameer Walawalkar To: FIELDTRIP at NIC.SURFNET.NL Subject: appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue May 8 18:44:37 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 8 May 2007 18:44:37 +0200 Subject: appenddata In-Reply-To: Message-ID: Hello Sameer, Yes it will work correctly. The only thing the function does with the .trl is concatenate that too. line 172 in newest version: % also concatenate the trial specification cfg.trl = cat(1, trl{:}); It doesn't care about dataset, headerfile, datatype and trialdef as long as you have the same channels in all datasets it works. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, May 08, 2007 6:05 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue May 8 18:48:38 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 8 May 2007 18:48:38 +0200 Subject: appenddata: correction to question appenddata In-Reply-To: Message-ID: It doesn't matter if it are different datasets/headerfiles you can just concatenate. But keep in mind that if the different datasets are measured in different sessions, and the electrodes (when EEG) or sensors/headposition (when MEG) is different in the two datasets, the same channel in the concatenated dataset can measure a different brain area. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, May 08, 2007 6:40 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] appenddata: correction to question appenddata Sorry, for the error in the earlier email, dataset and headerfile are also different (same subject). trialdef and datatype are the same. so to restate the question, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where cfg.dataset, cfg.headerfile, and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are the same, will data = appenddata(cfg1,data1,data2,data3) work correctly? sameer ---------- Forwarded message ---------- Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) From: Sameer Walawalkar To: FIELDTRIP at NIC.SURFNET.NL Subject: appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:55:55 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:55:55 -0400 Subject: appenddata: correction to question appenddata In-Reply-To: <00fa01c79190$ba1ab8a0$642dae83@fcdonders.nl> Message-ID: thanks a lot Ingrid. I am aware of that, and I think I can do it because Neuromag has a software (MaxMove) which will take care of exactly such changes. I restrict myself to appending data from trials for only one subject within one session and ensure that MaxMove is applied to the dataset before I extract data. sameer On Tue, 8 May 2007, Ingrid Nieuwenhuis wrote: > It doesn't matter if it are different datasets/headerfiles you can just > concatenate. But keep in mind that if the different datasets are measured in > different sessions, and the electrodes (when EEG) or sensors/headposition > (when MEG) is different in the two datasets, the same channel in the > concatenated dataset can measure a different brain area. > > Bests Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, May 08, 2007 6:40 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] appenddata: correction to question appenddata > > Sorry, for the error in the earlier email, dataset and headerfile are also > different (same subject). trialdef and datatype are the same. > > so to restate the question, > > The usage for appenddata is > data = appenddata(cfg,data1,data2,data3) > > I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, > cfg3, corresponding to data1, data2, data3, where cfg.dataset, > cfg.headerfile, > and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are > > the same, will > data = appenddata(cfg1,data1,data2,data3) work correctly? > > sameer > > ---------- Forwarded message ---------- > Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) > From: Sameer Walawalkar > To: FIELDTRIP at NIC.SURFNET.NL > Subject: appenddata > > > Hello, > > The usage for appenddata is > data = appenddata(cfg,data1,data2,data3) > > I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, > cfg3, corresponding to data1, data2, data3, where dataset, headerfile, > datatype and trialdef are the same and the only difference is ofcourse in > the > .trl field, will > data = appenddata(cfg1,data1,data2,data3) work correctly? > > Thanks for your reply, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 8 21:14:02 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 May 2007 21:14:02 +0200 Subject: appenddata In-Reply-To: Message-ID: Hi Sameer, On 8 May 2007, at 18:05, Sameer Walawalkar wrote: > I can see that appenddata does look for cfg.trl etc. If I have > cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where > dataset, headerfile, datatype and trialdef are the same and the > only difference is ofcourse in the .trl field, will > data = appenddata(cfg1,data1,data2,data3) work correctly? The reason for concatenating the cfg.trl in the different datasets is for keeping reference to the sections of data. The trl matrix and the event structure (read_fcdc_event) can be used afterwards to reconstruct the events on which the data was selected, even after partial and complete artifact removal. In your case, where the data comes from different datafiles, the concatenated dataset does not relate any more to either one of the files and as such the concatenated trl is not usefull any more. Note that this is only implemented to support rather exotic applications, so probably you don't have to worry too much about the concatenating of cfg.trl. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 8 21:24:06 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 May 2007 21:24:06 +0200 Subject: Fwd: [Fieldtrip] createlayout Message-ID: Begin forwarded message: > From: Nicolas Robitaille > Date: 8 May 2007 17:34:46 GMT+02:00 > > In the script "Use independent component analysis (ICA) to remove > ECG artifacts", there is mention of the function createlayout > > % look at the spatial topography of the components > % note that this requires that the fieldtrip/private function > "createlayout" to be available on your path > lay = createlayout('CTF151.lay'); > figure; > subplot(2,3,1);topoplot([], lay.prj(1:151,1), lay.prj(1:151,2), > comp.topo(:,1));title(num2str(1)); > subplot( ....... > > However, I can't find this function in fieldtrip/private. The > function prepare_layout.m did not create a lay.prj field. So, can I > plot topographic map of components without createlayout? Or where > can I find it? Hi Nicolas The example script refers to functions that have been updated considerably and renamed in the meantime: you should indeed use prepare_layout function. The output contains a lay.pos = [X Y]; lay.width = Width; lay.height = Height; lay.label = Lbl; You should use lay.pos instead of lay.prj. I have updated the wiki page with the example script. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tillmann at MPIH-FRANKFURT.MPG.DE Thu May 10 11:49:27 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Thu, 10 May 2007 11:49:27 +0200 Subject: clustering parameters Message-ID: Hi all, I'm wondering which parameters I should use for determining the way the clusters are formed in the freqstatistics; in the tutorials, I only found 'cfg.minnbchan' to specify the minimum number of neighborhood channels for a cluster, but in an older example script I also found 'cfg.neighbourdist' to determine the min. distance between neighborhood channels... and if 'cfg.neighbourdist' is used, is the value specified in mm or cm? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu May 10 12:37:32 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 10 May 2007 12:37:32 +0200 Subject: clustering parameters In-Reply-To: <07051011492728_2800013E@mpih-frankfurt.mpg.de> Message-ID: Christine, > I'm wondering which parameters I should use for determining the way the > clusters are formed in the freqstatistics; > > in the tutorials, I only found 'cfg.minnbchan' to specify the minimum > number of neighborhood channels for a cluster, but in an older example > script I also found 'cfg.neighbourdist' to determine the min. distance > between neighborhood channels... The two fields have very different functionalities. 1. The field cfg.neighbourdist is used to determine which channel pairs are neighbouring channels. See neighbourselection.m. 2. The field cfg.minnbchan is used to determine whether a (channel,frequency,time)-triplet (or (channel,time)-pair, or channel-singleton) that exceeds the threshold should be included in the clustering algorithm or not. Tip: start with the default value (cfg.minnbchan=0) and watch what happens if you change its value. Don't worry too much, cfg.minnbchan is a tuning parameter for which there is no theoretical rationale (contrary to the permutation test itself, which has a beautiful theoretical rationale). That's why I get so many questions about it... I have seriously considered removing it from the Fieldtrip code, but it still in, so you can play with it... > and if 'cfg.neighbourdist' is used, is the value specified in mm or cm? You should specify it in the scale as the coordinates of your channel configuration. Remember that you must run neighbourselection.m to construct your neighbourhood structure. Greetings, dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/> > Thanks, > Christine > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From muthuraman10 at HOTMAIL.COM Tue May 15 11:37:08 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 15 May 2007 09:37:08 +0000 Subject: Dynamical Coherence! Message-ID: Hello Fieldtrippers, Is there a way in the TopoplotTFR function to specify the time interval for plotting the coherence, inroder to get the dynamical coherence at specified time intervals between EEG and EMG channels. The Cfg.xlim when specified only acts as a labelling in the plot. Thanking you With regards M.Muthuraman. _________________________________________________________________ Voice your questions and our experts will answer them http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From nicola.ray at DPAG.OX.AC.UK Wed May 16 19:04:56 2007 From: nicola.ray at DPAG.OX.AC.UK (Niki Ray) Date: Wed, 16 May 2007 19:04:56 +0200 Subject: custom define trial to remove BAD data Message-ID: Hi, I would like to remove data which i have marked as BAD using CTF software, before using preprocessing. Is there anywhere I can find an example mytrialfun script that would do this? I'm a beginner matlab programmer, so can't seem to work it out for myself!! Many thanks Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From enteka at HOTMAIL.COM Wed May 16 19:18:42 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Wed, 16 May 2007 17:18:42 +0000 Subject: custom define trial to remove BAD data Message-ID: Hello Niki I wrote a litte function to do exacly this. You need to call it after "definetrial" and before "preprocessing". It will modify the cfg structure outputted from definetrial. Use: cfg = nr_fieldtrip_removeMarkedBad(cfg); Hope this help Nic ************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ ----Original Message Follows---- From: Niki Ray Reply-To: FieldTrip discussion list To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] custom define trial to remove BAD data Date: Wed, 16 May 2007 19:04:56 +0200 Hi, I would like to remove data which i have marked as BAD using CTF software, before using preprocessing. Is there anywhere I can find an example mytrialfun script that would do this? I'm a beginner matlab programmer, so can't seem to work it out for myself!! Many thanks Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. _________________________________________________________________ Windows Live Hotmail est la prochaine génération de MSN Hotmail. Il est rapide, simple et plus sûr que jamais. Mais surtout il est toujours gratuit. www.nouveauhotmail.ca?icid=WLHMFRCA119 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From alotof_xd at YAHOO.COM Mon May 28 19:20:03 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Mon, 28 May 2007 10:20:03 -0700 Subject: value of triggers Message-ID: Hi, FieldTrip experts, I met a problem on value of triggers. I don't know if you have similar experience. The steps I used were correct but some values missed. i.e., I set triggers with 1,2,3,5 values but only 5 can be found. The data collected from latest NeuroMag 306 Vectorview system. The script was wrote in E-Prime. The command I used in FieldTrip as followed: [event(find(strcmp('STI101', {event.type}))).value] The number and sample of triggers whose value is 5 are correct. But triggers whose value is 1, 2 or 3 are miss. No trigger value in other channel like STI201 and STI301. I have no idea where the key is to the problem. I don't think that FieldTrip cannot read triggers whose value is less than 5. Is that any tricks needed on E-Prime? Or anythng need to be noticed during data collection? Thaks in advance. Best, Eve --------------------------------- Pinpoint customers who are looking for what you sell. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Tue May 29 05:16:25 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Mon, 28 May 2007 20:16:25 -0700 Subject: again value of triggers Message-ID: Hi, FieldTrip experts, I tried the data in SPM5 and found SPM5 could read out other trigger values from STI101 channel. So it might be something wrong with my steps. But I couldn't find out where the problem might be. I read .fif data head with command: hdr = read_fcdc_header(filename); I also read the event with command: [event]=read_fcdc_event(filename); then I checked the trigger: [event(find(strcmp('STI101', {event.type}))).value] Why it miss some triggers with different values? Thanks in advance. Best, Eve alotof eve wrote: Date: Mon, 28 May 2007 10:20:03 -0700 From: alotof eve Subject: [FIELDTRIP] value of triggers To: FIELDTRIP at NIC.SURFNET.NL Hi, FieldTrip experts, I met a problem on value of triggers. I don't know if you have similar experience. The steps I used were correct but some values missed. i.e., I set triggers with 1,2,3,5 values but only 5 can be found. The data collected from latest NeuroMag 306 Vectorview system. The script was wrote in E-Prime. The command I used in FieldTrip as followed: [event(find(strcmp('STI101', {event.type}))).value] The number and sample of triggers whose value is 5 are correct. But triggers whose value is 1, 2 or 3 are miss. No trigger value in other channel like STI201 and STI301. I have no idea where the key is to the problem. I don't think that FieldTrip cannot read triggers whose value is less than 5. Is that any tricks needed on E-Prime? Or anythng need to be noticed during data collection? Thaks in advance. Best, Eve --------------------------------- Pinpoint customers who are looking for what you sell. ---------------------------------- The aim of this list 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/ --------------------------------- Shape Yahoo! in your own image. Join our Network Research Panel today! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.poort at NIN.KNAW.NL Wed May 2 16:21:38 2007 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Wed, 2 May 2007 16:21:38 +0200 Subject: sampling of data Message-ID: Hi all, I have some general questions about data sampling: 1 usually the sampling frequency is some nice round number, but I've got some data with a sampling frequency of 762.9395. Can non-integer sampling frequencies give problems in FieldTrip? Is it possible to downsample the data? 2 I have some data recorded with a sequential recording system: e.g. the 1st sample of chn 1 is recorded at 0.001, 1st smp of chn 2 at 0.002, 1st smp chn 3 at 0.003, then 2nd sample of chn 1 at 0.004 and so on; is it possibly to interpolate so that all channels have the same time axis? Thanks in advance, best, Jasper ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marcel.Bastiaansen at FCDONDERS.RU.NL Fri May 4 15:38:44 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Fri, 4 May 2007 15:38:44 +0200 Subject: what's the planar gradient unit? Message-ID: Hi, can anyone tell me what the unit is for planar gradients? Is that fT / square meter, or something else? Thanks, Marcel -- dr. Marcel C.M. Bastiaansen. Max Planck Institute for Psycholinguistics Visiting Adress: Wundtlaan 1, 6525 XD Nijmegen, the Netherlands Mailing adress: P.O. Box 310, 6500 AH Nijmegen, the Netherlands phone: +31 24 3521 347 fax: +31 24 3521 213 mail: marcel.bastiaansen at mpi.nl web: http://www.mpi.nl/Members/MarcelBastiaansen and FC Donders Centre for Cognitive Neuroimaging Visiting address: Kapittelweg 29, 6525 EN Nijmegen, the Netherlands Mailing address: PO Box 9101, 6500 HB Nijmegen, the Netherlands phone: + 31 24 3610 882 fax: + 31 24 3610 989 mail: marcel.bastiaansen at fcdonders.ru.nl web: http://www.ru.nl/aspx/get.aspx?xdl=/views/run/xdl/page&ItmIdt=20592&SitIdt=119&VarIdt=96 -- ---------------------------------- The aim of this list 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/ From litvak at TECHUNIX.TECHNION.AC.IL Fri May 4 20:24:35 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 4 May 2007 19:24:35 +0100 Subject: Two questions about topoplot Message-ID: Dear all, 1) What are the presently implemented options to visualize significant channels-time/channels-frequency clusters in topoplot? I looked in the help of topoplotTFR but haven't found anything. In the help of topoplot there is some obscure cfg.mask option, but it doesn't seem to do anything. 2) For MEG, if I put grad in the cfg for topoplotTFR rather than specifying the layout file, does it mean that the recorded subject's head position is taken into account while generating the layout? Thanks, Vladimir ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.stoegbauer at GMAIL.COM Mon May 7 08:55:35 2007 From: h.stoegbauer at GMAIL.COM (Harald Stoegbauer) Date: Sun, 6 May 2007 23:55:35 -0700 Subject: channel selection in timelockanalysis Message-ID: Dear fieldtripper, 'timelockanalysis' works fine when all subjects have exactly the same electrodes. When some subjects have 'bad channels' (missing) it doesn't work. Trying to narrow the channel selection with cfg.channel doesn't seem to work, too. (RAB_U_A is a cell which contains serveral subjects datasets) cfg =[]; cfg.keepindividual = 'no' cfg.channel={'E101'}; RUA = timelockgrandaverage(cfg, RAB_U_A{:}); ??? Index exceeds matrix dimensions. Error in ==> timelockgrandaverage at 125 avgmat(s, :, :) = varargin{s}.avg(:, ResultsTimeSelectCases); Thanks, Harald ---------------------------------- The aim of this list 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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon May 7 11:25:21 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 7 May 2007 11:25:21 +0200 Subject: channel selection in timelockanalysis In-Reply-To: <5bbfdea0705062355m2afd5e4cm8e51b84435354d55@mail.gmail.com> Message-ID: Dear Harald, It is not fully clear what you are trying to do. I think you mean timelockGRANDAVERAGE doesn't work when the subjects have different channels? (First you speak of timelockANALYSIS, but I assume that's a typo?) I looked into the code and there is an area that deals with the problem when not all subjects have the same channels (edit timelockgrandaverage: it says DETERMINE WHICH CHANNELS ARE AVAILABLE FOR ALL SUBJECTS). So I think that the problem doesn't lie in the fact that your subjects do not have the same channels. That also explains why you still get an error when you only use the 'E101' channel. You could try to find out with the debugger which matrix it is that exceeds its dimension; it seems that it might have to do with time ResultsTimeSelectCases Hop this help you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Harald Stoegbauer Sent: Monday, May 07, 2007 8:56 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] channel selection in timelockanalysis Dear fieldtripper, 'timelockanalysis' works fine when all subjects have exactly the same electrodes. When some subjects have 'bad channels' (missing) it doesn't work. Trying to narrow the channel selection with cfg.channel doesn't seem to work, too. (RAB_U_A is a cell which contains serveral subjects datasets) cfg =[]; cfg.keepindividual = 'no' cfg.channel={'E101'} ; RUA = timelockgrandaverage(cfg, RAB_U_A{:}); ??? Index exceeds matrix dimensions. Error in ==> timelockgrandaverage at 125 avgmat(s, :, :) = varargin{s}.avg(:, ResultsTimeSelectCases); Thanks, Harald ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon May 7 11:38:21 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 7 May 2007 11:38:21 +0200 Subject: dics method for coherence analysis In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B01C9A415@NIHCESMLBX8.nih.gov> Message-ID: Dear Feng, You can save yourself some time by running sourceanalysis twice. The first time you should specify cfg.keepfilter = 'yes' (and keep cfg.randomization = 'no'). This will yield a source-structure containing a field called 'filter'. These filters are computed using the cross-spectral density averaged across all replications. Subsequently you should plug these filters into the dipole grid by specifying cfg.grid.filter = source.filter (could also be source.avg.filter, I'm not sure, but it's easily checked by running the previous step). Then you should additionally specify cfg.rawtrial = 'yes'. If I'm not mistaken, when you then run sourceanalysis, this yields a source-structure containing a field called 'trial', which contains for each replication the source-reconstructed data, so it has dimensionality 1x the number of trials. Each trial itself will be a structure containing the fields csd (which in your case will contain the cross spectral density between the dipole at that particular location, and the reference), and the field pow, which contains the power at that location (not the reference). In subsequent analysis steps you can test whether coherence is different across conditions. This can be done parametrically, or non-parametrically. Either way, I'd advise you to collaps your data across the two conditions prior to computing your filters (so prior to calling sourceanalysis for the first time). This yields so-called 'common filters', which as I said before typically yield more robust results. The most convenient point to achieve this, is already concatenating the data of your two conditions prior to frequency analysis (so it should be done after preprocessing), by calling appenddata: dataall = appenddata([], data1, data2). You could then proceed to compute the filters, using the concatenated data. Afterwards, you could call sourceanalysis twice using the frequency-data for each of the conditions separately, yielding source structures for each of the conditions. These can then be used as an input to sourcedescriptives (should also be called twice). This will yield two source structures containing an estimate of the coherence, and an estimate of the sem of the coherence. This can then be tested parametrically with a t-test using sourcestatistics. (It would be more correct if you correct for the bias in the coherence estimate by applying some normalizing transform to the coherence, see Bokil et al. J. Neurosci Methods 159(2): 337-345.) You could also test non-parametrically. For this, I'd advise you to first have a thorough look at the statistics-tutorial on the fieldtrip-website. Moreover, you could consult Maris et al. J. Neurosci Methods 163(1): 161-175 for a way of testing coherence differences non-parametrically. However, doing this on the source-level is not yet supported by fieldtrip in a standard way. Hope this already points you in the good direction. Yours, Jan-Mathijs _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rong, Feng (NIH/NIDCD) [V] Sent: Monday, April 30, 2007 6:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] dics method for coherence analysis Jan-Mathijs, Thanks for the comprehensive feedback. It is really helpful. I have downloaded the new version and will try. As you have predicted, this procedure is time-consuming. May I know what can I do to revise the script so that I can save some time? Best, Feng _______________________________________________ The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.mazaheri at FCDONDERS.RU.NL Mon May 7 13:40:56 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Mon, 7 May 2007 13:40:56 +0200 Subject: read_fcdc_mri Message-ID: Hello, I am coming across this error when I use the read_fcdc_mri {Undefined function or variable "orientation" mri=ipermute(mri,orientation) This happens only for some of my MRI files... and not others.. which makes me think that there is a step somewhere I am missing when making my MRI files ( I use the instruction provided) any suggestions/remedies would be greatly appreciated. Ali ---------------------------------- The aim of this list 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/ From Jan.Schoffelen at FCDONDERS.RU.NL Mon May 7 13:48:36 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 7 May 2007 13:48:36 +0200 Subject: read_fcdc_mri In-Reply-To: <463F1048.5070700@fcdonders.ru.nl> Message-ID: Dear Ali, Could you be a bit more specific? The in-house version of fieldtrip's read_fcdc_mri doesn't contain the line you specify in your message. Could it be you are using an old version? Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ali Mazaheri Sent: Monday, May 07, 2007 1:41 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] read_fcdc_mri Hello, I am coming across this error when I use the read_fcdc_mri {Undefined function or variable "orientation" mri=ipermute(mri,orientation) This happens only for some of my MRI files... and not others.. which makes me think that there is a step somewhere I am missing when making my MRI files ( I use the instruction provided) any suggestions/remedies would be greatly appreciated. Ali ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ From r.oostenveld at FCDONDERS.RU.NL Mon May 7 13:56:40 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 13:56:40 +0200 Subject: read_fcdc_mri In-Reply-To: <463F1048.5070700@fcdonders.ru.nl> Message-ID: Hi Ali On 7 May 2007, at 13:40, Ali Mazaheri wrote: > I am coming across this error when I use the read_fcdc_mri > > {Undefined function or variable "orientation" > mri=ipermute(mri,orientation) > > This happens only for some of my MRI files... and not others.. > which makes me think that there is a step > somewhere I am missing when making my MRI files ( I use the > instruction provided) > > any suggestions/remedies would be greatly appreciated. Searching for the code that relates to your error message, I only see fcdc-roboos> grep ipermute *.m read_asa_mri.m:mri = ipermute(mri, orientation); read_asa_mri.m:seg = ipermute(seg, orientation); So it seems that you are trying to read ASA format *.mri files, which I know that you are not doing. The file format detection (fieldtrip/private/filetype.m) automatically determines the format, and read_fcdc_mri then uses the corresponding low-level function (in this case for ASA). The likely cause is that you are using a file with extension *.mri which is not being recognized as CTF MRI file. That can be the case if the binary file does not start with the string 'CTF_MRI_FORMAT VER 2.2'. Please open the mri file in a robust text editor or type "strings " on the linux prompt and see whether that is the case. The new version of MRIConverter/MRIViewer can write files in a new CTF format (probably what you have) and in the old v2.2 format (which the code seems to support). I don't know the difference between the formats. You might try read_ctf_mri on the file directly. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ From ali.mazaheri at FCDONDERS.RU.NL Mon May 7 14:06:38 2007 From: ali.mazaheri at FCDONDERS.RU.NL (Ali Mazaheri) Date: Mon, 7 May 2007 14:06:38 +0200 Subject: read_fcdc_mri In-Reply-To: <1AC9527E-8414-44DF-9D53-6C32F27BC59F@fcdonders.ru.nl> Message-ID: Thanks Robert, I think you are correct.... it appears the problem is the new versions of MRIViewer, If you save it as the default .MRI file it can't be read into fieldtrip. However, when I convert it to CTF v2 it works perfectly. All the files that didn't open were actually made quite recently..so this further explains things. so.... problem solved. Thanks a bunch ! ali Robert Oostenveld wrote: > Hi Ali > > On 7 May 2007, at 13:40, Ali Mazaheri wrote: >> I am coming across this error when I use the read_fcdc_mri >> >> {Undefined function or variable "orientation" >> mri=ipermute(mri,orientation) >> >> This happens only for some of my MRI files... and not others.. which >> makes me think that there is a step >> somewhere I am missing when making my MRI files ( I use the >> instruction provided) >> >> any suggestions/remedies would be greatly appreciated. > > Searching for the code that relates to your error message, I only see > fcdc-roboos> grep ipermute *.m > read_asa_mri.m:mri = ipermute(mri, orientation); > read_asa_mri.m:seg = ipermute(seg, orientation); > > So it seems that you are trying to read ASA format *.mri files, which > I know that you are not doing. > > The file format detection (fieldtrip/private/filetype.m) automatically > determines the format, and read_fcdc_mri then uses the corresponding > low-level function (in this case for ASA). The likely cause is that > you are using a file with extension *.mri which is not being > recognized as CTF MRI file. That can be the case if the binary file > does not start with the string 'CTF_MRI_FORMAT VER 2.2'. Please open > the mri file in a robust text editor or type "strings " on > the linux prompt and see whether that is the case. > > The new version of MRIConverter/MRIViewer can write files in a new CTF > format (probably what you have) and in the old v2.2 format (which the > code seems to support). I don't know the difference between the > formats. You might try read_ctf_mri on the file directly. > > Robert > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:12:56 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:12:56 +0200 Subject: SPM2 related error message when doing volumesegment In-Reply-To: Message-ID: On 17 Apr 2007, at 18:14, Y Chen wrote: > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.template = 'D:\mat\toolbox\spm2\templates\T1.mnc'; > ... > > ??? Error using ==> spm_vol>subfunc1 > Can't get volume information > for '/home/common/matlab/spm2/templates/T1.mnc' that is weird, since cfg.template is used as the filename to read. Please have a look at the code on volumesegment at line 235 where the error occurs. You can use the matlab debugger there (or type "dbsop if error" and repeat the error). Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:21:01 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:21:01 +0200 Subject: definetrial In-Reply-To: Message-ID: On 26 Apr 2007, at 14:08, Diederick Stoffers wrote: > The CTF dataset has been modified and now contains 160 trials with > a length > of 3.2 seconds and two markers (stimulus onset and trialtype) at 1 > second > into the trial as well as a marker for artefacts. > > Could anyone please advice what to include in mytrialfun.m ? Is it > only > possible to use triggers (in that case I will have to convert > markers to > triggers) or can I also use the information in MarkerFile.mrk? I have > attached a trialfun.m file which holds some of the information. Hi Diederick, There was no attachement to your mail. Please do event = read_fcdc_event(datasetdir) and then for i=1:length(event) disp(event(i)); end What you will see is a long list of events, both with type=trial and type=trigger. So not only the triggers but also the trials are listed as events. You can combine them: i.e. for each trial-event look into the corresponding trigger event and determine based on the trigger value whether to include the trial. Also marker events (which are stored in the CTF directory in a seperate file) thaht contain artifacts will be listed as events. An example trialfun is on http://www2.ru.nl/fcdonders/fieldtrip/ doku.php? id=fieldtrip:documentation:making_your_own_trialfun_for_conditional_tria l_definition Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 14:33:16 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 14:33:16 +0200 Subject: using prepare_layout and gradfile to generate mags and planar layout In-Reply-To: Message-ID: Hi Sameer On 19 Apr 2007, at 23:22, Sameer Walawalkar wrote: > Usually this meant lay.labels did not have MEG in them. In the > past, I have taken care of these errors by making changes to > Topoplot and multiplot and adding the MEG to the labels. Why don't you make a couple of layout files yourself with the selection of channels that you are interested in for plotting? With the matlab editor and some search-and-replace it is easy to change the channel labels to either include the "MEG " part or not (takes care of your deviant channel names). Knowing that they are systematically ordered, it is also easy to remove every second and third line in the file (takes care of the subset selection of planar or magnetometer channels). Editing these files in a text editor will only take you 5-10 minutes or so. > But with each version of changes being made, it becomes tougher and > tougher to keep up with this. That is why it is helpfull to use your own layout files instead of changing the code, since they do not change (assuming that you name them differently and keep them in a place where they are not overwritten by FT upgrades). > Incidently, my most currently download (april 18) is giving this > weird error for mags.lay : > > cfg.layout = NM306mags.lay; > reading layout from file NM306all.lay > ??? Trouble reading floating point number from file (row 1, field > 1) ==> MATLAB 5.0 MAT-file, Platform: You are not using Matlab 5.0 are you? It seems to be a matlab error, or your layout file not detected as being an ascii file. Since I do not know what is your file "NM306mags.lay", it might also be that your file is corrupt. Fieldtrip does include a file with the name NM306mag.lay, without the 's'. You can try that one. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Brian.Roach at YALE.EDU Mon May 7 15:04:55 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 7 May 2007 09:04:55 -0400 Subject: Fwd: [FIELDTRIP] source analysis example images Message-ID: > >fieldTrip users, > >I've run a source analysis using the DICS method and EEG data. Here is >the code the leads me to the attached sourceplot results: > >cfg.output = 'powandcsd'; >cfg.method = 'mtmfft'; >cfg.tapsmofrq = 2; >cfg.foilim = [80 81]; >freq = freqanalysis(cfg, data); >cfg.method = 'dics'; >cfg.frequency = 80; >cfg.hdmfile = '/home/bjr39/FTsource/vol.mat'; >cfg.resolution = 2; >cfg.projectnoise= 'yes'; >tic;source = sourceanalysis(cfg, freq);toc >cfg.mriunits = 'mm'; >cfg.sourceunits = 'mm'; >cfg.funparameter = 'nai'; >sourceD = sourcedescriptives([], source); >mriFile = '/home/bjr39/FTsource/t1_icbm_normal_1mm_pn0_rf0.mnc'; >tic; sourceF = source2full(sourceD); toc >tic; sourceInterp = sourceinterpolate(cfg, sourceF, mriFile); toc >sourceplot(cfg, sourceInterp) > >I am wondering if this type of result seems reasonable (if it looks as >though I have not made any huge mistakes)? If so, I would run another >condition for the same subject and try to use the statistics functions. > >Also, what does this color scale describe? What are its units? > >thanks, >Brian > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: naiOutput2.png Type: application/octet-stream Size: 98772 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: naiOutput.png Type: application/octet-stream Size: 106585 bytes Desc: not available URL: -------------- next part -------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 21:42:47 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 21:42:47 +0200 Subject: Fwd: [FIELDTRIP] source analysis example images In-Reply-To: <6.1.2.0.2.20070507090423.042c04f0@email.med.yale.edu> Message-ID: Hi Brian On 7 May 2007, at 15:04, Brian Roach wrote: >> I am wondering if this type of result seems reasonable (if it >> looks as though I have not made any huge mistakes)? If so, I >> would run another condition for the same subject and try to use >> the statistics functions. >> >> Also, what does this color scale describe? What are its units? The ratio between projected power and projected noise, where the noise estimate is based on the smallest singular value of the cross- spectral density matrix. See van Veen 1997. It is dimensionless. Note that the magnitude strongly depends on the noise estimate. But given that you are able to estimate NAI with EEG without specifying cfg.lambda makes me suspicious: The following code from "private/beamformer_dics.m" (around line 164) should apply if projectnoise % estimate the noise power, which is further assumed to be equal and uncorrelated over channels if isrankdeficient % estimated noise floor is equal to or higher than lambda noise = lambda; else % estimate the noise level in the covariance matrix by the smallest singular value noise = svd(Cf); noise = noise(end); % estimated noise floor is equal to or higher than lambda noise = max(noise, lambda); end end You did not specify lambda, hence the mallest singular value of the cross-spectral density matrix will be used (second part of the code). But in case of averaged referenced EEG, that should be zero. Hence the noise estimate is zero, resulting in NAI = source power divided by zero, which should be infinite. You should ensure that your EEG data is average referenced over teh channels on which you want to base your source reconstruction prior to computing freqanalysis and sourceanalysis. If the EEG data is average reference and you specify cfg.lambda=0 in sourceanalysis, you should see a warning about the cross-spectral density matrix being rank deficient and your nai should be infinite. Hence you have to specify a manual estimate of the noise floor (in cfg.lambda). Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:04:51 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:04:51 +0200 Subject: another help request for *.tfc files In-Reply-To: Message-ID: Hi Andrew, On 19 Apr 2007, at 0:28, Andrew Smart wrote: > In prepare_timefreq_data I changed: > > output.label = input.label; > > to > > output.label = input.labelcmb; > > To accomodate the labelcmb field in the fieldtrip structure. This > gets me by > the errors about the field 'label' not existing. The input data selection in freqanalysis depends on prepare_timefreq_data, but then that subfunction is not smart enough to work with bivariate measures (i.e. coherence depends on channel pairs and is bivariate, whereas power is univariate). I suggest that you change the code in freqstatistics by the code below. That renames both cohspctrm and labelcmb into something that the remainder of the code should be able to support. subsequently the low-level code should behave as if it is univariate data. Please let me know if it works. best regards, Robert ---- function [stat] = freqstatistics(cfg, varargin) % here is the help % the low-level data selection function does not know how to deal with other parameters, so work around it if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') % use the power spectrum, this is the default elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') % use the cross spectrum, this might work as well (but has not been tested) elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') % for testing coherence on group level: % rename cohspctrm->powspctrm and labelcmb->label for i=1:length(varargin) dat = varargin{i}.cohspctrm; labcmb = varargin{i}.labelcmb; for j=1:size(labcmb) lab{j,1} = sprintf('%s - %s', labcmb{j,1}, labcmb{j,2}); end varargin{i} = rmsubfield(varargin{i}, 'cohspctrm'); varargin{i} = rmsubfield(varargin{i}, 'labelcmb'); varargin{i} = setsubfield(varargin{i}, 'powspctrm', dat); varargin{i} = setsubfield(varargin{i}, 'label', lab); end else % rename the desired parameter to powspctrm fprintf('renaming parameter ''%s'' into ''powspctrm''\n', cfg.parameter); for i=1:length(varargin) dat = getsubfield(varargin{i}, cfg.parameter); varargin{i} = rmsubfield (varargin{i}, cfg.parameter); varargin{i} = setsubfield(varargin{i}, 'powspctrm', dat); end end % call the general function [stat] = statistics_wrapper(cfg, varargin{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:12:09 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:12:09 +0200 Subject: source coherence in one condition In-Reply-To: Message-ID: On 26 Apr 2007, at 0:35, Andrew Smart wrote: > I would like to try to compute whether there is significant > coherence across > subjects but within one condition and between two dipoles. This code > generates graphs but I am unclear about what they mean: Hi Andrew, It is unclear to me what the comparison is in the statistical test that you want to perform. There should be a hypothesis like "coherence is larger in XXX than YYY", which rephrased would be H0: the coherence is the same. Based on the H0, the probablility can be computed and H0 can (perhaps) be rejected. You cannot say that "coherence is significant" just like that. If the hypotheis is that coherence between one dipole pair is larger than between the other dipole pair, then I am affraid that you cannot test that using a permutation approach. With a permutation or randomizarion test you test the hypothesis that the data in two observed conditions is exchangeable. Simple differences in power in one of the 4 sources underlying the two dipole pairs would already be enough to reject the null-hypothesis that the data is exchangeable, but those power differences do not have to mean that there is a coherence difference. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon May 7 22:17:11 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 May 2007 22:17:11 +0200 Subject: loreta2fieldtrip output In-Reply-To: Message-ID: Hi Christian On 24 Apr 2007, at 14:22, Christian Rosenau wrote: > this is the struct which is created by loreta2fieldtrip > > dim: [37 44 36] > xgrid: [1x29 double] > ygrid: [1x34 double] > zgrid: [1x24 double] > and this is the error message > ??? Error using ==> fieldtrip-20070402\private\grid2transform > dimensions do not correspond > There is a problem with your data as outputted by loreta2fieldtrip. The data specifies that the dimension is 37x44x36, but at the same time the volume coordinate axes (xgrid, ygrid, zgrid) are specified as 29x34x24. That does not correspond. Please try to debug the code in loreta2fieldtrip, since there the format (and dimensions) of the Loreta files is hardcoded. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From andrew.smart at NYU.EDU Tue May 8 03:36:01 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Mon, 7 May 2007 20:36:01 -0500 Subject: source coherence in one condition In-Reply-To: Message-ID: Hi Robert, Thank you very much for the code and the answers. It helps to clarify things alot. My understanding of coherence was that if the phase difference between two signals is confined to within 2pi over some time interval, they are phase locked, ie the temporal variations in the signals tend to follow each other. But that this is regardless of their differences in amplitudes. When amplitude also covaries then there is 'true' coherence. I thought that you could test for signifant coherence between two signals. For example in BESA you can do permutation tests on individual subjects for 'significant' coherence between a reference dipole and the rest of the dipoles in a model in one condition. I might be misunderstanding something though becuase I was wondering if one could do this on a group level by importing the coherence data from BESA into fieldtrip. I suppose this would be coherence relative to some baseline, but I am not sure if that makes any sense. I don't know exactly how BESA calculates coherence. So I guess H0 would be that there is no coherence between two dipoles that is not due to chance in a particular condition - is that a possible null hypothesis for coherence? Thank you again for all your help! andy ----- Original Message ----- From: Robert Oostenveld Date: Monday, May 7, 2007 3:12 pm Subject: Re: [FIELDTRIP] source coherence in one condition To: FIELDTRIP at NIC.SURFNET.NL > On 26 Apr 2007, at 0:35, Andrew Smart wrote: > > > I would like to try to compute whether there is significant > > coherence across > > subjects but within one condition and between two dipoles. This code > > generates graphs but I am unclear about what they mean: > > Hi Andrew, > > It is unclear to me what the comparison is in the statistical test > that you want to perform. There should be a hypothesis like > "coherence is larger in XXX than YYY", which rephrased would be H0: > > the coherence is the same. Based on the H0, the probablility can be > > computed and H0 can (perhaps) be rejected. You cannot say that > "coherence is significant" just like that. > > If the hypotheis is that coherence between one dipole pair is larger > > than between the other dipole pair, then I am affraid that you cannot > > test that using a permutation approach. With a permutation or > randomizarion test you test the hypothesis that the data in two > observed conditions is exchangeable. Simple differences in power in > > one of the 4 sources underlying the two dipole pairs would already be > > enough to reject the null-hypothesis that the data is exchangeable, > > but those power differences do not have to mean that there is a > coherence difference. > > Robert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue May 8 13:30:28 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 8 May 2007 13:30:28 +0200 Subject: source coherence in one condition In-Reply-To: Message-ID: Dear Andrew, > Thank you very much for the code and the answers. It helps to clarify things alot. > My understanding of coherence was that if the phase difference between two signals > is confined to within 2pi over some time interval, they are phase locked, ie the > temporal variations in the signals tend to follow each other. But that this is > regardless of their differences in amplitudes. When amplitude also covaries then > there is 'true' coherence. I thought that you could test for signifant coherence > between two signals. I would forget about the influence of amplitude covariation on coherence (on top of phase consistency). This is a side-issue for the problem that you are addressing (testing for significant coherence in a single condition). > > For example in BESA you can do permutation tests on individual subjects for > 'significant' coherence between a reference dipole and the rest of the dipoles in a > model in one condition. I might be misunderstanding something though becuase I > was wondering if one could do this on a group level by importing the coherence data > from BESA into fieldtrip. I suppose this would be coherence relative to some > baseline, but I am not sure if that makes any sense. I don't know exactly how BESA > calculates coherence. > > So I guess H0 would be that there is no coherence between two dipoles that is not > due to chance in a particular condition - is that a possible null hypothesis for > coherence? In my opinion, it does not make sense to test the null hypothesis that coherence between two EEG/MEG-channels is equal to zero. The reason for this is biophysical: due to volume conduction, the activity produced by a given source will be picked up by all EEG/MEG-channels, and therefore it does not make sense to test the null hypothesis that coherence is zero. Testing coherence relative to baseline certainly makes sense, and is possible in Fieldtrip, although it is not documented very well. (I remember a work-around posted by Jan-Mathijs Schoffelen for testing coherence differences in within-subjects designs.) However, you should keep in mind that significant coherence-differences can also be produced by differences in power. This is because coherence not only measures the phase consistency between the signals at the source level but also the signal-to-noise ratio (SNR) at the different sensors: For a fixed source-level phase consistency, the larger the SNR, the larger the coherence. Greetings, dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thank you again for all your help! > > andy > > ----- Original Message ----- > From: Robert Oostenveld > Date: Monday, May 7, 2007 3:12 pm > Subject: Re: [FIELDTRIP] source coherence in one condition > To: FIELDTRIP at NIC.SURFNET.NL > > > > On 26 Apr 2007, at 0:35, Andrew Smart wrote: > > > > > I would like to try to compute whether there is significant > > > coherence across > > > subjects but within one condition and between two dipoles. This code > > > generates graphs but I am unclear about what they mean: > > > > Hi Andrew, > > > > It is unclear to me what the comparison is in the statistical test > > that you want to perform. There should be a hypothesis like > > "coherence is larger in XXX than YYY", which rephrased would be H0: > > > > the coherence is the same. Based on the H0, the probablility can be > > > > computed and H0 can (perhaps) be rejected. You cannot say that > > "coherence is significant" just like that. > > > > If the hypotheis is that coherence between one dipole pair is larger > > > > than between the other dipole pair, then I am affraid that you cannot > > > > test that using a permutation approach. With a permutation or > > randomizarion test you test the hypothesis that the data in two > > observed conditions is exchangeable. Simple differences in power in > > > > one of the 4 sources underlying the two dipole pairs would already be > > > > enough to reject the null-hypothesis that the data is exchangeable, > > > > but those power differences do not have to mean that there is a > > coherence difference. > > > > Robert > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > > the FieldTrip toolbox, to share experiences and to discuss new ideas > > for MEG and EEG analysis. See also http://www.ru.nl/fcdonders/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:05:20 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:05:20 -0400 Subject: appenddata Message-ID: Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:39:38 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:39:38 -0400 Subject: appenddata: correction to question appenddata Message-ID: Sorry, for the error in the earlier email, dataset and headerfile are also different (same subject). trialdef and datatype are the same. so to restate the question, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where cfg.dataset, cfg.headerfile, and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are the same, will data = appenddata(cfg1,data1,data2,data3) work correctly? sameer ---------- Forwarded message ---------- Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) From: Sameer Walawalkar To: FIELDTRIP at NIC.SURFNET.NL Subject: appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue May 8 18:44:37 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 8 May 2007 18:44:37 +0200 Subject: appenddata In-Reply-To: Message-ID: Hello Sameer, Yes it will work correctly. The only thing the function does with the .trl is concatenate that too. line 172 in newest version: % also concatenate the trial specification cfg.trl = cat(1, trl{:}); It doesn't care about dataset, headerfile, datatype and trialdef as long as you have the same channels in all datasets it works. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, May 08, 2007 6:05 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue May 8 18:48:38 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 8 May 2007 18:48:38 +0200 Subject: appenddata: correction to question appenddata In-Reply-To: Message-ID: It doesn't matter if it are different datasets/headerfiles you can just concatenate. But keep in mind that if the different datasets are measured in different sessions, and the electrodes (when EEG) or sensors/headposition (when MEG) is different in the two datasets, the same channel in the concatenated dataset can measure a different brain area. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, May 08, 2007 6:40 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] appenddata: correction to question appenddata Sorry, for the error in the earlier email, dataset and headerfile are also different (same subject). trialdef and datatype are the same. so to restate the question, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where cfg.dataset, cfg.headerfile, and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are the same, will data = appenddata(cfg1,data1,data2,data3) work correctly? sameer ---------- Forwarded message ---------- Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) From: Sameer Walawalkar To: FIELDTRIP at NIC.SURFNET.NL Subject: appenddata Hello, The usage for appenddata is data = appenddata(cfg,data1,data2,data3) I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where dataset, headerfile, datatype and trialdef are the same and the only difference is ofcourse in the .trl field, will data = appenddata(cfg1,data1,data2,data3) work correctly? Thanks for your reply, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue May 8 18:55:55 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 8 May 2007 12:55:55 -0400 Subject: appenddata: correction to question appenddata In-Reply-To: <00fa01c79190$ba1ab8a0$642dae83@fcdonders.nl> Message-ID: thanks a lot Ingrid. I am aware of that, and I think I can do it because Neuromag has a software (MaxMove) which will take care of exactly such changes. I restrict myself to appending data from trials for only one subject within one session and ensure that MaxMove is applied to the dataset before I extract data. sameer On Tue, 8 May 2007, Ingrid Nieuwenhuis wrote: > It doesn't matter if it are different datasets/headerfiles you can just > concatenate. But keep in mind that if the different datasets are measured in > different sessions, and the electrodes (when EEG) or sensors/headposition > (when MEG) is different in the two datasets, the same channel in the > concatenated dataset can measure a different brain area. > > Bests Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, May 08, 2007 6:40 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] appenddata: correction to question appenddata > > Sorry, for the error in the earlier email, dataset and headerfile are also > different (same subject). trialdef and datatype are the same. > > so to restate the question, > > The usage for appenddata is > data = appenddata(cfg,data1,data2,data3) > > I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, > cfg3, corresponding to data1, data2, data3, where cfg.dataset, > cfg.headerfile, > and cfg.trl are different, but cfg.datatype (continous) and cfg.trialdef are > > the same, will > data = appenddata(cfg1,data1,data2,data3) work correctly? > > sameer > > ---------- Forwarded message ---------- > Date: Tue, 8 May 2007 12:05:20 -0400 (EDT) > From: Sameer Walawalkar > To: FIELDTRIP at NIC.SURFNET.NL > Subject: appenddata > > > Hello, > > The usage for appenddata is > data = appenddata(cfg,data1,data2,data3) > > I can see that appenddata does look for cfg.trl etc. If I have cfg1, cfg2, > cfg3, corresponding to data1, data2, data3, where dataset, headerfile, > datatype and trialdef are the same and the only difference is ofcourse in > the > .trl field, will > data = appenddata(cfg1,data1,data2,data3) work correctly? > > Thanks for your reply, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 8 21:14:02 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 May 2007 21:14:02 +0200 Subject: appenddata In-Reply-To: Message-ID: Hi Sameer, On 8 May 2007, at 18:05, Sameer Walawalkar wrote: > I can see that appenddata does look for cfg.trl etc. If I have > cfg1, cfg2, cfg3, corresponding to data1, data2, data3, where > dataset, headerfile, datatype and trialdef are the same and the > only difference is ofcourse in the .trl field, will > data = appenddata(cfg1,data1,data2,data3) work correctly? The reason for concatenating the cfg.trl in the different datasets is for keeping reference to the sections of data. The trl matrix and the event structure (read_fcdc_event) can be used afterwards to reconstruct the events on which the data was selected, even after partial and complete artifact removal. In your case, where the data comes from different datafiles, the concatenated dataset does not relate any more to either one of the files and as such the concatenated trl is not usefull any more. Note that this is only implemented to support rather exotic applications, so probably you don't have to worry too much about the concatenating of cfg.trl. Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 8 21:24:06 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 May 2007 21:24:06 +0200 Subject: Fwd: [Fieldtrip] createlayout Message-ID: Begin forwarded message: > From: Nicolas Robitaille > Date: 8 May 2007 17:34:46 GMT+02:00 > > In the script "Use independent component analysis (ICA) to remove > ECG artifacts", there is mention of the function createlayout > > % look at the spatial topography of the components > % note that this requires that the fieldtrip/private function > "createlayout" to be available on your path > lay = createlayout('CTF151.lay'); > figure; > subplot(2,3,1);topoplot([], lay.prj(1:151,1), lay.prj(1:151,2), > comp.topo(:,1));title(num2str(1)); > subplot( ....... > > However, I can't find this function in fieldtrip/private. The > function prepare_layout.m did not create a lay.prj field. So, can I > plot topographic map of components without createlayout? Or where > can I find it? Hi Nicolas The example script refers to functions that have been updated considerably and renamed in the meantime: you should indeed use prepare_layout function. The output contains a lay.pos = [X Y]; lay.width = Width; lay.height = Height; lay.label = Lbl; You should use lay.pos instead of lay.prj. I have updated the wiki page with the example script. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tillmann at MPIH-FRANKFURT.MPG.DE Thu May 10 11:49:27 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Thu, 10 May 2007 11:49:27 +0200 Subject: clustering parameters Message-ID: Hi all, I'm wondering which parameters I should use for determining the way the clusters are formed in the freqstatistics; in the tutorials, I only found 'cfg.minnbchan' to specify the minimum number of neighborhood channels for a cluster, but in an older example script I also found 'cfg.neighbourdist' to determine the min. distance between neighborhood channels... and if 'cfg.neighbourdist' is used, is the value specified in mm or cm? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu May 10 12:37:32 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 10 May 2007 12:37:32 +0200 Subject: clustering parameters In-Reply-To: <07051011492728_2800013E@mpih-frankfurt.mpg.de> Message-ID: Christine, > I'm wondering which parameters I should use for determining the way the > clusters are formed in the freqstatistics; > > in the tutorials, I only found 'cfg.minnbchan' to specify the minimum > number of neighborhood channels for a cluster, but in an older example > script I also found 'cfg.neighbourdist' to determine the min. distance > between neighborhood channels... The two fields have very different functionalities. 1. The field cfg.neighbourdist is used to determine which channel pairs are neighbouring channels. See neighbourselection.m. 2. The field cfg.minnbchan is used to determine whether a (channel,frequency,time)-triplet (or (channel,time)-pair, or channel-singleton) that exceeds the threshold should be included in the clustering algorithm or not. Tip: start with the default value (cfg.minnbchan=0) and watch what happens if you change its value. Don't worry too much, cfg.minnbchan is a tuning parameter for which there is no theoretical rationale (contrary to the permutation test itself, which has a beautiful theoretical rationale). That's why I get so many questions about it... I have seriously considered removing it from the Fieldtrip code, but it still in, so you can play with it... > and if 'cfg.neighbourdist' is used, is the value specified in mm or cm? You should specify it in the scale as the coordinates of your channel configuration. Remember that you must run neighbourselection.m to construct your neighbourhood structure. Greetings, dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/> > Thanks, > Christine > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From muthuraman10 at HOTMAIL.COM Tue May 15 11:37:08 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 15 May 2007 09:37:08 +0000 Subject: Dynamical Coherence! Message-ID: Hello Fieldtrippers, Is there a way in the TopoplotTFR function to specify the time interval for plotting the coherence, inroder to get the dynamical coherence at specified time intervals between EEG and EMG channels. The Cfg.xlim when specified only acts as a labelling in the plot. Thanking you With regards M.Muthuraman. _________________________________________________________________ Voice your questions and our experts will answer them http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From nicola.ray at DPAG.OX.AC.UK Wed May 16 19:04:56 2007 From: nicola.ray at DPAG.OX.AC.UK (Niki Ray) Date: Wed, 16 May 2007 19:04:56 +0200 Subject: custom define trial to remove BAD data Message-ID: Hi, I would like to remove data which i have marked as BAD using CTF software, before using preprocessing. Is there anywhere I can find an example mytrialfun script that would do this? I'm a beginner matlab programmer, so can't seem to work it out for myself!! Many thanks Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From enteka at HOTMAIL.COM Wed May 16 19:18:42 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Wed, 16 May 2007 17:18:42 +0000 Subject: custom define trial to remove BAD data Message-ID: Hello Niki I wrote a litte function to do exacly this. You need to call it after "definetrial" and before "preprocessing". It will modify the cfg structure outputted from definetrial. Use: cfg = nr_fieldtrip_removeMarkedBad(cfg); Hope this help Nic ************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ ----Original Message Follows---- From: Niki Ray Reply-To: FieldTrip discussion list To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] custom define trial to remove BAD data Date: Wed, 16 May 2007 19:04:56 +0200 Hi, I would like to remove data which i have marked as BAD using CTF software, before using preprocessing. Is there anywhere I can find an example mytrialfun script that would do this? I'm a beginner matlab programmer, so can't seem to work it out for myself!! Many thanks Niki ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. _________________________________________________________________ Windows Live Hotmail est la prochaine génération de MSN Hotmail. Il est rapide, simple et plus sûr que jamais. Mais surtout il est toujours gratuit. www.nouveauhotmail.ca?icid=WLHMFRCA119 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From alotof_xd at YAHOO.COM Mon May 28 19:20:03 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Mon, 28 May 2007 10:20:03 -0700 Subject: value of triggers Message-ID: Hi, FieldTrip experts, I met a problem on value of triggers. I don't know if you have similar experience. The steps I used were correct but some values missed. i.e., I set triggers with 1,2,3,5 values but only 5 can be found. The data collected from latest NeuroMag 306 Vectorview system. The script was wrote in E-Prime. The command I used in FieldTrip as followed: [event(find(strcmp('STI101', {event.type}))).value] The number and sample of triggers whose value is 5 are correct. But triggers whose value is 1, 2 or 3 are miss. No trigger value in other channel like STI201 and STI301. I have no idea where the key is to the problem. I don't think that FieldTrip cannot read triggers whose value is less than 5. Is that any tricks needed on E-Prime? Or anythng need to be noticed during data collection? Thaks in advance. Best, Eve --------------------------------- Pinpoint customers who are looking for what you sell. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Tue May 29 05:16:25 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Mon, 28 May 2007 20:16:25 -0700 Subject: again value of triggers Message-ID: Hi, FieldTrip experts, I tried the data in SPM5 and found SPM5 could read out other trigger values from STI101 channel. So it might be something wrong with my steps. But I couldn't find out where the problem might be. I read .fif data head with command: hdr = read_fcdc_header(filename); I also read the event with command: [event]=read_fcdc_event(filename); then I checked the trigger: [event(find(strcmp('STI101', {event.type}))).value] Why it miss some triggers with different values? Thanks in advance. Best, Eve alotof eve wrote: Date: Mon, 28 May 2007 10:20:03 -0700 From: alotof eve Subject: [FIELDTRIP] value of triggers To: FIELDTRIP at NIC.SURFNET.NL Hi, FieldTrip experts, I met a problem on value of triggers. I don't know if you have similar experience. The steps I used were correct but some values missed. i.e., I set triggers with 1,2,3,5 values but only 5 can be found. The data collected from latest NeuroMag 306 Vectorview system. The script was wrote in E-Prime. The command I used in FieldTrip as followed: [event(find(strcmp('STI101', {event.type}))).value] The number and sample of triggers whose value is 5 are correct. But triggers whose value is 1, 2 or 3 are miss. No trigger value in other channel like STI201 and STI301. I have no idea where the key is to the problem. I don't think that FieldTrip cannot read triggers whose value is less than 5. Is that any tricks needed on E-Prime? Or anythng need to be noticed during data collection? Thaks in advance. Best, Eve --------------------------------- Pinpoint customers who are looking for what you sell. ---------------------------------- The aim of this list 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/ --------------------------------- Shape Yahoo! in your own image. Join our Network Research Panel today! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: