From r.oostenveld at FCDONDERS.RU.NL Wed Jul 2 11:49:56 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 2 Jul 2008 11:49:56 +0200 Subject: Reading in Neuroscan files In-Reply-To: Message-ID: Hi Monika, On 30 Jun 2008, at 13:21, Monika Mellem wrote: > I have noticed some things when reading in both Neuroscan .eeg > and .cnt files. > > 1) When reading a Neuroscan .eeg file, read_event.m seems to put > either > "accept" or "reject" into the field event.value. According to how > event.field is used later on, it should be putting the trigger > values in > this field which are in tmp.sweep.type. I modified the code as > shown below. Thanks for the suggestion. I have changed it into the following for i=1:hdr.nTrials % the *.eeg file has a fixed trigger value for each trial % furthermore each trial has the label 'accept' or 'reject' tmp = read_ns_eeg(filename, i); % create an event with the trigger value event(end+1).type = 'trial'; event(end ).sample = (i-1)*hdr.nSamples + 1; event(end ).value = tmp.sweep.type; % trigger value event(end ).offset = -hdr.nSamplesPre; event(end ).duration = hdr.nSamples; % create an event with the boolean accept/reject code event(end+1).type = 'accept'; event(end ).sample = (i-1)*hdr.nSamples + 1; event(end ).value = tmp.sweep.accept; % boolean value indicating accept/reject event(end ).offset = -hdr.nSamplesPre; event(end ).duration = hdr.nSamples; end This encodes both the event value (trigger code) and the accept/ reject state, albeit in different events. The two events can be combined in a trialfun of course. > 2) When reading in a Neuroscan .cnt file, read_header.m puts some bad > channel labels into hdr.label using what it gets from the > read_ns_cnt.m file > (around line 564). Whatever is in orig.chan.names starts with the > correct > channels (about 10 of them) and then has blank values or odd > characters for > the rest of the channel labels. This seems like a bug w.r.t. the reading of the header in general. I was not able to reproduce the problem. Could you send me the .cnt file that has the problem, e.g. using yousendit.com or on ftp.fcdonders.nl? best regards, Robert > As a quick fix for just the channel labels, > I just took the channel labels that read_ns_hdr.m finds and > substituted them > into hdr.label. See below. This doesn't fix the underlying > problem in > read_ns_cnt.m though which seems to be with the variables chandat and > r.chan.names (lines 140-141). > > orig = read_ns_hdr(filename); > hdr.label = orig.label; > hdr.orig.chan.names = orig.label; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From florisdelange at GMAIL.COM Wed Jul 2 17:45:02 2008 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Wed, 2 Jul 2008 17:45:02 +0200 Subject: Significance test frequency power decrease baseline vs stimulation Message-ID: Dear Thomas, Jan-Matthijs and others, Related to the post of a few days ago (error message undefined data or class data.biol), it looks like this problem has been discussed already before on the list: see https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0610&L=FIELDTRIP&P=R23621 I copy/paste the relevant bit below. Best wishes, Floris On 13 Oct 2006, at 19:03, Marco Buiatti wrote: > > ??? Undefined variable "data" or class "data.biol". > > > > Error in ==> fieldtrip-20061012/private/prepare_design at 92 > > nrepl=size(data.biol,1); > > > > Error in ==> fieldtrip-20061012/private/statistics_wrapper at 212 > > [cfg] = prepare_design(cfg); > > > > Error in ==> timelockstatistics at 50 > > [stat] = statistics_wrapper(cfg, varargin{:}); > > Yep, that is a known problem (sorry about that). The function > prepare_design is not working properly. I suggest to make a design > matrix in cfg.design by hand (similar to, but not completely the same > as in SPM). It is not difficult, and it will also make you more clear > how it works. Please have a look at > https://listserv.surfnet.nl/scripts/wa.exe? > A2=ind0607&L=FIELDTRIP&P=R3192&I=-3&X=77C04E25A87526C2B4 > or if that URL does not work, then search the fieldtrip discussion > list archive for the string "cfg.design". ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Thu Jul 3 15:59:09 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Thu, 3 Jul 2008 15:59:09 +0200 Subject: Call for participation - Autumn School 'Magnetoencephalography' Message-ID: Dear all, I've been asked to distribute the announcement of an Autumn School in 'Magnetoencephalography' to the members of this list. Best, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Call_and_Program.pdf Type: application/binary Size: 141002 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ApplicationForm.pdf Type: application/binary Size: 265885 bytes Desc: not available URL: From A.Stolk at EWI.UTWENTE.NL Thu Jul 3 16:05:00 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Thu, 3 Jul 2008 16:05:00 +0200 Subject: Undefined function or variable "sens" Message-ID: Dear fieldtrippers, While performing statitstical analysis on time-frequency EEG data, I get the following error: ??? Undefined function or variable "sens". Error in ==> neighbourselection at 106 if ~isstruct(sens) Error in ==> statistics_wrapper at 226 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 132 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> fieldtripstatanalyse at 70 [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); The neighbourselection function tells: if ~isstruct(sens) error('Did not find gradiometer or electrode information.'); which gets its data by: % Revision 1.6 2006/07/12 14:14:59 roboos % get sens from data.grad/elec I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? Regards, Arjen Stolk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Jul 3 17:10:40 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 3 Jul 2008 16:10:40 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Jul 7 14:43:59 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Jul 2008 14:43:59 +0200 Subject: fixed bug in sourceanalysis w.r.t. channel ordering Message-ID: Dear all, Thanks to the sharp eye of one of the FieldTrip users, a bug was discovered in SOURCEANALYSIS. The bug caused souercanalysis to result in nonsense results if the channel ordering in the data (i.e. data.label) and the channel ordering in the sensor definition (grad.label or elec.label) was inconsistent. Missing channels in either one were treated correctly, but a different ordering was not treated correctly. The bug did not affect MEG data, hence it was not affecting MEG users in the Donders centre. It might be that people doing source reconstruction on EEG data are affected by the bug. The bug only applied to the SOURCEANALYSIS function, not to the DIPOLEFITTING function. I have just fixed the bug. External users should download the latest daily version from the ftp server, which will be copied to the ftp server this evening around 22h CET. Sorry for the inconvenience that it might have caused. best regards. Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jrkerlin at UCDAVIS.EDU Tue Jul 8 02:08:30 2008 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Mon, 7 Jul 2008 17:08:30 -0700 Subject: Statistics on a pre-defined cluster Message-ID: Hello all, I'm running an 128 electrode EEG experiment and I'd like to constrain my time-locked statistical analysis of Condition B to the significant electrode/time clusters of independent Condition A. I know I can use cfg.elec to constrain the electrode locations before running timelockstatistics, but I don't know how to constrain by a pre-defined elec/time cluster from separate data. All suggestions appreciated. Cheers, Jess Kerlin ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 10:36:48 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 10:36:48 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. I do manage to get my script to work on another computer, but somehow not on this one. ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: do 7/3/2008 5:10 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jul 8 10:52:58 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Jul 2008 10:52:58 +0200 Subject: FieldTrip and BCI2000 Message-ID: Dear fieldtrip users (and specifically those of you interested in BCI and neurofeedback): Last weekend the BCI2000 workshop took place in Utrecht (see http:// www.bci2008.nl). Christian (also from the FCDC) and I contributed to the lectures and hands-on sessions at that workshop by showing how Matlab can be used for "in the pipe" (synchronous) and "out of the pipe" (asynchronous) real-time processing of EEG data. Overall the workshop was a great succes and a lot of fun to be part of. Given the successful demonstration of the joint BCI2000-FieldTrip efforts in Utrecht, we will now release the BCI specific FieldTrip code that we have developed. Part of that code is specific to BCI2000 and will be released through www.bci2000.org and documented there. Part of the code is not specific to BCI2000 and hence will be released and documented at the FieldTrip wiki. Keep an eye on the FieldTrip wiki for updates on this. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Jul 8 10:55:54 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Jul 2008 10:55:54 +0200 Subject: Statistics on a pre-defined cluster In-Reply-To: <4872AFFE.7070406@ucdavis.edu> Message-ID: Hi Jess, You can use avgoverchan, avgovertime and avgoverfreq configuration options in freqstatistics. However, that does not allow you to make a cluster with "ragged edges", i.e. one channel only being included for part of the time in which the effect is significant and not for another part. If you want to do that, then you will have to average over the channel-time-frequency points in the cluster by hand. best regards, Robert On 8 Jul 2008, at 2:08, Jess R. Kerlin wrote: > Hello all, > > I'm running an 128 electrode EEG experiment and I'd like to > constrain my time-locked statistical analysis of Condition B to > the significant electrode/time clusters of independent Condition A. > I know I can use cfg.elec to constrain the electrode locations > before running timelockstatistics, but I don't know how to > constrain by a pre-defined elec/time cluster from separate data. > All suggestions appreciated. > > Cheers, > > Jess Kerlin > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 11:46:15 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 11:46:15 +0200 Subject: Undefined function or variable "sens" Message-ID: If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. Regards, Arjen Stolk ________________________________ Van: FieldTrip discussion list namens A. Stolk Verzonden: di 7/8/2008 10:36 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. I do manage to get my script to work on another computer, but somehow not on this one. ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: do 7/3/2008 5:10 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From grion at SISSA.IT Tue Jul 8 11:50:14 2008 From: grion at SISSA.IT (Natalia Grion) Date: Tue, 8 Jul 2008 11:50:14 +0200 Subject: Overlapping trials In-Reply-To: Message-ID: Dear All, During reading and preprocessing lfps, I find this error for some trials: ?? Subscript indices must either be real positive integers or logicals. *Error in ==> read_data at 576 dat = ncs.dat(begsample:endsample);* Error in ==> read_fcdc_data at 49 [dat] = read_data(varargin{:}); Error in ==> preprocessing at 554 dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, rawindx, strcmp(cfg.continuous, 'yes')); Error in ==> FreqAnalysis at 51 datar{chanindx}=preprocessing(cfgpreproc) Trials are defined by 2 trigger beams, first trigger defines the start of the trial, and 2nd trigger beam: the reward time (which is variable). I'm taking smaples in this way: prestimbeam: 3 sec before "start trigger", and poststimbeam = time till trigger of reward. I pretty sure this error appears when prestimbeam is overlapping with the previous poststimbeam (actually, taking 2sec before start trigger error doesn't come up). Do you have any suggestion of how i could introduce i conditional statement for skipping these trials? I guess this statement has to be written is "read_data" function, right? Thanks! Natalia Grion ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.b.dijkman at STUDENT.UTWENTE.NL Tue Jul 8 13:03:52 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Tue, 8 Jul 2008 13:03:52 +0200 Subject: Overlapping trials Message-ID: Hi Natalia, Your error seems te originate from this line: dat = ncs.dat(begsample:endsample); Either the begsample variable or the endsample variable isn't a positive number. As you probably know, matlab starts counting with 1 for vector and matrix indices. Since you mention the error doesn't come up when you take a trial 2 sec instead of 3 sec before the prestimbeam, my guess is that he sample index of the prestimbeam is more than 2 sec * samplefreq, but less then 3 sec * samplefreq. Perhaps you could elaborate a bit further about your experimental setup? All your trials have a different duration? I hope this helps, Thomas Dijkman -----Oorspronkelijk bericht----- Van: FieldTrip discussion list namens Natalia Grion Verzonden: di 8-7-2008 11:50 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] Overlapping trials Dear All, During reading and preprocessing lfps, I find this error for some trials: ?? Subscript indices must either be real positive integers or logicals. *Error in ==> read_data at 576 dat = ncs.dat(begsample:endsample);* Error in ==> read_fcdc_data at 49 [dat] = read_data(varargin{:}); Error in ==> preprocessing at 554 dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, rawindx, strcmp(cfg.continuous, 'yes')); Error in ==> FreqAnalysis at 51 datar{chanindx}=preprocessing(cfgpreproc) Trials are defined by 2 trigger beams, first trigger defines the start of the trial, and 2nd trigger beam: the reward time (which is variable). I'm taking smaples in this way: prestimbeam: 3 sec before "start trigger", and poststimbeam = time till trigger of reward. I pretty sure this error appears when prestimbeam is overlapping with the previous poststimbeam (actually, taking 2sec before start trigger error doesn't come up). Do you have any suggestion of how i could introduce i conditional statement for skipping these trials? I guess this statement has to be written is "read_data" function, right? Thanks! Natalia Grion ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 p.medendorp at NICI.RU.NL Tue Jul 8 15:03:19 2008 From: p.medendorp at NICI.RU.NL (Pieter Medendorp) Date: Tue, 8 Jul 2008 15:03:19 +0200 Subject: POSTDOC POSITION AVAILABLE IN NIJMEGEN Message-ID: POST-DOCTORAL RESEARCH POSITION IN SPATIAL PERCEPTION AND MOTOR CONTROL A post-doctoral research position (3 yrs) is available at the Radboud University Nijmegen, The Netherlands, in the research group of Dr. Pieter Medendorp. Research in our group aims to elucidate the computational and neural strategies in human sensorimotor processing. This theme is mainly investigated from a neuroscience systems point of view, using a combination of computational modeling, psychophysics and imaging techniques (EEG, MEG and fMRI). Current research projects investigate topics such as spatial constancy, effector selection, eye-hand coordination, vestibular processing, and spatial motion perception. The new project, funded by the Netherlands Organisation for Scientific Research, will study the neural signals and mechanisms that preserve spatial constancy for motor control. Facilities and tools to support these studies include real-time motion tracking systems, eye trackers, visual displays, and a vestibular platform. Two state-of the-art MRI systems, whole-head MEG, and an EEG lab are also available. Preference will be given to candidates with a PhD in neuroscience, or related field, who have a strong motivation to do challenging interdisciplinary research. Experience with functional imaging, psychophysical techniques, as well as strong programming skills, and a demonstrable affinity with quantitative data analysis (e.g. MatLab) is highly desirable. Salary will be commensurate with experience. The anticipated start date is fall 2008, but earlier is possible. Nijmegen is the oldest city of the Netherlands, with an interesting history dating back to the Roman Empire, nice surrounding scenery (rivers, hills, woods) and a rich cultural life. Interested applicants should send CV, statement of background and interests, and names of 2 referees to: Pieter Medendorp, Nijmegen Institute for Cognition and Information, Radboud University Nijmegen, Montessorilaan 3, 6525 HR Nijmegen, The Netherlands; Email: p.medendorp at nici.ru.nl. Web: http://www.nici.ru.nl/~pieterm/. Review of applications will begin August 15, 2008, and will continue until the position is filled. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 grion at SISSA.IT Tue Jul 8 16:56:47 2008 From: grion at SISSA.IT (Natalia Grion) Date: Tue, 8 Jul 2008 16:56:47 +0200 Subject: Overlapping trials In-Reply-To: Message-ID: Hi Thomas and All, well this are recordings from freely moving rats with neuralynx system. By the way I'm defining trials, yes, they have variable length: I'm taking 3sec before the central beam is triggered (this is indicative of stimulus "on" = start trigger), till the trigger of the 2nd beam is trigger (reward trigger), even if they have a regular behaviour from trial to trial, sometimes they are faster. Start trigger is stored in a separate file as EventTimeTrigger, this event is a TimeStamp, Reward Trigger is stored in an external file (txt file) generated by labview (software that commands the maze). Timestamps are generated by the recording system(microseconds). Every LFP sample has an associated timestamp and this forms the time axis, knowing the EventTimeStamp i can take the 'n' samples before this event and/or after, in my case time taken 'after' depends on how long the rat took to trigger the Reward beam (ellapsed time). This is my function (main part): function [trl]=trialfunNG(cfg) *% get the inter-timestamp time from the header* hdr=read_fcdc_header(cfg.datadir); nlfpsamplespersec=hdr.Fs; *% read the timestamps of the events in the Neuralynx stimulus channel (the .nev-file in cfg.datadir)* events=read_fcdc_event(cfg.datadir); eventlfpsamples=[events(:).sample]'; *% read the stimulus and behavioral information in the external file....info about stimulus, correct\incorrect trials etc* stimbehdata=dlmread(cfg.extstimbehfile,'\t',1,1); *....* nlfpsamplesprestimbeamcrossing=cfg.prestimbeam*nlfpsamplespersec; if ischar(cfg.poststimbeam) && strcmp(cfg.poststimbeam,'respbeam') *%this respbeam is taken from the txt file* rtinmsec=stimbehdata(selvec,6); triallengthinlfpsamples=(rtinmsec/1000)*nlfpsamplespersec; else triallengthinlfpsamples=cfg.poststimbeam*nlfpsamplespersec; end; trl=zeros(nseltrials,3); trl(:,1)=eventlfpsamples(selvec)-nlfpsamplesprestimbeamcrossing; trl(:,2)=eventlfpsamples(selvec)+triallengthinlfpsamples; trl(:,3)=-nlfpsamplesprestimbeamcrossing; I don't know till this point if I'm missing sth from Nlx, or is a bug generated by the way fieldtrip is picking up my data. One solution I thought, would be to write a conditional statement for skipping these trials, but, as the error comes up from read_data. I'd like to know how to introduce it. Thanks again Natalia Thomas Dijkman wrote: > Hi Natalia, > > Your error seems te originate from this line: dat = ncs.dat(begsample:endsample); Either the begsample variable or the endsample variable isn't a positive number. As you probably know, matlab starts counting with 1 for vector and matrix indices. Since you mention the error doesn't come up when you take a trial 2 sec instead of 3 sec before the prestimbeam, my guess is that he sample index of the prestimbeam is more than 2 sec * samplefreq, but less then 3 sec * samplefreq. > Perhaps you could elaborate a bit further about your experimental setup? All your trials have a different duration? > I hope this helps, > > Thomas Dijkman > > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list namens Natalia Grion > Verzonden: di 8-7-2008 11:50 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] Overlapping trials > > Dear All, > During reading and preprocessing lfps, I find this error for some trials: > > ?? Subscript indices must either be real positive integers or logicals. > *Error in ==> read_data at 576 > dat = ncs.dat(begsample:endsample);* > Error in ==> read_fcdc_data at 49 > [dat] = read_data(varargin{:}); > Error in ==> preprocessing at 554 > dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, > rawindx, strcmp(cfg.continuous, > 'yes')); > Error in ==> FreqAnalysis at 51 > datar{chanindx}=preprocessing(cfgpreproc) > > Trials are defined by 2 trigger beams, first trigger defines the start > of the trial, and 2nd trigger beam: the reward time (which is variable). > I'm taking smaples in this way: prestimbeam: 3 sec before "start > trigger", and poststimbeam = time till trigger of reward. I pretty sure > this error appears when prestimbeam is overlapping with the previous > poststimbeam (actually, taking 2sec before start trigger error doesn't > come up). Do you have any suggestion of how i could introduce i > conditional statement for skipping these trials? I guess this statement > has to be written is "read_data" function, right? > Thanks! > Natalia Grion > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Tue Jul 8 16:52:34 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 8 Jul 2008 16:52:34 +0200 Subject: Overlapping trials In-Reply-To: <4873802F.2030209@sissa.it> Message-ID: Dear Natalia, Most likely your error is caused by the begsmp/endsmp in read_data not being integer and positive. This could be due to the fact that your variables nlfpsamplesprestimbeamcrossing and triallengthinlfpsamples are not integer numbers. A simple round should do the trick I guess... In general, I'd advice you to use less elaborate names for the definition of your variables: it saves some typing (also for the repliers to your question ;o) ), and so reduces the probability of typos. Moreover, it facilitates reading. Hope this helped, Jan-Mathijs On Jul 8, 2008, at 4:56 PM, Natalia Grion wrote: > Hi Thomas and All, > well this are recordings from freely moving rats with neuralynx > system. By the way I'm defining trials, yes, they have variable > length: I'm taking 3sec before the central beam is triggered (this > is indicative of stimulus "on" = start trigger), till the trigger > of the 2nd beam is trigger (reward trigger), even if they have a > regular behaviour from trial to trial, sometimes they are faster. > Start trigger is stored in a separate file as EventTimeTrigger, > this event is a TimeStamp, Reward Trigger is stored in an external > file (txt file) generated by labview (software that commands the > maze). Timestamps are generated by the recording system > (microseconds). Every LFP sample has an associated timestamp and > this forms the time axis, knowing the EventTimeStamp i can take > the 'n' samples before this event and/or after, in my case time > taken 'after' depends on how long the rat took to trigger the > Reward beam (ellapsed time). This is my function (main part): > > function [trl]=trialfunNG(cfg) > *% get the inter-timestamp time from the header* > hdr=read_fcdc_header(cfg.datadir); > nlfpsamplespersec=hdr.Fs; > > *% read the timestamps of the events in the Neuralynx stimulus > channel (the .nev-file in cfg.datadir)* > events=read_fcdc_event(cfg.datadir); > eventlfpsamples=[events(:).sample]'; > > *% read the stimulus and behavioral information in the external > file....info about stimulus, correct\incorrect trials etc* > stimbehdata=dlmread(cfg.extstimbehfile,'\t',1,1); > *....* > nlfpsamplesprestimbeamcrossing=cfg.prestimbeam*nlfpsamplespersec; > > if ischar(cfg.poststimbeam) && strcmp(cfg.poststimbeam,'respbeam') > *%this respbeam is taken from the txt file* > rtinmsec=stimbehdata(selvec,6); > triallengthinlfpsamples=(rtinmsec/1000)*nlfpsamplespersec; > else > triallengthinlfpsamples=cfg.poststimbeam*nlfpsamplespersec; > end; > trl=zeros(nseltrials,3); > trl(:,1)=eventlfpsamples(selvec)-nlfpsamplesprestimbeamcrossing; > trl(:,2)=eventlfpsamples(selvec)+triallengthinlfpsamples; > trl(:,3)=-nlfpsamplesprestimbeamcrossing; > > I don't know till this point if I'm missing sth from Nlx, or is a > bug generated by the way fieldtrip is picking up my data. One > solution I thought, would be to write a conditional statement for > skipping these trials, but, as the error comes up from read_data. > I'd like to know how to introduce it. > Thanks again > Natalia > > > > Thomas Dijkman wrote: >> Hi Natalia, >> >> Your error seems te originate from this line: dat = ncs.dat >> (begsample:endsample); Either the begsample variable or the >> endsample variable isn't a positive number. As you probably know, >> matlab starts counting with 1 for vector and matrix indices. Since >> you mention the error doesn't come up when you take a trial 2 sec >> instead of 3 sec before the prestimbeam, my guess is that he >> sample index of the prestimbeam is more than 2 sec * samplefreq, >> but less then 3 sec * samplefreq. Perhaps you could elaborate a >> bit further about your experimental setup? All your trials have a >> different duration? I hope this helps, >> >> Thomas Dijkman >> >> -----Oorspronkelijk bericht----- >> Van: FieldTrip discussion list namens Natalia Grion >> Verzonden: di 8-7-2008 11:50 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: [FIELDTRIP] Overlapping trials >> Dear All, >> During reading and preprocessing lfps, I find this error for some >> trials: >> >> ?? Subscript indices must either be real positive integers or >> logicals. >> *Error in ==> read_data at 576 >> dat = ncs.dat(begsample:endsample);* >> Error in ==> read_fcdc_data at 49 >> [dat] = read_data(varargin{:}); >> Error in ==> preprocessing at 554 >> dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, >> rawindx, strcmp(cfg.continuous, >> 'yes')); >> Error in ==> FreqAnalysis at 51 >> datar{chanindx}=preprocessing(cfgpreproc) >> >> Trials are defined by 2 trigger beams, first trigger defines the >> start of the trial, and 2nd trigger beam: the reward time (which >> is variable). I'm taking smaples in this way: prestimbeam: 3 sec >> before "start trigger", and poststimbeam = time till trigger of >> reward. I pretty sure this error appears when prestimbeam is >> overlapping with the previous poststimbeam (actually, taking >> 2sec before start trigger error doesn't come up). Do you have >> any suggestion of how i could introduce i conditional statement >> for skipping these trials? I guess this statement has to be >> written is "read_data" function, right? >> Thanks! >> Natalia Grion >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From arno at SALK.EDU Tue Jul 8 17:22:45 2008 From: arno at SALK.EDU (arno delorme) Date: Tue, 8 Jul 2008 17:22:45 +0200 Subject: Thesis fellowship EEG Neurofeedback to control mind wandering Message-ID: Thesis fellowship for 3 years financed by the French ministry of research in Toulouse, France: EEG Neurofeedback to control mind wandering The capacity to concentrate for long period of times is critical both for students and some specific position (air traffic controller, monitor security guard, child care teacher or even Paris taxi driver). Failure to do so can result in life-threatening accident. Monks of various traditions, practicing concentrative meditation, excel at developing a one point focus attention. Over the 3-year course of this project, we intend to 1) record the brain activity of monks in meditation using EEG. 2) train normal non-meditative subjects to produce the same brain rhythms as the monk do. 3) test the concentrative capacities of these subjects before and after training. The institution hosting the project is the University of Toulouse III and the CNRS laboratory CERCO. The CERCO (Center for Brain and Cognition Research) is an internationally recognized laboratory of 18 professional independent CNRS researchers. In 2006 4-year evaluation, this laboratory was ranked first in Neuroscience in France. It is well known for its multidisciplinary approach to cognitive neuroscience with experiments on mice, monkeys and humans, and a wide range of imaging methodologies including modeling. The ideal candidate will have: - a master degree or equivalent in the cognitive or computational domain (no constraint in terms of nationality) - an interest for studying the brain and altered states of consciousness such as those induced by neurofeedback or meditation - a training in mathematics, signal processing and/or computer science - fluency in English. Working knowledge in French is preferred. - capacity to work independently - age limit: 25 (or 30 under special circumstances) Contact: Arnaud Delorme via email before the 31 of August 2008 (arno at cerco.ups-tlse.fr ) (include PDF of a motivation letter, a CV, any publication in english/french and have 2 references send recommendation letter independently by email). http://cerco.ups-tlse.fr/~delorme ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 v.litvak at ION.UCL.AC.UK Tue Jul 8 17:24:32 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 8 Jul 2008 16:24:32 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: I don't think it's a matter of 'light', but it might be a matter of a different FT version. If you look in neighbourselection.m there is a comment % Revision 1.8 2007/05/14 08:26:31 roboos % added option to construct neighbours from 2-D layout So if you FT dates prior to that date, it cannot determine neighbour relations based on 2D layout. Update your FT and see if it solves the problem. Without layout and without 3D electrode positions it won't work and rightly so. With layout it should work if your FT is up to date. Best, Vladimir On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: > If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. > > Regards, > > Arjen Stolk > > ________________________________ > > Van: FieldTrip discussion list namens A. Stolk > Verzonden: di 7/8/2008 10:36 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. > I do manage to get my script to work on another computer, but somehow not on this one. > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: do 7/3/2008 5:10 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Do you actually have electrode positions somewhere in your data? They > are not usually supposed to get there by themselves so unless you > somehow got them there (like read in a file with sensor positions), > they are indeed missing. For statistics you don't actually need sensor > positions You can specify the neighborhood relations 'by hand' instead > of calling neighbourselection. > > Best, > > Vladimir > > On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >> Dear fieldtrippers, >> >> While performing statitstical analysis on time-frequency EEG data, I get the following error: >> >> ??? Undefined function or variable "sens". >> Error in ==> neighbourselection at 106 >> if ~isstruct(sens) >> Error in ==> statistics_wrapper at 226 >> cfg.neighbours = neighbourselection(cfg,varargin{1}); >> Error in ==> freqstatistics at 132 >> [stat] = statistics_wrapper(cfg, varargin{:}); >> Error in ==> fieldtripstatanalyse at 70 >> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >> >> The neighbourselection function tells: >> >> if ~isstruct(sens) >> >> error('Did not find gradiometer or electrode information.'); >> >> >> >> which gets its data by: >> >> % Revision 1.6 2006/07/12 14:14:59 roboos >> >> % get sens from data.grad/elec >> >> >> >> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >> >> >> >> Regards, >> >> Arjen Stolk >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 17:36:26 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 17:36:26 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 7/8/2008 5:24 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" I don't think it's a matter of 'light', but it might be a matter of a different FT version. If you look in neighbourselection.m there is a comment % Revision 1.8 2007/05/14 08:26:31 roboos % added option to construct neighbours from 2-D layout So if you FT dates prior to that date, it cannot determine neighbour relations based on 2D layout. Update your FT and see if it solves the problem. Without layout and without 3D electrode positions it won't work and rightly so. With layout it should work if your FT is up to date. Best, Vladimir On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: > If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. > > Regards, > > Arjen Stolk > > ________________________________ > > Van: FieldTrip discussion list namens A. Stolk > Verzonden: di 7/8/2008 10:36 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. > I do manage to get my script to work on another computer, but somehow not on this one. > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: do 7/3/2008 5:10 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Do you actually have electrode positions somewhere in your data? They > are not usually supposed to get there by themselves so unless you > somehow got them there (like read in a file with sensor positions), > they are indeed missing. For statistics you don't actually need sensor > positions You can specify the neighborhood relations 'by hand' instead > of calling neighbourselection. > > Best, > > Vladimir > > On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >> Dear fieldtrippers, >> >> While performing statitstical analysis on time-frequency EEG data, I get the following error: >> >> ??? Undefined function or variable "sens". >> Error in ==> neighbourselection at 106 >> if ~isstruct(sens) >> Error in ==> statistics_wrapper at 226 >> cfg.neighbours = neighbourselection(cfg,varargin{1}); >> Error in ==> freqstatistics at 132 >> [stat] = statistics_wrapper(cfg, varargin{:}); >> Error in ==> fieldtripstatanalyse at 70 >> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >> >> The neighbourselection function tells: >> >> if ~isstruct(sens) >> >> error('Did not find gradiometer or electrode information.'); >> >> >> >> which gets its data by: >> >> % Revision 1.6 2006/07/12 14:14:59 roboos >> >> % get sens from data.grad/elec >> >> >> >> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >> >> >> >> Regards, >> >> Arjen Stolk >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Tue Jul 8 18:16:22 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 8 Jul 2008 17:16:22 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 19:57:02 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 19:57:02 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your assistance. Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 7/8/2008 6:16 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 t.b.dijkman at STUDENT.UTWENTE.NL Wed Jul 9 09:38:05 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Wed, 9 Jul 2008 09:38:05 +0200 Subject: Undefined function or variable "sens" Message-ID: This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. Regards, Thomas Dijkman -----Oorspronkelijk bericht----- Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 8-7-2008 18:16 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Paul.vandenHurk at FCDONDERS.RU.NL Wed Jul 9 10:23:54 2008 From: Paul.vandenHurk at FCDONDERS.RU.NL (Paul van den Hurk) Date: Wed, 9 Jul 2008 10:23:54 +0200 Subject: read_fcdc_header problem In-Reply-To: Message-ID: Dear all, When trying to read in my header information using e.g. hdr = read_fcdc_header('C:\Documents and Settings\pauvdhur\My Documents\MATLAB_Files\ANT_EEG_pilot_data\Subj_1\FabioGiommi.vhdr') only recently I got the following error: ??? Error using ==> rdivide Not enough input arguments. Error in ==> fieldtrip\private\read_brainvision_vhdr at 66 hdr.nSamples = info.bytes./(hdr.NumberOfChannels*2); Apparently, the info.bytes field is empty. The info structure is obtained by the following code (which you can check in the 'read_brainvision_vhdr' function): info = dir(hdr.DataFile); While the hdr.DataFile is obtained by: hdr.DataFile = read_asa(filename, 'DataFile=', '%s'); If I change the script info = dir(hdr.DataFile); into: info = dir(filename); the problem seems to be solved. Could anyone tell me what is best to do? To change the 'read_brainvision_vhdr' function for my own use? Or is there a possibility to change something else, so I could still use the standard ' read_brainvision_vhdr' function (which I would prefer actually). Thanks a lot in advance for any suggestion! Kind regards, Paul van den Hurk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 11:17:57 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 10:17:57 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Then perhaps Robert should look into it. If you look at statistics_wrapper line 229 it says: if ~isfield(cfg,'neighbours') && isfield(cfg, 'correctm') && strcmp(cfg.correctm, 'cluster') cfg.neighbours = neighbourselection(cfg,varargin{1}); end Thus neighbourselection should not be called with the settings you specified. Perhaps try putting a breakpoint there and see what happens. Best, Vladimir On Wed, Jul 9, 2008 at 8:38 AM, Thomas Dijkman wrote: > This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. > > Regards, > > Thomas Dijkman > > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 8-7-2008 18:16 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > The fact that you get this error indicates that somewhere you > specified correction for multiple comparisons using clustering. If you > want to get clusters on the scalp then you do use neighbour relations > even if you don't call neighbourselection explicitly. It will be > called by freqstatistics. Freqstatistics assumes that you do use scalp > clustering unless you specify otherwise. So if you don't say that you > don't want scalp clustering and don't provide any way to determine > neighbour relations, there is an error. So depending on what you > really want you should do one of three things: > > 1) If you do not want to use clustering at all specify a different way > of MCP correction (like 'max'). > > 1) If you do want to have scalp clusters then provide the layout as > you are doing now. > > 2) If you want to have clusters but only in time-frequency and not in > space put an empty neighbourhood structure in your cfg. Like (assuming > that cfg.channel is a list of your labels). > > cfg.neighbours = struct([]); > for chan=1:length(cfg.channel) > cfg.neighbours{chan}.label = cfg.channel{chan}; > cfg.neighbours{chan}.neighblabel = {}; > end > > Not that in this case you will still have MCP correction over > channels, so if you have more channels you loose power. So just > include the channels you really want to test. > > Best, > > Vladimir > > > On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: >> Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. >> >> Regards, >> >> Arjen >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: di 7/8/2008 5:24 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> I don't think it's a matter of 'light', but it might be a matter of a >> different FT version. If you look in neighbourselection.m there is a >> comment >> >> % Revision 1.8 2007/05/14 08:26:31 roboos >> % added option to construct neighbours from 2-D layout >> >> So if you FT dates prior to that date, it cannot determine neighbour >> relations based on 2D layout. Update your FT and see if it solves the >> problem. Without layout and without 3D electrode positions it won't >> work and rightly so. With layout it should work if your FT is up to >> date. >> >> Best, >> >> Vladimir >> >> >> >> On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >>> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens A. Stolk >>> Verzonden: di 7/8/2008 10:36 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >>> I do manage to get my script to work on another computer, but somehow not on this one. >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens Vladimir Litvak >>> Verzonden: do 7/3/2008 5:10 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> Do you actually have electrode positions somewhere in your data? They >>> are not usually supposed to get there by themselves so unless you >>> somehow got them there (like read in a file with sensor positions), >>> they are indeed missing. For statistics you don't actually need sensor >>> positions You can specify the neighborhood relations 'by hand' instead >>> of calling neighbourselection. >>> >>> Best, >>> >>> Vladimir >>> >>> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>>> Dear fieldtrippers, >>>> >>>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>>> >>>> ??? Undefined function or variable "sens". >>>> Error in ==> neighbourselection at 106 >>>> if ~isstruct(sens) >>>> Error in ==> statistics_wrapper at 226 >>>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>>> Error in ==> freqstatistics at 132 >>>> [stat] = statistics_wrapper(cfg, varargin{:}); >>>> Error in ==> fieldtripstatanalyse at 70 >>>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>>> >>>> The neighbourselection function tells: >>>> >>>> if ~isstruct(sens) >>>> >>>> error('Did not find gradiometer or electrode information.'); >>>> >>>> >>>> >>>> which gets its data by: >>>> >>>> % Revision 1.6 2006/07/12 14:14:59 roboos >>>> >>>> % get sens from data.grad/elec >>>> >>>> >>>> >>>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>>> >>>> >>>> >>>> Regards, >>>> >>>> Arjen Stolk >>>> >>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 11:23:37 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 10:23:37 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Ah, I think I see what's happening. There was also a fix in statistics_wrapper: % Revision 1.45 2008/04/09 14:14:09 roboos % only make neighbours if clustering is required Both problematic versions mentioned before are prior to this date. So you should update to the latest version as I suggested before. Vladimir On Wed, Jul 9, 2008 at 10:17 AM, Vladimir Litvak wrote: > Then perhaps Robert should look into it. If you look at > statistics_wrapper line 229 it says: > > if ~isfield(cfg,'neighbours') && isfield(cfg, 'correctm') && > strcmp(cfg.correctm, 'cluster') > cfg.neighbours = neighbourselection(cfg,varargin{1}); > end > > > Thus neighbourselection should not be called with the settings you > specified. Perhaps try putting a breakpoint there and see what > happens. > > Best, > > Vladimir > > > > On Wed, Jul 9, 2008 at 8:38 AM, Thomas Dijkman > wrote: >> This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. >> >> Regards, >> >> Thomas Dijkman >> >> >> -----Oorspronkelijk bericht----- >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: di 8-7-2008 18:16 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> The fact that you get this error indicates that somewhere you >> specified correction for multiple comparisons using clustering. If you >> want to get clusters on the scalp then you do use neighbour relations >> even if you don't call neighbourselection explicitly. It will be >> called by freqstatistics. Freqstatistics assumes that you do use scalp >> clustering unless you specify otherwise. So if you don't say that you >> don't want scalp clustering and don't provide any way to determine >> neighbour relations, there is an error. So depending on what you >> really want you should do one of three things: >> >> 1) If you do not want to use clustering at all specify a different way >> of MCP correction (like 'max'). >> >> 1) If you do want to have scalp clusters then provide the layout as >> you are doing now. >> >> 2) If you want to have clusters but only in time-frequency and not in >> space put an empty neighbourhood structure in your cfg. Like (assuming >> that cfg.channel is a list of your labels). >> >> cfg.neighbours = struct([]); >> for chan=1:length(cfg.channel) >> cfg.neighbours{chan}.label = cfg.channel{chan}; >> cfg.neighbours{chan}.neighblabel = {}; >> end >> >> Not that in this case you will still have MCP correction over >> channels, so if you have more channels you loose power. So just >> include the channels you really want to test. >> >> Best, >> >> Vladimir >> >> >> On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: >>> Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. >>> >>> Regards, >>> >>> Arjen >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens Vladimir Litvak >>> Verzonden: di 7/8/2008 5:24 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> I don't think it's a matter of 'light', but it might be a matter of a >>> different FT version. If you look in neighbourselection.m there is a >>> comment >>> >>> % Revision 1.8 2007/05/14 08:26:31 roboos >>> % added option to construct neighbours from 2-D layout >>> >>> So if you FT dates prior to that date, it cannot determine neighbour >>> relations based on 2D layout. Update your FT and see if it solves the >>> problem. Without layout and without 3D electrode positions it won't >>> work and rightly so. With layout it should work if your FT is up to >>> date. >>> >>> Best, >>> >>> Vladimir >>> >>> >>> >>> On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >>>> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >>>> >>>> Regards, >>>> >>>> Arjen Stolk >>>> >>>> ________________________________ >>>> >>>> Van: FieldTrip discussion list namens A. Stolk >>>> Verzonden: di 7/8/2008 10:36 >>>> Aan: FIELDTRIP at NIC.SURFNET.NL >>>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>>> >>>> >>>> >>>> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >>>> I do manage to get my script to work on another computer, but somehow not on this one. >>>> >>>> ________________________________ >>>> >>>> Van: FieldTrip discussion list namens Vladimir Litvak >>>> Verzonden: do 7/3/2008 5:10 >>>> Aan: FIELDTRIP at NIC.SURFNET.NL >>>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>>> >>>> >>>> >>>> Do you actually have electrode positions somewhere in your data? They >>>> are not usually supposed to get there by themselves so unless you >>>> somehow got them there (like read in a file with sensor positions), >>>> they are indeed missing. For statistics you don't actually need sensor >>>> positions You can specify the neighborhood relations 'by hand' instead >>>> of calling neighbourselection. >>>> >>>> Best, >>>> >>>> Vladimir >>>> >>>> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>>>> Dear fieldtrippers, >>>>> >>>>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>>>> >>>>> ??? Undefined function or variable "sens". >>>>> Error in ==> neighbourselection at 106 >>>>> if ~isstruct(sens) >>>>> Error in ==> statistics_wrapper at 226 >>>>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>>>> Error in ==> freqstatistics at 132 >>>>> [stat] = statistics_wrapper(cfg, varargin{:}); >>>>> Error in ==> fieldtripstatanalyse at 70 >>>>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>>>> >>>>> The neighbourselection function tells: >>>>> >>>>> if ~isstruct(sens) >>>>> >>>>> error('Did not find gradiometer or electrode information.'); >>>>> >>>>> >>>>> >>>>> which gets its data by: >>>>> >>>>> % Revision 1.6 2006/07/12 14:14:59 roboos >>>>> >>>>> % get sens from data.grad/elec >>>>> >>>>> >>>>> >>>>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>>>> >>>>> >>>>> >>>>> Regards, >>>>> >>>>> Arjen Stolk >>>>> >>>>> >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michelic72 at GMAIL.COM Wed Jul 9 18:02:14 2008 From: michelic72 at GMAIL.COM (Cristiano Micheli) Date: Wed, 9 Jul 2008 18:02:14 +0200 Subject: CTF 3rd order gradiometers correction Message-ID: Hi All CTF software allows to open a MEG dataset and to apply a theoretical 3rd order gradiometers data correction, which makes use of a number of coefficients to correct raw data from common mode artifacts. Does Fieldtrip take in account this correction as well? Where is it coded? Regards Cristiano ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sdmuthu at CARDIFF.AC.UK Wed Jul 9 18:32:02 2008 From: sdmuthu at CARDIFF.AC.UK (Suresh Muthukumaraswamy) Date: Wed, 9 Jul 2008 17:32:02 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Hi, as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and doesnt apply any other processing to this You can check what the gradiometer definition of the saved data is in DataEditor. In the Acq software you can pick what type of gradiometers the data is saved as. We usually just save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on (unless you had some reason to undo the 3rd order gradiometers) - Suresh Suresh Muthukumaraswamy, PhD CUBRIC Cardiff University Park Place Cardiff, CF10 3AT United Kingdom email: sdmuthu at cardiff.ac.uk Phone: +44 (0)29 2087 0353 >>> Cristiano Micheli 09/07/2008 17:02 >>> Hi All CTF software allows to open a MEG dataset and to apply a theoretical 3rd order gradiometers data correction, which makes use of a number of coefficients to correct raw data from common mode artifacts. Does Fieldtrip take in account this correction as well? Where is it coded? Regards Cristiano ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 18:53:48 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 17:53:48 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Dear Christiano, This has only recently been implemented and is now being tested at FCDC. Look at denoise_synthetic function. You will also need to download the ctf toolbox from ftp://ftp.fcdonders.nl/pub/fieldtrip/external/ctf.zip and specify 'ctf_new' as filetype when you read the data (in particular the header with grad). But keep in mind that this is still very experimental. Good luck, Vladimir On Wed, Jul 9, 2008 at 5:02 PM, Cristiano Micheli wrote: > Hi All > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > order gradiometers data correction, which makes use of a number of > coefficients to correct raw data from common mode artifacts. > Does Fieldtrip take in account this correction as well? > Where is it coded? > Regards > Cristiano > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 19:23:11 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 18:23:11 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <4874F612020000AD00028460@zgrw01.cf.ac.uk> Message-ID: Until the recent improvements (which are not yet default) fieldtrip assumed that the data is 'raw'. Therefore source reconstruction was not precise for data that was saved in 3rd gradient. The data is indeed read as it's saved so for sensor level analysis there is no problem. But the leadfields computed using grads read with the old ctf reader are only suitable for the 'raw' setting. Best, Vladimir On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy wrote: > Hi, > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and > doesnt apply any other processing to this > You can check what the gradiometer definition of the saved data is in DataEditor. > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on > (unless you had some reason to undo the 3rd order gradiometers) > - Suresh > > Suresh Muthukumaraswamy, PhD > CUBRIC > Cardiff University > Park Place > Cardiff, CF10 3AT > United Kingdom > email: sdmuthu at cardiff.ac.uk > Phone: +44 (0)29 2087 0353 > >>>> Cristiano Micheli 09/07/2008 17:02 >>> > Hi All > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > order gradiometers data correction, which makes use of a number of > coefficients to correct raw data from common mode artifacts. > Does Fieldtrip take in account this correction as well? > Where is it coded? > Regards > Cristiano > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to > share experiences and to 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 Thu Jul 10 09:15:48 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 10 Jul 2008 09:15:48 +0200 Subject: read_fcdc_header problem In-Reply-To: <000601c8e19d$20014b90$172dae83@fcdonders.nl> Message-ID: Hi Paul On 9 Jul 2008, at 10:23, Paul van den Hurk wrote: > If I change the script > > info = dir(hdr.DataFile); > > into: > > info = dir(filename); > > the problem seems to be solved. Thanks for the detailled report and suggestion. The snippet of code that you are having a problem with is for determining the number of samples in the data, and it does that by determining the size of the file (in bytes). In the low-level read_brainvision_vhdr function the filename is the string with the *.vhrd file, whereas hdr. DataFile should be pointing to the filename with the *.dat file. Your suggested fix would hence determine the number of samples incorrectly. Since there is not an error in info = dir(hdr.DataFile); itself, I suspect that hdr does have the DataFile field, but that it points to a filename which cannot be found by the dir command. That is the case due to the file being in another directory, which is actually even stated as "FIXME" in the code. I have changed it to % determine the number of samples by looking at the binary file if strcmp(hdr.DataFormat, 'BINARY') % the data file is supposed to be located in the same directory as the header file % but that might be on another location than the present working directory [p, f, x] = fileparts(filename); datafile = fullfile(p, hdr.DataFile); info = dir(datafile); if isempty(info) error('cannot determine the location of the data file %s', hdr.DataFile); end switch lower(hdr.BinaryFormat) ... The new version will be on FCDC home/common in 10 minutes and on the ftp server this evening. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu Jul 10 14:05:50 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 10 Jul 2008 14:05:50 +0200 Subject: CTF 3rd order gradiometers correction Message-ID: Dear Vladimir, I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). (3) try to use laedfields from CTF for these data, if that's possible. Thanks for any suggestions on this issue. Best, Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 09.07.08 19:34:51 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction > Until the recent improvements (which are not yet default) fieldtrip > assumed that the data is 'raw'. Therefore source reconstruction was > not precise for data that was saved in 3rd gradient. The data is > indeed read as it's saved so for sensor level analysis there is no > problem. But the leadfields computed using grads read with the old ctf > reader are only suitable for the 'raw' setting. > > Best, > > Vladimir > > On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy > wrote: > > Hi, > > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and > > doesnt apply any other processing to this > > You can check what the gradiometer definition of the saved data is in DataEditor. > > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just > > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on > > (unless you had some reason to undo the 3rd order gradiometers) > > - Suresh > > > > Suresh Muthukumaraswamy, PhD > > CUBRIC > > Cardiff University > > Park Place > > Cardiff, CF10 3AT > > United Kingdom > > email: sdmuthu at cardiff.ac.uk > > Phone: +44 (0)29 2087 0353 > > > >>>> Cristiano Micheli 09/07/2008 17:02 >>> > > Hi All > > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > > order gradiometers data correction, which makes use of a number of > > coefficients to correct raw data from common mode artifacts. > > Does Fieldtrip take in account this correction as well? > > Where is it coded? > > Regards > > Cristiano > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to > > share experiences and to discuss new ideas for MEG and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Thu Jul 10 14:34:19 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 10 Jul 2008 13:34:19 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <723641289@web.de> Message-ID: Dear Michael, You don't need to wait. You just need to be careful. The version presently available on the FTP server supports reading CTF datasets with denoising. Just see my remarks from the e-mails before. You should specify: cfg.headerformat = 'ctf_new'; cfg.dataformat = 'ctf_new'; for preprocessing and also specify ctf_new in read_data and read_header if you call them directly. The signs that you are using the right reader (from external ctf toolbox) are that there is a disclaimer message appearing every time you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd gradient dataset, you'll see that there is a lot happening on the right side of the matrix related to reference sensors (for the wrong reader you'll just see some straight lines). Then use the data and the grad normally. To be careful I'd suggest you to test your results thoroughly. Try to do the same analysis with 'raw' and 3rd gradient. Also you can try converting with either CTF software or denoise_synthetic and compare the results (for denoise_synthetic to work you must use the new reader). The more people do this kind of tests and report their results, the more confident we'll become of the new code and the sooner Robert will make it default. Good luck, Vladimir On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral wrote: > Dear Vladimir, > > I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: > (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). > (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). > (3) try to use laedfields from CTF for these data, if that's possible. > > Thanks for any suggestions on this issue. > > Best, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 09.07.08 19:34:51 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction > > >> Until the recent improvements (which are not yet default) fieldtrip >> assumed that the data is 'raw'. Therefore source reconstruction was >> not precise for data that was saved in 3rd gradient. The data is >> indeed read as it's saved so for sensor level analysis there is no >> problem. But the leadfields computed using grads read with the old ctf >> reader are only suitable for the 'raw' setting. >> >> Best, >> >> Vladimir >> >> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >> wrote: >> > Hi, >> > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and >> > doesnt apply any other processing to this >> > You can check what the gradiometer definition of the saved data is in DataEditor. >> > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just >> > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on >> > (unless you had some reason to undo the 3rd order gradiometers) >> > - Suresh >> > >> > Suresh Muthukumaraswamy, PhD >> > CUBRIC >> > Cardiff University >> > Park Place >> > Cardiff, CF10 3AT >> > United Kingdom >> > email: sdmuthu at cardiff.ac.uk >> > Phone: +44 (0)29 2087 0353 >> > >> >>>> Cristiano Micheli 09/07/2008 17:02 >>> >> > Hi All >> > CTF software allows to open a MEG dataset and to apply a theoretical 3rd >> > order gradiometers data correction, which makes use of a number of >> > coefficients to correct raw data from common mode artifacts. >> > Does Fieldtrip take in account this correction as well? >> > Where is it coded? >> > Regards >> > Cristiano >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to >> > share experiences and to discuss new ideas for MEG and EEG analysis. See also >> > http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From guido.nolte at FIRST.FRAUNHOFER.DE Thu Jul 10 16:52:51 2008 From: guido.nolte at FIRST.FRAUNHOFER.DE (Guido Nolte) Date: Thu, 10 Jul 2008 16:52:51 +0200 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Guys, some years ago I stumbled over the same problem. I want to add to this discussion that it is quite important to properly include the 3rd-order gradiometer into the lead field. For a phantom experiment with a single dipole the error reduced by about a factor 10 as compared to simply ignoring that and treating the signals as simple gradiometer measurements (if I remember right). Back then I actually asked CTF for the coefficients (which they considered as a weird request (which I considered as weird)), and included that into my own programs. I still have these coefficients. Regards, Guido Vladimir Litvak wrote: > Dear Michael, > > You don't need to wait. You just need to be careful. The version > presently available on the FTP server supports reading CTF datasets > with denoising. Just see my remarks from the e-mails before. You > should specify: > > cfg.headerformat = 'ctf_new'; > cfg.dataformat = 'ctf_new'; > > for preprocessing and also specify ctf_new in read_data and > read_header if you call them directly. > > The signs that you are using the right reader (from external ctf > toolbox) are that there is a disclaimer message appearing every time > you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd > gradient dataset, you'll see that there is a lot happening on the > right side of the matrix related to reference sensors (for the wrong > reader you'll just see some straight lines). > > Then use the data and the grad normally. To be careful I'd suggest you > to test your results thoroughly. Try to do the same analysis with > 'raw' and 3rd gradient. Also you can try converting with either CTF > software or denoise_synthetic and compare the results (for > denoise_synthetic to work you must use the new reader). > > The more people do this kind of tests and report their results, the > more confident we'll become of the new code and the sooner Robert will > make it default. > > Good luck, > > Vladimir > > > On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral > wrote: >> Dear Vladimir, >> >> I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: >> (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). >> (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). >> (3) try to use laedfields from CTF for these data, if that's possible. >> >> Thanks for any suggestions on this issue. >> >> Best, >> Michael >> >> >>> -----Ursprüngliche Nachricht----- >>> Von: "Vladimir Litvak" >>> Gesendet: 09.07.08 19:34:51 >>> An: FIELDTRIP at NIC.SURFNET.NL >>> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction >> >>> Until the recent improvements (which are not yet default) fieldtrip >>> assumed that the data is 'raw'. Therefore source reconstruction was >>> not precise for data that was saved in 3rd gradient. The data is >>> indeed read as it's saved so for sensor level analysis there is no >>> problem. But the leadfields computed using grads read with the old ctf >>> reader are only suitable for the 'raw' setting. >>> >>> Best, >>> >>> Vladimir >>> >>> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >>> wrote: >>>> Hi, >>>> as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and >>>> doesnt apply any other processing to this >>>> You can check what the gradiometer definition of the saved data is in DataEditor. >>>> In the Acq software you can pick what type of gradiometers the data is saved as. We usually just >>>> save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on >>>> (unless you had some reason to undo the 3rd order gradiometers) >>>> - Suresh >>>> >>>> Suresh Muthukumaraswamy, PhD >>>> CUBRIC >>>> Cardiff University >>>> Park Place >>>> Cardiff, CF10 3AT >>>> United Kingdom >>>> email: sdmuthu at cardiff.ac.uk >>>> Phone: +44 (0)29 2087 0353 >>>> >>>>>>> Cristiano Micheli 09/07/2008 17:02 >>> >>>> Hi All >>>> CTF software allows to open a MEG dataset and to apply a theoretical 3rd >>>> order gradiometers data correction, which makes use of a number of >>>> coefficients to correct raw data from common mode artifacts. >>>> Does Fieldtrip take in account this correction as well? >>>> Where is it coded? >>>> Regards >>>> Cristiano >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to >>>> share experiences and to discuss new ideas for MEG and EEG analysis. See also >>>> http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Jul 10 17:13:58 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 10 Jul 2008 16:13:58 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <48762243.1040804@first.fraunhofer.de> Message-ID: What I understand from Robert is that the coefficients are not fixed. They are at least site-specific if not file-specific. So the new way should really be optimal. Guido, if you can also do some testing and compare with your existing code, that'd be helpful. Best, Vladimir On Thu, Jul 10, 2008 at 3:52 PM, Guido Nolte wrote: > Guys, > some years ago I stumbled over the same problem. > I want to add to this discussion that it is > quite important to properly include the 3rd-order > gradiometer into the lead field. For a phantom > experiment with a single dipole the error reduced by about a factor > 10 as compared to simply ignoring that and treating > the signals as simple gradiometer measurements (if I remember > right). > Back then I actually asked CTF for > the coefficients (which they considered as a weird > request (which I considered as weird)), > and included that into my own programs. > I still have these coefficients. > > Regards, Guido > > > Vladimir Litvak wrote: >> >> Dear Michael, >> >> You don't need to wait. You just need to be careful. The version >> presently available on the FTP server supports reading CTF datasets >> with denoising. Just see my remarks from the e-mails before. You >> should specify: >> >> cfg.headerformat = 'ctf_new'; >> cfg.dataformat = 'ctf_new'; >> >> for preprocessing and also specify ctf_new in read_data and >> read_header if you call them directly. >> >> The signs that you are using the right reader (from external ctf >> toolbox) are that there is a disclaimer message appearing every time >> you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd >> gradient dataset, you'll see that there is a lot happening on the >> right side of the matrix related to reference sensors (for the wrong >> reader you'll just see some straight lines). >> >> Then use the data and the grad normally. To be careful I'd suggest you >> to test your results thoroughly. Try to do the same analysis with >> 'raw' and 3rd gradient. Also you can try converting with either CTF >> software or denoise_synthetic and compare the results (for >> denoise_synthetic to work you must use the new reader). >> >> The more people do this kind of tests and report their results, the >> more confident we'll become of the new code and the sooner Robert will >> make it default. >> >> Good luck, >> >> Vladimir >> >> >> On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral >> wrote: >>> >>> Dear Vladimir, >>> >>> I understand the problem about leadfields for 3rd gradients and >>> magnetometers to be different. I am just curious now how to best proceed, >>> when the measured data are from a rather noisy inner city environment: >>> (1) Go for the raw data and increase the artefact rejection thresholds >>> considerably (as beamforming should not localize artefacts inside the head >>> anyway). >>> (2) Wait for a fieldtrip version where leadfield can be computed for 3rd >>> grads (if that's planned at all...). >>> (3) try to use laedfields from CTF for these data, if that's possible. >>> >>> Thanks for any suggestions on this issue. >>> >>> Best, >>> Michael >>> >>> >>>> -----Ursprüngliche Nachricht----- >>>> Von: "Vladimir Litvak" >>>> Gesendet: 09.07.08 19:34:51 >>>> An: FIELDTRIP at NIC.SURFNET.NL >>>> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction >>> >>>> Until the recent improvements (which are not yet default) fieldtrip >>>> assumed that the data is 'raw'. Therefore source reconstruction was >>>> not precise for data that was saved in 3rd gradient. The data is >>>> indeed read as it's saved so for sensor level analysis there is no >>>> problem. But the leadfields computed using grads read with the old ctf >>>> reader are only suitable for the 'raw' setting. >>>> >>>> Best, >>>> >>>> Vladimir >>>> >>>> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >>>> wrote: >>>>> >>>>> Hi, >>>>> as far as I am aware fieldtrip reads in whatever gradiometer >>>>> definition your data is saved as and >>>>> doesnt apply any other processing to this >>>>> You can check what the gradiometer definition of the saved data is in >>>>> DataEditor. >>>>> In the Acq software you can pick what type of gradiometers the data is >>>>> saved as. We usually just >>>>> save it as 3rd order in the data at the Acq level and you dont have to >>>>> worry about it from then on >>>>> (unless you had some reason to undo the 3rd order gradiometers) >>>>> - Suresh >>>>> >>>>> Suresh Muthukumaraswamy, PhD >>>>> CUBRIC >>>>> Cardiff University >>>>> Park Place >>>>> Cardiff, CF10 3AT >>>>> United Kingdom >>>>> email: sdmuthu at cardiff.ac.uk >>>>> Phone: +44 (0)29 2087 0353 >>>>> >>>>>>>> Cristiano Micheli 09/07/2008 17:02 >>> >>>>> >>>>> Hi All >>>>> CTF software allows to open a MEG dataset and to apply a theoretical >>>>> 3rd >>>>> order gradiometers data correction, which makes use of a number of >>>>> coefficients to correct raw data from common mode artifacts. >>>>> Does Fieldtrip take in account this correction as well? >>>>> Where is it coded? >>>>> Regards >>>>> Cristiano >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of >>>>> the FieldTrip toolbox, to >>>>> share experiences and to discuss new ideas for MEG and EEG analysis. >>>>> See also >>>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>>> http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of >>>>> the FieldTrip toolbox, to share experiences and to discuss new ideas for >>>>> MEG and EEG analysis. See also >>>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>>> http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of >>>> the FieldTrip toolbox, to share experiences and to discuss new ideas for >>>> MEG and EEG analysis. See also >>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>> http://www.ru.nl/fcdonders/fieldtrip. >>>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >>> and EEG analysis. See also >>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>> http://www.ru.nl/fcdonders/fieldtrip. >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to 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 fredericroux at HOTMAIL.DE Thu Jul 10 18:19:11 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Thu, 10 Jul 2008 18:19:11 +0200 Subject: No subject Message-ID: Dear Fieldtrippers, It is not really clear to me what exactly the difference is between the stats and the raweffect matrices that I get when performing clusterrandanalysis. Does anyone know what the difference is between these two matrices? Best regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Kostenlos: Die Festplatte im Netz mit 5 GB Speicher! http://skydrive.live.com/?mkt=de-de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Thu Jul 10 18:19:26 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Thu, 10 Jul 2008 18:19:26 +0200 Subject: stats vs raweffect Message-ID: Dear Fieldtrippers, It is not really clear to me what exactly the difference is between the stats and the raweffect matrices that I get when performing clusterrandanalysis. Does anyone know what the difference is between these two matrices? Best regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Neu: Mit Live Search Ihre Stadt in der Vogelperspektive! http://maps.live.de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Jul 10 23:19:32 2008 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 10 Jul 2008 23:19:32 +0200 Subject: No subject In-Reply-To: Message-ID: Frederic, In the .raweffect field, you find the difference between the means in the two conditions that you compare. In the .stats field, you find the (sensor,time)- or (sensor,frequency, time)-specific test statistics that were later thresholded to construct the clusters. Good luck, Eric Maris > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens > Frederic Roux > Verzonden: donderdag 10 juli 2008 18:19 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] > > Dear Fieldtrippers, > > It is not really clear to me what exactly the difference is between the stats and the > raweffect matrices that I get when performing clusterrandanalysis. > > Does anyone know what the difference is between these two matrices? > > Best regards, > > Frederic > > > Dipl. Psych. Frederic Roux > > Max Planck Institut für Hirnforschung > Abteilung Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > > Tel.: 069 / 6301 83225 > Mail: fredericroux at hotmail.de > froux at mpih-frankfurt.mpg.de > > _________________________________________________________________ > Kostenlos: Die Festplatte im Netz mit 5 GB Speicher! > http://skydrive.live.com/?mkt=de-de > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Fri Jul 11 09:17:22 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Fri, 11 Jul 2008 09:17:22 +0200 Subject: No subject In-Reply-To: <200807102119.m6ALJUaE027509@smtp20.nijmegen.internl.net> Message-ID: Hi Eric, thank you for replying so fast. Your answer helped me a lot. I have on more question: if I want to see significant differences between conditions I must multiply the raweffect with a significance map? This should look similar to this: plotdata.powspctrm = clusrand.raweffect.*squeeze(clusrand.posclusterlabelmat == 1); Is that correct? Regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Lustige Emoticons für Ihren Messenger! Hier kostenlos downloaden! http://messenger.live.de/mein/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Jul 11 09:53:29 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 11 Jul 2008 09:53:29 +0200 Subject: No subject In-Reply-To: Message-ID: Hi Frederic, If you use the plotting functions in FieldTrip there are several ways to plot the significant differences between conditions. In the topoplot functions you can highlight the significant sensors (see help topoplot.m). In the multiplot functions you can make use of opacity masking (see help again). Set the data.mask field as cfg.maskparameter. Multiplying the raw effect with the significance map is not recommended if you use the topoplot functions, because interpolation takes place to fill in the space between the channels. Setting channels to zero can create interpolation artifiacts. See also the tutorials on the FieldTrip webpage for more information: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip Plotting clusters: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting#plotting_clusters In the Cluster-based permutation tests tutorial there is also information about plotting the results http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:statistics#2.1_permutation_tests_for_time-locked_databetween-trials_e xperiments Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Frederic Roux Sent: Friday, July 11, 2008 9:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Hi Eric, thank you for replying so fast. Your answer helped me a lot. I have on more question: if I want to see significant differences between conditions I must multiply the raweffect with a significance map? This should look similar to this: plotdata.powspctrm = clusrand.raweffect.*squeeze(clusrand.posclusterlabelmat == 1); Is that correct? Regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _____ Messenger Online Treff: Spontan chatten, über Hobbies reden, sofort Spass haben? Jetzt klicken! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Fri Jul 11 10:11:10 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 11 Jul 2008 10:11:10 +0200 Subject: CTF 3rd order gradiometers correction In-Reply-To: <723641289@web.de> Message-ID: Hi Michael, On 10 Jul 2008, at 14:05, Michael Wibral wrote: > (1) Go for the raw data and increase the artefact rejection > thresholds considerably (as beamforming should not localize > artefacts inside the head anyway). Beamforming tries to optimally supress the noise. That means that noise will not be perfectly suppressed. If you can use the 3rd order gradient to already reduce the impact that environmental noise has on your data, you'll make it easier for the beamformer to suppress the remaining environmental and physiological noise. With 3rd order gradients switched on, it probably will also be easier to identify physiological artifacts (eye blinks, muscle) and to discard those pieces of data from your analysis. Again, if you can remove noise from the data, the source reconstruction will perform better. > (2) Wait for a fieldtrip version where leadfield can be computed > for 3rd grads (if that's planned at all...). That is what is now possible, although it requires cfg.headerformat='ctf_new', cfg.dataformat='ctf_new' and the ctf p- files (from ftp://ftp.fcdonders.nl/pub/fieldtrip/external). Through the CTF p-files the balancing coefficients are read and stored along with the data. The denoise_synthetic function applies the balancing coefficients to the data _and_ updates the sensor array description so that the balanging will be taken into account during the forward computations. If you want to see how it works: do preprocessing and have a look at data.grad.balance, which contains the details. Then do denoise_snthetic and compare data.grad.tra prior to and after applying the 3rd order synthetic gradient. The grad.tra matrix describes how all individual coils of the MEG system are combined into channels, and in the comparison you can see that for 3rd order data the reference coils are also used, whereas for raw data the reference coils are weighted with zero. > (3) try to use laedfields from CTF for these data, if that's possible. that is not needed, see above. best regards, Robert PS I suggest to make an example matlab page at http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:examples:denoise_synthetic. Feel free to add code and explanation there for other people. PPS I am curious to hear from other people on how using 3rd order gradient influences their results ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Mon Jul 14 17:21:13 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Mon, 14 Jul 2008 17:21:13 +0200 Subject: Template MRI and missing fiducials Message-ID: Hi everyone, I was wondering if there is some sort of template brain or headmodel that one can use to perform a beamforming analysis of MEG data? Otherwise does someone know if it is possible to perform a sourceanalysis without having recorded fiducials during the anatomical MRI scan? I have the dicom files of all my subjects but I did not record fiducials during the MRI scan. Regards, Frederic _________________________________________________________________ Lustige Emoticons für Ihren Messenger! Hier kostenlos downloaden! http://messenger.live.de/mein/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 16 12:38:10 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 16 Jul 2008 11:38:10 +0100 Subject: Significance of coherence Message-ID: Dear all, Could you point me to the present state of the art method to determine significance of coherence? I'm not talking about comparison between two conditions and not about activation to baseline comparison. Just you have some stationary signals, compute coherence and want to say whether it's real. I suspect there is no ideal solution, but what is the most accepted presently? Can jackknife implemented in freqdescriptives be used for that? Any other suggestions. 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. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Jul 16 12:56:42 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 16 Jul 2008 12:56:42 +0200 Subject: Significance of coherence In-Reply-To: Message-ID: Dear Vladimir, I usually use a shift predictor to test for this (computing coherence between signal A and a shuffled set of trials for signal B: provided both signals are not phase-locked to trial onset). However, this only works well when you are estimating for coherence between non-volume conducted activities. When coherence is estimated between two reconstructed dipoles, the amount of volume conduction is generally too high for this method to make sense. In other words, you will always get "significant" coherence in this case. The other way would be to use the traditional thresholding which is applied for example in Kilner et al 2001 J Neurosci. But this obviously suffers from the same problems as the shift predictor. Jackknifing could also be used with a t-test against 0, but again with the same problem. Yours, Jan-Mathijs On Jul 16, 2008, at 12:38 PM, Vladimir Litvak wrote: > Dear all, > > Could you point me to the present state of the art method to determine > significance of coherence? I'm not talking about comparison between > two conditions and not about activation to baseline comparison. Just > you have some stationary signals, compute coherence and want to say > whether it's real. I suspect there is no ideal solution, but what is > the most accepted presently? Can jackknife implemented in > freqdescriptives be used for that? Any other suggestions. > > 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. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 16 13:44:41 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 16 Jul 2008 12:44:41 +0100 Subject: Significance of coherence In-Reply-To: <93A59937-2451-47E1-997A-0F9FDE26E823@psy.gla.ac.uk> Message-ID: Dear JM, Is there any paper where the issue of shift-predictors for coherence is properly looked at? I've also been using shift-predictors but I started having serious doubts in the case of MAR-based measures. So I thought that for coherence there is something better justified and the distribution under the null is known at least under some assumptions. But if you say that shift-predictor is state of the art, I'll take your word for it since I know you've researched this subject quite well. Thanks, Vladimir On Wed, Jul 16, 2008 at 11:56 AM, jan-mathijs schoffelen wrote: > Dear Vladimir, > > I usually use a shift predictor to test for this (computing coherence > between signal A and a shuffled set of trials for signal B: provided both > signals are not phase-locked to trial onset). > However, this only works well when you are estimating for coherence between > non-volume conducted activities. > When coherence is estimated between two reconstructed dipoles, the amount of > volume conduction is generally too high for this method to make sense. > In other words, you will always get "significant" coherence in this case. > The other way would be to use the traditional thresholding which is applied > for example in Kilner et al 2001 J Neurosci. But this obviously suffers from > the same problems as the > shift predictor. > Jackknifing could also be used with a t-test against 0, but again with the > same problem. > > Yours, > > Jan-Mathijs > > > On Jul 16, 2008, at 12:38 PM, Vladimir Litvak wrote: > >> Dear all, >> >> Could you point me to the present state of the art method to determine >> significance of coherence? I'm not talking about comparison between >> two conditions and not about activation to baseline comparison. Just >> you have some stationary signals, compute coherence and want to say >> whether it's real. I suspect there is no ideal solution, but what is >> the most accepted presently? Can jackknife implemented in >> freqdescriptives be used for that? Any other suggestions. >> >> 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. 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 tomh at KURAGE.NIMH.NIH.GOV Wed Jul 16 14:08:03 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Wed, 16 Jul 2008 08:08:03 -0400 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: On Thu, 2008-07-10 at 16:13 +0100, Vladimir Litvak wrote: > What I understand from Robert is that the coefficients are not fixed. > They are at least site-specific if not file-specific. So the new way > should really be optimal. Guido, if you can also do some testing and > compare with your existing code, that'd be helpful. Yes, the 3rd gradient balancing coefficients are site specific (well, machine specific). However they are stored in every dataset, so if you have a dataset, you have the correct coefficients. dsinfo displays them, you want the G3BR coefficients. -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Wed Jul 16 14:17:09 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Wed, 16 Jul 2008 08:17:09 -0400 Subject: Template MRI and missing fiducials In-Reply-To: Message-ID: > Otherwise does someone know if it is possible to perform a > sourceanalysis without having recorded fiducials during the anatomical > MRI scan? > I have the dicom files of all my subjects but I did not record > fiducials during the MRI scan. You can read the MRI into AFNI, and mark the fiducials; just estimate them (assuming your MRI has the nasion and ears, if not you're out of luck). You can be off by a few mm, it doesn't matter since one usually doesn't do source estimation at a resolution higher than 5 mm or so. It's not just a matter of co-registration, you also need the brain to make the forward model (if you're using CTF, you'll make a multisphere model; see the brainhull page here: http://kurage.nimh.nih.gov/meglab/Meg/Brainhull -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 17 08:44:08 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 17 Jul 2008 08:44:08 +0200 Subject: Template MRI and missing fiducials In-Reply-To: Message-ID: Hi Frederic On 14 Jul 2008, at 17:21, Frederic Roux wrote: > I was wondering if there is some sort of template brain or > headmodel that one can use to perform a beamforming analysis of MEG > data? In principle you could use one anatomical MRI for anmother subject. But I would recomment to use individual MRIs if you have them. > Otherwise does someone know if it is possible to perform a > sourceanalysis without having recorded fiducials during the > anatomical MRI scan? > I have the dicom files of all my subjects but I did not record > fiducials during the MRI scan. The position of the coils during the MEG measurement needs to be marked in the MRI, otherwise it is not possible to localize the activity during the MEG measurements onto the anatomical MRI. Furthermore, as Tom pointed out, you need it to align the head model (volume conduction model of the head) with the sensor positions. In FieldTrip you can use the VOLUMEREALIGN function to specify the fiducials. And you can use the PREPARE_LOCALSPHERES or PRERARE_SINGLESHELL functions to make the head model. The only tricky part is to read the anatomical MRI into Matlab without mixing up left and right in the MRI. The READ_FCDC_MRI function can read dicom files, but that is not 100% foolproof, so please check the output of that function carefully (and use Matlab flipdim and permute functions). best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 17 16:49:21 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 17 Jul 2008 16:49:21 +0200 Subject: denoise_synthetic Message-ID: Dear all, I just noticed that it was possible to do denoise_synthetic (i.e. apply 3rd order gradients to CTF data) without all required channels being present in the data. It requires the MEG channels and the reference channels to be both present in the preprocessed data. If you have beein doing cfg.channel=MEG in preprocessing and then denoise_synthetic, then the data will not be correct 3rd order gradients. If you have been doing cfg.channel=all, then denoise_synthetic will have done its job correct (I hope). I have now added an explicit check on the presence of the required channels, so now it will give an error if the reference channels are missing. best regards, Robert PS the update will be available this evening on the ftp ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Thu Jul 17 17:16:26 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 17 Jul 2008 17:16:26 +0200 Subject: denoise_synthetic Message-ID: Dear Robert, I have a question regarding the use of the new preprocessing function and denoise synthetic: If the ctf data are saved in 3rd gradient mode - will preprocessing and denoise_synthetic treat this correctly? I.e. will these functions not perform any (unnecessary/wrong) computation and simply update the relevant information fields in the data structure? Or do I have to save the ctf data in raw format and then let fieldtrip do the rest? Sorry if this question is somehow redundant. Just wanted to be sure. Many thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 17.07.08 17:07:06 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] denoise_synthetic > Dear all, > > I just noticed that it was possible to do denoise_synthetic (i.e. > apply 3rd order gradients to CTF data) without all required channels > being present in the data. It requires the MEG channels and the > reference channels to be both present in the preprocessed data. > > If you have beein doing cfg.channel=MEG in preprocessing and then > denoise_synthetic, then the data will not be correct 3rd order > gradients. If you have been doing cfg.channel=all, then > denoise_synthetic will have done its job correct (I hope). I have now > added an explicit check on the presence of the required channels, so > now it will give an error if the reference channels are missing. > > best regards, > Robert > > PS the update will be available this evening on the ftp > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From matthew.tata at ULETH.CA Thu Jul 17 20:34:43 2008 From: matthew.tata at ULETH.CA (Matt Tata) Date: Thu, 17 Jul 2008 20:34:43 +0200 Subject: bwlabelnmex !? Message-ID: Hello, I'm trying to use freqstatistics() on some TFC data imported from BESA. I'm getting this series of errors and I can't figure them out. I have the source file bwlabelnmex.cpp in my matlab\toolbox\images\images\private folder, but nothing else. I do have the signal processing and image processing toolboxes installed (perhaps not correctly?). Any suggestions? Thank you. Matt Tata ??? Undefined function or method 'bwlabelnmex' for input arguments of type 'double'. Error in ==> bwlabeln at 56 [L,num] = bwlabelnmex(A,conn); Error in ==> fieldtrip-20080521\private\clusterstat at 178 posclusobs = bwlabeln(tmp, conndef(length(cfg.dim),'min')); Error in ==> fieldtrip-20080521\private\statistics_montecarlo at 392 [stat, cfg] = clusterstat(cfg, statrand, statobs); Error in ==> fieldtrip-20080521\private\statistics_wrapper at 272 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> freqstatistics at 132 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> TF_Stats at 101 stat = freqstatistics(cfg, blgw{:}, blgl{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Fri Jul 18 18:41:19 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 18 Jul 2008 18:41:19 +0200 Subject: denoise_synthetic In-Reply-To: <729978737@web.de> Message-ID: Dear Michael I think you can also read in ctf data that are saved in 3rd gradient mode without any problems. If you look in data.grad.balance.current it should then be G3BR after preprocessing. When we were testing, one of the things we did was compare 3rd order data made by DataEditor with 3rd order data made by FieldTrip. That looked fine. But again, it's not tested thoroughly yet. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Thursday, July 17, 2008 5:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] denoise_synthetic Dear Robert, I have a question regarding the use of the new preprocessing function and denoise synthetic: If the ctf data are saved in 3rd gradient mode - will preprocessing and denoise_synthetic treat this correctly? I.e. will these functions not perform any (unnecessary/wrong) computation and simply update the relevant information fields in the data structure? Or do I have to save the ctf data in raw format and then let fieldtrip do the rest? Sorry if this question is somehow redundant. Just wanted to be sure. Many thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 17.07.08 17:07:06 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] denoise_synthetic > Dear all, > > I just noticed that it was possible to do denoise_synthetic (i.e. > apply 3rd order gradients to CTF data) without all required channels > being present in the data. It requires the MEG channels and the > reference channels to be both present in the preprocessed data. > > If you have beein doing cfg.channel=MEG in preprocessing and then > denoise_synthetic, then the data will not be correct 3rd order > gradients. If you have been doing cfg.channel=all, then > denoise_synthetic will have done its job correct (I hope). I have now > added an explicit check on the presence of the required channels, so > now it will give an error if the reference channels are missing. > > best regards, > Robert > > PS the update will be available this evening on the ftp > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Mon Jul 21 20:06:19 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Mon, 21 Jul 2008 20:06:19 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread Message-ID: Dear Robert and all Fieldtrip users, I've encountered an issue with read_ctf_res4.m, that causes unexpected behavior in some operations. For instance, when I tried to check events from a dataset: cfg = []; cfg.channel = {'MEG'}; cfg.dataset = dataset; cfg.trialdef.eventtype = '?'; cfg = definetrial(cfg); evaluating trialfunction 'trialfun_general' no events were found in the datafile no trials have been defined yet, see DEFINETRIAL for further help found 0 events created 0 trials In fact, there are 1260 events in this dataset. I think that this problem is due to a change in fread's behaviour: as nowadays characters are not always 8-bit wide, we are supposed to use 'uint8' instead of 'char'. This change has been responsible for some nasty problems, including this one. As of 20080720 version of Fieldtrip, the snapshot still showed this behavior. Herewith I am attaching a correction of read_ctf_res4.m. Hope that some of you who have had similar problem might find it helpful. Best regards, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: read_ctf_res4.m URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jul 24 09:29:52 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 24 Jul 2008 09:29:52 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread In-Reply-To: <4884D01B.3010606@med.uni-tuebingen.de> Message-ID: Hi Erick Thanks for the suggested change. I have incoroprated it and it will be included in tonights release version on the ftp. The char/int8 problem had been reported before, but I have never seen it happen myself on any of the computers that I have been working with. Do you think that it might be related to particular language settings on the computer that you are using? Since it not always occuring to me seems to indicate that Matlab sometimes wants to use 8 bit and sometimes 16 bit wide characters. Actually there is a lot of reading code for other (non ctf) formats that also uses fread(...'char'). That code should also be affected with the bug, which means that I should make the suggested change everywhere where chars are read. best regards, Robert On 21 Jul 2008, at 20:06, Erick Britis Ortiz wrote: > I think that this problem is due to a change in fread's behaviour: > as nowadays characters are not always 8-bit wide, we are supposed > to use 'uint8' instead of 'char'. This change has been responsible > for some nasty problems, including this one. > > As of 20080720 version of Fieldtrip, the snapshot still showed this > behavior. Herewith I am attaching a correction of read_ctf_res4.m. > Hope that some of you who have had similar problem might find it > helpful. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 24 09:40:46 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 24 Jul 2008 09:40:46 +0200 Subject: bwlabelnmex !? In-Reply-To: Message-ID: Hi Matt The bwlabeln function is used for clustering and is part of the Matlab image processing toolbox. On my computer I have >> which bwlabeln C:\Program Files\MATLAB\R2006b\toolbox\images\images\bwlabeln.m and if I subsequently look into the details, then there is a C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.cpp C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.mexw32 C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.csf Actually, there is a whole bunch of cpp and mexw32 files in that directory. In older Matlab version the windows mex files would have the extension *.dll. Do you have a bwlabeln.dll file, or any other mexw32 or dll files in that private directory? If not, then your Matlab installation is not correct. I don't know whether it is possible to recompile the mex files in the images/private directory, but if you have problems there, it might very well be that also on other locations in your matlab toolbox tree the mex files would be missing. If that is the case, I would just reinstall Matlab and not try to compile all Mathworks mex files. best regards, Robert On 17 Jul 2008, at 20:34, Matt Tata wrote: > I'm trying to use freqstatistics() on some TFC data imported from > BESA. I'm > getting this series of errors and I can't figure them out. I have the > source file bwlabelnmex.cpp in my matlab\toolbox\images\images\private > folder, but nothing else. I do have the signal processing and image > processing toolboxes installed (perhaps not correctly?). Any > suggestions? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Fri Jul 25 19:38:15 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Fri, 25 Jul 2008 19:38:15 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread In-Reply-To: <83778C31-572C-4A44-B424-99EA62972FD0@fcdonders.ru.nl> Message-ID: Dear Robert, Here is the configuration of the systems were the issue was observed: - Linux: MATLAB 7.5.0 (R2007b) System language: German (LANG=de_DE.UTF-8) - Windows XP: MATLAB 7.0.1 (R14) System language: Brazilian Portuguese It turns out, it had to do with two things. First, on reproducing it, I noticed another change that is necessary to tackle the issue: long ago, I included the channel UDIO001 in read_ctf_trigger.m, what I thought was a "my-system-only" change. But without it, it still finds 0 events, confirmed both in Linux and Windows. I am sending my read_ctf_trigger.m for reviewing also. In the Windows machine, this was enough to solve the problem. Second, the language settings: I looked up which encoding was used when a file is opened by using: [filename, permission, machineformat, encoding] = fopen(fid) And the values returned were 'UTF-8' in the Linux machine and an empty string in the Windows one. Changing the LANG to de_DE on Linux gave me the value 'ISO-8859-1' for encoding, but the problem was only solved when I replaced read_ctf_trigger.m. Finally, changing char to uint8 in read_ctf_res4.m made it robust against locale changes. Maybe the issue has not been noticed before because it is inside a try-catch block (in fact, some layers of try-catch to get to fread), so usually it fails silently. I noticed some odd behaviour on file handling since I started to use Fieldtrip, but it took some time to get to the exact point and I do not know to which extent using another trigger channel would prevent the problem from happening. Additionally, MATLAB changed the file handling in a recent version, so it might happen that people using older versions also do not see it. Best regards, Erick Robert Oostenveld wrote: > Hi Erick > > Thanks for the suggested change. I have incoroprated it and it will be > included in tonights release version on the ftp. > > The char/int8 problem had been reported before, but I have never seen it > happen myself on any of the computers that I have been working with. Do > you think that it might be related to particular language settings on > the computer that you are using? Since it not always occuring to me > seems to indicate that Matlab sometimes wants to use 8 bit and sometimes > 16 bit wide characters. > > Actually there is a lot of reading code for other (non ctf) formats that > also uses fread(...'char'). That code should also be affected with the > bug, which means that I should make the suggested change everywhere > where chars are read. > > best regards, > Robert > > > On 21 Jul 2008, at 20:06, Erick Britis Ortiz wrote: > >> I think that this problem is due to a change in fread's behaviour: as >> nowadays characters are not always 8-bit wide, we are supposed to use >> 'uint8' instead of 'char'. This change has been responsible for some >> nasty problems, including this one. >> >> As of 20080720 version of Fieldtrip, the snapshot still showed this >> behavior. Herewith I am attaching a correction of read_ctf_res4.m. >> Hope that some of you who have had similar problem might find it helpful. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: read_ctf_trigger.m URL: From wibral at BIC.UNI-FRANKFURT.DE Thu Jul 31 18:11:28 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 31 Jul 2008 18:11:28 +0200 Subject: Logical problem with CTF 3rd order gradiometers correction Message-ID: Dear listusers, I have a logical problem with denoise-synthetic. here's what I want to do: 1. use definetrial to make cfg.trl (works fine) 2. use preprocessing with the new cfg. headerfile='ctf_new' , cfg.datafile='ctf_new' options to read the reference gradiometer information and the data into a fieldtrip structure (works fine) 3. use denoise_synthetic to denoise the data (works fine ?) 4. un artefact detection on these data (-> this works fine and updates cfg.trl) 5. run preprocessing a second time for filtering and actually applying the results of artefact corrcetion,... i.e. those things that I didn't want to do before denoise_synthetic. BUT preprocessing complains that cfg shouldn't contain the cfg.trl field when no data are read - which is the case because I am invoking preprocessing a second time here on an existing fieldtrip structure. Therefore all information from artefact rejection is lost. Somehow it seems that I can run denoise_synthetic only after artefact rejection, because I need a fieldtrip dataset to run it, but NO dataset for preprocessing to perform artefact correction, i.e. accept cfg.trl. This would be a pity. Any suggestion how to solve this? Many Thanks, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jul 31 22:55:01 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 31 Jul 2008 22:55:01 +0200 Subject: Logical problem with CTF 3rd order gradiometers correction In-Reply-To: <741246283@web.de> Message-ID: Hi Michael On 31 Jul 2008, at 18:11, Michael Wibral wrote: > Dear listusers, > I have a logical problem with denoise-synthetic. > > here's what I want to do: > > 1. use definetrial to make cfg.trl (works fine) > 2. use preprocessing with the new cfg. headerfile='ctf_new' , > cfg.datafile='ctf_new' options to read the reference gradiometer > information and the data into a fieldtrip structure (works fine) > 3. use denoise_synthetic to denoise the data (works fine ?) In the (sofar limited) experiences that I heard there are noticeable differences mainly on the central/vertex sensors (which are also the closest to the reference sensors). > 4. un artefact detection on these data (-> this works fine and > updates cfg.trl) after artifact_xxx and rejectartifact you should read the data using preprocessing. Or are you using rejectvisual? If so, then you don't have to call preprocessing a second time, because the output of rejectvisual is again your data with the bad trials removed. > 5. run preprocessing a second time for filtering and actually > applying the results of artefact corrcetion,... i.e. those things > that I didn't want to do before denoise_synthetic. After rejectartifact, you should be calling it here like preprocessing (cfg), and not with a second input argument. If you call it like preprocessing(cfg, data), then the cfg should not contain cfg.dataset and cfg.trl but only filtering options, because the data should not be read from file. > BUT preprocessing complains that cfg shouldn't contain the cfg.trl > field when no data are read - which is the case because I am > invoking preprocessing a second time here on an existing fieldtrip > structure. I suspect that you are mixing up rejectartifact and preprocessing. Calling preprocessing with a 2nd data input argument is only meant to apply another set of filters on that data (i.e. if you forgot to do it in the first run, or if you sequentially want to bandstopfilter some line noise or CRT artifacts). > Therefore all information from artefact rejection is lost. > > Somehow it seems that I can run denoise_synthetic only after > artefact rejection, because I need a fieldtrip dataset to run it, > but NO dataset for preprocessing to perform artefact correction, > i.e. accept cfg.trl. This would be a pity. I must say that I had not considered sofar the interaction between denoising and artifact detectoin and removal. The artfifact_xxx functions perform detection on data from disk(*), i.e. prior to reading the data into memory. The historical reason for (*) is to save on memory when a lot of filter padding is used and when there is a lot of overlap between padded trials. The padded regions should be checked for artifacts (esp jump artifacts which cause a lot of filter rinning), but in the end we don't need them in memory. The denoising only happens after the data is read into memory. > Any suggestion how to solve this? For the moment I suggest to use the following sequence definetrial preprocessing denoise_synthetic rejectvisual and not use artifact_xxx combined with rejectartifact. We are revising the automatic artifact detection functions at the moment, since computers nowadays have much more RAM than when we started implementing it 5 years ago, and reading the padded data into memory is now much less of a concern. So in the near future, it will be possible to do autodetection of artifacts also on data that is in memory, which means that then you could also do the autodetection after denoise_synthetic. best regards Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Jul 2 11:49:56 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 2 Jul 2008 11:49:56 +0200 Subject: Reading in Neuroscan files In-Reply-To: Message-ID: Hi Monika, On 30 Jun 2008, at 13:21, Monika Mellem wrote: > I have noticed some things when reading in both Neuroscan .eeg > and .cnt files. > > 1) When reading a Neuroscan .eeg file, read_event.m seems to put > either > "accept" or "reject" into the field event.value. According to how > event.field is used later on, it should be putting the trigger > values in > this field which are in tmp.sweep.type. I modified the code as > shown below. Thanks for the suggestion. I have changed it into the following for i=1:hdr.nTrials % the *.eeg file has a fixed trigger value for each trial % furthermore each trial has the label 'accept' or 'reject' tmp = read_ns_eeg(filename, i); % create an event with the trigger value event(end+1).type = 'trial'; event(end ).sample = (i-1)*hdr.nSamples + 1; event(end ).value = tmp.sweep.type; % trigger value event(end ).offset = -hdr.nSamplesPre; event(end ).duration = hdr.nSamples; % create an event with the boolean accept/reject code event(end+1).type = 'accept'; event(end ).sample = (i-1)*hdr.nSamples + 1; event(end ).value = tmp.sweep.accept; % boolean value indicating accept/reject event(end ).offset = -hdr.nSamplesPre; event(end ).duration = hdr.nSamples; end This encodes both the event value (trigger code) and the accept/ reject state, albeit in different events. The two events can be combined in a trialfun of course. > 2) When reading in a Neuroscan .cnt file, read_header.m puts some bad > channel labels into hdr.label using what it gets from the > read_ns_cnt.m file > (around line 564). Whatever is in orig.chan.names starts with the > correct > channels (about 10 of them) and then has blank values or odd > characters for > the rest of the channel labels. This seems like a bug w.r.t. the reading of the header in general. I was not able to reproduce the problem. Could you send me the .cnt file that has the problem, e.g. using yousendit.com or on ftp.fcdonders.nl? best regards, Robert > As a quick fix for just the channel labels, > I just took the channel labels that read_ns_hdr.m finds and > substituted them > into hdr.label. See below. This doesn't fix the underlying > problem in > read_ns_cnt.m though which seems to be with the variables chandat and > r.chan.names (lines 140-141). > > orig = read_ns_hdr(filename); > hdr.label = orig.label; > hdr.orig.chan.names = orig.label; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From florisdelange at GMAIL.COM Wed Jul 2 17:45:02 2008 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Wed, 2 Jul 2008 17:45:02 +0200 Subject: Significance test frequency power decrease baseline vs stimulation Message-ID: Dear Thomas, Jan-Matthijs and others, Related to the post of a few days ago (error message undefined data or class data.biol), it looks like this problem has been discussed already before on the list: see https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0610&L=FIELDTRIP&P=R23621 I copy/paste the relevant bit below. Best wishes, Floris On 13 Oct 2006, at 19:03, Marco Buiatti wrote: > > ??? Undefined variable "data" or class "data.biol". > > > > Error in ==> fieldtrip-20061012/private/prepare_design at 92 > > nrepl=size(data.biol,1); > > > > Error in ==> fieldtrip-20061012/private/statistics_wrapper at 212 > > [cfg] = prepare_design(cfg); > > > > Error in ==> timelockstatistics at 50 > > [stat] = statistics_wrapper(cfg, varargin{:}); > > Yep, that is a known problem (sorry about that). The function > prepare_design is not working properly. I suggest to make a design > matrix in cfg.design by hand (similar to, but not completely the same > as in SPM). It is not difficult, and it will also make you more clear > how it works. Please have a look at > https://listserv.surfnet.nl/scripts/wa.exe? > A2=ind0607&L=FIELDTRIP&P=R3192&I=-3&X=77C04E25A87526C2B4 > or if that URL does not work, then search the fieldtrip discussion > list archive for the string "cfg.design". ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Thu Jul 3 15:59:09 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Thu, 3 Jul 2008 15:59:09 +0200 Subject: Call for participation - Autumn School 'Magnetoencephalography' Message-ID: Dear all, I've been asked to distribute the announcement of an Autumn School in 'Magnetoencephalography' to the members of this list. Best, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Call_and_Program.pdf Type: application/binary Size: 141002 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ApplicationForm.pdf Type: application/binary Size: 265885 bytes Desc: not available URL: From A.Stolk at EWI.UTWENTE.NL Thu Jul 3 16:05:00 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Thu, 3 Jul 2008 16:05:00 +0200 Subject: Undefined function or variable "sens" Message-ID: Dear fieldtrippers, While performing statitstical analysis on time-frequency EEG data, I get the following error: ??? Undefined function or variable "sens". Error in ==> neighbourselection at 106 if ~isstruct(sens) Error in ==> statistics_wrapper at 226 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 132 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> fieldtripstatanalyse at 70 [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); The neighbourselection function tells: if ~isstruct(sens) error('Did not find gradiometer or electrode information.'); which gets its data by: % Revision 1.6 2006/07/12 14:14:59 roboos % get sens from data.grad/elec I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? Regards, Arjen Stolk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Jul 3 17:10:40 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 3 Jul 2008 16:10:40 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Jul 7 14:43:59 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Jul 2008 14:43:59 +0200 Subject: fixed bug in sourceanalysis w.r.t. channel ordering Message-ID: Dear all, Thanks to the sharp eye of one of the FieldTrip users, a bug was discovered in SOURCEANALYSIS. The bug caused souercanalysis to result in nonsense results if the channel ordering in the data (i.e. data.label) and the channel ordering in the sensor definition (grad.label or elec.label) was inconsistent. Missing channels in either one were treated correctly, but a different ordering was not treated correctly. The bug did not affect MEG data, hence it was not affecting MEG users in the Donders centre. It might be that people doing source reconstruction on EEG data are affected by the bug. The bug only applied to the SOURCEANALYSIS function, not to the DIPOLEFITTING function. I have just fixed the bug. External users should download the latest daily version from the ftp server, which will be copied to the ftp server this evening around 22h CET. Sorry for the inconvenience that it might have caused. best regards. Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jrkerlin at UCDAVIS.EDU Tue Jul 8 02:08:30 2008 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Mon, 7 Jul 2008 17:08:30 -0700 Subject: Statistics on a pre-defined cluster Message-ID: Hello all, I'm running an 128 electrode EEG experiment and I'd like to constrain my time-locked statistical analysis of Condition B to the significant electrode/time clusters of independent Condition A. I know I can use cfg.elec to constrain the electrode locations before running timelockstatistics, but I don't know how to constrain by a pre-defined elec/time cluster from separate data. All suggestions appreciated. Cheers, Jess Kerlin ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 10:36:48 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 10:36:48 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. I do manage to get my script to work on another computer, but somehow not on this one. ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: do 7/3/2008 5:10 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jul 8 10:52:58 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Jul 2008 10:52:58 +0200 Subject: FieldTrip and BCI2000 Message-ID: Dear fieldtrip users (and specifically those of you interested in BCI and neurofeedback): Last weekend the BCI2000 workshop took place in Utrecht (see http:// www.bci2008.nl). Christian (also from the FCDC) and I contributed to the lectures and hands-on sessions at that workshop by showing how Matlab can be used for "in the pipe" (synchronous) and "out of the pipe" (asynchronous) real-time processing of EEG data. Overall the workshop was a great succes and a lot of fun to be part of. Given the successful demonstration of the joint BCI2000-FieldTrip efforts in Utrecht, we will now release the BCI specific FieldTrip code that we have developed. Part of that code is specific to BCI2000 and will be released through www.bci2000.org and documented there. Part of the code is not specific to BCI2000 and hence will be released and documented at the FieldTrip wiki. Keep an eye on the FieldTrip wiki for updates on this. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Jul 8 10:55:54 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Jul 2008 10:55:54 +0200 Subject: Statistics on a pre-defined cluster In-Reply-To: <4872AFFE.7070406@ucdavis.edu> Message-ID: Hi Jess, You can use avgoverchan, avgovertime and avgoverfreq configuration options in freqstatistics. However, that does not allow you to make a cluster with "ragged edges", i.e. one channel only being included for part of the time in which the effect is significant and not for another part. If you want to do that, then you will have to average over the channel-time-frequency points in the cluster by hand. best regards, Robert On 8 Jul 2008, at 2:08, Jess R. Kerlin wrote: > Hello all, > > I'm running an 128 electrode EEG experiment and I'd like to > constrain my time-locked statistical analysis of Condition B to > the significant electrode/time clusters of independent Condition A. > I know I can use cfg.elec to constrain the electrode locations > before running timelockstatistics, but I don't know how to > constrain by a pre-defined elec/time cluster from separate data. > All suggestions appreciated. > > Cheers, > > Jess Kerlin > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 11:46:15 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 11:46:15 +0200 Subject: Undefined function or variable "sens" Message-ID: If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. Regards, Arjen Stolk ________________________________ Van: FieldTrip discussion list namens A. Stolk Verzonden: di 7/8/2008 10:36 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. I do manage to get my script to work on another computer, but somehow not on this one. ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: do 7/3/2008 5:10 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From grion at SISSA.IT Tue Jul 8 11:50:14 2008 From: grion at SISSA.IT (Natalia Grion) Date: Tue, 8 Jul 2008 11:50:14 +0200 Subject: Overlapping trials In-Reply-To: Message-ID: Dear All, During reading and preprocessing lfps, I find this error for some trials: ?? Subscript indices must either be real positive integers or logicals. *Error in ==> read_data at 576 dat = ncs.dat(begsample:endsample);* Error in ==> read_fcdc_data at 49 [dat] = read_data(varargin{:}); Error in ==> preprocessing at 554 dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, rawindx, strcmp(cfg.continuous, 'yes')); Error in ==> FreqAnalysis at 51 datar{chanindx}=preprocessing(cfgpreproc) Trials are defined by 2 trigger beams, first trigger defines the start of the trial, and 2nd trigger beam: the reward time (which is variable). I'm taking smaples in this way: prestimbeam: 3 sec before "start trigger", and poststimbeam = time till trigger of reward. I pretty sure this error appears when prestimbeam is overlapping with the previous poststimbeam (actually, taking 2sec before start trigger error doesn't come up). Do you have any suggestion of how i could introduce i conditional statement for skipping these trials? I guess this statement has to be written is "read_data" function, right? Thanks! Natalia Grion ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.b.dijkman at STUDENT.UTWENTE.NL Tue Jul 8 13:03:52 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Tue, 8 Jul 2008 13:03:52 +0200 Subject: Overlapping trials Message-ID: Hi Natalia, Your error seems te originate from this line: dat = ncs.dat(begsample:endsample); Either the begsample variable or the endsample variable isn't a positive number. As you probably know, matlab starts counting with 1 for vector and matrix indices. Since you mention the error doesn't come up when you take a trial 2 sec instead of 3 sec before the prestimbeam, my guess is that he sample index of the prestimbeam is more than 2 sec * samplefreq, but less then 3 sec * samplefreq. Perhaps you could elaborate a bit further about your experimental setup? All your trials have a different duration? I hope this helps, Thomas Dijkman -----Oorspronkelijk bericht----- Van: FieldTrip discussion list namens Natalia Grion Verzonden: di 8-7-2008 11:50 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] Overlapping trials Dear All, During reading and preprocessing lfps, I find this error for some trials: ?? Subscript indices must either be real positive integers or logicals. *Error in ==> read_data at 576 dat = ncs.dat(begsample:endsample);* Error in ==> read_fcdc_data at 49 [dat] = read_data(varargin{:}); Error in ==> preprocessing at 554 dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, rawindx, strcmp(cfg.continuous, 'yes')); Error in ==> FreqAnalysis at 51 datar{chanindx}=preprocessing(cfgpreproc) Trials are defined by 2 trigger beams, first trigger defines the start of the trial, and 2nd trigger beam: the reward time (which is variable). I'm taking smaples in this way: prestimbeam: 3 sec before "start trigger", and poststimbeam = time till trigger of reward. I pretty sure this error appears when prestimbeam is overlapping with the previous poststimbeam (actually, taking 2sec before start trigger error doesn't come up). Do you have any suggestion of how i could introduce i conditional statement for skipping these trials? I guess this statement has to be written is "read_data" function, right? Thanks! Natalia Grion ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 p.medendorp at NICI.RU.NL Tue Jul 8 15:03:19 2008 From: p.medendorp at NICI.RU.NL (Pieter Medendorp) Date: Tue, 8 Jul 2008 15:03:19 +0200 Subject: POSTDOC POSITION AVAILABLE IN NIJMEGEN Message-ID: POST-DOCTORAL RESEARCH POSITION IN SPATIAL PERCEPTION AND MOTOR CONTROL A post-doctoral research position (3 yrs) is available at the Radboud University Nijmegen, The Netherlands, in the research group of Dr. Pieter Medendorp. Research in our group aims to elucidate the computational and neural strategies in human sensorimotor processing. This theme is mainly investigated from a neuroscience systems point of view, using a combination of computational modeling, psychophysics and imaging techniques (EEG, MEG and fMRI). Current research projects investigate topics such as spatial constancy, effector selection, eye-hand coordination, vestibular processing, and spatial motion perception. The new project, funded by the Netherlands Organisation for Scientific Research, will study the neural signals and mechanisms that preserve spatial constancy for motor control. Facilities and tools to support these studies include real-time motion tracking systems, eye trackers, visual displays, and a vestibular platform. Two state-of the-art MRI systems, whole-head MEG, and an EEG lab are also available. Preference will be given to candidates with a PhD in neuroscience, or related field, who have a strong motivation to do challenging interdisciplinary research. Experience with functional imaging, psychophysical techniques, as well as strong programming skills, and a demonstrable affinity with quantitative data analysis (e.g. MatLab) is highly desirable. Salary will be commensurate with experience. The anticipated start date is fall 2008, but earlier is possible. Nijmegen is the oldest city of the Netherlands, with an interesting history dating back to the Roman Empire, nice surrounding scenery (rivers, hills, woods) and a rich cultural life. Interested applicants should send CV, statement of background and interests, and names of 2 referees to: Pieter Medendorp, Nijmegen Institute for Cognition and Information, Radboud University Nijmegen, Montessorilaan 3, 6525 HR Nijmegen, The Netherlands; Email: p.medendorp at nici.ru.nl. Web: http://www.nici.ru.nl/~pieterm/. Review of applications will begin August 15, 2008, and will continue until the position is filled. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 grion at SISSA.IT Tue Jul 8 16:56:47 2008 From: grion at SISSA.IT (Natalia Grion) Date: Tue, 8 Jul 2008 16:56:47 +0200 Subject: Overlapping trials In-Reply-To: Message-ID: Hi Thomas and All, well this are recordings from freely moving rats with neuralynx system. By the way I'm defining trials, yes, they have variable length: I'm taking 3sec before the central beam is triggered (this is indicative of stimulus "on" = start trigger), till the trigger of the 2nd beam is trigger (reward trigger), even if they have a regular behaviour from trial to trial, sometimes they are faster. Start trigger is stored in a separate file as EventTimeTrigger, this event is a TimeStamp, Reward Trigger is stored in an external file (txt file) generated by labview (software that commands the maze). Timestamps are generated by the recording system(microseconds). Every LFP sample has an associated timestamp and this forms the time axis, knowing the EventTimeStamp i can take the 'n' samples before this event and/or after, in my case time taken 'after' depends on how long the rat took to trigger the Reward beam (ellapsed time). This is my function (main part): function [trl]=trialfunNG(cfg) *% get the inter-timestamp time from the header* hdr=read_fcdc_header(cfg.datadir); nlfpsamplespersec=hdr.Fs; *% read the timestamps of the events in the Neuralynx stimulus channel (the .nev-file in cfg.datadir)* events=read_fcdc_event(cfg.datadir); eventlfpsamples=[events(:).sample]'; *% read the stimulus and behavioral information in the external file....info about stimulus, correct\incorrect trials etc* stimbehdata=dlmread(cfg.extstimbehfile,'\t',1,1); *....* nlfpsamplesprestimbeamcrossing=cfg.prestimbeam*nlfpsamplespersec; if ischar(cfg.poststimbeam) && strcmp(cfg.poststimbeam,'respbeam') *%this respbeam is taken from the txt file* rtinmsec=stimbehdata(selvec,6); triallengthinlfpsamples=(rtinmsec/1000)*nlfpsamplespersec; else triallengthinlfpsamples=cfg.poststimbeam*nlfpsamplespersec; end; trl=zeros(nseltrials,3); trl(:,1)=eventlfpsamples(selvec)-nlfpsamplesprestimbeamcrossing; trl(:,2)=eventlfpsamples(selvec)+triallengthinlfpsamples; trl(:,3)=-nlfpsamplesprestimbeamcrossing; I don't know till this point if I'm missing sth from Nlx, or is a bug generated by the way fieldtrip is picking up my data. One solution I thought, would be to write a conditional statement for skipping these trials, but, as the error comes up from read_data. I'd like to know how to introduce it. Thanks again Natalia Thomas Dijkman wrote: > Hi Natalia, > > Your error seems te originate from this line: dat = ncs.dat(begsample:endsample); Either the begsample variable or the endsample variable isn't a positive number. As you probably know, matlab starts counting with 1 for vector and matrix indices. Since you mention the error doesn't come up when you take a trial 2 sec instead of 3 sec before the prestimbeam, my guess is that he sample index of the prestimbeam is more than 2 sec * samplefreq, but less then 3 sec * samplefreq. > Perhaps you could elaborate a bit further about your experimental setup? All your trials have a different duration? > I hope this helps, > > Thomas Dijkman > > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list namens Natalia Grion > Verzonden: di 8-7-2008 11:50 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] Overlapping trials > > Dear All, > During reading and preprocessing lfps, I find this error for some trials: > > ?? Subscript indices must either be real positive integers or logicals. > *Error in ==> read_data at 576 > dat = ncs.dat(begsample:endsample);* > Error in ==> read_fcdc_data at 49 > [dat] = read_data(varargin{:}); > Error in ==> preprocessing at 554 > dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, > rawindx, strcmp(cfg.continuous, > 'yes')); > Error in ==> FreqAnalysis at 51 > datar{chanindx}=preprocessing(cfgpreproc) > > Trials are defined by 2 trigger beams, first trigger defines the start > of the trial, and 2nd trigger beam: the reward time (which is variable). > I'm taking smaples in this way: prestimbeam: 3 sec before "start > trigger", and poststimbeam = time till trigger of reward. I pretty sure > this error appears when prestimbeam is overlapping with the previous > poststimbeam (actually, taking 2sec before start trigger error doesn't > come up). Do you have any suggestion of how i could introduce i > conditional statement for skipping these trials? I guess this statement > has to be written is "read_data" function, right? > Thanks! > Natalia Grion > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Tue Jul 8 16:52:34 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 8 Jul 2008 16:52:34 +0200 Subject: Overlapping trials In-Reply-To: <4873802F.2030209@sissa.it> Message-ID: Dear Natalia, Most likely your error is caused by the begsmp/endsmp in read_data not being integer and positive. This could be due to the fact that your variables nlfpsamplesprestimbeamcrossing and triallengthinlfpsamples are not integer numbers. A simple round should do the trick I guess... In general, I'd advice you to use less elaborate names for the definition of your variables: it saves some typing (also for the repliers to your question ;o) ), and so reduces the probability of typos. Moreover, it facilitates reading. Hope this helped, Jan-Mathijs On Jul 8, 2008, at 4:56 PM, Natalia Grion wrote: > Hi Thomas and All, > well this are recordings from freely moving rats with neuralynx > system. By the way I'm defining trials, yes, they have variable > length: I'm taking 3sec before the central beam is triggered (this > is indicative of stimulus "on" = start trigger), till the trigger > of the 2nd beam is trigger (reward trigger), even if they have a > regular behaviour from trial to trial, sometimes they are faster. > Start trigger is stored in a separate file as EventTimeTrigger, > this event is a TimeStamp, Reward Trigger is stored in an external > file (txt file) generated by labview (software that commands the > maze). Timestamps are generated by the recording system > (microseconds). Every LFP sample has an associated timestamp and > this forms the time axis, knowing the EventTimeStamp i can take > the 'n' samples before this event and/or after, in my case time > taken 'after' depends on how long the rat took to trigger the > Reward beam (ellapsed time). This is my function (main part): > > function [trl]=trialfunNG(cfg) > *% get the inter-timestamp time from the header* > hdr=read_fcdc_header(cfg.datadir); > nlfpsamplespersec=hdr.Fs; > > *% read the timestamps of the events in the Neuralynx stimulus > channel (the .nev-file in cfg.datadir)* > events=read_fcdc_event(cfg.datadir); > eventlfpsamples=[events(:).sample]'; > > *% read the stimulus and behavioral information in the external > file....info about stimulus, correct\incorrect trials etc* > stimbehdata=dlmread(cfg.extstimbehfile,'\t',1,1); > *....* > nlfpsamplesprestimbeamcrossing=cfg.prestimbeam*nlfpsamplespersec; > > if ischar(cfg.poststimbeam) && strcmp(cfg.poststimbeam,'respbeam') > *%this respbeam is taken from the txt file* > rtinmsec=stimbehdata(selvec,6); > triallengthinlfpsamples=(rtinmsec/1000)*nlfpsamplespersec; > else > triallengthinlfpsamples=cfg.poststimbeam*nlfpsamplespersec; > end; > trl=zeros(nseltrials,3); > trl(:,1)=eventlfpsamples(selvec)-nlfpsamplesprestimbeamcrossing; > trl(:,2)=eventlfpsamples(selvec)+triallengthinlfpsamples; > trl(:,3)=-nlfpsamplesprestimbeamcrossing; > > I don't know till this point if I'm missing sth from Nlx, or is a > bug generated by the way fieldtrip is picking up my data. One > solution I thought, would be to write a conditional statement for > skipping these trials, but, as the error comes up from read_data. > I'd like to know how to introduce it. > Thanks again > Natalia > > > > Thomas Dijkman wrote: >> Hi Natalia, >> >> Your error seems te originate from this line: dat = ncs.dat >> (begsample:endsample); Either the begsample variable or the >> endsample variable isn't a positive number. As you probably know, >> matlab starts counting with 1 for vector and matrix indices. Since >> you mention the error doesn't come up when you take a trial 2 sec >> instead of 3 sec before the prestimbeam, my guess is that he >> sample index of the prestimbeam is more than 2 sec * samplefreq, >> but less then 3 sec * samplefreq. Perhaps you could elaborate a >> bit further about your experimental setup? All your trials have a >> different duration? I hope this helps, >> >> Thomas Dijkman >> >> -----Oorspronkelijk bericht----- >> Van: FieldTrip discussion list namens Natalia Grion >> Verzonden: di 8-7-2008 11:50 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: [FIELDTRIP] Overlapping trials >> Dear All, >> During reading and preprocessing lfps, I find this error for some >> trials: >> >> ?? Subscript indices must either be real positive integers or >> logicals. >> *Error in ==> read_data at 576 >> dat = ncs.dat(begsample:endsample);* >> Error in ==> read_fcdc_data at 49 >> [dat] = read_data(varargin{:}); >> Error in ==> preprocessing at 554 >> dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, >> rawindx, strcmp(cfg.continuous, >> 'yes')); >> Error in ==> FreqAnalysis at 51 >> datar{chanindx}=preprocessing(cfgpreproc) >> >> Trials are defined by 2 trigger beams, first trigger defines the >> start of the trial, and 2nd trigger beam: the reward time (which >> is variable). I'm taking smaples in this way: prestimbeam: 3 sec >> before "start trigger", and poststimbeam = time till trigger of >> reward. I pretty sure this error appears when prestimbeam is >> overlapping with the previous poststimbeam (actually, taking >> 2sec before start trigger error doesn't come up). Do you have >> any suggestion of how i could introduce i conditional statement >> for skipping these trials? I guess this statement has to be >> written is "read_data" function, right? >> Thanks! >> Natalia Grion >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From arno at SALK.EDU Tue Jul 8 17:22:45 2008 From: arno at SALK.EDU (arno delorme) Date: Tue, 8 Jul 2008 17:22:45 +0200 Subject: Thesis fellowship EEG Neurofeedback to control mind wandering Message-ID: Thesis fellowship for 3 years financed by the French ministry of research in Toulouse, France: EEG Neurofeedback to control mind wandering The capacity to concentrate for long period of times is critical both for students and some specific position (air traffic controller, monitor security guard, child care teacher or even Paris taxi driver). Failure to do so can result in life-threatening accident. Monks of various traditions, practicing concentrative meditation, excel at developing a one point focus attention. Over the 3-year course of this project, we intend to 1) record the brain activity of monks in meditation using EEG. 2) train normal non-meditative subjects to produce the same brain rhythms as the monk do. 3) test the concentrative capacities of these subjects before and after training. The institution hosting the project is the University of Toulouse III and the CNRS laboratory CERCO. The CERCO (Center for Brain and Cognition Research) is an internationally recognized laboratory of 18 professional independent CNRS researchers. In 2006 4-year evaluation, this laboratory was ranked first in Neuroscience in France. It is well known for its multidisciplinary approach to cognitive neuroscience with experiments on mice, monkeys and humans, and a wide range of imaging methodologies including modeling. The ideal candidate will have: - a master degree or equivalent in the cognitive or computational domain (no constraint in terms of nationality) - an interest for studying the brain and altered states of consciousness such as those induced by neurofeedback or meditation - a training in mathematics, signal processing and/or computer science - fluency in English. Working knowledge in French is preferred. - capacity to work independently - age limit: 25 (or 30 under special circumstances) Contact: Arnaud Delorme via email before the 31 of August 2008 (arno at cerco.ups-tlse.fr ) (include PDF of a motivation letter, a CV, any publication in english/french and have 2 references send recommendation letter independently by email). http://cerco.ups-tlse.fr/~delorme ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 v.litvak at ION.UCL.AC.UK Tue Jul 8 17:24:32 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 8 Jul 2008 16:24:32 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: I don't think it's a matter of 'light', but it might be a matter of a different FT version. If you look in neighbourselection.m there is a comment % Revision 1.8 2007/05/14 08:26:31 roboos % added option to construct neighbours from 2-D layout So if you FT dates prior to that date, it cannot determine neighbour relations based on 2D layout. Update your FT and see if it solves the problem. Without layout and without 3D electrode positions it won't work and rightly so. With layout it should work if your FT is up to date. Best, Vladimir On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: > If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. > > Regards, > > Arjen Stolk > > ________________________________ > > Van: FieldTrip discussion list namens A. Stolk > Verzonden: di 7/8/2008 10:36 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. > I do manage to get my script to work on another computer, but somehow not on this one. > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: do 7/3/2008 5:10 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Do you actually have electrode positions somewhere in your data? They > are not usually supposed to get there by themselves so unless you > somehow got them there (like read in a file with sensor positions), > they are indeed missing. For statistics you don't actually need sensor > positions You can specify the neighborhood relations 'by hand' instead > of calling neighbourselection. > > Best, > > Vladimir > > On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >> Dear fieldtrippers, >> >> While performing statitstical analysis on time-frequency EEG data, I get the following error: >> >> ??? Undefined function or variable "sens". >> Error in ==> neighbourselection at 106 >> if ~isstruct(sens) >> Error in ==> statistics_wrapper at 226 >> cfg.neighbours = neighbourselection(cfg,varargin{1}); >> Error in ==> freqstatistics at 132 >> [stat] = statistics_wrapper(cfg, varargin{:}); >> Error in ==> fieldtripstatanalyse at 70 >> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >> >> The neighbourselection function tells: >> >> if ~isstruct(sens) >> >> error('Did not find gradiometer or electrode information.'); >> >> >> >> which gets its data by: >> >> % Revision 1.6 2006/07/12 14:14:59 roboos >> >> % get sens from data.grad/elec >> >> >> >> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >> >> >> >> Regards, >> >> Arjen Stolk >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 17:36:26 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 17:36:26 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 7/8/2008 5:24 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" I don't think it's a matter of 'light', but it might be a matter of a different FT version. If you look in neighbourselection.m there is a comment % Revision 1.8 2007/05/14 08:26:31 roboos % added option to construct neighbours from 2-D layout So if you FT dates prior to that date, it cannot determine neighbour relations based on 2D layout. Update your FT and see if it solves the problem. Without layout and without 3D electrode positions it won't work and rightly so. With layout it should work if your FT is up to date. Best, Vladimir On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: > If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. > > Regards, > > Arjen Stolk > > ________________________________ > > Van: FieldTrip discussion list namens A. Stolk > Verzonden: di 7/8/2008 10:36 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. > I do manage to get my script to work on another computer, but somehow not on this one. > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: do 7/3/2008 5:10 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Do you actually have electrode positions somewhere in your data? They > are not usually supposed to get there by themselves so unless you > somehow got them there (like read in a file with sensor positions), > they are indeed missing. For statistics you don't actually need sensor > positions You can specify the neighborhood relations 'by hand' instead > of calling neighbourselection. > > Best, > > Vladimir > > On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >> Dear fieldtrippers, >> >> While performing statitstical analysis on time-frequency EEG data, I get the following error: >> >> ??? Undefined function or variable "sens". >> Error in ==> neighbourselection at 106 >> if ~isstruct(sens) >> Error in ==> statistics_wrapper at 226 >> cfg.neighbours = neighbourselection(cfg,varargin{1}); >> Error in ==> freqstatistics at 132 >> [stat] = statistics_wrapper(cfg, varargin{:}); >> Error in ==> fieldtripstatanalyse at 70 >> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >> >> The neighbourselection function tells: >> >> if ~isstruct(sens) >> >> error('Did not find gradiometer or electrode information.'); >> >> >> >> which gets its data by: >> >> % Revision 1.6 2006/07/12 14:14:59 roboos >> >> % get sens from data.grad/elec >> >> >> >> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >> >> >> >> Regards, >> >> Arjen Stolk >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Tue Jul 8 18:16:22 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 8 Jul 2008 17:16:22 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 19:57:02 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 19:57:02 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your assistance. Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 7/8/2008 6:16 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 t.b.dijkman at STUDENT.UTWENTE.NL Wed Jul 9 09:38:05 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Wed, 9 Jul 2008 09:38:05 +0200 Subject: Undefined function or variable "sens" Message-ID: This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. Regards, Thomas Dijkman -----Oorspronkelijk bericht----- Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 8-7-2008 18:16 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Paul.vandenHurk at FCDONDERS.RU.NL Wed Jul 9 10:23:54 2008 From: Paul.vandenHurk at FCDONDERS.RU.NL (Paul van den Hurk) Date: Wed, 9 Jul 2008 10:23:54 +0200 Subject: read_fcdc_header problem In-Reply-To: Message-ID: Dear all, When trying to read in my header information using e.g. hdr = read_fcdc_header('C:\Documents and Settings\pauvdhur\My Documents\MATLAB_Files\ANT_EEG_pilot_data\Subj_1\FabioGiommi.vhdr') only recently I got the following error: ??? Error using ==> rdivide Not enough input arguments. Error in ==> fieldtrip\private\read_brainvision_vhdr at 66 hdr.nSamples = info.bytes./(hdr.NumberOfChannels*2); Apparently, the info.bytes field is empty. The info structure is obtained by the following code (which you can check in the 'read_brainvision_vhdr' function): info = dir(hdr.DataFile); While the hdr.DataFile is obtained by: hdr.DataFile = read_asa(filename, 'DataFile=', '%s'); If I change the script info = dir(hdr.DataFile); into: info = dir(filename); the problem seems to be solved. Could anyone tell me what is best to do? To change the 'read_brainvision_vhdr' function for my own use? Or is there a possibility to change something else, so I could still use the standard ' read_brainvision_vhdr' function (which I would prefer actually). Thanks a lot in advance for any suggestion! Kind regards, Paul van den Hurk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 11:17:57 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 10:17:57 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Then perhaps Robert should look into it. If you look at statistics_wrapper line 229 it says: if ~isfield(cfg,'neighbours') && isfield(cfg, 'correctm') && strcmp(cfg.correctm, 'cluster') cfg.neighbours = neighbourselection(cfg,varargin{1}); end Thus neighbourselection should not be called with the settings you specified. Perhaps try putting a breakpoint there and see what happens. Best, Vladimir On Wed, Jul 9, 2008 at 8:38 AM, Thomas Dijkman wrote: > This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. > > Regards, > > Thomas Dijkman > > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 8-7-2008 18:16 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > The fact that you get this error indicates that somewhere you > specified correction for multiple comparisons using clustering. If you > want to get clusters on the scalp then you do use neighbour relations > even if you don't call neighbourselection explicitly. It will be > called by freqstatistics. Freqstatistics assumes that you do use scalp > clustering unless you specify otherwise. So if you don't say that you > don't want scalp clustering and don't provide any way to determine > neighbour relations, there is an error. So depending on what you > really want you should do one of three things: > > 1) If you do not want to use clustering at all specify a different way > of MCP correction (like 'max'). > > 1) If you do want to have scalp clusters then provide the layout as > you are doing now. > > 2) If you want to have clusters but only in time-frequency and not in > space put an empty neighbourhood structure in your cfg. Like (assuming > that cfg.channel is a list of your labels). > > cfg.neighbours = struct([]); > for chan=1:length(cfg.channel) > cfg.neighbours{chan}.label = cfg.channel{chan}; > cfg.neighbours{chan}.neighblabel = {}; > end > > Not that in this case you will still have MCP correction over > channels, so if you have more channels you loose power. So just > include the channels you really want to test. > > Best, > > Vladimir > > > On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: >> Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. >> >> Regards, >> >> Arjen >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: di 7/8/2008 5:24 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> I don't think it's a matter of 'light', but it might be a matter of a >> different FT version. If you look in neighbourselection.m there is a >> comment >> >> % Revision 1.8 2007/05/14 08:26:31 roboos >> % added option to construct neighbours from 2-D layout >> >> So if you FT dates prior to that date, it cannot determine neighbour >> relations based on 2D layout. Update your FT and see if it solves the >> problem. Without layout and without 3D electrode positions it won't >> work and rightly so. With layout it should work if your FT is up to >> date. >> >> Best, >> >> Vladimir >> >> >> >> On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >>> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens A. Stolk >>> Verzonden: di 7/8/2008 10:36 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >>> I do manage to get my script to work on another computer, but somehow not on this one. >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens Vladimir Litvak >>> Verzonden: do 7/3/2008 5:10 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> Do you actually have electrode positions somewhere in your data? They >>> are not usually supposed to get there by themselves so unless you >>> somehow got them there (like read in a file with sensor positions), >>> they are indeed missing. For statistics you don't actually need sensor >>> positions You can specify the neighborhood relations 'by hand' instead >>> of calling neighbourselection. >>> >>> Best, >>> >>> Vladimir >>> >>> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>>> Dear fieldtrippers, >>>> >>>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>>> >>>> ??? Undefined function or variable "sens". >>>> Error in ==> neighbourselection at 106 >>>> if ~isstruct(sens) >>>> Error in ==> statistics_wrapper at 226 >>>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>>> Error in ==> freqstatistics at 132 >>>> [stat] = statistics_wrapper(cfg, varargin{:}); >>>> Error in ==> fieldtripstatanalyse at 70 >>>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>>> >>>> The neighbourselection function tells: >>>> >>>> if ~isstruct(sens) >>>> >>>> error('Did not find gradiometer or electrode information.'); >>>> >>>> >>>> >>>> which gets its data by: >>>> >>>> % Revision 1.6 2006/07/12 14:14:59 roboos >>>> >>>> % get sens from data.grad/elec >>>> >>>> >>>> >>>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>>> >>>> >>>> >>>> Regards, >>>> >>>> Arjen Stolk >>>> >>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 11:23:37 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 10:23:37 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Ah, I think I see what's happening. There was also a fix in statistics_wrapper: % Revision 1.45 2008/04/09 14:14:09 roboos % only make neighbours if clustering is required Both problematic versions mentioned before are prior to this date. So you should update to the latest version as I suggested before. Vladimir On Wed, Jul 9, 2008 at 10:17 AM, Vladimir Litvak wrote: > Then perhaps Robert should look into it. If you look at > statistics_wrapper line 229 it says: > > if ~isfield(cfg,'neighbours') && isfield(cfg, 'correctm') && > strcmp(cfg.correctm, 'cluster') > cfg.neighbours = neighbourselection(cfg,varargin{1}); > end > > > Thus neighbourselection should not be called with the settings you > specified. Perhaps try putting a breakpoint there and see what > happens. > > Best, > > Vladimir > > > > On Wed, Jul 9, 2008 at 8:38 AM, Thomas Dijkman > wrote: >> This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. >> >> Regards, >> >> Thomas Dijkman >> >> >> -----Oorspronkelijk bericht----- >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: di 8-7-2008 18:16 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> The fact that you get this error indicates that somewhere you >> specified correction for multiple comparisons using clustering. If you >> want to get clusters on the scalp then you do use neighbour relations >> even if you don't call neighbourselection explicitly. It will be >> called by freqstatistics. Freqstatistics assumes that you do use scalp >> clustering unless you specify otherwise. So if you don't say that you >> don't want scalp clustering and don't provide any way to determine >> neighbour relations, there is an error. So depending on what you >> really want you should do one of three things: >> >> 1) If you do not want to use clustering at all specify a different way >> of MCP correction (like 'max'). >> >> 1) If you do want to have scalp clusters then provide the layout as >> you are doing now. >> >> 2) If you want to have clusters but only in time-frequency and not in >> space put an empty neighbourhood structure in your cfg. Like (assuming >> that cfg.channel is a list of your labels). >> >> cfg.neighbours = struct([]); >> for chan=1:length(cfg.channel) >> cfg.neighbours{chan}.label = cfg.channel{chan}; >> cfg.neighbours{chan}.neighblabel = {}; >> end >> >> Not that in this case you will still have MCP correction over >> channels, so if you have more channels you loose power. So just >> include the channels you really want to test. >> >> Best, >> >> Vladimir >> >> >> On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: >>> Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. >>> >>> Regards, >>> >>> Arjen >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens Vladimir Litvak >>> Verzonden: di 7/8/2008 5:24 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> I don't think it's a matter of 'light', but it might be a matter of a >>> different FT version. If you look in neighbourselection.m there is a >>> comment >>> >>> % Revision 1.8 2007/05/14 08:26:31 roboos >>> % added option to construct neighbours from 2-D layout >>> >>> So if you FT dates prior to that date, it cannot determine neighbour >>> relations based on 2D layout. Update your FT and see if it solves the >>> problem. Without layout and without 3D electrode positions it won't >>> work and rightly so. With layout it should work if your FT is up to >>> date. >>> >>> Best, >>> >>> Vladimir >>> >>> >>> >>> On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >>>> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >>>> >>>> Regards, >>>> >>>> Arjen Stolk >>>> >>>> ________________________________ >>>> >>>> Van: FieldTrip discussion list namens A. Stolk >>>> Verzonden: di 7/8/2008 10:36 >>>> Aan: FIELDTRIP at NIC.SURFNET.NL >>>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>>> >>>> >>>> >>>> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >>>> I do manage to get my script to work on another computer, but somehow not on this one. >>>> >>>> ________________________________ >>>> >>>> Van: FieldTrip discussion list namens Vladimir Litvak >>>> Verzonden: do 7/3/2008 5:10 >>>> Aan: FIELDTRIP at NIC.SURFNET.NL >>>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>>> >>>> >>>> >>>> Do you actually have electrode positions somewhere in your data? They >>>> are not usually supposed to get there by themselves so unless you >>>> somehow got them there (like read in a file with sensor positions), >>>> they are indeed missing. For statistics you don't actually need sensor >>>> positions You can specify the neighborhood relations 'by hand' instead >>>> of calling neighbourselection. >>>> >>>> Best, >>>> >>>> Vladimir >>>> >>>> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>>>> Dear fieldtrippers, >>>>> >>>>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>>>> >>>>> ??? Undefined function or variable "sens". >>>>> Error in ==> neighbourselection at 106 >>>>> if ~isstruct(sens) >>>>> Error in ==> statistics_wrapper at 226 >>>>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>>>> Error in ==> freqstatistics at 132 >>>>> [stat] = statistics_wrapper(cfg, varargin{:}); >>>>> Error in ==> fieldtripstatanalyse at 70 >>>>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>>>> >>>>> The neighbourselection function tells: >>>>> >>>>> if ~isstruct(sens) >>>>> >>>>> error('Did not find gradiometer or electrode information.'); >>>>> >>>>> >>>>> >>>>> which gets its data by: >>>>> >>>>> % Revision 1.6 2006/07/12 14:14:59 roboos >>>>> >>>>> % get sens from data.grad/elec >>>>> >>>>> >>>>> >>>>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>>>> >>>>> >>>>> >>>>> Regards, >>>>> >>>>> Arjen Stolk >>>>> >>>>> >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michelic72 at GMAIL.COM Wed Jul 9 18:02:14 2008 From: michelic72 at GMAIL.COM (Cristiano Micheli) Date: Wed, 9 Jul 2008 18:02:14 +0200 Subject: CTF 3rd order gradiometers correction Message-ID: Hi All CTF software allows to open a MEG dataset and to apply a theoretical 3rd order gradiometers data correction, which makes use of a number of coefficients to correct raw data from common mode artifacts. Does Fieldtrip take in account this correction as well? Where is it coded? Regards Cristiano ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sdmuthu at CARDIFF.AC.UK Wed Jul 9 18:32:02 2008 From: sdmuthu at CARDIFF.AC.UK (Suresh Muthukumaraswamy) Date: Wed, 9 Jul 2008 17:32:02 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Hi, as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and doesnt apply any other processing to this You can check what the gradiometer definition of the saved data is in DataEditor. In the Acq software you can pick what type of gradiometers the data is saved as. We usually just save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on (unless you had some reason to undo the 3rd order gradiometers) - Suresh Suresh Muthukumaraswamy, PhD CUBRIC Cardiff University Park Place Cardiff, CF10 3AT United Kingdom email: sdmuthu at cardiff.ac.uk Phone: +44 (0)29 2087 0353 >>> Cristiano Micheli 09/07/2008 17:02 >>> Hi All CTF software allows to open a MEG dataset and to apply a theoretical 3rd order gradiometers data correction, which makes use of a number of coefficients to correct raw data from common mode artifacts. Does Fieldtrip take in account this correction as well? Where is it coded? Regards Cristiano ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 18:53:48 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 17:53:48 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Dear Christiano, This has only recently been implemented and is now being tested at FCDC. Look at denoise_synthetic function. You will also need to download the ctf toolbox from ftp://ftp.fcdonders.nl/pub/fieldtrip/external/ctf.zip and specify 'ctf_new' as filetype when you read the data (in particular the header with grad). But keep in mind that this is still very experimental. Good luck, Vladimir On Wed, Jul 9, 2008 at 5:02 PM, Cristiano Micheli wrote: > Hi All > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > order gradiometers data correction, which makes use of a number of > coefficients to correct raw data from common mode artifacts. > Does Fieldtrip take in account this correction as well? > Where is it coded? > Regards > Cristiano > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 19:23:11 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 18:23:11 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <4874F612020000AD00028460@zgrw01.cf.ac.uk> Message-ID: Until the recent improvements (which are not yet default) fieldtrip assumed that the data is 'raw'. Therefore source reconstruction was not precise for data that was saved in 3rd gradient. The data is indeed read as it's saved so for sensor level analysis there is no problem. But the leadfields computed using grads read with the old ctf reader are only suitable for the 'raw' setting. Best, Vladimir On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy wrote: > Hi, > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and > doesnt apply any other processing to this > You can check what the gradiometer definition of the saved data is in DataEditor. > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on > (unless you had some reason to undo the 3rd order gradiometers) > - Suresh > > Suresh Muthukumaraswamy, PhD > CUBRIC > Cardiff University > Park Place > Cardiff, CF10 3AT > United Kingdom > email: sdmuthu at cardiff.ac.uk > Phone: +44 (0)29 2087 0353 > >>>> Cristiano Micheli 09/07/2008 17:02 >>> > Hi All > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > order gradiometers data correction, which makes use of a number of > coefficients to correct raw data from common mode artifacts. > Does Fieldtrip take in account this correction as well? > Where is it coded? > Regards > Cristiano > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to > share experiences and to 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 Thu Jul 10 09:15:48 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 10 Jul 2008 09:15:48 +0200 Subject: read_fcdc_header problem In-Reply-To: <000601c8e19d$20014b90$172dae83@fcdonders.nl> Message-ID: Hi Paul On 9 Jul 2008, at 10:23, Paul van den Hurk wrote: > If I change the script > > info = dir(hdr.DataFile); > > into: > > info = dir(filename); > > the problem seems to be solved. Thanks for the detailled report and suggestion. The snippet of code that you are having a problem with is for determining the number of samples in the data, and it does that by determining the size of the file (in bytes). In the low-level read_brainvision_vhdr function the filename is the string with the *.vhrd file, whereas hdr. DataFile should be pointing to the filename with the *.dat file. Your suggested fix would hence determine the number of samples incorrectly. Since there is not an error in info = dir(hdr.DataFile); itself, I suspect that hdr does have the DataFile field, but that it points to a filename which cannot be found by the dir command. That is the case due to the file being in another directory, which is actually even stated as "FIXME" in the code. I have changed it to % determine the number of samples by looking at the binary file if strcmp(hdr.DataFormat, 'BINARY') % the data file is supposed to be located in the same directory as the header file % but that might be on another location than the present working directory [p, f, x] = fileparts(filename); datafile = fullfile(p, hdr.DataFile); info = dir(datafile); if isempty(info) error('cannot determine the location of the data file %s', hdr.DataFile); end switch lower(hdr.BinaryFormat) ... The new version will be on FCDC home/common in 10 minutes and on the ftp server this evening. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu Jul 10 14:05:50 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 10 Jul 2008 14:05:50 +0200 Subject: CTF 3rd order gradiometers correction Message-ID: Dear Vladimir, I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). (3) try to use laedfields from CTF for these data, if that's possible. Thanks for any suggestions on this issue. Best, Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 09.07.08 19:34:51 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction > Until the recent improvements (which are not yet default) fieldtrip > assumed that the data is 'raw'. Therefore source reconstruction was > not precise for data that was saved in 3rd gradient. The data is > indeed read as it's saved so for sensor level analysis there is no > problem. But the leadfields computed using grads read with the old ctf > reader are only suitable for the 'raw' setting. > > Best, > > Vladimir > > On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy > wrote: > > Hi, > > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and > > doesnt apply any other processing to this > > You can check what the gradiometer definition of the saved data is in DataEditor. > > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just > > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on > > (unless you had some reason to undo the 3rd order gradiometers) > > - Suresh > > > > Suresh Muthukumaraswamy, PhD > > CUBRIC > > Cardiff University > > Park Place > > Cardiff, CF10 3AT > > United Kingdom > > email: sdmuthu at cardiff.ac.uk > > Phone: +44 (0)29 2087 0353 > > > >>>> Cristiano Micheli 09/07/2008 17:02 >>> > > Hi All > > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > > order gradiometers data correction, which makes use of a number of > > coefficients to correct raw data from common mode artifacts. > > Does Fieldtrip take in account this correction as well? > > Where is it coded? > > Regards > > Cristiano > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to > > share experiences and to discuss new ideas for MEG and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Thu Jul 10 14:34:19 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 10 Jul 2008 13:34:19 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <723641289@web.de> Message-ID: Dear Michael, You don't need to wait. You just need to be careful. The version presently available on the FTP server supports reading CTF datasets with denoising. Just see my remarks from the e-mails before. You should specify: cfg.headerformat = 'ctf_new'; cfg.dataformat = 'ctf_new'; for preprocessing and also specify ctf_new in read_data and read_header if you call them directly. The signs that you are using the right reader (from external ctf toolbox) are that there is a disclaimer message appearing every time you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd gradient dataset, you'll see that there is a lot happening on the right side of the matrix related to reference sensors (for the wrong reader you'll just see some straight lines). Then use the data and the grad normally. To be careful I'd suggest you to test your results thoroughly. Try to do the same analysis with 'raw' and 3rd gradient. Also you can try converting with either CTF software or denoise_synthetic and compare the results (for denoise_synthetic to work you must use the new reader). The more people do this kind of tests and report their results, the more confident we'll become of the new code and the sooner Robert will make it default. Good luck, Vladimir On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral wrote: > Dear Vladimir, > > I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: > (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). > (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). > (3) try to use laedfields from CTF for these data, if that's possible. > > Thanks for any suggestions on this issue. > > Best, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 09.07.08 19:34:51 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction > > >> Until the recent improvements (which are not yet default) fieldtrip >> assumed that the data is 'raw'. Therefore source reconstruction was >> not precise for data that was saved in 3rd gradient. The data is >> indeed read as it's saved so for sensor level analysis there is no >> problem. But the leadfields computed using grads read with the old ctf >> reader are only suitable for the 'raw' setting. >> >> Best, >> >> Vladimir >> >> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >> wrote: >> > Hi, >> > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and >> > doesnt apply any other processing to this >> > You can check what the gradiometer definition of the saved data is in DataEditor. >> > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just >> > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on >> > (unless you had some reason to undo the 3rd order gradiometers) >> > - Suresh >> > >> > Suresh Muthukumaraswamy, PhD >> > CUBRIC >> > Cardiff University >> > Park Place >> > Cardiff, CF10 3AT >> > United Kingdom >> > email: sdmuthu at cardiff.ac.uk >> > Phone: +44 (0)29 2087 0353 >> > >> >>>> Cristiano Micheli 09/07/2008 17:02 >>> >> > Hi All >> > CTF software allows to open a MEG dataset and to apply a theoretical 3rd >> > order gradiometers data correction, which makes use of a number of >> > coefficients to correct raw data from common mode artifacts. >> > Does Fieldtrip take in account this correction as well? >> > Where is it coded? >> > Regards >> > Cristiano >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to >> > share experiences and to discuss new ideas for MEG and EEG analysis. See also >> > http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From guido.nolte at FIRST.FRAUNHOFER.DE Thu Jul 10 16:52:51 2008 From: guido.nolte at FIRST.FRAUNHOFER.DE (Guido Nolte) Date: Thu, 10 Jul 2008 16:52:51 +0200 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Guys, some years ago I stumbled over the same problem. I want to add to this discussion that it is quite important to properly include the 3rd-order gradiometer into the lead field. For a phantom experiment with a single dipole the error reduced by about a factor 10 as compared to simply ignoring that and treating the signals as simple gradiometer measurements (if I remember right). Back then I actually asked CTF for the coefficients (which they considered as a weird request (which I considered as weird)), and included that into my own programs. I still have these coefficients. Regards, Guido Vladimir Litvak wrote: > Dear Michael, > > You don't need to wait. You just need to be careful. The version > presently available on the FTP server supports reading CTF datasets > with denoising. Just see my remarks from the e-mails before. You > should specify: > > cfg.headerformat = 'ctf_new'; > cfg.dataformat = 'ctf_new'; > > for preprocessing and also specify ctf_new in read_data and > read_header if you call them directly. > > The signs that you are using the right reader (from external ctf > toolbox) are that there is a disclaimer message appearing every time > you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd > gradient dataset, you'll see that there is a lot happening on the > right side of the matrix related to reference sensors (for the wrong > reader you'll just see some straight lines). > > Then use the data and the grad normally. To be careful I'd suggest you > to test your results thoroughly. Try to do the same analysis with > 'raw' and 3rd gradient. Also you can try converting with either CTF > software or denoise_synthetic and compare the results (for > denoise_synthetic to work you must use the new reader). > > The more people do this kind of tests and report their results, the > more confident we'll become of the new code and the sooner Robert will > make it default. > > Good luck, > > Vladimir > > > On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral > wrote: >> Dear Vladimir, >> >> I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: >> (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). >> (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). >> (3) try to use laedfields from CTF for these data, if that's possible. >> >> Thanks for any suggestions on this issue. >> >> Best, >> Michael >> >> >>> -----Ursprüngliche Nachricht----- >>> Von: "Vladimir Litvak" >>> Gesendet: 09.07.08 19:34:51 >>> An: FIELDTRIP at NIC.SURFNET.NL >>> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction >> >>> Until the recent improvements (which are not yet default) fieldtrip >>> assumed that the data is 'raw'. Therefore source reconstruction was >>> not precise for data that was saved in 3rd gradient. The data is >>> indeed read as it's saved so for sensor level analysis there is no >>> problem. But the leadfields computed using grads read with the old ctf >>> reader are only suitable for the 'raw' setting. >>> >>> Best, >>> >>> Vladimir >>> >>> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >>> wrote: >>>> Hi, >>>> as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and >>>> doesnt apply any other processing to this >>>> You can check what the gradiometer definition of the saved data is in DataEditor. >>>> In the Acq software you can pick what type of gradiometers the data is saved as. We usually just >>>> save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on >>>> (unless you had some reason to undo the 3rd order gradiometers) >>>> - Suresh >>>> >>>> Suresh Muthukumaraswamy, PhD >>>> CUBRIC >>>> Cardiff University >>>> Park Place >>>> Cardiff, CF10 3AT >>>> United Kingdom >>>> email: sdmuthu at cardiff.ac.uk >>>> Phone: +44 (0)29 2087 0353 >>>> >>>>>>> Cristiano Micheli 09/07/2008 17:02 >>> >>>> Hi All >>>> CTF software allows to open a MEG dataset and to apply a theoretical 3rd >>>> order gradiometers data correction, which makes use of a number of >>>> coefficients to correct raw data from common mode artifacts. >>>> Does Fieldtrip take in account this correction as well? >>>> Where is it coded? >>>> Regards >>>> Cristiano >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to >>>> share experiences and to discuss new ideas for MEG and EEG analysis. See also >>>> http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Jul 10 17:13:58 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 10 Jul 2008 16:13:58 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <48762243.1040804@first.fraunhofer.de> Message-ID: What I understand from Robert is that the coefficients are not fixed. They are at least site-specific if not file-specific. So the new way should really be optimal. Guido, if you can also do some testing and compare with your existing code, that'd be helpful. Best, Vladimir On Thu, Jul 10, 2008 at 3:52 PM, Guido Nolte wrote: > Guys, > some years ago I stumbled over the same problem. > I want to add to this discussion that it is > quite important to properly include the 3rd-order > gradiometer into the lead field. For a phantom > experiment with a single dipole the error reduced by about a factor > 10 as compared to simply ignoring that and treating > the signals as simple gradiometer measurements (if I remember > right). > Back then I actually asked CTF for > the coefficients (which they considered as a weird > request (which I considered as weird)), > and included that into my own programs. > I still have these coefficients. > > Regards, Guido > > > Vladimir Litvak wrote: >> >> Dear Michael, >> >> You don't need to wait. You just need to be careful. The version >> presently available on the FTP server supports reading CTF datasets >> with denoising. Just see my remarks from the e-mails before. You >> should specify: >> >> cfg.headerformat = 'ctf_new'; >> cfg.dataformat = 'ctf_new'; >> >> for preprocessing and also specify ctf_new in read_data and >> read_header if you call them directly. >> >> The signs that you are using the right reader (from external ctf >> toolbox) are that there is a disclaimer message appearing every time >> you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd >> gradient dataset, you'll see that there is a lot happening on the >> right side of the matrix related to reference sensors (for the wrong >> reader you'll just see some straight lines). >> >> Then use the data and the grad normally. To be careful I'd suggest you >> to test your results thoroughly. Try to do the same analysis with >> 'raw' and 3rd gradient. Also you can try converting with either CTF >> software or denoise_synthetic and compare the results (for >> denoise_synthetic to work you must use the new reader). >> >> The more people do this kind of tests and report their results, the >> more confident we'll become of the new code and the sooner Robert will >> make it default. >> >> Good luck, >> >> Vladimir >> >> >> On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral >> wrote: >>> >>> Dear Vladimir, >>> >>> I understand the problem about leadfields for 3rd gradients and >>> magnetometers to be different. I am just curious now how to best proceed, >>> when the measured data are from a rather noisy inner city environment: >>> (1) Go for the raw data and increase the artefact rejection thresholds >>> considerably (as beamforming should not localize artefacts inside the head >>> anyway). >>> (2) Wait for a fieldtrip version where leadfield can be computed for 3rd >>> grads (if that's planned at all...). >>> (3) try to use laedfields from CTF for these data, if that's possible. >>> >>> Thanks for any suggestions on this issue. >>> >>> Best, >>> Michael >>> >>> >>>> -----Ursprüngliche Nachricht----- >>>> Von: "Vladimir Litvak" >>>> Gesendet: 09.07.08 19:34:51 >>>> An: FIELDTRIP at NIC.SURFNET.NL >>>> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction >>> >>>> Until the recent improvements (which are not yet default) fieldtrip >>>> assumed that the data is 'raw'. Therefore source reconstruction was >>>> not precise for data that was saved in 3rd gradient. The data is >>>> indeed read as it's saved so for sensor level analysis there is no >>>> problem. But the leadfields computed using grads read with the old ctf >>>> reader are only suitable for the 'raw' setting. >>>> >>>> Best, >>>> >>>> Vladimir >>>> >>>> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >>>> wrote: >>>>> >>>>> Hi, >>>>> as far as I am aware fieldtrip reads in whatever gradiometer >>>>> definition your data is saved as and >>>>> doesnt apply any other processing to this >>>>> You can check what the gradiometer definition of the saved data is in >>>>> DataEditor. >>>>> In the Acq software you can pick what type of gradiometers the data is >>>>> saved as. We usually just >>>>> save it as 3rd order in the data at the Acq level and you dont have to >>>>> worry about it from then on >>>>> (unless you had some reason to undo the 3rd order gradiometers) >>>>> - Suresh >>>>> >>>>> Suresh Muthukumaraswamy, PhD >>>>> CUBRIC >>>>> Cardiff University >>>>> Park Place >>>>> Cardiff, CF10 3AT >>>>> United Kingdom >>>>> email: sdmuthu at cardiff.ac.uk >>>>> Phone: +44 (0)29 2087 0353 >>>>> >>>>>>>> Cristiano Micheli 09/07/2008 17:02 >>> >>>>> >>>>> Hi All >>>>> CTF software allows to open a MEG dataset and to apply a theoretical >>>>> 3rd >>>>> order gradiometers data correction, which makes use of a number of >>>>> coefficients to correct raw data from common mode artifacts. >>>>> Does Fieldtrip take in account this correction as well? >>>>> Where is it coded? >>>>> Regards >>>>> Cristiano >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of >>>>> the FieldTrip toolbox, to >>>>> share experiences and to discuss new ideas for MEG and EEG analysis. >>>>> See also >>>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>>> http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of >>>>> the FieldTrip toolbox, to share experiences and to discuss new ideas for >>>>> MEG and EEG analysis. See also >>>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>>> http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of >>>> the FieldTrip toolbox, to share experiences and to discuss new ideas for >>>> MEG and EEG analysis. See also >>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>> http://www.ru.nl/fcdonders/fieldtrip. >>>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >>> and EEG analysis. See also >>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>> http://www.ru.nl/fcdonders/fieldtrip. >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to 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 fredericroux at HOTMAIL.DE Thu Jul 10 18:19:11 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Thu, 10 Jul 2008 18:19:11 +0200 Subject: No subject Message-ID: Dear Fieldtrippers, It is not really clear to me what exactly the difference is between the stats and the raweffect matrices that I get when performing clusterrandanalysis. Does anyone know what the difference is between these two matrices? Best regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Kostenlos: Die Festplatte im Netz mit 5 GB Speicher! http://skydrive.live.com/?mkt=de-de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Thu Jul 10 18:19:26 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Thu, 10 Jul 2008 18:19:26 +0200 Subject: stats vs raweffect Message-ID: Dear Fieldtrippers, It is not really clear to me what exactly the difference is between the stats and the raweffect matrices that I get when performing clusterrandanalysis. Does anyone know what the difference is between these two matrices? Best regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Neu: Mit Live Search Ihre Stadt in der Vogelperspektive! http://maps.live.de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Jul 10 23:19:32 2008 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 10 Jul 2008 23:19:32 +0200 Subject: No subject In-Reply-To: Message-ID: Frederic, In the .raweffect field, you find the difference between the means in the two conditions that you compare. In the .stats field, you find the (sensor,time)- or (sensor,frequency, time)-specific test statistics that were later thresholded to construct the clusters. Good luck, Eric Maris > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens > Frederic Roux > Verzonden: donderdag 10 juli 2008 18:19 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] > > Dear Fieldtrippers, > > It is not really clear to me what exactly the difference is between the stats and the > raweffect matrices that I get when performing clusterrandanalysis. > > Does anyone know what the difference is between these two matrices? > > Best regards, > > Frederic > > > Dipl. Psych. Frederic Roux > > Max Planck Institut für Hirnforschung > Abteilung Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > > Tel.: 069 / 6301 83225 > Mail: fredericroux at hotmail.de > froux at mpih-frankfurt.mpg.de > > _________________________________________________________________ > Kostenlos: Die Festplatte im Netz mit 5 GB Speicher! > http://skydrive.live.com/?mkt=de-de > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Fri Jul 11 09:17:22 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Fri, 11 Jul 2008 09:17:22 +0200 Subject: No subject In-Reply-To: <200807102119.m6ALJUaE027509@smtp20.nijmegen.internl.net> Message-ID: Hi Eric, thank you for replying so fast. Your answer helped me a lot. I have on more question: if I want to see significant differences between conditions I must multiply the raweffect with a significance map? This should look similar to this: plotdata.powspctrm = clusrand.raweffect.*squeeze(clusrand.posclusterlabelmat == 1); Is that correct? Regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Lustige Emoticons für Ihren Messenger! Hier kostenlos downloaden! http://messenger.live.de/mein/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Jul 11 09:53:29 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 11 Jul 2008 09:53:29 +0200 Subject: No subject In-Reply-To: Message-ID: Hi Frederic, If you use the plotting functions in FieldTrip there are several ways to plot the significant differences between conditions. In the topoplot functions you can highlight the significant sensors (see help topoplot.m). In the multiplot functions you can make use of opacity masking (see help again). Set the data.mask field as cfg.maskparameter. Multiplying the raw effect with the significance map is not recommended if you use the topoplot functions, because interpolation takes place to fill in the space between the channels. Setting channels to zero can create interpolation artifiacts. See also the tutorials on the FieldTrip webpage for more information: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip Plotting clusters: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting#plotting_clusters In the Cluster-based permutation tests tutorial there is also information about plotting the results http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:statistics#2.1_permutation_tests_for_time-locked_databetween-trials_e xperiments Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Frederic Roux Sent: Friday, July 11, 2008 9:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Hi Eric, thank you for replying so fast. Your answer helped me a lot. I have on more question: if I want to see significant differences between conditions I must multiply the raweffect with a significance map? This should look similar to this: plotdata.powspctrm = clusrand.raweffect.*squeeze(clusrand.posclusterlabelmat == 1); Is that correct? Regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _____ Messenger Online Treff: Spontan chatten, über Hobbies reden, sofort Spass haben? Jetzt klicken! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Fri Jul 11 10:11:10 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 11 Jul 2008 10:11:10 +0200 Subject: CTF 3rd order gradiometers correction In-Reply-To: <723641289@web.de> Message-ID: Hi Michael, On 10 Jul 2008, at 14:05, Michael Wibral wrote: > (1) Go for the raw data and increase the artefact rejection > thresholds considerably (as beamforming should not localize > artefacts inside the head anyway). Beamforming tries to optimally supress the noise. That means that noise will not be perfectly suppressed. If you can use the 3rd order gradient to already reduce the impact that environmental noise has on your data, you'll make it easier for the beamformer to suppress the remaining environmental and physiological noise. With 3rd order gradients switched on, it probably will also be easier to identify physiological artifacts (eye blinks, muscle) and to discard those pieces of data from your analysis. Again, if you can remove noise from the data, the source reconstruction will perform better. > (2) Wait for a fieldtrip version where leadfield can be computed > for 3rd grads (if that's planned at all...). That is what is now possible, although it requires cfg.headerformat='ctf_new', cfg.dataformat='ctf_new' and the ctf p- files (from ftp://ftp.fcdonders.nl/pub/fieldtrip/external). Through the CTF p-files the balancing coefficients are read and stored along with the data. The denoise_synthetic function applies the balancing coefficients to the data _and_ updates the sensor array description so that the balanging will be taken into account during the forward computations. If you want to see how it works: do preprocessing and have a look at data.grad.balance, which contains the details. Then do denoise_snthetic and compare data.grad.tra prior to and after applying the 3rd order synthetic gradient. The grad.tra matrix describes how all individual coils of the MEG system are combined into channels, and in the comparison you can see that for 3rd order data the reference coils are also used, whereas for raw data the reference coils are weighted with zero. > (3) try to use laedfields from CTF for these data, if that's possible. that is not needed, see above. best regards, Robert PS I suggest to make an example matlab page at http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:examples:denoise_synthetic. Feel free to add code and explanation there for other people. PPS I am curious to hear from other people on how using 3rd order gradient influences their results ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Mon Jul 14 17:21:13 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Mon, 14 Jul 2008 17:21:13 +0200 Subject: Template MRI and missing fiducials Message-ID: Hi everyone, I was wondering if there is some sort of template brain or headmodel that one can use to perform a beamforming analysis of MEG data? Otherwise does someone know if it is possible to perform a sourceanalysis without having recorded fiducials during the anatomical MRI scan? I have the dicom files of all my subjects but I did not record fiducials during the MRI scan. Regards, Frederic _________________________________________________________________ Lustige Emoticons für Ihren Messenger! Hier kostenlos downloaden! http://messenger.live.de/mein/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 16 12:38:10 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 16 Jul 2008 11:38:10 +0100 Subject: Significance of coherence Message-ID: Dear all, Could you point me to the present state of the art method to determine significance of coherence? I'm not talking about comparison between two conditions and not about activation to baseline comparison. Just you have some stationary signals, compute coherence and want to say whether it's real. I suspect there is no ideal solution, but what is the most accepted presently? Can jackknife implemented in freqdescriptives be used for that? Any other suggestions. 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. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Jul 16 12:56:42 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 16 Jul 2008 12:56:42 +0200 Subject: Significance of coherence In-Reply-To: Message-ID: Dear Vladimir, I usually use a shift predictor to test for this (computing coherence between signal A and a shuffled set of trials for signal B: provided both signals are not phase-locked to trial onset). However, this only works well when you are estimating for coherence between non-volume conducted activities. When coherence is estimated between two reconstructed dipoles, the amount of volume conduction is generally too high for this method to make sense. In other words, you will always get "significant" coherence in this case. The other way would be to use the traditional thresholding which is applied for example in Kilner et al 2001 J Neurosci. But this obviously suffers from the same problems as the shift predictor. Jackknifing could also be used with a t-test against 0, but again with the same problem. Yours, Jan-Mathijs On Jul 16, 2008, at 12:38 PM, Vladimir Litvak wrote: > Dear all, > > Could you point me to the present state of the art method to determine > significance of coherence? I'm not talking about comparison between > two conditions and not about activation to baseline comparison. Just > you have some stationary signals, compute coherence and want to say > whether it's real. I suspect there is no ideal solution, but what is > the most accepted presently? Can jackknife implemented in > freqdescriptives be used for that? Any other suggestions. > > 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. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 16 13:44:41 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 16 Jul 2008 12:44:41 +0100 Subject: Significance of coherence In-Reply-To: <93A59937-2451-47E1-997A-0F9FDE26E823@psy.gla.ac.uk> Message-ID: Dear JM, Is there any paper where the issue of shift-predictors for coherence is properly looked at? I've also been using shift-predictors but I started having serious doubts in the case of MAR-based measures. So I thought that for coherence there is something better justified and the distribution under the null is known at least under some assumptions. But if you say that shift-predictor is state of the art, I'll take your word for it since I know you've researched this subject quite well. Thanks, Vladimir On Wed, Jul 16, 2008 at 11:56 AM, jan-mathijs schoffelen wrote: > Dear Vladimir, > > I usually use a shift predictor to test for this (computing coherence > between signal A and a shuffled set of trials for signal B: provided both > signals are not phase-locked to trial onset). > However, this only works well when you are estimating for coherence between > non-volume conducted activities. > When coherence is estimated between two reconstructed dipoles, the amount of > volume conduction is generally too high for this method to make sense. > In other words, you will always get "significant" coherence in this case. > The other way would be to use the traditional thresholding which is applied > for example in Kilner et al 2001 J Neurosci. But this obviously suffers from > the same problems as the > shift predictor. > Jackknifing could also be used with a t-test against 0, but again with the > same problem. > > Yours, > > Jan-Mathijs > > > On Jul 16, 2008, at 12:38 PM, Vladimir Litvak wrote: > >> Dear all, >> >> Could you point me to the present state of the art method to determine >> significance of coherence? I'm not talking about comparison between >> two conditions and not about activation to baseline comparison. Just >> you have some stationary signals, compute coherence and want to say >> whether it's real. I suspect there is no ideal solution, but what is >> the most accepted presently? Can jackknife implemented in >> freqdescriptives be used for that? Any other suggestions. >> >> 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. 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 tomh at KURAGE.NIMH.NIH.GOV Wed Jul 16 14:08:03 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Wed, 16 Jul 2008 08:08:03 -0400 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: On Thu, 2008-07-10 at 16:13 +0100, Vladimir Litvak wrote: > What I understand from Robert is that the coefficients are not fixed. > They are at least site-specific if not file-specific. So the new way > should really be optimal. Guido, if you can also do some testing and > compare with your existing code, that'd be helpful. Yes, the 3rd gradient balancing coefficients are site specific (well, machine specific). However they are stored in every dataset, so if you have a dataset, you have the correct coefficients. dsinfo displays them, you want the G3BR coefficients. -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Wed Jul 16 14:17:09 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Wed, 16 Jul 2008 08:17:09 -0400 Subject: Template MRI and missing fiducials In-Reply-To: Message-ID: > Otherwise does someone know if it is possible to perform a > sourceanalysis without having recorded fiducials during the anatomical > MRI scan? > I have the dicom files of all my subjects but I did not record > fiducials during the MRI scan. You can read the MRI into AFNI, and mark the fiducials; just estimate them (assuming your MRI has the nasion and ears, if not you're out of luck). You can be off by a few mm, it doesn't matter since one usually doesn't do source estimation at a resolution higher than 5 mm or so. It's not just a matter of co-registration, you also need the brain to make the forward model (if you're using CTF, you'll make a multisphere model; see the brainhull page here: http://kurage.nimh.nih.gov/meglab/Meg/Brainhull -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 17 08:44:08 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 17 Jul 2008 08:44:08 +0200 Subject: Template MRI and missing fiducials In-Reply-To: Message-ID: Hi Frederic On 14 Jul 2008, at 17:21, Frederic Roux wrote: > I was wondering if there is some sort of template brain or > headmodel that one can use to perform a beamforming analysis of MEG > data? In principle you could use one anatomical MRI for anmother subject. But I would recomment to use individual MRIs if you have them. > Otherwise does someone know if it is possible to perform a > sourceanalysis without having recorded fiducials during the > anatomical MRI scan? > I have the dicom files of all my subjects but I did not record > fiducials during the MRI scan. The position of the coils during the MEG measurement needs to be marked in the MRI, otherwise it is not possible to localize the activity during the MEG measurements onto the anatomical MRI. Furthermore, as Tom pointed out, you need it to align the head model (volume conduction model of the head) with the sensor positions. In FieldTrip you can use the VOLUMEREALIGN function to specify the fiducials. And you can use the PREPARE_LOCALSPHERES or PRERARE_SINGLESHELL functions to make the head model. The only tricky part is to read the anatomical MRI into Matlab without mixing up left and right in the MRI. The READ_FCDC_MRI function can read dicom files, but that is not 100% foolproof, so please check the output of that function carefully (and use Matlab flipdim and permute functions). best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 17 16:49:21 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 17 Jul 2008 16:49:21 +0200 Subject: denoise_synthetic Message-ID: Dear all, I just noticed that it was possible to do denoise_synthetic (i.e. apply 3rd order gradients to CTF data) without all required channels being present in the data. It requires the MEG channels and the reference channels to be both present in the preprocessed data. If you have beein doing cfg.channel=MEG in preprocessing and then denoise_synthetic, then the data will not be correct 3rd order gradients. If you have been doing cfg.channel=all, then denoise_synthetic will have done its job correct (I hope). I have now added an explicit check on the presence of the required channels, so now it will give an error if the reference channels are missing. best regards, Robert PS the update will be available this evening on the ftp ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Thu Jul 17 17:16:26 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 17 Jul 2008 17:16:26 +0200 Subject: denoise_synthetic Message-ID: Dear Robert, I have a question regarding the use of the new preprocessing function and denoise synthetic: If the ctf data are saved in 3rd gradient mode - will preprocessing and denoise_synthetic treat this correctly? I.e. will these functions not perform any (unnecessary/wrong) computation and simply update the relevant information fields in the data structure? Or do I have to save the ctf data in raw format and then let fieldtrip do the rest? Sorry if this question is somehow redundant. Just wanted to be sure. Many thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 17.07.08 17:07:06 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] denoise_synthetic > Dear all, > > I just noticed that it was possible to do denoise_synthetic (i.e. > apply 3rd order gradients to CTF data) without all required channels > being present in the data. It requires the MEG channels and the > reference channels to be both present in the preprocessed data. > > If you have beein doing cfg.channel=MEG in preprocessing and then > denoise_synthetic, then the data will not be correct 3rd order > gradients. If you have been doing cfg.channel=all, then > denoise_synthetic will have done its job correct (I hope). I have now > added an explicit check on the presence of the required channels, so > now it will give an error if the reference channels are missing. > > best regards, > Robert > > PS the update will be available this evening on the ftp > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From matthew.tata at ULETH.CA Thu Jul 17 20:34:43 2008 From: matthew.tata at ULETH.CA (Matt Tata) Date: Thu, 17 Jul 2008 20:34:43 +0200 Subject: bwlabelnmex !? Message-ID: Hello, I'm trying to use freqstatistics() on some TFC data imported from BESA. I'm getting this series of errors and I can't figure them out. I have the source file bwlabelnmex.cpp in my matlab\toolbox\images\images\private folder, but nothing else. I do have the signal processing and image processing toolboxes installed (perhaps not correctly?). Any suggestions? Thank you. Matt Tata ??? Undefined function or method 'bwlabelnmex' for input arguments of type 'double'. Error in ==> bwlabeln at 56 [L,num] = bwlabelnmex(A,conn); Error in ==> fieldtrip-20080521\private\clusterstat at 178 posclusobs = bwlabeln(tmp, conndef(length(cfg.dim),'min')); Error in ==> fieldtrip-20080521\private\statistics_montecarlo at 392 [stat, cfg] = clusterstat(cfg, statrand, statobs); Error in ==> fieldtrip-20080521\private\statistics_wrapper at 272 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> freqstatistics at 132 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> TF_Stats at 101 stat = freqstatistics(cfg, blgw{:}, blgl{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Fri Jul 18 18:41:19 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 18 Jul 2008 18:41:19 +0200 Subject: denoise_synthetic In-Reply-To: <729978737@web.de> Message-ID: Dear Michael I think you can also read in ctf data that are saved in 3rd gradient mode without any problems. If you look in data.grad.balance.current it should then be G3BR after preprocessing. When we were testing, one of the things we did was compare 3rd order data made by DataEditor with 3rd order data made by FieldTrip. That looked fine. But again, it's not tested thoroughly yet. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Thursday, July 17, 2008 5:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] denoise_synthetic Dear Robert, I have a question regarding the use of the new preprocessing function and denoise synthetic: If the ctf data are saved in 3rd gradient mode - will preprocessing and denoise_synthetic treat this correctly? I.e. will these functions not perform any (unnecessary/wrong) computation and simply update the relevant information fields in the data structure? Or do I have to save the ctf data in raw format and then let fieldtrip do the rest? Sorry if this question is somehow redundant. Just wanted to be sure. Many thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 17.07.08 17:07:06 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] denoise_synthetic > Dear all, > > I just noticed that it was possible to do denoise_synthetic (i.e. > apply 3rd order gradients to CTF data) without all required channels > being present in the data. It requires the MEG channels and the > reference channels to be both present in the preprocessed data. > > If you have beein doing cfg.channel=MEG in preprocessing and then > denoise_synthetic, then the data will not be correct 3rd order > gradients. If you have been doing cfg.channel=all, then > denoise_synthetic will have done its job correct (I hope). I have now > added an explicit check on the presence of the required channels, so > now it will give an error if the reference channels are missing. > > best regards, > Robert > > PS the update will be available this evening on the ftp > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Mon Jul 21 20:06:19 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Mon, 21 Jul 2008 20:06:19 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread Message-ID: Dear Robert and all Fieldtrip users, I've encountered an issue with read_ctf_res4.m, that causes unexpected behavior in some operations. For instance, when I tried to check events from a dataset: cfg = []; cfg.channel = {'MEG'}; cfg.dataset = dataset; cfg.trialdef.eventtype = '?'; cfg = definetrial(cfg); evaluating trialfunction 'trialfun_general' no events were found in the datafile no trials have been defined yet, see DEFINETRIAL for further help found 0 events created 0 trials In fact, there are 1260 events in this dataset. I think that this problem is due to a change in fread's behaviour: as nowadays characters are not always 8-bit wide, we are supposed to use 'uint8' instead of 'char'. This change has been responsible for some nasty problems, including this one. As of 20080720 version of Fieldtrip, the snapshot still showed this behavior. Herewith I am attaching a correction of read_ctf_res4.m. Hope that some of you who have had similar problem might find it helpful. Best regards, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: read_ctf_res4.m URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jul 24 09:29:52 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 24 Jul 2008 09:29:52 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread In-Reply-To: <4884D01B.3010606@med.uni-tuebingen.de> Message-ID: Hi Erick Thanks for the suggested change. I have incoroprated it and it will be included in tonights release version on the ftp. The char/int8 problem had been reported before, but I have never seen it happen myself on any of the computers that I have been working with. Do you think that it might be related to particular language settings on the computer that you are using? Since it not always occuring to me seems to indicate that Matlab sometimes wants to use 8 bit and sometimes 16 bit wide characters. Actually there is a lot of reading code for other (non ctf) formats that also uses fread(...'char'). That code should also be affected with the bug, which means that I should make the suggested change everywhere where chars are read. best regards, Robert On 21 Jul 2008, at 20:06, Erick Britis Ortiz wrote: > I think that this problem is due to a change in fread's behaviour: > as nowadays characters are not always 8-bit wide, we are supposed > to use 'uint8' instead of 'char'. This change has been responsible > for some nasty problems, including this one. > > As of 20080720 version of Fieldtrip, the snapshot still showed this > behavior. Herewith I am attaching a correction of read_ctf_res4.m. > Hope that some of you who have had similar problem might find it > helpful. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 24 09:40:46 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 24 Jul 2008 09:40:46 +0200 Subject: bwlabelnmex !? In-Reply-To: Message-ID: Hi Matt The bwlabeln function is used for clustering and is part of the Matlab image processing toolbox. On my computer I have >> which bwlabeln C:\Program Files\MATLAB\R2006b\toolbox\images\images\bwlabeln.m and if I subsequently look into the details, then there is a C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.cpp C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.mexw32 C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.csf Actually, there is a whole bunch of cpp and mexw32 files in that directory. In older Matlab version the windows mex files would have the extension *.dll. Do you have a bwlabeln.dll file, or any other mexw32 or dll files in that private directory? If not, then your Matlab installation is not correct. I don't know whether it is possible to recompile the mex files in the images/private directory, but if you have problems there, it might very well be that also on other locations in your matlab toolbox tree the mex files would be missing. If that is the case, I would just reinstall Matlab and not try to compile all Mathworks mex files. best regards, Robert On 17 Jul 2008, at 20:34, Matt Tata wrote: > I'm trying to use freqstatistics() on some TFC data imported from > BESA. I'm > getting this series of errors and I can't figure them out. I have the > source file bwlabelnmex.cpp in my matlab\toolbox\images\images\private > folder, but nothing else. I do have the signal processing and image > processing toolboxes installed (perhaps not correctly?). Any > suggestions? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Fri Jul 25 19:38:15 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Fri, 25 Jul 2008 19:38:15 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread In-Reply-To: <83778C31-572C-4A44-B424-99EA62972FD0@fcdonders.ru.nl> Message-ID: Dear Robert, Here is the configuration of the systems were the issue was observed: - Linux: MATLAB 7.5.0 (R2007b) System language: German (LANG=de_DE.UTF-8) - Windows XP: MATLAB 7.0.1 (R14) System language: Brazilian Portuguese It turns out, it had to do with two things. First, on reproducing it, I noticed another change that is necessary to tackle the issue: long ago, I included the channel UDIO001 in read_ctf_trigger.m, what I thought was a "my-system-only" change. But without it, it still finds 0 events, confirmed both in Linux and Windows. I am sending my read_ctf_trigger.m for reviewing also. In the Windows machine, this was enough to solve the problem. Second, the language settings: I looked up which encoding was used when a file is opened by using: [filename, permission, machineformat, encoding] = fopen(fid) And the values returned were 'UTF-8' in the Linux machine and an empty string in the Windows one. Changing the LANG to de_DE on Linux gave me the value 'ISO-8859-1' for encoding, but the problem was only solved when I replaced read_ctf_trigger.m. Finally, changing char to uint8 in read_ctf_res4.m made it robust against locale changes. Maybe the issue has not been noticed before because it is inside a try-catch block (in fact, some layers of try-catch to get to fread), so usually it fails silently. I noticed some odd behaviour on file handling since I started to use Fieldtrip, but it took some time to get to the exact point and I do not know to which extent using another trigger channel would prevent the problem from happening. Additionally, MATLAB changed the file handling in a recent version, so it might happen that people using older versions also do not see it. Best regards, Erick Robert Oostenveld wrote: > Hi Erick > > Thanks for the suggested change. I have incoroprated it and it will be > included in tonights release version on the ftp. > > The char/int8 problem had been reported before, but I have never seen it > happen myself on any of the computers that I have been working with. Do > you think that it might be related to particular language settings on > the computer that you are using? Since it not always occuring to me > seems to indicate that Matlab sometimes wants to use 8 bit and sometimes > 16 bit wide characters. > > Actually there is a lot of reading code for other (non ctf) formats that > also uses fread(...'char'). That code should also be affected with the > bug, which means that I should make the suggested change everywhere > where chars are read. > > best regards, > Robert > > > On 21 Jul 2008, at 20:06, Erick Britis Ortiz wrote: > >> I think that this problem is due to a change in fread's behaviour: as >> nowadays characters are not always 8-bit wide, we are supposed to use >> 'uint8' instead of 'char'. This change has been responsible for some >> nasty problems, including this one. >> >> As of 20080720 version of Fieldtrip, the snapshot still showed this >> behavior. Herewith I am attaching a correction of read_ctf_res4.m. >> Hope that some of you who have had similar problem might find it helpful. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: read_ctf_trigger.m URL: From wibral at BIC.UNI-FRANKFURT.DE Thu Jul 31 18:11:28 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 31 Jul 2008 18:11:28 +0200 Subject: Logical problem with CTF 3rd order gradiometers correction Message-ID: Dear listusers, I have a logical problem with denoise-synthetic. here's what I want to do: 1. use definetrial to make cfg.trl (works fine) 2. use preprocessing with the new cfg. headerfile='ctf_new' , cfg.datafile='ctf_new' options to read the reference gradiometer information and the data into a fieldtrip structure (works fine) 3. use denoise_synthetic to denoise the data (works fine ?) 4. un artefact detection on these data (-> this works fine and updates cfg.trl) 5. run preprocessing a second time for filtering and actually applying the results of artefact corrcetion,... i.e. those things that I didn't want to do before denoise_synthetic. BUT preprocessing complains that cfg shouldn't contain the cfg.trl field when no data are read - which is the case because I am invoking preprocessing a second time here on an existing fieldtrip structure. Therefore all information from artefact rejection is lost. Somehow it seems that I can run denoise_synthetic only after artefact rejection, because I need a fieldtrip dataset to run it, but NO dataset for preprocessing to perform artefact correction, i.e. accept cfg.trl. This would be a pity. Any suggestion how to solve this? Many Thanks, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jul 31 22:55:01 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 31 Jul 2008 22:55:01 +0200 Subject: Logical problem with CTF 3rd order gradiometers correction In-Reply-To: <741246283@web.de> Message-ID: Hi Michael On 31 Jul 2008, at 18:11, Michael Wibral wrote: > Dear listusers, > I have a logical problem with denoise-synthetic. > > here's what I want to do: > > 1. use definetrial to make cfg.trl (works fine) > 2. use preprocessing with the new cfg. headerfile='ctf_new' , > cfg.datafile='ctf_new' options to read the reference gradiometer > information and the data into a fieldtrip structure (works fine) > 3. use denoise_synthetic to denoise the data (works fine ?) In the (sofar limited) experiences that I heard there are noticeable differences mainly on the central/vertex sensors (which are also the closest to the reference sensors). > 4. un artefact detection on these data (-> this works fine and > updates cfg.trl) after artifact_xxx and rejectartifact you should read the data using preprocessing. Or are you using rejectvisual? If so, then you don't have to call preprocessing a second time, because the output of rejectvisual is again your data with the bad trials removed. > 5. run preprocessing a second time for filtering and actually > applying the results of artefact corrcetion,... i.e. those things > that I didn't want to do before denoise_synthetic. After rejectartifact, you should be calling it here like preprocessing (cfg), and not with a second input argument. If you call it like preprocessing(cfg, data), then the cfg should not contain cfg.dataset and cfg.trl but only filtering options, because the data should not be read from file. > BUT preprocessing complains that cfg shouldn't contain the cfg.trl > field when no data are read - which is the case because I am > invoking preprocessing a second time here on an existing fieldtrip > structure. I suspect that you are mixing up rejectartifact and preprocessing. Calling preprocessing with a 2nd data input argument is only meant to apply another set of filters on that data (i.e. if you forgot to do it in the first run, or if you sequentially want to bandstopfilter some line noise or CRT artifacts). > Therefore all information from artefact rejection is lost. > > Somehow it seems that I can run denoise_synthetic only after > artefact rejection, because I need a fieldtrip dataset to run it, > but NO dataset for preprocessing to perform artefact correction, > i.e. accept cfg.trl. This would be a pity. I must say that I had not considered sofar the interaction between denoising and artifact detectoin and removal. The artfifact_xxx functions perform detection on data from disk(*), i.e. prior to reading the data into memory. The historical reason for (*) is to save on memory when a lot of filter padding is used and when there is a lot of overlap between padded trials. The padded regions should be checked for artifacts (esp jump artifacts which cause a lot of filter rinning), but in the end we don't need them in memory. The denoising only happens after the data is read into memory. > Any suggestion how to solve this? For the moment I suggest to use the following sequence definetrial preprocessing denoise_synthetic rejectvisual and not use artifact_xxx combined with rejectartifact. We are revising the automatic artifact detection functions at the moment, since computers nowadays have much more RAM than when we started implementing it 5 years ago, and reading the padded data into memory is now much less of a concern. So in the near future, it will be possible to do autodetection of artifacts also on data that is in memory, which means that then you could also do the autodetection after denoise_synthetic. best regards Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Jul 2 11:49:56 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 2 Jul 2008 11:49:56 +0200 Subject: Reading in Neuroscan files In-Reply-To: Message-ID: Hi Monika, On 30 Jun 2008, at 13:21, Monika Mellem wrote: > I have noticed some things when reading in both Neuroscan .eeg > and .cnt files. > > 1) When reading a Neuroscan .eeg file, read_event.m seems to put > either > "accept" or "reject" into the field event.value. According to how > event.field is used later on, it should be putting the trigger > values in > this field which are in tmp.sweep.type. I modified the code as > shown below. Thanks for the suggestion. I have changed it into the following for i=1:hdr.nTrials % the *.eeg file has a fixed trigger value for each trial % furthermore each trial has the label 'accept' or 'reject' tmp = read_ns_eeg(filename, i); % create an event with the trigger value event(end+1).type = 'trial'; event(end ).sample = (i-1)*hdr.nSamples + 1; event(end ).value = tmp.sweep.type; % trigger value event(end ).offset = -hdr.nSamplesPre; event(end ).duration = hdr.nSamples; % create an event with the boolean accept/reject code event(end+1).type = 'accept'; event(end ).sample = (i-1)*hdr.nSamples + 1; event(end ).value = tmp.sweep.accept; % boolean value indicating accept/reject event(end ).offset = -hdr.nSamplesPre; event(end ).duration = hdr.nSamples; end This encodes both the event value (trigger code) and the accept/ reject state, albeit in different events. The two events can be combined in a trialfun of course. > 2) When reading in a Neuroscan .cnt file, read_header.m puts some bad > channel labels into hdr.label using what it gets from the > read_ns_cnt.m file > (around line 564). Whatever is in orig.chan.names starts with the > correct > channels (about 10 of them) and then has blank values or odd > characters for > the rest of the channel labels. This seems like a bug w.r.t. the reading of the header in general. I was not able to reproduce the problem. Could you send me the .cnt file that has the problem, e.g. using yousendit.com or on ftp.fcdonders.nl? best regards, Robert > As a quick fix for just the channel labels, > I just took the channel labels that read_ns_hdr.m finds and > substituted them > into hdr.label. See below. This doesn't fix the underlying > problem in > read_ns_cnt.m though which seems to be with the variables chandat and > r.chan.names (lines 140-141). > > orig = read_ns_hdr(filename); > hdr.label = orig.label; > hdr.orig.chan.names = orig.label; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From florisdelange at GMAIL.COM Wed Jul 2 17:45:02 2008 From: florisdelange at GMAIL.COM (Floris de Lange) Date: Wed, 2 Jul 2008 17:45:02 +0200 Subject: Significance test frequency power decrease baseline vs stimulation Message-ID: Dear Thomas, Jan-Matthijs and others, Related to the post of a few days ago (error message undefined data or class data.biol), it looks like this problem has been discussed already before on the list: see https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0610&L=FIELDTRIP&P=R23621 I copy/paste the relevant bit below. Best wishes, Floris On 13 Oct 2006, at 19:03, Marco Buiatti wrote: > > ??? Undefined variable "data" or class "data.biol". > > > > Error in ==> fieldtrip-20061012/private/prepare_design at 92 > > nrepl=size(data.biol,1); > > > > Error in ==> fieldtrip-20061012/private/statistics_wrapper at 212 > > [cfg] = prepare_design(cfg); > > > > Error in ==> timelockstatistics at 50 > > [stat] = statistics_wrapper(cfg, varargin{:}); > > Yep, that is a known problem (sorry about that). The function > prepare_design is not working properly. I suggest to make a design > matrix in cfg.design by hand (similar to, but not completely the same > as in SPM). It is not difficult, and it will also make you more clear > how it works. Please have a look at > https://listserv.surfnet.nl/scripts/wa.exe? > A2=ind0607&L=FIELDTRIP&P=R3192&I=-3&X=77C04E25A87526C2B4 > or if that URL does not work, then search the fieldtrip discussion > list archive for the string "cfg.design". ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Thu Jul 3 15:59:09 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Thu, 3 Jul 2008 15:59:09 +0200 Subject: Call for participation - Autumn School 'Magnetoencephalography' Message-ID: Dear all, I've been asked to distribute the announcement of an Autumn School in 'Magnetoencephalography' to the members of this list. Best, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Call_and_Program.pdf Type: application/binary Size: 141002 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ApplicationForm.pdf Type: application/binary Size: 265885 bytes Desc: not available URL: From A.Stolk at EWI.UTWENTE.NL Thu Jul 3 16:05:00 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Thu, 3 Jul 2008 16:05:00 +0200 Subject: Undefined function or variable "sens" Message-ID: Dear fieldtrippers, While performing statitstical analysis on time-frequency EEG data, I get the following error: ??? Undefined function or variable "sens". Error in ==> neighbourselection at 106 if ~isstruct(sens) Error in ==> statistics_wrapper at 226 cfg.neighbours = neighbourselection(cfg,varargin{1}); Error in ==> freqstatistics at 132 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> fieldtripstatanalyse at 70 [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); The neighbourselection function tells: if ~isstruct(sens) error('Did not find gradiometer or electrode information.'); which gets its data by: % Revision 1.6 2006/07/12 14:14:59 roboos % get sens from data.grad/elec I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? Regards, Arjen Stolk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Jul 3 17:10:40 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 3 Jul 2008 16:10:40 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Jul 7 14:43:59 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 7 Jul 2008 14:43:59 +0200 Subject: fixed bug in sourceanalysis w.r.t. channel ordering Message-ID: Dear all, Thanks to the sharp eye of one of the FieldTrip users, a bug was discovered in SOURCEANALYSIS. The bug caused souercanalysis to result in nonsense results if the channel ordering in the data (i.e. data.label) and the channel ordering in the sensor definition (grad.label or elec.label) was inconsistent. Missing channels in either one were treated correctly, but a different ordering was not treated correctly. The bug did not affect MEG data, hence it was not affecting MEG users in the Donders centre. It might be that people doing source reconstruction on EEG data are affected by the bug. The bug only applied to the SOURCEANALYSIS function, not to the DIPOLEFITTING function. I have just fixed the bug. External users should download the latest daily version from the ftp server, which will be copied to the ftp server this evening around 22h CET. Sorry for the inconvenience that it might have caused. best regards. Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jrkerlin at UCDAVIS.EDU Tue Jul 8 02:08:30 2008 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Mon, 7 Jul 2008 17:08:30 -0700 Subject: Statistics on a pre-defined cluster Message-ID: Hello all, I'm running an 128 electrode EEG experiment and I'd like to constrain my time-locked statistical analysis of Condition B to the significant electrode/time clusters of independent Condition A. I know I can use cfg.elec to constrain the electrode locations before running timelockstatistics, but I don't know how to constrain by a pre-defined elec/time cluster from separate data. All suggestions appreciated. Cheers, Jess Kerlin ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 10:36:48 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 10:36:48 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. I do manage to get my script to work on another computer, but somehow not on this one. ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: do 7/3/2008 5:10 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jul 8 10:52:58 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Jul 2008 10:52:58 +0200 Subject: FieldTrip and BCI2000 Message-ID: Dear fieldtrip users (and specifically those of you interested in BCI and neurofeedback): Last weekend the BCI2000 workshop took place in Utrecht (see http:// www.bci2008.nl). Christian (also from the FCDC) and I contributed to the lectures and hands-on sessions at that workshop by showing how Matlab can be used for "in the pipe" (synchronous) and "out of the pipe" (asynchronous) real-time processing of EEG data. Overall the workshop was a great succes and a lot of fun to be part of. Given the successful demonstration of the joint BCI2000-FieldTrip efforts in Utrecht, we will now release the BCI specific FieldTrip code that we have developed. Part of that code is specific to BCI2000 and will be released through www.bci2000.org and documented there. Part of the code is not specific to BCI2000 and hence will be released and documented at the FieldTrip wiki. Keep an eye on the FieldTrip wiki for updates on this. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Jul 8 10:55:54 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 8 Jul 2008 10:55:54 +0200 Subject: Statistics on a pre-defined cluster In-Reply-To: <4872AFFE.7070406@ucdavis.edu> Message-ID: Hi Jess, You can use avgoverchan, avgovertime and avgoverfreq configuration options in freqstatistics. However, that does not allow you to make a cluster with "ragged edges", i.e. one channel only being included for part of the time in which the effect is significant and not for another part. If you want to do that, then you will have to average over the channel-time-frequency points in the cluster by hand. best regards, Robert On 8 Jul 2008, at 2:08, Jess R. Kerlin wrote: > Hello all, > > I'm running an 128 electrode EEG experiment and I'd like to > constrain my time-locked statistical analysis of Condition B to > the significant electrode/time clusters of independent Condition A. > I know I can use cfg.elec to constrain the electrode locations > before running timelockstatistics, but I don't know how to > constrain by a pre-defined elec/time cluster from separate data. > All suggestions appreciated. > > Cheers, > > Jess Kerlin > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 11:46:15 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 11:46:15 +0200 Subject: Undefined function or variable "sens" Message-ID: If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. Regards, Arjen Stolk ________________________________ Van: FieldTrip discussion list namens A. Stolk Verzonden: di 7/8/2008 10:36 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. I do manage to get my script to work on another computer, but somehow not on this one. ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: do 7/3/2008 5:10 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" Do you actually have electrode positions somewhere in your data? They are not usually supposed to get there by themselves so unless you somehow got them there (like read in a file with sensor positions), they are indeed missing. For statistics you don't actually need sensor positions You can specify the neighborhood relations 'by hand' instead of calling neighbourselection. Best, Vladimir On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: > Dear fieldtrippers, > > While performing statitstical analysis on time-frequency EEG data, I get the following error: > > ??? Undefined function or variable "sens". > Error in ==> neighbourselection at 106 > if ~isstruct(sens) > Error in ==> statistics_wrapper at 226 > cfg.neighbours = neighbourselection(cfg,varargin{1}); > Error in ==> freqstatistics at 132 > [stat] = statistics_wrapper(cfg, varargin{:}); > Error in ==> fieldtripstatanalyse at 70 > [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); > > The neighbourselection function tells: > > if ~isstruct(sens) > > error('Did not find gradiometer or electrode information.'); > > > > which gets its data by: > > % Revision 1.6 2006/07/12 14:14:59 roboos > > % get sens from data.grad/elec > > > > I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? > > > > Regards, > > Arjen Stolk > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From grion at SISSA.IT Tue Jul 8 11:50:14 2008 From: grion at SISSA.IT (Natalia Grion) Date: Tue, 8 Jul 2008 11:50:14 +0200 Subject: Overlapping trials In-Reply-To: Message-ID: Dear All, During reading and preprocessing lfps, I find this error for some trials: ?? Subscript indices must either be real positive integers or logicals. *Error in ==> read_data at 576 dat = ncs.dat(begsample:endsample);* Error in ==> read_fcdc_data at 49 [dat] = read_data(varargin{:}); Error in ==> preprocessing at 554 dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, rawindx, strcmp(cfg.continuous, 'yes')); Error in ==> FreqAnalysis at 51 datar{chanindx}=preprocessing(cfgpreproc) Trials are defined by 2 trigger beams, first trigger defines the start of the trial, and 2nd trigger beam: the reward time (which is variable). I'm taking smaples in this way: prestimbeam: 3 sec before "start trigger", and poststimbeam = time till trigger of reward. I pretty sure this error appears when prestimbeam is overlapping with the previous poststimbeam (actually, taking 2sec before start trigger error doesn't come up). Do you have any suggestion of how i could introduce i conditional statement for skipping these trials? I guess this statement has to be written is "read_data" function, right? Thanks! Natalia Grion ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.b.dijkman at STUDENT.UTWENTE.NL Tue Jul 8 13:03:52 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Tue, 8 Jul 2008 13:03:52 +0200 Subject: Overlapping trials Message-ID: Hi Natalia, Your error seems te originate from this line: dat = ncs.dat(begsample:endsample); Either the begsample variable or the endsample variable isn't a positive number. As you probably know, matlab starts counting with 1 for vector and matrix indices. Since you mention the error doesn't come up when you take a trial 2 sec instead of 3 sec before the prestimbeam, my guess is that he sample index of the prestimbeam is more than 2 sec * samplefreq, but less then 3 sec * samplefreq. Perhaps you could elaborate a bit further about your experimental setup? All your trials have a different duration? I hope this helps, Thomas Dijkman -----Oorspronkelijk bericht----- Van: FieldTrip discussion list namens Natalia Grion Verzonden: di 8-7-2008 11:50 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: [FIELDTRIP] Overlapping trials Dear All, During reading and preprocessing lfps, I find this error for some trials: ?? Subscript indices must either be real positive integers or logicals. *Error in ==> read_data at 576 dat = ncs.dat(begsample:endsample);* Error in ==> read_fcdc_data at 49 [dat] = read_data(varargin{:}); Error in ==> preprocessing at 554 dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, rawindx, strcmp(cfg.continuous, 'yes')); Error in ==> FreqAnalysis at 51 datar{chanindx}=preprocessing(cfgpreproc) Trials are defined by 2 trigger beams, first trigger defines the start of the trial, and 2nd trigger beam: the reward time (which is variable). I'm taking smaples in this way: prestimbeam: 3 sec before "start trigger", and poststimbeam = time till trigger of reward. I pretty sure this error appears when prestimbeam is overlapping with the previous poststimbeam (actually, taking 2sec before start trigger error doesn't come up). Do you have any suggestion of how i could introduce i conditional statement for skipping these trials? I guess this statement has to be written is "read_data" function, right? Thanks! Natalia Grion ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 p.medendorp at NICI.RU.NL Tue Jul 8 15:03:19 2008 From: p.medendorp at NICI.RU.NL (Pieter Medendorp) Date: Tue, 8 Jul 2008 15:03:19 +0200 Subject: POSTDOC POSITION AVAILABLE IN NIJMEGEN Message-ID: POST-DOCTORAL RESEARCH POSITION IN SPATIAL PERCEPTION AND MOTOR CONTROL A post-doctoral research position (3 yrs) is available at the Radboud University Nijmegen, The Netherlands, in the research group of Dr. Pieter Medendorp. Research in our group aims to elucidate the computational and neural strategies in human sensorimotor processing. This theme is mainly investigated from a neuroscience systems point of view, using a combination of computational modeling, psychophysics and imaging techniques (EEG, MEG and fMRI). Current research projects investigate topics such as spatial constancy, effector selection, eye-hand coordination, vestibular processing, and spatial motion perception. The new project, funded by the Netherlands Organisation for Scientific Research, will study the neural signals and mechanisms that preserve spatial constancy for motor control. Facilities and tools to support these studies include real-time motion tracking systems, eye trackers, visual displays, and a vestibular platform. Two state-of the-art MRI systems, whole-head MEG, and an EEG lab are also available. Preference will be given to candidates with a PhD in neuroscience, or related field, who have a strong motivation to do challenging interdisciplinary research. Experience with functional imaging, psychophysical techniques, as well as strong programming skills, and a demonstrable affinity with quantitative data analysis (e.g. MatLab) is highly desirable. Salary will be commensurate with experience. The anticipated start date is fall 2008, but earlier is possible. Nijmegen is the oldest city of the Netherlands, with an interesting history dating back to the Roman Empire, nice surrounding scenery (rivers, hills, woods) and a rich cultural life. Interested applicants should send CV, statement of background and interests, and names of 2 referees to: Pieter Medendorp, Nijmegen Institute for Cognition and Information, Radboud University Nijmegen, Montessorilaan 3, 6525 HR Nijmegen, The Netherlands; Email: p.medendorp at nici.ru.nl. Web: http://www.nici.ru.nl/~pieterm/. Review of applications will begin August 15, 2008, and will continue until the position is filled. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 grion at SISSA.IT Tue Jul 8 16:56:47 2008 From: grion at SISSA.IT (Natalia Grion) Date: Tue, 8 Jul 2008 16:56:47 +0200 Subject: Overlapping trials In-Reply-To: Message-ID: Hi Thomas and All, well this are recordings from freely moving rats with neuralynx system. By the way I'm defining trials, yes, they have variable length: I'm taking 3sec before the central beam is triggered (this is indicative of stimulus "on" = start trigger), till the trigger of the 2nd beam is trigger (reward trigger), even if they have a regular behaviour from trial to trial, sometimes they are faster. Start trigger is stored in a separate file as EventTimeTrigger, this event is a TimeStamp, Reward Trigger is stored in an external file (txt file) generated by labview (software that commands the maze). Timestamps are generated by the recording system(microseconds). Every LFP sample has an associated timestamp and this forms the time axis, knowing the EventTimeStamp i can take the 'n' samples before this event and/or after, in my case time taken 'after' depends on how long the rat took to trigger the Reward beam (ellapsed time). This is my function (main part): function [trl]=trialfunNG(cfg) *% get the inter-timestamp time from the header* hdr=read_fcdc_header(cfg.datadir); nlfpsamplespersec=hdr.Fs; *% read the timestamps of the events in the Neuralynx stimulus channel (the .nev-file in cfg.datadir)* events=read_fcdc_event(cfg.datadir); eventlfpsamples=[events(:).sample]'; *% read the stimulus and behavioral information in the external file....info about stimulus, correct\incorrect trials etc* stimbehdata=dlmread(cfg.extstimbehfile,'\t',1,1); *....* nlfpsamplesprestimbeamcrossing=cfg.prestimbeam*nlfpsamplespersec; if ischar(cfg.poststimbeam) && strcmp(cfg.poststimbeam,'respbeam') *%this respbeam is taken from the txt file* rtinmsec=stimbehdata(selvec,6); triallengthinlfpsamples=(rtinmsec/1000)*nlfpsamplespersec; else triallengthinlfpsamples=cfg.poststimbeam*nlfpsamplespersec; end; trl=zeros(nseltrials,3); trl(:,1)=eventlfpsamples(selvec)-nlfpsamplesprestimbeamcrossing; trl(:,2)=eventlfpsamples(selvec)+triallengthinlfpsamples; trl(:,3)=-nlfpsamplesprestimbeamcrossing; I don't know till this point if I'm missing sth from Nlx, or is a bug generated by the way fieldtrip is picking up my data. One solution I thought, would be to write a conditional statement for skipping these trials, but, as the error comes up from read_data. I'd like to know how to introduce it. Thanks again Natalia Thomas Dijkman wrote: > Hi Natalia, > > Your error seems te originate from this line: dat = ncs.dat(begsample:endsample); Either the begsample variable or the endsample variable isn't a positive number. As you probably know, matlab starts counting with 1 for vector and matrix indices. Since you mention the error doesn't come up when you take a trial 2 sec instead of 3 sec before the prestimbeam, my guess is that he sample index of the prestimbeam is more than 2 sec * samplefreq, but less then 3 sec * samplefreq. > Perhaps you could elaborate a bit further about your experimental setup? All your trials have a different duration? > I hope this helps, > > Thomas Dijkman > > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list namens Natalia Grion > Verzonden: di 8-7-2008 11:50 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] Overlapping trials > > Dear All, > During reading and preprocessing lfps, I find this error for some trials: > > ?? Subscript indices must either be real positive integers or logicals. > *Error in ==> read_data at 576 > dat = ncs.dat(begsample:endsample);* > Error in ==> read_fcdc_data at 49 > [dat] = read_data(varargin{:}); > Error in ==> preprocessing at 554 > dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, > rawindx, strcmp(cfg.continuous, > 'yes')); > Error in ==> FreqAnalysis at 51 > datar{chanindx}=preprocessing(cfgpreproc) > > Trials are defined by 2 trigger beams, first trigger defines the start > of the trial, and 2nd trigger beam: the reward time (which is variable). > I'm taking smaples in this way: prestimbeam: 3 sec before "start > trigger", and poststimbeam = time till trigger of reward. I pretty sure > this error appears when prestimbeam is overlapping with the previous > poststimbeam (actually, taking 2sec before start trigger error doesn't > come up). Do you have any suggestion of how i could introduce i > conditional statement for skipping these trials? I guess this statement > has to be written is "read_data" function, right? > Thanks! > Natalia Grion > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Tue Jul 8 16:52:34 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 8 Jul 2008 16:52:34 +0200 Subject: Overlapping trials In-Reply-To: <4873802F.2030209@sissa.it> Message-ID: Dear Natalia, Most likely your error is caused by the begsmp/endsmp in read_data not being integer and positive. This could be due to the fact that your variables nlfpsamplesprestimbeamcrossing and triallengthinlfpsamples are not integer numbers. A simple round should do the trick I guess... In general, I'd advice you to use less elaborate names for the definition of your variables: it saves some typing (also for the repliers to your question ;o) ), and so reduces the probability of typos. Moreover, it facilitates reading. Hope this helped, Jan-Mathijs On Jul 8, 2008, at 4:56 PM, Natalia Grion wrote: > Hi Thomas and All, > well this are recordings from freely moving rats with neuralynx > system. By the way I'm defining trials, yes, they have variable > length: I'm taking 3sec before the central beam is triggered (this > is indicative of stimulus "on" = start trigger), till the trigger > of the 2nd beam is trigger (reward trigger), even if they have a > regular behaviour from trial to trial, sometimes they are faster. > Start trigger is stored in a separate file as EventTimeTrigger, > this event is a TimeStamp, Reward Trigger is stored in an external > file (txt file) generated by labview (software that commands the > maze). Timestamps are generated by the recording system > (microseconds). Every LFP sample has an associated timestamp and > this forms the time axis, knowing the EventTimeStamp i can take > the 'n' samples before this event and/or after, in my case time > taken 'after' depends on how long the rat took to trigger the > Reward beam (ellapsed time). This is my function (main part): > > function [trl]=trialfunNG(cfg) > *% get the inter-timestamp time from the header* > hdr=read_fcdc_header(cfg.datadir); > nlfpsamplespersec=hdr.Fs; > > *% read the timestamps of the events in the Neuralynx stimulus > channel (the .nev-file in cfg.datadir)* > events=read_fcdc_event(cfg.datadir); > eventlfpsamples=[events(:).sample]'; > > *% read the stimulus and behavioral information in the external > file....info about stimulus, correct\incorrect trials etc* > stimbehdata=dlmread(cfg.extstimbehfile,'\t',1,1); > *....* > nlfpsamplesprestimbeamcrossing=cfg.prestimbeam*nlfpsamplespersec; > > if ischar(cfg.poststimbeam) && strcmp(cfg.poststimbeam,'respbeam') > *%this respbeam is taken from the txt file* > rtinmsec=stimbehdata(selvec,6); > triallengthinlfpsamples=(rtinmsec/1000)*nlfpsamplespersec; > else > triallengthinlfpsamples=cfg.poststimbeam*nlfpsamplespersec; > end; > trl=zeros(nseltrials,3); > trl(:,1)=eventlfpsamples(selvec)-nlfpsamplesprestimbeamcrossing; > trl(:,2)=eventlfpsamples(selvec)+triallengthinlfpsamples; > trl(:,3)=-nlfpsamplesprestimbeamcrossing; > > I don't know till this point if I'm missing sth from Nlx, or is a > bug generated by the way fieldtrip is picking up my data. One > solution I thought, would be to write a conditional statement for > skipping these trials, but, as the error comes up from read_data. > I'd like to know how to introduce it. > Thanks again > Natalia > > > > Thomas Dijkman wrote: >> Hi Natalia, >> >> Your error seems te originate from this line: dat = ncs.dat >> (begsample:endsample); Either the begsample variable or the >> endsample variable isn't a positive number. As you probably know, >> matlab starts counting with 1 for vector and matrix indices. Since >> you mention the error doesn't come up when you take a trial 2 sec >> instead of 3 sec before the prestimbeam, my guess is that he >> sample index of the prestimbeam is more than 2 sec * samplefreq, >> but less then 3 sec * samplefreq. Perhaps you could elaborate a >> bit further about your experimental setup? All your trials have a >> different duration? I hope this helps, >> >> Thomas Dijkman >> >> -----Oorspronkelijk bericht----- >> Van: FieldTrip discussion list namens Natalia Grion >> Verzonden: di 8-7-2008 11:50 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: [FIELDTRIP] Overlapping trials >> Dear All, >> During reading and preprocessing lfps, I find this error for some >> trials: >> >> ?? Subscript indices must either be real positive integers or >> logicals. >> *Error in ==> read_data at 576 >> dat = ncs.dat(begsample:endsample);* >> Error in ==> read_fcdc_data at 49 >> [dat] = read_data(varargin{:}); >> Error in ==> preprocessing at 554 >> dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, >> rawindx, strcmp(cfg.continuous, >> 'yes')); >> Error in ==> FreqAnalysis at 51 >> datar{chanindx}=preprocessing(cfgpreproc) >> >> Trials are defined by 2 trigger beams, first trigger defines the >> start of the trial, and 2nd trigger beam: the reward time (which >> is variable). I'm taking smaples in this way: prestimbeam: 3 sec >> before "start trigger", and poststimbeam = time till trigger of >> reward. I pretty sure this error appears when prestimbeam is >> overlapping with the previous poststimbeam (actually, taking >> 2sec before start trigger error doesn't come up). Do you have >> any suggestion of how i could introduce i conditional statement >> for skipping these trials? I guess this statement has to be >> written is "read_data" function, right? >> Thanks! >> Natalia Grion >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From arno at SALK.EDU Tue Jul 8 17:22:45 2008 From: arno at SALK.EDU (arno delorme) Date: Tue, 8 Jul 2008 17:22:45 +0200 Subject: Thesis fellowship EEG Neurofeedback to control mind wandering Message-ID: Thesis fellowship for 3 years financed by the French ministry of research in Toulouse, France: EEG Neurofeedback to control mind wandering The capacity to concentrate for long period of times is critical both for students and some specific position (air traffic controller, monitor security guard, child care teacher or even Paris taxi driver). Failure to do so can result in life-threatening accident. Monks of various traditions, practicing concentrative meditation, excel at developing a one point focus attention. Over the 3-year course of this project, we intend to 1) record the brain activity of monks in meditation using EEG. 2) train normal non-meditative subjects to produce the same brain rhythms as the monk do. 3) test the concentrative capacities of these subjects before and after training. The institution hosting the project is the University of Toulouse III and the CNRS laboratory CERCO. The CERCO (Center for Brain and Cognition Research) is an internationally recognized laboratory of 18 professional independent CNRS researchers. In 2006 4-year evaluation, this laboratory was ranked first in Neuroscience in France. It is well known for its multidisciplinary approach to cognitive neuroscience with experiments on mice, monkeys and humans, and a wide range of imaging methodologies including modeling. The ideal candidate will have: - a master degree or equivalent in the cognitive or computational domain (no constraint in terms of nationality) - an interest for studying the brain and altered states of consciousness such as those induced by neurofeedback or meditation - a training in mathematics, signal processing and/or computer science - fluency in English. Working knowledge in French is preferred. - capacity to work independently - age limit: 25 (or 30 under special circumstances) Contact: Arnaud Delorme via email before the 31 of August 2008 (arno at cerco.ups-tlse.fr ) (include PDF of a motivation letter, a CV, any publication in english/french and have 2 references send recommendation letter independently by email). http://cerco.ups-tlse.fr/~delorme ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 v.litvak at ION.UCL.AC.UK Tue Jul 8 17:24:32 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 8 Jul 2008 16:24:32 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: I don't think it's a matter of 'light', but it might be a matter of a different FT version. If you look in neighbourselection.m there is a comment % Revision 1.8 2007/05/14 08:26:31 roboos % added option to construct neighbours from 2-D layout So if you FT dates prior to that date, it cannot determine neighbour relations based on 2D layout. Update your FT and see if it solves the problem. Without layout and without 3D electrode positions it won't work and rightly so. With layout it should work if your FT is up to date. Best, Vladimir On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: > If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. > > Regards, > > Arjen Stolk > > ________________________________ > > Van: FieldTrip discussion list namens A. Stolk > Verzonden: di 7/8/2008 10:36 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. > I do manage to get my script to work on another computer, but somehow not on this one. > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: do 7/3/2008 5:10 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Do you actually have electrode positions somewhere in your data? They > are not usually supposed to get there by themselves so unless you > somehow got them there (like read in a file with sensor positions), > they are indeed missing. For statistics you don't actually need sensor > positions You can specify the neighborhood relations 'by hand' instead > of calling neighbourselection. > > Best, > > Vladimir > > On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >> Dear fieldtrippers, >> >> While performing statitstical analysis on time-frequency EEG data, I get the following error: >> >> ??? Undefined function or variable "sens". >> Error in ==> neighbourselection at 106 >> if ~isstruct(sens) >> Error in ==> statistics_wrapper at 226 >> cfg.neighbours = neighbourselection(cfg,varargin{1}); >> Error in ==> freqstatistics at 132 >> [stat] = statistics_wrapper(cfg, varargin{:}); >> Error in ==> fieldtripstatanalyse at 70 >> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >> >> The neighbourselection function tells: >> >> if ~isstruct(sens) >> >> error('Did not find gradiometer or electrode information.'); >> >> >> >> which gets its data by: >> >> % Revision 1.6 2006/07/12 14:14:59 roboos >> >> % get sens from data.grad/elec >> >> >> >> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >> >> >> >> Regards, >> >> Arjen Stolk >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 17:36:26 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 17:36:26 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 7/8/2008 5:24 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" I don't think it's a matter of 'light', but it might be a matter of a different FT version. If you look in neighbourselection.m there is a comment % Revision 1.8 2007/05/14 08:26:31 roboos % added option to construct neighbours from 2-D layout So if you FT dates prior to that date, it cannot determine neighbour relations based on 2D layout. Update your FT and see if it solves the problem. Without layout and without 3D electrode positions it won't work and rightly so. With layout it should work if your FT is up to date. Best, Vladimir On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: > If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. > > Regards, > > Arjen Stolk > > ________________________________ > > Van: FieldTrip discussion list namens A. Stolk > Verzonden: di 7/8/2008 10:36 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. > I do manage to get my script to work on another computer, but somehow not on this one. > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: do 7/3/2008 5:10 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > Do you actually have electrode positions somewhere in your data? They > are not usually supposed to get there by themselves so unless you > somehow got them there (like read in a file with sensor positions), > they are indeed missing. For statistics you don't actually need sensor > positions You can specify the neighborhood relations 'by hand' instead > of calling neighbourselection. > > Best, > > Vladimir > > On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >> Dear fieldtrippers, >> >> While performing statitstical analysis on time-frequency EEG data, I get the following error: >> >> ??? Undefined function or variable "sens". >> Error in ==> neighbourselection at 106 >> if ~isstruct(sens) >> Error in ==> statistics_wrapper at 226 >> cfg.neighbours = neighbourselection(cfg,varargin{1}); >> Error in ==> freqstatistics at 132 >> [stat] = statistics_wrapper(cfg, varargin{:}); >> Error in ==> fieldtripstatanalyse at 70 >> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >> >> The neighbourselection function tells: >> >> if ~isstruct(sens) >> >> error('Did not find gradiometer or electrode information.'); >> >> >> >> which gets its data by: >> >> % Revision 1.6 2006/07/12 14:14:59 roboos >> >> % get sens from data.grad/elec >> >> >> >> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >> >> >> >> Regards, >> >> Arjen Stolk >> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Tue Jul 8 18:16:22 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 8 Jul 2008 17:16:22 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From A.Stolk at EWI.UTWENTE.NL Tue Jul 8 19:57:02 2008 From: A.Stolk at EWI.UTWENTE.NL (A. Stolk) Date: Tue, 8 Jul 2008 19:57:02 +0200 Subject: Undefined function or variable "sens" Message-ID: Thank you for your assistance. Regards, Arjen ________________________________ Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 7/8/2008 6:16 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 t.b.dijkman at STUDENT.UTWENTE.NL Wed Jul 9 09:38:05 2008 From: t.b.dijkman at STUDENT.UTWENTE.NL (Thomas Dijkman) Date: Wed, 9 Jul 2008 09:38:05 +0200 Subject: Undefined function or variable "sens" Message-ID: This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. Regards, Thomas Dijkman -----Oorspronkelijk bericht----- Van: FieldTrip discussion list namens Vladimir Litvak Verzonden: di 8-7-2008 18:16 Aan: FIELDTRIP at NIC.SURFNET.NL Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" The fact that you get this error indicates that somewhere you specified correction for multiple comparisons using clustering. If you want to get clusters on the scalp then you do use neighbour relations even if you don't call neighbourselection explicitly. It will be called by freqstatistics. Freqstatistics assumes that you do use scalp clustering unless you specify otherwise. So if you don't say that you don't want scalp clustering and don't provide any way to determine neighbour relations, there is an error. So depending on what you really want you should do one of three things: 1) If you do not want to use clustering at all specify a different way of MCP correction (like 'max'). 1) If you do want to have scalp clusters then provide the layout as you are doing now. 2) If you want to have clusters but only in time-frequency and not in space put an empty neighbourhood structure in your cfg. Like (assuming that cfg.channel is a list of your labels). cfg.neighbours = struct([]); for chan=1:length(cfg.channel) cfg.neighbours{chan}.label = cfg.channel{chan}; cfg.neighbours{chan}.neighblabel = {}; end Not that in this case you will still have MCP correction over channels, so if you have more channels you loose power. So just include the channels you really want to test. Best, Vladimir On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: > Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. > > Regards, > > Arjen > > ________________________________ > > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 7/8/2008 5:24 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > > > I don't think it's a matter of 'light', but it might be a matter of a > different FT version. If you look in neighbourselection.m there is a > comment > > % Revision 1.8 2007/05/14 08:26:31 roboos > % added option to construct neighbours from 2-D layout > > So if you FT dates prior to that date, it cannot determine neighbour > relations based on 2D layout. Update your FT and see if it solves the > problem. Without layout and without 3D electrode positions it won't > work and rightly so. With layout it should work if your FT is up to > date. > > Best, > > Vladimir > > > > On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >> >> Regards, >> >> Arjen Stolk >> >> ________________________________ >> >> Van: FieldTrip discussion list namens A. Stolk >> Verzonden: di 7/8/2008 10:36 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >> I do manage to get my script to work on another computer, but somehow not on this one. >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: do 7/3/2008 5:10 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> Do you actually have electrode positions somewhere in your data? They >> are not usually supposed to get there by themselves so unless you >> somehow got them there (like read in a file with sensor positions), >> they are indeed missing. For statistics you don't actually need sensor >> positions You can specify the neighborhood relations 'by hand' instead >> of calling neighbourselection. >> >> Best, >> >> Vladimir >> >> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>> Dear fieldtrippers, >>> >>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>> >>> ??? Undefined function or variable "sens". >>> Error in ==> neighbourselection at 106 >>> if ~isstruct(sens) >>> Error in ==> statistics_wrapper at 226 >>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>> Error in ==> freqstatistics at 132 >>> [stat] = statistics_wrapper(cfg, varargin{:}); >>> Error in ==> fieldtripstatanalyse at 70 >>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>> >>> The neighbourselection function tells: >>> >>> if ~isstruct(sens) >>> >>> error('Did not find gradiometer or electrode information.'); >>> >>> >>> >>> which gets its data by: >>> >>> % Revision 1.6 2006/07/12 14:14:59 roboos >>> >>> % get sens from data.grad/elec >>> >>> >>> >>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>> >>> >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Paul.vandenHurk at FCDONDERS.RU.NL Wed Jul 9 10:23:54 2008 From: Paul.vandenHurk at FCDONDERS.RU.NL (Paul van den Hurk) Date: Wed, 9 Jul 2008 10:23:54 +0200 Subject: read_fcdc_header problem In-Reply-To: Message-ID: Dear all, When trying to read in my header information using e.g. hdr = read_fcdc_header('C:\Documents and Settings\pauvdhur\My Documents\MATLAB_Files\ANT_EEG_pilot_data\Subj_1\FabioGiommi.vhdr') only recently I got the following error: ??? Error using ==> rdivide Not enough input arguments. Error in ==> fieldtrip\private\read_brainvision_vhdr at 66 hdr.nSamples = info.bytes./(hdr.NumberOfChannels*2); Apparently, the info.bytes field is empty. The info structure is obtained by the following code (which you can check in the 'read_brainvision_vhdr' function): info = dir(hdr.DataFile); While the hdr.DataFile is obtained by: hdr.DataFile = read_asa(filename, 'DataFile=', '%s'); If I change the script info = dir(hdr.DataFile); into: info = dir(filename); the problem seems to be solved. Could anyone tell me what is best to do? To change the 'read_brainvision_vhdr' function for my own use? Or is there a possibility to change something else, so I could still use the standard ' read_brainvision_vhdr' function (which I would prefer actually). Thanks a lot in advance for any suggestion! Kind regards, Paul van den Hurk ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 11:17:57 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 10:17:57 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Then perhaps Robert should look into it. If you look at statistics_wrapper line 229 it says: if ~isfield(cfg,'neighbours') && isfield(cfg, 'correctm') && strcmp(cfg.correctm, 'cluster') cfg.neighbours = neighbourselection(cfg,varargin{1}); end Thus neighbourselection should not be called with the settings you specified. Perhaps try putting a breakpoint there and see what happens. Best, Vladimir On Wed, Jul 9, 2008 at 8:38 AM, Thomas Dijkman wrote: > This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. > > Regards, > > Thomas Dijkman > > > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list namens Vladimir Litvak > Verzonden: di 8-7-2008 18:16 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" > > The fact that you get this error indicates that somewhere you > specified correction for multiple comparisons using clustering. If you > want to get clusters on the scalp then you do use neighbour relations > even if you don't call neighbourselection explicitly. It will be > called by freqstatistics. Freqstatistics assumes that you do use scalp > clustering unless you specify otherwise. So if you don't say that you > don't want scalp clustering and don't provide any way to determine > neighbour relations, there is an error. So depending on what you > really want you should do one of three things: > > 1) If you do not want to use clustering at all specify a different way > of MCP correction (like 'max'). > > 1) If you do want to have scalp clusters then provide the layout as > you are doing now. > > 2) If you want to have clusters but only in time-frequency and not in > space put an empty neighbourhood structure in your cfg. Like (assuming > that cfg.channel is a list of your labels). > > cfg.neighbours = struct([]); > for chan=1:length(cfg.channel) > cfg.neighbours{chan}.label = cfg.channel{chan}; > cfg.neighbours{chan}.neighblabel = {}; > end > > Not that in this case you will still have MCP correction over > channels, so if you have more channels you loose power. So just > include the channels you really want to test. > > Best, > > Vladimir > > > On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: >> Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. >> >> Regards, >> >> Arjen >> >> ________________________________ >> >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: di 7/8/2008 5:24 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> >> >> I don't think it's a matter of 'light', but it might be a matter of a >> different FT version. If you look in neighbourselection.m there is a >> comment >> >> % Revision 1.8 2007/05/14 08:26:31 roboos >> % added option to construct neighbours from 2-D layout >> >> So if you FT dates prior to that date, it cannot determine neighbour >> relations based on 2D layout. Update your FT and see if it solves the >> problem. Without layout and without 3D electrode positions it won't >> work and rightly so. With layout it should work if your FT is up to >> date. >> >> Best, >> >> Vladimir >> >> >> >> On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >>> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >>> >>> Regards, >>> >>> Arjen Stolk >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens A. Stolk >>> Verzonden: di 7/8/2008 10:36 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >>> I do manage to get my script to work on another computer, but somehow not on this one. >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens Vladimir Litvak >>> Verzonden: do 7/3/2008 5:10 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> Do you actually have electrode positions somewhere in your data? They >>> are not usually supposed to get there by themselves so unless you >>> somehow got them there (like read in a file with sensor positions), >>> they are indeed missing. For statistics you don't actually need sensor >>> positions You can specify the neighborhood relations 'by hand' instead >>> of calling neighbourselection. >>> >>> Best, >>> >>> Vladimir >>> >>> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>>> Dear fieldtrippers, >>>> >>>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>>> >>>> ??? Undefined function or variable "sens". >>>> Error in ==> neighbourselection at 106 >>>> if ~isstruct(sens) >>>> Error in ==> statistics_wrapper at 226 >>>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>>> Error in ==> freqstatistics at 132 >>>> [stat] = statistics_wrapper(cfg, varargin{:}); >>>> Error in ==> fieldtripstatanalyse at 70 >>>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>>> >>>> The neighbourselection function tells: >>>> >>>> if ~isstruct(sens) >>>> >>>> error('Did not find gradiometer or electrode information.'); >>>> >>>> >>>> >>>> which gets its data by: >>>> >>>> % Revision 1.6 2006/07/12 14:14:59 roboos >>>> >>>> % get sens from data.grad/elec >>>> >>>> >>>> >>>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>>> >>>> >>>> >>>> Regards, >>>> >>>> Arjen Stolk >>>> >>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 11:23:37 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 10:23:37 +0100 Subject: Undefined function or variable "sens" In-Reply-To: Message-ID: Ah, I think I see what's happening. There was also a fix in statistics_wrapper: % Revision 1.45 2008/04/09 14:14:09 roboos % only make neighbours if clustering is required Both problematic versions mentioned before are prior to this date. So you should update to the latest version as I suggested before. Vladimir On Wed, Jul 9, 2008 at 10:17 AM, Vladimir Litvak wrote: > Then perhaps Robert should look into it. If you look at > statistics_wrapper line 229 it says: > > if ~isfield(cfg,'neighbours') && isfield(cfg, 'correctm') && > strcmp(cfg.correctm, 'cluster') > cfg.neighbours = neighbourselection(cfg,varargin{1}); > end > > > Thus neighbourselection should not be called with the settings you > specified. Perhaps try putting a breakpoint there and see what > happens. > > Best, > > Vladimir > > > > On Wed, Jul 9, 2008 at 8:38 AM, Thomas Dijkman > wrote: >> This script that causes this error on Arjen's computer was written by me, and the strange part is that it worked perfectly on my computer, but caused the error on Arjen's computer. I just looked into the matter you brought up, the MCP correction, but my script does not specify it. You have to explicitly add the option in cfg.correctm for it to be used. And since the default option for cfg.correctm = 'no', I don't understand the reason for this error. The fact that it is solved by adding a 2D layout file, means that somehow freqstatistics is in fact using MCP correction, even though it is not specified to do this. Both computers run the same Matlab version (R2007B, 7.5.0), and I was using fieldtrip 20080519 until I updated it to 20080708 this morning. The script still runs fine on my PC. >> >> Regards, >> >> Thomas Dijkman >> >> >> -----Oorspronkelijk bericht----- >> Van: FieldTrip discussion list namens Vladimir Litvak >> Verzonden: di 8-7-2008 18:16 >> Aan: FIELDTRIP at NIC.SURFNET.NL >> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >> >> The fact that you get this error indicates that somewhere you >> specified correction for multiple comparisons using clustering. If you >> want to get clusters on the scalp then you do use neighbour relations >> even if you don't call neighbourselection explicitly. It will be >> called by freqstatistics. Freqstatistics assumes that you do use scalp >> clustering unless you specify otherwise. So if you don't say that you >> don't want scalp clustering and don't provide any way to determine >> neighbour relations, there is an error. So depending on what you >> really want you should do one of three things: >> >> 1) If you do not want to use clustering at all specify a different way >> of MCP correction (like 'max'). >> >> 1) If you do want to have scalp clusters then provide the layout as >> you are doing now. >> >> 2) If you want to have clusters but only in time-frequency and not in >> space put an empty neighbourhood structure in your cfg. Like (assuming >> that cfg.channel is a list of your labels). >> >> cfg.neighbours = struct([]); >> for chan=1:length(cfg.channel) >> cfg.neighbours{chan}.label = cfg.channel{chan}; >> cfg.neighbours{chan}.neighblabel = {}; >> end >> >> Not that in this case you will still have MCP correction over >> channels, so if you have more channels you loose power. So just >> include the channels you really want to test. >> >> Best, >> >> Vladimir >> >> >> On Tue, Jul 8, 2008 at 4:36 PM, A. Stolk wrote: >>> Thank you for your reply. I got the errors both in fieldtrip-20080325 and in fieldtrip-20080408. I'm not intending to use any neighbour relations, just frequency statistics. Adding my own EEG.lay solved the problem. >>> >>> Regards, >>> >>> Arjen >>> >>> ________________________________ >>> >>> Van: FieldTrip discussion list namens Vladimir Litvak >>> Verzonden: di 7/8/2008 5:24 >>> Aan: FIELDTRIP at NIC.SURFNET.NL >>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>> >>> >>> >>> I don't think it's a matter of 'light', but it might be a matter of a >>> different FT version. If you look in neighbourselection.m there is a >>> comment >>> >>> % Revision 1.8 2007/05/14 08:26:31 roboos >>> % added option to construct neighbours from 2-D layout >>> >>> So if you FT dates prior to that date, it cannot determine neighbour >>> relations based on 2D layout. Update your FT and see if it solves the >>> problem. Without layout and without 3D electrode positions it won't >>> work and rightly so. With layout it should work if your FT is up to >>> date. >>> >>> Best, >>> >>> Vladimir >>> >>> >>> >>> On Tue, Jul 8, 2008 at 10:46 AM, A. Stolk wrote: >>>> If I add my own EEG.lay, the function does work well. If I leave it out, it does give the errors mentioned below. This problem is somehow absent in the 'light' fieldtrip edition installed on another computer. >>>> >>>> Regards, >>>> >>>> Arjen Stolk >>>> >>>> ________________________________ >>>> >>>> Van: FieldTrip discussion list namens A. Stolk >>>> Verzonden: di 7/8/2008 10:36 >>>> Aan: FIELDTRIP at NIC.SURFNET.NL >>>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>>> >>>> >>>> >>>> Thank you for your quick reply. I indeed do use a self-made EEG.lay, but am not using the neighbourselection.m. >>>> I do manage to get my script to work on another computer, but somehow not on this one. >>>> >>>> ________________________________ >>>> >>>> Van: FieldTrip discussion list namens Vladimir Litvak >>>> Verzonden: do 7/3/2008 5:10 >>>> Aan: FIELDTRIP at NIC.SURFNET.NL >>>> Onderwerp: Re: [FIELDTRIP] Undefined function or variable "sens" >>>> >>>> >>>> >>>> Do you actually have electrode positions somewhere in your data? They >>>> are not usually supposed to get there by themselves so unless you >>>> somehow got them there (like read in a file with sensor positions), >>>> they are indeed missing. For statistics you don't actually need sensor >>>> positions You can specify the neighborhood relations 'by hand' instead >>>> of calling neighbourselection. >>>> >>>> Best, >>>> >>>> Vladimir >>>> >>>> On Thu, Jul 3, 2008 at 3:05 PM, A. Stolk wrote: >>>>> Dear fieldtrippers, >>>>> >>>>> While performing statitstical analysis on time-frequency EEG data, I get the following error: >>>>> >>>>> ??? Undefined function or variable "sens". >>>>> Error in ==> neighbourselection at 106 >>>>> if ~isstruct(sens) >>>>> Error in ==> statistics_wrapper at 226 >>>>> cfg.neighbours = neighbourselection(cfg,varargin{1}); >>>>> Error in ==> freqstatistics at 132 >>>>> [stat] = statistics_wrapper(cfg, varargin{:}); >>>>> Error in ==> fieldtripstatanalyse at 70 >>>>> [stat] = freqstatistics(cfg, stimulusFFT, baselineFFT); >>>>> >>>>> The neighbourselection function tells: >>>>> >>>>> if ~isstruct(sens) >>>>> >>>>> error('Did not find gradiometer or electrode information.'); >>>>> >>>>> >>>>> >>>>> which gets its data by: >>>>> >>>>> % Revision 1.6 2006/07/12 14:14:59 roboos >>>>> >>>>> % get sens from data.grad/elec >>>>> >>>>> >>>>> >>>>> I get this error on several matlab and fieldtrip versions. Any suggestions how to solve this? >>>>> >>>>> >>>>> >>>>> Regards, >>>>> >>>>> Arjen Stolk >>>>> >>>>> >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> >> > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michelic72 at GMAIL.COM Wed Jul 9 18:02:14 2008 From: michelic72 at GMAIL.COM (Cristiano Micheli) Date: Wed, 9 Jul 2008 18:02:14 +0200 Subject: CTF 3rd order gradiometers correction Message-ID: Hi All CTF software allows to open a MEG dataset and to apply a theoretical 3rd order gradiometers data correction, which makes use of a number of coefficients to correct raw data from common mode artifacts. Does Fieldtrip take in account this correction as well? Where is it coded? Regards Cristiano ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sdmuthu at CARDIFF.AC.UK Wed Jul 9 18:32:02 2008 From: sdmuthu at CARDIFF.AC.UK (Suresh Muthukumaraswamy) Date: Wed, 9 Jul 2008 17:32:02 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Hi, as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and doesnt apply any other processing to this You can check what the gradiometer definition of the saved data is in DataEditor. In the Acq software you can pick what type of gradiometers the data is saved as. We usually just save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on (unless you had some reason to undo the 3rd order gradiometers) - Suresh Suresh Muthukumaraswamy, PhD CUBRIC Cardiff University Park Place Cardiff, CF10 3AT United Kingdom email: sdmuthu at cardiff.ac.uk Phone: +44 (0)29 2087 0353 >>> Cristiano Micheli 09/07/2008 17:02 >>> Hi All CTF software allows to open a MEG dataset and to apply a theoretical 3rd order gradiometers data correction, which makes use of a number of coefficients to correct raw data from common mode artifacts. Does Fieldtrip take in account this correction as well? Where is it coded? Regards Cristiano ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 18:53:48 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 17:53:48 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Dear Christiano, This has only recently been implemented and is now being tested at FCDC. Look at denoise_synthetic function. You will also need to download the ctf toolbox from ftp://ftp.fcdonders.nl/pub/fieldtrip/external/ctf.zip and specify 'ctf_new' as filetype when you read the data (in particular the header with grad). But keep in mind that this is still very experimental. Good luck, Vladimir On Wed, Jul 9, 2008 at 5:02 PM, Cristiano Micheli wrote: > Hi All > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > order gradiometers data correction, which makes use of a number of > coefficients to correct raw data from common mode artifacts. > Does Fieldtrip take in account this correction as well? > Where is it coded? > Regards > Cristiano > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 9 19:23:11 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 9 Jul 2008 18:23:11 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <4874F612020000AD00028460@zgrw01.cf.ac.uk> Message-ID: Until the recent improvements (which are not yet default) fieldtrip assumed that the data is 'raw'. Therefore source reconstruction was not precise for data that was saved in 3rd gradient. The data is indeed read as it's saved so for sensor level analysis there is no problem. But the leadfields computed using grads read with the old ctf reader are only suitable for the 'raw' setting. Best, Vladimir On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy wrote: > Hi, > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and > doesnt apply any other processing to this > You can check what the gradiometer definition of the saved data is in DataEditor. > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on > (unless you had some reason to undo the 3rd order gradiometers) > - Suresh > > Suresh Muthukumaraswamy, PhD > CUBRIC > Cardiff University > Park Place > Cardiff, CF10 3AT > United Kingdom > email: sdmuthu at cardiff.ac.uk > Phone: +44 (0)29 2087 0353 > >>>> Cristiano Micheli 09/07/2008 17:02 >>> > Hi All > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > order gradiometers data correction, which makes use of a number of > coefficients to correct raw data from common mode artifacts. > Does Fieldtrip take in account this correction as well? > Where is it coded? > Regards > Cristiano > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to > share experiences and to 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 Thu Jul 10 09:15:48 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 10 Jul 2008 09:15:48 +0200 Subject: read_fcdc_header problem In-Reply-To: <000601c8e19d$20014b90$172dae83@fcdonders.nl> Message-ID: Hi Paul On 9 Jul 2008, at 10:23, Paul van den Hurk wrote: > If I change the script > > info = dir(hdr.DataFile); > > into: > > info = dir(filename); > > the problem seems to be solved. Thanks for the detailled report and suggestion. The snippet of code that you are having a problem with is for determining the number of samples in the data, and it does that by determining the size of the file (in bytes). In the low-level read_brainvision_vhdr function the filename is the string with the *.vhrd file, whereas hdr. DataFile should be pointing to the filename with the *.dat file. Your suggested fix would hence determine the number of samples incorrectly. Since there is not an error in info = dir(hdr.DataFile); itself, I suspect that hdr does have the DataFile field, but that it points to a filename which cannot be found by the dir command. That is the case due to the file being in another directory, which is actually even stated as "FIXME" in the code. I have changed it to % determine the number of samples by looking at the binary file if strcmp(hdr.DataFormat, 'BINARY') % the data file is supposed to be located in the same directory as the header file % but that might be on another location than the present working directory [p, f, x] = fileparts(filename); datafile = fullfile(p, hdr.DataFile); info = dir(datafile); if isempty(info) error('cannot determine the location of the data file %s', hdr.DataFile); end switch lower(hdr.BinaryFormat) ... The new version will be on FCDC home/common in 10 minutes and on the ftp server this evening. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu Jul 10 14:05:50 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 10 Jul 2008 14:05:50 +0200 Subject: CTF 3rd order gradiometers correction Message-ID: Dear Vladimir, I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). (3) try to use laedfields from CTF for these data, if that's possible. Thanks for any suggestions on this issue. Best, Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 09.07.08 19:34:51 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction > Until the recent improvements (which are not yet default) fieldtrip > assumed that the data is 'raw'. Therefore source reconstruction was > not precise for data that was saved in 3rd gradient. The data is > indeed read as it's saved so for sensor level analysis there is no > problem. But the leadfields computed using grads read with the old ctf > reader are only suitable for the 'raw' setting. > > Best, > > Vladimir > > On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy > wrote: > > Hi, > > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and > > doesnt apply any other processing to this > > You can check what the gradiometer definition of the saved data is in DataEditor. > > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just > > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on > > (unless you had some reason to undo the 3rd order gradiometers) > > - Suresh > > > > Suresh Muthukumaraswamy, PhD > > CUBRIC > > Cardiff University > > Park Place > > Cardiff, CF10 3AT > > United Kingdom > > email: sdmuthu at cardiff.ac.uk > > Phone: +44 (0)29 2087 0353 > > > >>>> Cristiano Micheli 09/07/2008 17:02 >>> > > Hi All > > CTF software allows to open a MEG dataset and to apply a theoretical 3rd > > order gradiometers data correction, which makes use of a number of > > coefficients to correct raw data from common mode artifacts. > > Does Fieldtrip take in account this correction as well? > > Where is it coded? > > Regards > > Cristiano > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to > > share experiences and to discuss new ideas for MEG and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Thu Jul 10 14:34:19 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 10 Jul 2008 13:34:19 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <723641289@web.de> Message-ID: Dear Michael, You don't need to wait. You just need to be careful. The version presently available on the FTP server supports reading CTF datasets with denoising. Just see my remarks from the e-mails before. You should specify: cfg.headerformat = 'ctf_new'; cfg.dataformat = 'ctf_new'; for preprocessing and also specify ctf_new in read_data and read_header if you call them directly. The signs that you are using the right reader (from external ctf toolbox) are that there is a disclaimer message appearing every time you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd gradient dataset, you'll see that there is a lot happening on the right side of the matrix related to reference sensors (for the wrong reader you'll just see some straight lines). Then use the data and the grad normally. To be careful I'd suggest you to test your results thoroughly. Try to do the same analysis with 'raw' and 3rd gradient. Also you can try converting with either CTF software or denoise_synthetic and compare the results (for denoise_synthetic to work you must use the new reader). The more people do this kind of tests and report their results, the more confident we'll become of the new code and the sooner Robert will make it default. Good luck, Vladimir On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral wrote: > Dear Vladimir, > > I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: > (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). > (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). > (3) try to use laedfields from CTF for these data, if that's possible. > > Thanks for any suggestions on this issue. > > Best, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 09.07.08 19:34:51 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction > > >> Until the recent improvements (which are not yet default) fieldtrip >> assumed that the data is 'raw'. Therefore source reconstruction was >> not precise for data that was saved in 3rd gradient. The data is >> indeed read as it's saved so for sensor level analysis there is no >> problem. But the leadfields computed using grads read with the old ctf >> reader are only suitable for the 'raw' setting. >> >> Best, >> >> Vladimir >> >> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >> wrote: >> > Hi, >> > as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and >> > doesnt apply any other processing to this >> > You can check what the gradiometer definition of the saved data is in DataEditor. >> > In the Acq software you can pick what type of gradiometers the data is saved as. We usually just >> > save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on >> > (unless you had some reason to undo the 3rd order gradiometers) >> > - Suresh >> > >> > Suresh Muthukumaraswamy, PhD >> > CUBRIC >> > Cardiff University >> > Park Place >> > Cardiff, CF10 3AT >> > United Kingdom >> > email: sdmuthu at cardiff.ac.uk >> > Phone: +44 (0)29 2087 0353 >> > >> >>>> Cristiano Micheli 09/07/2008 17:02 >>> >> > Hi All >> > CTF software allows to open a MEG dataset and to apply a theoretical 3rd >> > order gradiometers data correction, which makes use of a number of >> > coefficients to correct raw data from common mode artifacts. >> > Does Fieldtrip take in account this correction as well? >> > Where is it coded? >> > Regards >> > Cristiano >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to >> > share experiences and to discuss new ideas for MEG and EEG analysis. See also >> > http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From guido.nolte at FIRST.FRAUNHOFER.DE Thu Jul 10 16:52:51 2008 From: guido.nolte at FIRST.FRAUNHOFER.DE (Guido Nolte) Date: Thu, 10 Jul 2008 16:52:51 +0200 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: Guys, some years ago I stumbled over the same problem. I want to add to this discussion that it is quite important to properly include the 3rd-order gradiometer into the lead field. For a phantom experiment with a single dipole the error reduced by about a factor 10 as compared to simply ignoring that and treating the signals as simple gradiometer measurements (if I remember right). Back then I actually asked CTF for the coefficients (which they considered as a weird request (which I considered as weird)), and included that into my own programs. I still have these coefficients. Regards, Guido Vladimir Litvak wrote: > Dear Michael, > > You don't need to wait. You just need to be careful. The version > presently available on the FTP server supports reading CTF datasets > with denoising. Just see my remarks from the e-mails before. You > should specify: > > cfg.headerformat = 'ctf_new'; > cfg.dataformat = 'ctf_new'; > > for preprocessing and also specify ctf_new in read_data and > read_header if you call them directly. > > The signs that you are using the right reader (from external ctf > toolbox) are that there is a disclaimer message appearing every time > you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd > gradient dataset, you'll see that there is a lot happening on the > right side of the matrix related to reference sensors (for the wrong > reader you'll just see some straight lines). > > Then use the data and the grad normally. To be careful I'd suggest you > to test your results thoroughly. Try to do the same analysis with > 'raw' and 3rd gradient. Also you can try converting with either CTF > software or denoise_synthetic and compare the results (for > denoise_synthetic to work you must use the new reader). > > The more people do this kind of tests and report their results, the > more confident we'll become of the new code and the sooner Robert will > make it default. > > Good luck, > > Vladimir > > > On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral > wrote: >> Dear Vladimir, >> >> I understand the problem about leadfields for 3rd gradients and magnetometers to be different. I am just curious now how to best proceed, when the measured data are from a rather noisy inner city environment: >> (1) Go for the raw data and increase the artefact rejection thresholds considerably (as beamforming should not localize artefacts inside the head anyway). >> (2) Wait for a fieldtrip version where leadfield can be computed for 3rd grads (if that's planned at all...). >> (3) try to use laedfields from CTF for these data, if that's possible. >> >> Thanks for any suggestions on this issue. >> >> Best, >> Michael >> >> >>> -----Ursprüngliche Nachricht----- >>> Von: "Vladimir Litvak" >>> Gesendet: 09.07.08 19:34:51 >>> An: FIELDTRIP at NIC.SURFNET.NL >>> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction >> >>> Until the recent improvements (which are not yet default) fieldtrip >>> assumed that the data is 'raw'. Therefore source reconstruction was >>> not precise for data that was saved in 3rd gradient. The data is >>> indeed read as it's saved so for sensor level analysis there is no >>> problem. But the leadfields computed using grads read with the old ctf >>> reader are only suitable for the 'raw' setting. >>> >>> Best, >>> >>> Vladimir >>> >>> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >>> wrote: >>>> Hi, >>>> as far as I am aware fieldtrip reads in whatever gradiometer definition your data is saved as and >>>> doesnt apply any other processing to this >>>> You can check what the gradiometer definition of the saved data is in DataEditor. >>>> In the Acq software you can pick what type of gradiometers the data is saved as. We usually just >>>> save it as 3rd order in the data at the Acq level and you dont have to worry about it from then on >>>> (unless you had some reason to undo the 3rd order gradiometers) >>>> - Suresh >>>> >>>> Suresh Muthukumaraswamy, PhD >>>> CUBRIC >>>> Cardiff University >>>> Park Place >>>> Cardiff, CF10 3AT >>>> United Kingdom >>>> email: sdmuthu at cardiff.ac.uk >>>> Phone: +44 (0)29 2087 0353 >>>> >>>>>>> Cristiano Micheli 09/07/2008 17:02 >>> >>>> Hi All >>>> CTF software allows to open a MEG dataset and to apply a theoretical 3rd >>>> order gradiometers data correction, which makes use of a number of >>>> coefficients to correct raw data from common mode artifacts. >>>> Does Fieldtrip take in account this correction as well? >>>> Where is it coded? >>>> Regards >>>> Cristiano >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to >>>> share experiences and to discuss new ideas for MEG and EEG analysis. See also >>>> http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >>> >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Thu Jul 10 17:13:58 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Thu, 10 Jul 2008 16:13:58 +0100 Subject: CTF 3rd order gradiometers correction In-Reply-To: <48762243.1040804@first.fraunhofer.de> Message-ID: What I understand from Robert is that the coefficients are not fixed. They are at least site-specific if not file-specific. So the new way should really be optimal. Guido, if you can also do some testing and compare with your existing code, that'd be helpful. Best, Vladimir On Thu, Jul 10, 2008 at 3:52 PM, Guido Nolte wrote: > Guys, > some years ago I stumbled over the same problem. > I want to add to this discussion that it is > quite important to properly include the 3rd-order > gradiometer into the lead field. For a phantom > experiment with a single dipole the error reduced by about a factor > 10 as compared to simply ignoring that and treating > the signals as simple gradiometer measurements (if I remember > right). > Back then I actually asked CTF for > the coefficients (which they considered as a weird > request (which I considered as weird)), > and included that into my own programs. > I still have these coefficients. > > Regards, Guido > > > Vladimir Litvak wrote: >> >> Dear Michael, >> >> You don't need to wait. You just need to be careful. The version >> presently available on the FTP server supports reading CTF datasets >> with denoising. Just see my remarks from the e-mails before. You >> should specify: >> >> cfg.headerformat = 'ctf_new'; >> cfg.dataformat = 'ctf_new'; >> >> for preprocessing and also specify ctf_new in read_data and >> read_header if you call them directly. >> >> The signs that you are using the right reader (from external ctf >> toolbox) are that there is a disclaimer message appearing every time >> you read something and if you do imagesc(log(abs(grad.tra))) for a 3rd >> gradient dataset, you'll see that there is a lot happening on the >> right side of the matrix related to reference sensors (for the wrong >> reader you'll just see some straight lines). >> >> Then use the data and the grad normally. To be careful I'd suggest you >> to test your results thoroughly. Try to do the same analysis with >> 'raw' and 3rd gradient. Also you can try converting with either CTF >> software or denoise_synthetic and compare the results (for >> denoise_synthetic to work you must use the new reader). >> >> The more people do this kind of tests and report their results, the >> more confident we'll become of the new code and the sooner Robert will >> make it default. >> >> Good luck, >> >> Vladimir >> >> >> On Thu, Jul 10, 2008 at 1:05 PM, Michael Wibral >> wrote: >>> >>> Dear Vladimir, >>> >>> I understand the problem about leadfields for 3rd gradients and >>> magnetometers to be different. I am just curious now how to best proceed, >>> when the measured data are from a rather noisy inner city environment: >>> (1) Go for the raw data and increase the artefact rejection thresholds >>> considerably (as beamforming should not localize artefacts inside the head >>> anyway). >>> (2) Wait for a fieldtrip version where leadfield can be computed for 3rd >>> grads (if that's planned at all...). >>> (3) try to use laedfields from CTF for these data, if that's possible. >>> >>> Thanks for any suggestions on this issue. >>> >>> Best, >>> Michael >>> >>> >>>> -----Ursprüngliche Nachricht----- >>>> Von: "Vladimir Litvak" >>>> Gesendet: 09.07.08 19:34:51 >>>> An: FIELDTRIP at NIC.SURFNET.NL >>>> Betreff: Re: [FIELDTRIP] CTF 3rd order gradiometers correction >>> >>>> Until the recent improvements (which are not yet default) fieldtrip >>>> assumed that the data is 'raw'. Therefore source reconstruction was >>>> not precise for data that was saved in 3rd gradient. The data is >>>> indeed read as it's saved so for sensor level analysis there is no >>>> problem. But the leadfields computed using grads read with the old ctf >>>> reader are only suitable for the 'raw' setting. >>>> >>>> Best, >>>> >>>> Vladimir >>>> >>>> On Wed, Jul 9, 2008 at 5:32 PM, Suresh Muthukumaraswamy >>>> wrote: >>>>> >>>>> Hi, >>>>> as far as I am aware fieldtrip reads in whatever gradiometer >>>>> definition your data is saved as and >>>>> doesnt apply any other processing to this >>>>> You can check what the gradiometer definition of the saved data is in >>>>> DataEditor. >>>>> In the Acq software you can pick what type of gradiometers the data is >>>>> saved as. We usually just >>>>> save it as 3rd order in the data at the Acq level and you dont have to >>>>> worry about it from then on >>>>> (unless you had some reason to undo the 3rd order gradiometers) >>>>> - Suresh >>>>> >>>>> Suresh Muthukumaraswamy, PhD >>>>> CUBRIC >>>>> Cardiff University >>>>> Park Place >>>>> Cardiff, CF10 3AT >>>>> United Kingdom >>>>> email: sdmuthu at cardiff.ac.uk >>>>> Phone: +44 (0)29 2087 0353 >>>>> >>>>>>>> Cristiano Micheli 09/07/2008 17:02 >>> >>>>> >>>>> Hi All >>>>> CTF software allows to open a MEG dataset and to apply a theoretical >>>>> 3rd >>>>> order gradiometers data correction, which makes use of a number of >>>>> coefficients to correct raw data from common mode artifacts. >>>>> Does Fieldtrip take in account this correction as well? >>>>> Where is it coded? >>>>> Regards >>>>> Cristiano >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of >>>>> the FieldTrip toolbox, to >>>>> share experiences and to discuss new ideas for MEG and EEG analysis. >>>>> See also >>>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>>> http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> ---------------------------------- >>>>> The aim of this list is to facilitate the discussion between users of >>>>> the FieldTrip toolbox, to share experiences and to discuss new ideas for >>>>> MEG and EEG analysis. See also >>>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>>> http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of >>>> the FieldTrip toolbox, to share experiences and to discuss new ideas for >>>> MEG and EEG analysis. See also >>>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>>> http://www.ru.nl/fcdonders/fieldtrip. >>>> >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >>> and EEG analysis. See also >>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>> http://www.ru.nl/fcdonders/fieldtrip. >>> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to 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 fredericroux at HOTMAIL.DE Thu Jul 10 18:19:11 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Thu, 10 Jul 2008 18:19:11 +0200 Subject: No subject Message-ID: Dear Fieldtrippers, It is not really clear to me what exactly the difference is between the stats and the raweffect matrices that I get when performing clusterrandanalysis. Does anyone know what the difference is between these two matrices? Best regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Kostenlos: Die Festplatte im Netz mit 5 GB Speicher! http://skydrive.live.com/?mkt=de-de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Thu Jul 10 18:19:26 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Thu, 10 Jul 2008 18:19:26 +0200 Subject: stats vs raweffect Message-ID: Dear Fieldtrippers, It is not really clear to me what exactly the difference is between the stats and the raweffect matrices that I get when performing clusterrandanalysis. Does anyone know what the difference is between these two matrices? Best regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Neu: Mit Live Search Ihre Stadt in der Vogelperspektive! http://maps.live.de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Jul 10 23:19:32 2008 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 10 Jul 2008 23:19:32 +0200 Subject: No subject In-Reply-To: Message-ID: Frederic, In the .raweffect field, you find the difference between the means in the two conditions that you compare. In the .stats field, you find the (sensor,time)- or (sensor,frequency, time)-specific test statistics that were later thresholded to construct the clusters. Good luck, Eric Maris > -----Oorspronkelijk bericht----- > Van: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] Namens > Frederic Roux > Verzonden: donderdag 10 juli 2008 18:19 > Aan: FIELDTRIP at NIC.SURFNET.NL > Onderwerp: [FIELDTRIP] > > Dear Fieldtrippers, > > It is not really clear to me what exactly the difference is between the stats and the > raweffect matrices that I get when performing clusterrandanalysis. > > Does anyone know what the difference is between these two matrices? > > Best regards, > > Frederic > > > Dipl. Psych. Frederic Roux > > Max Planck Institut für Hirnforschung > Abteilung Neurophysiologie > Deutschordenstr. 46 > 60528 Frankfurt am Main > > Tel.: 069 / 6301 83225 > Mail: fredericroux at hotmail.de > froux at mpih-frankfurt.mpg.de > > _________________________________________________________________ > Kostenlos: Die Festplatte im Netz mit 5 GB Speicher! > http://skydrive.live.com/?mkt=de-de > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Fri Jul 11 09:17:22 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Fri, 11 Jul 2008 09:17:22 +0200 Subject: No subject In-Reply-To: <200807102119.m6ALJUaE027509@smtp20.nijmegen.internl.net> Message-ID: Hi Eric, thank you for replying so fast. Your answer helped me a lot. I have on more question: if I want to see significant differences between conditions I must multiply the raweffect with a significance map? This should look similar to this: plotdata.powspctrm = clusrand.raweffect.*squeeze(clusrand.posclusterlabelmat == 1); Is that correct? Regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _________________________________________________________________ Lustige Emoticons für Ihren Messenger! Hier kostenlos downloaden! http://messenger.live.de/mein/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Jul 11 09:53:29 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 11 Jul 2008 09:53:29 +0200 Subject: No subject In-Reply-To: Message-ID: Hi Frederic, If you use the plotting functions in FieldTrip there are several ways to plot the significant differences between conditions. In the topoplot functions you can highlight the significant sensors (see help topoplot.m). In the multiplot functions you can make use of opacity masking (see help again). Set the data.mask field as cfg.maskparameter. Multiplying the raw effect with the significance map is not recommended if you use the topoplot functions, because interpolation takes place to fill in the space between the channels. Setting channels to zero can create interpolation artifiacts. See also the tutorials on the FieldTrip webpage for more information: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip Plotting clusters: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting#plotting_clusters In the Cluster-based permutation tests tutorial there is also information about plotting the results http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:statistics#2.1_permutation_tests_for_time-locked_databetween-trials_e xperiments Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Frederic Roux Sent: Friday, July 11, 2008 9:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Hi Eric, thank you for replying so fast. Your answer helped me a lot. I have on more question: if I want to see significant differences between conditions I must multiply the raweffect with a significance map? This should look similar to this: plotdata.powspctrm = clusrand.raweffect.*squeeze(clusrand.posclusterlabelmat == 1); Is that correct? Regards, Frederic Dipl. Psych. Frederic Roux Max Planck Institut für Hirnforschung Abteilung Neurophysiologie Deutschordenstr. 46 60528 Frankfurt am Main Tel.: 069 / 6301 83225 Mail: fredericroux at hotmail.de froux at mpih-frankfurt.mpg.de _____ Messenger Online Treff: Spontan chatten, über Hobbies reden, sofort Spass haben? Jetzt klicken! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Fri Jul 11 10:11:10 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 11 Jul 2008 10:11:10 +0200 Subject: CTF 3rd order gradiometers correction In-Reply-To: <723641289@web.de> Message-ID: Hi Michael, On 10 Jul 2008, at 14:05, Michael Wibral wrote: > (1) Go for the raw data and increase the artefact rejection > thresholds considerably (as beamforming should not localize > artefacts inside the head anyway). Beamforming tries to optimally supress the noise. That means that noise will not be perfectly suppressed. If you can use the 3rd order gradient to already reduce the impact that environmental noise has on your data, you'll make it easier for the beamformer to suppress the remaining environmental and physiological noise. With 3rd order gradients switched on, it probably will also be easier to identify physiological artifacts (eye blinks, muscle) and to discard those pieces of data from your analysis. Again, if you can remove noise from the data, the source reconstruction will perform better. > (2) Wait for a fieldtrip version where leadfield can be computed > for 3rd grads (if that's planned at all...). That is what is now possible, although it requires cfg.headerformat='ctf_new', cfg.dataformat='ctf_new' and the ctf p- files (from ftp://ftp.fcdonders.nl/pub/fieldtrip/external). Through the CTF p-files the balancing coefficients are read and stored along with the data. The denoise_synthetic function applies the balancing coefficients to the data _and_ updates the sensor array description so that the balanging will be taken into account during the forward computations. If you want to see how it works: do preprocessing and have a look at data.grad.balance, which contains the details. Then do denoise_snthetic and compare data.grad.tra prior to and after applying the 3rd order synthetic gradient. The grad.tra matrix describes how all individual coils of the MEG system are combined into channels, and in the comparison you can see that for 3rd order data the reference coils are also used, whereas for raw data the reference coils are weighted with zero. > (3) try to use laedfields from CTF for these data, if that's possible. that is not needed, see above. best regards, Robert PS I suggest to make an example matlab page at http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:examples:denoise_synthetic. Feel free to add code and explanation there for other people. PPS I am curious to hear from other people on how using 3rd order gradient influences their results ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From fredericroux at HOTMAIL.DE Mon Jul 14 17:21:13 2008 From: fredericroux at HOTMAIL.DE (Frederic Roux) Date: Mon, 14 Jul 2008 17:21:13 +0200 Subject: Template MRI and missing fiducials Message-ID: Hi everyone, I was wondering if there is some sort of template brain or headmodel that one can use to perform a beamforming analysis of MEG data? Otherwise does someone know if it is possible to perform a sourceanalysis without having recorded fiducials during the anatomical MRI scan? I have the dicom files of all my subjects but I did not record fiducials during the MRI scan. Regards, Frederic _________________________________________________________________ Lustige Emoticons für Ihren Messenger! Hier kostenlos downloaden! http://messenger.live.de/mein/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 16 12:38:10 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 16 Jul 2008 11:38:10 +0100 Subject: Significance of coherence Message-ID: Dear all, Could you point me to the present state of the art method to determine significance of coherence? I'm not talking about comparison between two conditions and not about activation to baseline comparison. Just you have some stationary signals, compute coherence and want to say whether it's real. I suspect there is no ideal solution, but what is the most accepted presently? Can jackknife implemented in freqdescriptives be used for that? Any other suggestions. 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. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Jul 16 12:56:42 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 16 Jul 2008 12:56:42 +0200 Subject: Significance of coherence In-Reply-To: Message-ID: Dear Vladimir, I usually use a shift predictor to test for this (computing coherence between signal A and a shuffled set of trials for signal B: provided both signals are not phase-locked to trial onset). However, this only works well when you are estimating for coherence between non-volume conducted activities. When coherence is estimated between two reconstructed dipoles, the amount of volume conduction is generally too high for this method to make sense. In other words, you will always get "significant" coherence in this case. The other way would be to use the traditional thresholding which is applied for example in Kilner et al 2001 J Neurosci. But this obviously suffers from the same problems as the shift predictor. Jackknifing could also be used with a t-test against 0, but again with the same problem. Yours, Jan-Mathijs On Jul 16, 2008, at 12:38 PM, Vladimir Litvak wrote: > Dear all, > > Could you point me to the present state of the art method to determine > significance of coherence? I'm not talking about comparison between > two conditions and not about activation to baseline comparison. Just > you have some stationary signals, compute coherence and want to say > whether it's real. I suspect there is no ideal solution, but what is > the most accepted presently? Can jackknife implemented in > freqdescriptives be used for that? Any other suggestions. > > 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. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Wed Jul 16 13:44:41 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 16 Jul 2008 12:44:41 +0100 Subject: Significance of coherence In-Reply-To: <93A59937-2451-47E1-997A-0F9FDE26E823@psy.gla.ac.uk> Message-ID: Dear JM, Is there any paper where the issue of shift-predictors for coherence is properly looked at? I've also been using shift-predictors but I started having serious doubts in the case of MAR-based measures. So I thought that for coherence there is something better justified and the distribution under the null is known at least under some assumptions. But if you say that shift-predictor is state of the art, I'll take your word for it since I know you've researched this subject quite well. Thanks, Vladimir On Wed, Jul 16, 2008 at 11:56 AM, jan-mathijs schoffelen wrote: > Dear Vladimir, > > I usually use a shift predictor to test for this (computing coherence > between signal A and a shuffled set of trials for signal B: provided both > signals are not phase-locked to trial onset). > However, this only works well when you are estimating for coherence between > non-volume conducted activities. > When coherence is estimated between two reconstructed dipoles, the amount of > volume conduction is generally too high for this method to make sense. > In other words, you will always get "significant" coherence in this case. > The other way would be to use the traditional thresholding which is applied > for example in Kilner et al 2001 J Neurosci. But this obviously suffers from > the same problems as the > shift predictor. > Jackknifing could also be used with a t-test against 0, but again with the > same problem. > > Yours, > > Jan-Mathijs > > > On Jul 16, 2008, at 12:38 PM, Vladimir Litvak wrote: > >> Dear all, >> >> Could you point me to the present state of the art method to determine >> significance of coherence? I'm not talking about comparison between >> two conditions and not about activation to baseline comparison. Just >> you have some stationary signals, compute coherence and want to say >> whether it's real. I suspect there is no ideal solution, but what is >> the most accepted presently? Can jackknife implemented in >> freqdescriptives be used for that? Any other suggestions. >> >> 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. 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 tomh at KURAGE.NIMH.NIH.GOV Wed Jul 16 14:08:03 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Wed, 16 Jul 2008 08:08:03 -0400 Subject: CTF 3rd order gradiometers correction In-Reply-To: Message-ID: On Thu, 2008-07-10 at 16:13 +0100, Vladimir Litvak wrote: > What I understand from Robert is that the coefficients are not fixed. > They are at least site-specific if not file-specific. So the new way > should really be optimal. Guido, if you can also do some testing and > compare with your existing code, that'd be helpful. Yes, the 3rd gradient balancing coefficients are site specific (well, machine specific). However they are stored in every dataset, so if you have a dataset, you have the correct coefficients. dsinfo displays them, you want the G3BR coefficients. -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Wed Jul 16 14:17:09 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Wed, 16 Jul 2008 08:17:09 -0400 Subject: Template MRI and missing fiducials In-Reply-To: Message-ID: > Otherwise does someone know if it is possible to perform a > sourceanalysis without having recorded fiducials during the anatomical > MRI scan? > I have the dicom files of all my subjects but I did not record > fiducials during the MRI scan. You can read the MRI into AFNI, and mark the fiducials; just estimate them (assuming your MRI has the nasion and ears, if not you're out of luck). You can be off by a few mm, it doesn't matter since one usually doesn't do source estimation at a resolution higher than 5 mm or so. It's not just a matter of co-registration, you also need the brain to make the forward model (if you're using CTF, you'll make a multisphere model; see the brainhull page here: http://kurage.nimh.nih.gov/meglab/Meg/Brainhull -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 17 08:44:08 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 17 Jul 2008 08:44:08 +0200 Subject: Template MRI and missing fiducials In-Reply-To: Message-ID: Hi Frederic On 14 Jul 2008, at 17:21, Frederic Roux wrote: > I was wondering if there is some sort of template brain or > headmodel that one can use to perform a beamforming analysis of MEG > data? In principle you could use one anatomical MRI for anmother subject. But I would recomment to use individual MRIs if you have them. > Otherwise does someone know if it is possible to perform a > sourceanalysis without having recorded fiducials during the > anatomical MRI scan? > I have the dicom files of all my subjects but I did not record > fiducials during the MRI scan. The position of the coils during the MEG measurement needs to be marked in the MRI, otherwise it is not possible to localize the activity during the MEG measurements onto the anatomical MRI. Furthermore, as Tom pointed out, you need it to align the head model (volume conduction model of the head) with the sensor positions. In FieldTrip you can use the VOLUMEREALIGN function to specify the fiducials. And you can use the PREPARE_LOCALSPHERES or PRERARE_SINGLESHELL functions to make the head model. The only tricky part is to read the anatomical MRI into Matlab without mixing up left and right in the MRI. The READ_FCDC_MRI function can read dicom files, but that is not 100% foolproof, so please check the output of that function carefully (and use Matlab flipdim and permute functions). best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 17 16:49:21 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 17 Jul 2008 16:49:21 +0200 Subject: denoise_synthetic Message-ID: Dear all, I just noticed that it was possible to do denoise_synthetic (i.e. apply 3rd order gradients to CTF data) without all required channels being present in the data. It requires the MEG channels and the reference channels to be both present in the preprocessed data. If you have beein doing cfg.channel=MEG in preprocessing and then denoise_synthetic, then the data will not be correct 3rd order gradients. If you have been doing cfg.channel=all, then denoise_synthetic will have done its job correct (I hope). I have now added an explicit check on the presence of the required channels, so now it will give an error if the reference channels are missing. best regards, Robert PS the update will be available this evening on the ftp ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From michael.wibral at WEB.DE Thu Jul 17 17:16:26 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Thu, 17 Jul 2008 17:16:26 +0200 Subject: denoise_synthetic Message-ID: Dear Robert, I have a question regarding the use of the new preprocessing function and denoise synthetic: If the ctf data are saved in 3rd gradient mode - will preprocessing and denoise_synthetic treat this correctly? I.e. will these functions not perform any (unnecessary/wrong) computation and simply update the relevant information fields in the data structure? Or do I have to save the ctf data in raw format and then let fieldtrip do the rest? Sorry if this question is somehow redundant. Just wanted to be sure. Many thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 17.07.08 17:07:06 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] denoise_synthetic > Dear all, > > I just noticed that it was possible to do denoise_synthetic (i.e. > apply 3rd order gradients to CTF data) without all required channels > being present in the data. It requires the MEG channels and the > reference channels to be both present in the preprocessed data. > > If you have beein doing cfg.channel=MEG in preprocessing and then > denoise_synthetic, then the data will not be correct 3rd order > gradients. If you have been doing cfg.channel=all, then > denoise_synthetic will have done its job correct (I hope). I have now > added an explicit check on the presence of the required channels, so > now it will give an error if the reference channels are missing. > > best regards, > Robert > > PS the update will be available this evening on the ftp > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From matthew.tata at ULETH.CA Thu Jul 17 20:34:43 2008 From: matthew.tata at ULETH.CA (Matt Tata) Date: Thu, 17 Jul 2008 20:34:43 +0200 Subject: bwlabelnmex !? Message-ID: Hello, I'm trying to use freqstatistics() on some TFC data imported from BESA. I'm getting this series of errors and I can't figure them out. I have the source file bwlabelnmex.cpp in my matlab\toolbox\images\images\private folder, but nothing else. I do have the signal processing and image processing toolboxes installed (perhaps not correctly?). Any suggestions? Thank you. Matt Tata ??? Undefined function or method 'bwlabelnmex' for input arguments of type 'double'. Error in ==> bwlabeln at 56 [L,num] = bwlabelnmex(A,conn); Error in ==> fieldtrip-20080521\private\clusterstat at 178 posclusobs = bwlabeln(tmp, conndef(length(cfg.dim),'min')); Error in ==> fieldtrip-20080521\private\statistics_montecarlo at 392 [stat, cfg] = clusterstat(cfg, statrand, statobs); Error in ==> fieldtrip-20080521\private\statistics_wrapper at 272 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> freqstatistics at 132 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> TF_Stats at 101 stat = freqstatistics(cfg, blgw{:}, blgl{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Fri Jul 18 18:41:19 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 18 Jul 2008 18:41:19 +0200 Subject: denoise_synthetic In-Reply-To: <729978737@web.de> Message-ID: Dear Michael I think you can also read in ctf data that are saved in 3rd gradient mode without any problems. If you look in data.grad.balance.current it should then be G3BR after preprocessing. When we were testing, one of the things we did was compare 3rd order data made by DataEditor with 3rd order data made by FieldTrip. That looked fine. But again, it's not tested thoroughly yet. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Wibral Sent: Thursday, July 17, 2008 5:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] denoise_synthetic Dear Robert, I have a question regarding the use of the new preprocessing function and denoise synthetic: If the ctf data are saved in 3rd gradient mode - will preprocessing and denoise_synthetic treat this correctly? I.e. will these functions not perform any (unnecessary/wrong) computation and simply update the relevant information fields in the data structure? Or do I have to save the ctf data in raw format and then let fieldtrip do the rest? Sorry if this question is somehow redundant. Just wanted to be sure. Many thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Robert Oostenveld" > Gesendet: 17.07.08 17:07:06 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] denoise_synthetic > Dear all, > > I just noticed that it was possible to do denoise_synthetic (i.e. > apply 3rd order gradients to CTF data) without all required channels > being present in the data. It requires the MEG channels and the > reference channels to be both present in the preprocessed data. > > If you have beein doing cfg.channel=MEG in preprocessing and then > denoise_synthetic, then the data will not be correct 3rd order > gradients. If you have been doing cfg.channel=all, then > denoise_synthetic will have done its job correct (I hope). I have now > added an explicit check on the presence of the required channels, so > now it will give an error if the reference channels are missing. > > best regards, > Robert > > PS the update will be available this evening on the ftp > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Mon Jul 21 20:06:19 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Mon, 21 Jul 2008 20:06:19 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread Message-ID: Dear Robert and all Fieldtrip users, I've encountered an issue with read_ctf_res4.m, that causes unexpected behavior in some operations. For instance, when I tried to check events from a dataset: cfg = []; cfg.channel = {'MEG'}; cfg.dataset = dataset; cfg.trialdef.eventtype = '?'; cfg = definetrial(cfg); evaluating trialfunction 'trialfun_general' no events were found in the datafile no trials have been defined yet, see DEFINETRIAL for further help found 0 events created 0 trials In fact, there are 1260 events in this dataset. I think that this problem is due to a change in fread's behaviour: as nowadays characters are not always 8-bit wide, we are supposed to use 'uint8' instead of 'char'. This change has been responsible for some nasty problems, including this one. As of 20080720 version of Fieldtrip, the snapshot still showed this behavior. Herewith I am attaching a correction of read_ctf_res4.m. Hope that some of you who have had similar problem might find it helpful. Best regards, Erick ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: read_ctf_res4.m URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jul 24 09:29:52 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 24 Jul 2008 09:29:52 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread In-Reply-To: <4884D01B.3010606@med.uni-tuebingen.de> Message-ID: Hi Erick Thanks for the suggested change. I have incoroprated it and it will be included in tonights release version on the ftp. The char/int8 problem had been reported before, but I have never seen it happen myself on any of the computers that I have been working with. Do you think that it might be related to particular language settings on the computer that you are using? Since it not always occuring to me seems to indicate that Matlab sometimes wants to use 8 bit and sometimes 16 bit wide characters. Actually there is a lot of reading code for other (non ctf) formats that also uses fread(...'char'). That code should also be affected with the bug, which means that I should make the suggested change everywhere where chars are read. best regards, Robert On 21 Jul 2008, at 20:06, Erick Britis Ortiz wrote: > I think that this problem is due to a change in fread's behaviour: > as nowadays characters are not always 8-bit wide, we are supposed > to use 'uint8' instead of 'char'. This change has been responsible > for some nasty problems, including this one. > > As of 20080720 version of Fieldtrip, the snapshot still showed this > behavior. Herewith I am attaching a correction of read_ctf_res4.m. > Hope that some of you who have had similar problem might find it > helpful. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 24 09:40:46 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 24 Jul 2008 09:40:46 +0200 Subject: bwlabelnmex !? In-Reply-To: Message-ID: Hi Matt The bwlabeln function is used for clustering and is part of the Matlab image processing toolbox. On my computer I have >> which bwlabeln C:\Program Files\MATLAB\R2006b\toolbox\images\images\bwlabeln.m and if I subsequently look into the details, then there is a C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.cpp C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.mexw32 C:\Program Files\MATLAB\R2006b\toolbox\images\images\private \bwlabeln.csf Actually, there is a whole bunch of cpp and mexw32 files in that directory. In older Matlab version the windows mex files would have the extension *.dll. Do you have a bwlabeln.dll file, or any other mexw32 or dll files in that private directory? If not, then your Matlab installation is not correct. I don't know whether it is possible to recompile the mex files in the images/private directory, but if you have problems there, it might very well be that also on other locations in your matlab toolbox tree the mex files would be missing. If that is the case, I would just reinstall Matlab and not try to compile all Mathworks mex files. best regards, Robert On 17 Jul 2008, at 20:34, Matt Tata wrote: > I'm trying to use freqstatistics() on some TFC data imported from > BESA. I'm > getting this series of errors and I can't figure them out. I have the > source file bwlabelnmex.cpp in my matlab\toolbox\images\images\private > folder, but nothing else. I do have the signal processing and image > processing toolboxes installed (perhaps not correctly?). Any > suggestions? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Erick.Ortiz at MED.UNI-TUEBINGEN.DE Fri Jul 25 19:38:15 2008 From: Erick.Ortiz at MED.UNI-TUEBINGEN.DE (Erick Britis Ortiz) Date: Fri, 25 Jul 2008 19:38:15 +0200 Subject: issue with read_ctf_res4.m: use of uinit8 and char in fread In-Reply-To: <83778C31-572C-4A44-B424-99EA62972FD0@fcdonders.ru.nl> Message-ID: Dear Robert, Here is the configuration of the systems were the issue was observed: - Linux: MATLAB 7.5.0 (R2007b) System language: German (LANG=de_DE.UTF-8) - Windows XP: MATLAB 7.0.1 (R14) System language: Brazilian Portuguese It turns out, it had to do with two things. First, on reproducing it, I noticed another change that is necessary to tackle the issue: long ago, I included the channel UDIO001 in read_ctf_trigger.m, what I thought was a "my-system-only" change. But without it, it still finds 0 events, confirmed both in Linux and Windows. I am sending my read_ctf_trigger.m for reviewing also. In the Windows machine, this was enough to solve the problem. Second, the language settings: I looked up which encoding was used when a file is opened by using: [filename, permission, machineformat, encoding] = fopen(fid) And the values returned were 'UTF-8' in the Linux machine and an empty string in the Windows one. Changing the LANG to de_DE on Linux gave me the value 'ISO-8859-1' for encoding, but the problem was only solved when I replaced read_ctf_trigger.m. Finally, changing char to uint8 in read_ctf_res4.m made it robust against locale changes. Maybe the issue has not been noticed before because it is inside a try-catch block (in fact, some layers of try-catch to get to fread), so usually it fails silently. I noticed some odd behaviour on file handling since I started to use Fieldtrip, but it took some time to get to the exact point and I do not know to which extent using another trigger channel would prevent the problem from happening. Additionally, MATLAB changed the file handling in a recent version, so it might happen that people using older versions also do not see it. Best regards, Erick Robert Oostenveld wrote: > Hi Erick > > Thanks for the suggested change. I have incoroprated it and it will be > included in tonights release version on the ftp. > > The char/int8 problem had been reported before, but I have never seen it > happen myself on any of the computers that I have been working with. Do > you think that it might be related to particular language settings on > the computer that you are using? Since it not always occuring to me > seems to indicate that Matlab sometimes wants to use 8 bit and sometimes > 16 bit wide characters. > > Actually there is a lot of reading code for other (non ctf) formats that > also uses fread(...'char'). That code should also be affected with the > bug, which means that I should make the suggested change everywhere > where chars are read. > > best regards, > Robert > > > On 21 Jul 2008, at 20:06, Erick Britis Ortiz wrote: > >> I think that this problem is due to a change in fread's behaviour: as >> nowadays characters are not always 8-bit wide, we are supposed to use >> 'uint8' instead of 'char'. This change has been responsible for some >> nasty problems, including this one. >> >> As of 20080720 version of Fieldtrip, the snapshot still showed this >> behavior. Herewith I am attaching a correction of read_ctf_res4.m. >> Hope that some of you who have had similar problem might find it helpful. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: read_ctf_trigger.m URL: From wibral at BIC.UNI-FRANKFURT.DE Thu Jul 31 18:11:28 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 31 Jul 2008 18:11:28 +0200 Subject: Logical problem with CTF 3rd order gradiometers correction Message-ID: Dear listusers, I have a logical problem with denoise-synthetic. here's what I want to do: 1. use definetrial to make cfg.trl (works fine) 2. use preprocessing with the new cfg. headerfile='ctf_new' , cfg.datafile='ctf_new' options to read the reference gradiometer information and the data into a fieldtrip structure (works fine) 3. use denoise_synthetic to denoise the data (works fine ?) 4. un artefact detection on these data (-> this works fine and updates cfg.trl) 5. run preprocessing a second time for filtering and actually applying the results of artefact corrcetion,... i.e. those things that I didn't want to do before denoise_synthetic. BUT preprocessing complains that cfg shouldn't contain the cfg.trl field when no data are read - which is the case because I am invoking preprocessing a second time here on an existing fieldtrip structure. Therefore all information from artefact rejection is lost. Somehow it seems that I can run denoise_synthetic only after artefact rejection, because I need a fieldtrip dataset to run it, but NO dataset for preprocessing to perform artefact correction, i.e. accept cfg.trl. This would be a pity. Any suggestion how to solve this? Many Thanks, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Thu Jul 31 22:55:01 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 31 Jul 2008 22:55:01 +0200 Subject: Logical problem with CTF 3rd order gradiometers correction In-Reply-To: <741246283@web.de> Message-ID: Hi Michael On 31 Jul 2008, at 18:11, Michael Wibral wrote: > Dear listusers, > I have a logical problem with denoise-synthetic. > > here's what I want to do: > > 1. use definetrial to make cfg.trl (works fine) > 2. use preprocessing with the new cfg. headerfile='ctf_new' , > cfg.datafile='ctf_new' options to read the reference gradiometer > information and the data into a fieldtrip structure (works fine) > 3. use denoise_synthetic to denoise the data (works fine ?) In the (sofar limited) experiences that I heard there are noticeable differences mainly on the central/vertex sensors (which are also the closest to the reference sensors). > 4. un artefact detection on these data (-> this works fine and > updates cfg.trl) after artifact_xxx and rejectartifact you should read the data using preprocessing. Or are you using rejectvisual? If so, then you don't have to call preprocessing a second time, because the output of rejectvisual is again your data with the bad trials removed. > 5. run preprocessing a second time for filtering and actually > applying the results of artefact corrcetion,... i.e. those things > that I didn't want to do before denoise_synthetic. After rejectartifact, you should be calling it here like preprocessing (cfg), and not with a second input argument. If you call it like preprocessing(cfg, data), then the cfg should not contain cfg.dataset and cfg.trl but only filtering options, because the data should not be read from file. > BUT preprocessing complains that cfg shouldn't contain the cfg.trl > field when no data are read - which is the case because I am > invoking preprocessing a second time here on an existing fieldtrip > structure. I suspect that you are mixing up rejectartifact and preprocessing. Calling preprocessing with a 2nd data input argument is only meant to apply another set of filters on that data (i.e. if you forgot to do it in the first run, or if you sequentially want to bandstopfilter some line noise or CRT artifacts). > Therefore all information from artefact rejection is lost. > > Somehow it seems that I can run denoise_synthetic only after > artefact rejection, because I need a fieldtrip dataset to run it, > but NO dataset for preprocessing to perform artefact correction, > i.e. accept cfg.trl. This would be a pity. I must say that I had not considered sofar the interaction between denoising and artifact detectoin and removal. The artfifact_xxx functions perform detection on data from disk(*), i.e. prior to reading the data into memory. The historical reason for (*) is to save on memory when a lot of filter padding is used and when there is a lot of overlap between padded trials. The padded regions should be checked for artifacts (esp jump artifacts which cause a lot of filter rinning), but in the end we don't need them in memory. The denoising only happens after the data is read into memory. > Any suggestion how to solve this? For the moment I suggest to use the following sequence definetrial preprocessing denoise_synthetic rejectvisual and not use artifact_xxx combined with rejectartifact. We are revising the automatic artifact detection functions at the moment, since computers nowadays have much more RAM than when we started implementing it 5 years ago, and reading the padded data into memory is now much less of a concern. So in the near future, it will be possible to do autodetection of artifacts also on data that is in memory, which means that then you could also do the autodetection after denoise_synthetic. 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.