From daria.osipova at FCDONDERS.RU.NL Tue Dec 4 14:25:40 2007 From: daria.osipova at FCDONDERS.RU.NL (Daria Osipova) Date: Tue, 4 Dec 2007 14:25:40 +0100 Subject: combineplanar for 275-ch CTF data Message-ID: Hi I am trying to analyze 275-channel data but having trouble with combineplanar. I want to calculate planar gradient for posterior channels only (86 channels) and here's my configuration: cfg = []; cfg.channel = channelselection({'MLO', 'MRO', 'MRP', 'MLP', 'MZP', 'MZO'}, data.label); cfg.planarmethod = 'sincos'; data_planar = megplanar(cfg, data); comb =combineplanar([], data_planar); data_planar.label contains 361 channels i.e. it includes 86*2=172 channels for which planar gradient has been calculated and the rest of the channels in the original non-planar form. When I use combineplanar, I get 322 channels some of which are the orginal non-planar channels, some are the result of the combined planar gradient and some are not combined planar gradient. I suspect this has something to do with checking for the layout (151 or 275 channels) since the same scheme seems to work ok for the old 151 -channel dataset. Thanks in advance. Bests, Dasha ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Tue Dec 4 14:44:35 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 4 Dec 2007 14:44:35 +0100 Subject: combineplanar for 275-ch CTF data In-Reply-To: <413a38c83f8dd.47556364@ru.nl> Message-ID: Dear Dasha, In order to compute the planar gradient of the magnetic field at the position of a given axial gradiometer, you always have to take the axial gradient of the magnetic field, measured by a bunch of neighbouring gradiometers, into account. I guess that the order in which you want to do things does not make sense in this context. First, you select a subset of sensors, and then you transform to the planar gradient. I would call megplanar without the subset of channels, and only select the subset of channels after having called combineplanar. Yours, Jan-Mathijs On Dec 4, 2007, at 2:25 PM, Daria Osipova wrote: > Hi > I am trying to analyze 275-channel data but having trouble with > combineplanar. I want to calculate planar gradient for posterior > channels only (86 channels) and here's my configuration: > cfg = []; > cfg.channel = channelselection({'MLO', 'MRO', 'MRP', 'MLP', 'MZP', > 'MZO'}, data.label); > cfg.planarmethod = 'sincos'; > data_planar = megplanar(cfg, data); > comb =combineplanar([], data_planar); > > data_planar.label contains 361 channels i.e. it includes 86*2=172 > channels for which planar gradient has been calculated and the rest > of the channels in the original non-planar form. > > When I use combineplanar, I get 322 channels some of which are the > orginal non-planar channels, some are the result of the combined > planar gradient and some are not combined planar gradient. > I suspect this has something to do with checking for the layout > (151 or 275 channels) since the same scheme seems to work ok for > the old 151 -channel dataset. > Thanks in advance. > Bests, Dasha > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Thu Dec 6 20:08:13 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 6 Dec 2007 14:08:13 -0500 Subject: clusterandanalysis on two dataset with different number oc channels Message-ID: Hello, I am processing my data to ready it for non parametric statistical testing. Since one or two channels when bad during different trials, I am faced with the prospect of comparing two datasets with diffeent number of channels (between trials comparison). I would like to know if this is expected to cause problems (my guess is it will). thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Dec 6 21:17:24 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 6 Dec 2007 21:17:24 +0100 Subject: clusterandanalysis on two dataset with different number oc channels In-Reply-To: Message-ID: Hi Sameer, > I am processing my data to ready it for non parametric statistical > testing. Since one or two channels when bad during different trials, I am > faced with the prospect of comparing two datasets with diffeent number of > channels (between trials comparison). I would like to know if this is > expected to cause problems (my guess is it will). I don't expect that this will cause problems. Let me know if it does. Greetings, Eric Maris > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jsgonzal at ING.UCHILE.CL Sat Dec 8 05:10:26 2007 From: jsgonzal at ING.UCHILE.CL (Sebastian Gonzalez) Date: Sat, 8 Dec 2007 01:10:26 -0300 Subject: Parallel Fieldtrip Message-ID: Hi, I was wandering if it is possible or is already done, to use intel TBB to build mex files to use in filedtrip. ("It is a library that helps you take advantage of multi-core processor performance without having to be a threading expert." from http://threadingbuildingblocks.org/ ) If it's done, I would like to know how, and if is not, I would like to try to rewrite some functions using TBB. Best regards, Sebastian Gonzalez ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Dec 11 09:56:30 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 11 Dec 2007 09:56:30 +0100 Subject: Parallel Fieldtrip In-Reply-To: <20071208011026.wmo2tev2io8c8k84@correo.cec.uchile.cl> Message-ID: On 8 Dec 2007, at 5:10, Sebastian Gonzalez wrote: > I was wandering if it is possible or is already done, to use intel > TBB to build mex files to use in filedtrip. ("It is a library that > helps you take advantage of multi-core processor performance > without having to be a threading expert." from http:// > threadingbuildingblocks.org/ ) > > If it's done, I would like to know how, and if is not, I would like > to try to rewrite some functions using TBB. Hi Sebastian In the past there has been some parallelism geared toward running FieldTrip on a linux cluster (see http://oase.uci.ru.nl/~roberto/ index.php/mentat), but that was too difficult to maintain and therefore I removed it. Recently I evaluated StarP (http:// www.interactivesupercomputing.com) and the Distributed Computing Toolbox+Engine (http://www.mathworks.com/products/distribtb/). StarP was not suitable because of not supporting the Matlab toolboxes on the "computing engines", and the DCT was not optimal because of the relatively slow data transport protocol between the master node and the engines. I will continue looking into DCT to see whether it can be tweaked to prevent the data transport between cluster nodes being the bottleneck. Your sugegstion of using multithreading in a mex file is new to me. FieldTrip comes with 8 mex files, most of them related to forward computation. That means that speeding these mex files up will only impact the sourceanalysis and dipolefitting function. For sourceanalysis (which uses a fixed and pre-defined dipole grid), the prepare_leadfield function is already a good way of speeding up the computations. Although I like the idea, I doubt whether working on those 8 mex files will result in a noticeable speed increase. But that of course depends a lot on the exact nature of the computations that you do a lot. Let me give a list of functions and what they are involved in: * meg_leadfield1.mexa64 This one is used for MEG forward modelling using single and local- spheres models. * lmoutr.mexa64 * ptriproj.mexa64 * routlm.mexa64 * solid_angle.mexa64 These are used for forward computation in the BEM-EEG case, but only in the preparatory phase (i.e. not while iterating over dipole positions). They are also used for determining which dipoles are inside the head of a volume conduction model (which is done for almost all forward computation methods, but also only once). After one call to prepare_leadfield and these functions would not be used any more in the sourceanalysis function. * plgndr.mexa64 This is used for 3 and 4-sphere EEG forward computation, and will be called on each iteration in dipolefitting. * read_24bit.mexa64 This is for reading BDF files. * splint_gh.mexa64 This is for computing the EEG surface laplacian. The source code of these mex files is included in the fieldtrip release version (private/mex directory). I presume that you are aware of the Matlab profiler: that will give you a good overview of the time spent in these mex files, compared to teh time spent in other parts of the code. Subtracting the time spent in the mex files from the total time gives you the maximum speed increase that can be achieved by optimizing the mex files (i.e. if 20% of the time would be spent in a mex file, then speeding up that mex file to infinitely fast would result in 0% time spent in that mex file, but you would still spend the 80% of the time in the other parts of the code). I am curious to see how much it can be sped up. best regards, Robert PS I am also not aware of people having tried to speed up the standard Matlab BLAS computations as explained here http:// www.mathworks.com/support/solutions/data/1-34HE9M.html. It would also be interesting to see how muct that might help. PS ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Dec 13 12:10:58 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 13 Dec 2007 12:10:58 +0100 Subject: virtual electrodes in fieldtrip Message-ID: Dear Christine, I forward your question to the rest of the mailing-list, so that other people can participate in the discussion as well. > I saw in the fieldtrip-mailinglist that you had been working on > virtualelectrodes; since I'm trying to do this analysis with > fieldtrip, I would be > glad if you could give me some advice on how to implement the > analysis best. > It seemed that you had found a good solution using SAM weights > files created > in CTF and reading them in into fieldtrip. Is there a way to create > theweights directly in fieldtrip? Yes, it is possible to do it in fieldtrip. If you are planning to do a 'SAM'-like analysis, the lcvm-beamformer is the thing you should use. The weights are outputted in the output of sourceanalysis, when you specify cfg.keepfilter = 'yes'; > I'm using the dics beamforming > method right > now but I think you proposed to use lcmv instead and use timelock > data as > input? Is there a routine for this type of analysis? Please let me > know if > you any idea on this! It completely depends on what you exactly want to do, whether you should use DICS, or the time-domain lcmv-beamformer (DICS is just the frequency domain analogue of the traditional 'lcmv'-beamformer). If it is your purpose to create TFRs on virtual channels (such as what is facilitated by the CTF-software in the context of a SAM-analysis) you should use 'lcmv' as a method in your sourceanalysis. There is no ready-made script which concatenates all the analysis steps, but I would approach it as follows: Perform timelockanalysis on your data, because you have to compute the sensor-level covariance for a particular time-window of interest. This might also involve some bandpass-filtering of the data. Then perform sourceanalysis (using the result of timelockanalysis), and specify the locations of your virtual channel(s) in cfg.grid.pos, and cfg.keepfilter='yes'. The output of sourceanalysis will contain the filter weights in source.avg.filter, and the virtual channel data in source.avg.mom. However, this will be the average across all trials. If you would want to effectively compute the single-trial virtual channel data, you can easily recover this by pre-multiplying the single trial representations, as present in your timelocked data-structure: source.avg.filter{x}*squeeze(timelock.trial(y,:,:)) Good luck, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Tue Dec 18 13:43:10 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Tue, 18 Dec 2007 13:43:10 +0100 Subject: PhD student position in cognitive neuroscience Message-ID: An HTML attachment was scrubbed... URL: From soren.r.christensen at GSK.COM Tue Dec 18 14:03:35 2007 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Tue, 18 Dec 2007 13:03:35 +0000 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 15-Dec-2007 and will not return until 02-Jan-2008. Back 2nd Jan 2008 ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From linpe at NINDS.NIH.GOV Tue Dec 18 19:33:16 2007 From: linpe at NINDS.NIH.GOV (Peter Lin) Date: Tue, 18 Dec 2007 19:33:16 +0100 Subject: corticomuscular coherence demo Message-ID: > I was trying the corticomuscular coherence demo off of fieldtrip. Not > sure how to implement the trial_left_fun function. I created the cfg > using the initial few instructiosn in the documentation. But when I > get to meg = preprocessing(cfg), matlab asked for a DEFINETRIAL > prestep. > Not sure how what steps to take to load the dataset using trial script > at the appendix. > > Thanks, > > Peter > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Wed Dec 19 09:19:39 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 19 Dec 2007 09:19:39 +0100 Subject: corticomuscular coherence demo In-Reply-To: Message-ID: Hi Peter, I don't know if you already went through the preprocessing tutorials. These give useful background on how you go from the raw data, to a fieldtrip data-structure. The "trialfun_left" in the appendix is a snippet of code, which you could copy and paste into your editor. If you save it as trialfun_left.m, and the file's location is in your matlab-path, this function will be called by definetrial, in order to identify the begin and endsamples of the relevant pieces of data. Yours, Jan-Mathijs On Dec 18, 2007, at 7:33 PM, Peter Lin wrote: >> I was trying the corticomuscular coherence demo off of fieldtrip. >> Not >> sure how to implement the trial_left_fun function. I created the cfg >> using the initial few instructiosn in the documentation. But when I >> get to meg = preprocessing(cfg), matlab asked for a DEFINETRIAL >> prestep. >> Not sure how what steps to take to load the dataset using trial >> script >> at the appendix. >> >> Thanks, >> >> Peter >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Wed Dec 19 22:49:47 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 19 Dec 2007 21:49:47 +0000 Subject: 3 post doc positions at ccni glasgow Message-ID: 2 Postdoctoral Research Assistants (Level 7) / Postdoctoral Research Fellow (Level 8) ESRC/MRC project “Social Interactions: A Cognitive Neurosciences Approach” The project will investigate (1) the immediate processing of social signals from the voice, face and bodily movement, (2) how such signals support interactive alignment of social behaviours (associated with pupil dilation, blinking, yawning etc.), and, (3) the mechanisms that underlie joint attention and action. The project will also produce a substantial database of parameterised social signals from body, voice and face. 1. Applications are invited for a Research Assistant to work with Professor Simon Garrod. The successful candidate will contribute to the design, running and analysis of behavioural experiments investigating alignment of autonomic social signals (e.g., blinking, yawning, pupil dilation). The candidate would also be expected to become familiar with brain imaging techniques (such as fMRI, MEG and EEG) with a view to refining some of the designs for subsequent neuro- imaging studies. This post is available from 1 January 2008, funding is available for up to three years in the first instance. You will be qualified, with a PhD in psychology, cognitive neuroscience or a related discipline. You will also have experience of running cognitive and other behavioural studies. Limited experience with brain imaging techniques will be in your favour and you will have good programming skills, particularly with MATLAB. You should also have a strong interest in pursuing a research career. Informal enquiries may be made to Professor Simon Garrod (+44 (0)141 330 5033) email: simon at psy.gla.ac.uk . 2. Applications are invited for a Research Fellow to work with Professors Philippe Schyns. The successful candidate will be responsible for managing the Social Signals Database. This will involve measuring, rendering and organising the Social Signal Database which consists of dynamic face, body and voice stimuli acquired in a large sample of the population. It will also involve responsibility for the supervision, mentoring and coaching of less experienced research staff and graduate students in the subject area. You will be qualified, with a PhD, or equivalent, in computing science or a related discipline. You will also have experience in acquisition and rendering of dynamic 3D Audio and Video data, in writing system and user documentation for the software and in the development and maintenance of databases. You should also have excellent skills in project management. Finally, you should have a strong interest in pursuing a research career. Informal enquiries may be made to Professor P Schyns, (+44 (0)141 330 4937); e-mail p.schyns at psy.gla.ac.uk 3. Applications are invited for a Research Assistant to work with Professors Philippe Schyns. The successful candidate will work on the Social Signal Database. This will involve measuring, rendering and organising social signals which consist of dynamic face, body and voice stimuli acquired in a large sample of the population. You will be qualified, with a PhD, or equivalent, in computing science or a related discipline. You will also have experience in acquisition and rendering of dynamic 3D Audio and Video data, in writing system and user documentation for the software and in the development and maintenance of databases. Finally, you should have a strong interest in pursuing a research career. Informal enquiries may be made to Professor P Schyns, (+44 (0)141 330 4937); e-mail p.schyns at psy.gla.ac.uk These posts are available from 1 January 2008 for either 3 or 4 years, however, continuation of the grant is dependent on a successful report after year 2. For further details about all three posts, please contact Heather Robertson, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0) 141 330 6173, email h.robertson at psy.gla.ac.uk For an application pack, please see our website at: http:// www.gla.ac.uk/jobs/vacancies/researchandteaching Specific job descriptions for each role can be viewed at: 1. Ref: 13806/DPO/A3 (Research Assistant) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13806ra/#d.en. 56276 2. Ref: 13890/DPO/A3 (Research Fellow) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13890ra/#d.en. 56280 3. Ref: 13889/DPO/A3 (Research Assistant) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13889ra/#d.en. 56277 Completed applications comprising of: applicant information form, three copies of covering letter, C.V. (including list of publications and names) and contact details of two referees, should be submitted by post to: Heather Robertson, Department of Psychology,University of Glasgow, G12 8QQ. We regret that we cannot accept applications by email. Closing date: Tuesday 8th January 2008 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 kenton.hokanson at POMONA.EDU Tue Dec 25 21:06:34 2007 From: kenton.hokanson at POMONA.EDU (Kenton Hokanson) Date: Tue, 25 Dec 2007 12:06:34 -0800 Subject: Importing .acq dataformat Message-ID: Hi everyone, Sorry, this is a rather basic yet lengthy question, but I've been working on my own for some time and am totally stumped. If there exists a more appropriate way to get an answer to this question than to email the entire list, please let me know; otherwise, please forgive my inexperience! I'm trying to use FieldTrip to analyze EEG data recorded using BioPac's "AcqKnowledge" data acquisition program (data files are saved with extension .acq). This is not a FieldTrip-compatible format, but using the FT FAQ ( http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat) I found the following information for importing my dataformat. "Alternatively, if you already are able to read the data into Matlab, you can reformat that data within Matlab into a datastructure that is compatible with FieldTrip. Raw data that is comparable with the output of preprocessing should consist of a structure with the fields data.label % cell-array containing strings, Nchan X 1 data.fsample % sampling frequency in Hz, single number data.trial % cell-array containing a data matrix for each trial (1 X Ntrial), each data matrix is Nchan X Nsamples data.time % cell-array containing a time axis for each trial (1 X Ntrial), each time axis is a 1 X Nsamples vector" I'm able to save my data file as a single MATLAB matrix of dimensions NSamples x NChannels (20073x10). Using my knowledge of the timestamps of events within the data file, I divided it up into two trials. Each trial is 4001 samples long, and there are six channels that I want to analyze, so I've pasted that data into smaller matrices (Trial1 and Trial2) each with dimensions 6 x 4001. Having done this, I input the following: data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} data.fsample = 1000 data.trial = {Trial1 Trial2} data.time = {1:4001 1:4001} Here's the output those commands generate: data = label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} fsample: 1000 trial: {[6x4001 double] [6x4001 double]} time: {[1x4001 double] [1x4001 double]} It would seem to me that I have created the datastructure defined on the FAQ site. However, the structure doesn't appear to be usable for anything (my guess is that a cfg structure is also necessary, but I haven't found how to create one that is functionally identical to the output of preprocessing, define_trials, any of the read_xxx programs from fileio)...I don't know where to begin! I'd very much appreciate any help I could get. Thanks, very happy holidays. Best, Kenton Hokanson ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 jan.schoffelen at FCDONDERS.RU.NL Thu Dec 27 14:32:12 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 27 Dec 2007 14:32:12 +0100 Subject: Importing .acq dataformat Message-ID: Dear Kenton, It seems to me as if you're almost there. Good work. I can imagine that fieldtrip crashes when it finds a cfg-field missing in the data-structure. You can bypass this by specifying data.cfg = [ ]; This should do the trick. The cfg of the previous fieldtrip-step is stored in the output of many of the high-level fieldtrip-functions (such as preprocessing, freqanalysis, sourceanalysis) in order to keep track of the entire pipeline of analysis (provided you stay within fieldtrip for your entire analysis). However, it is not an essential field in the data-structure for subsequent steps (despite the fact that it apparently causes some unwanted crashes). Yours, Jan-Mathijs ----- Original Message ----- From: Kenton Hokanson Date: Tuesday, December 25, 2007 9:06 pm Subject: [FIELDTRIP] Importing .acq dataformat > Hi everyone, > > Sorry, this is a rather basic yet lengthy question, but I've been > working on > my own for some time and am totally stumped. If there exists a more > appropriate way to get an answer to this question than to email the > entirelist, please let me know; otherwise, please forgive my > inexperience!I'm trying to use FieldTrip to analyze EEG data > recorded using BioPac's > "AcqKnowledge" data acquisition program (data files are saved with > extension.acq). This is not a FieldTrip-compatible format, but > using the FT FAQ ( > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat) I > found the following information for importing my dataformat. > > "Alternatively, if you already are able to read the data into > Matlab, you > can reformat that data within Matlab into a datastructure that is > compatiblewith FieldTrip. Raw data that is comparable with the > output of preprocessing > should consist of a structure with the fields > > data.label % cell-array containing strings, Nchan X 1 > data.fsample % sampling frequency in Hz, single number > data.trial % cell-array containing a data matrix for each trial > (1 X > Ntrial), each data matrix is Nchan X Nsamples > data.time % cell-array containing a time axis for each trial (1 X > Ntrial), each time axis is a 1 X Nsamples vector" > > I'm able to save my data file as a single MATLAB matrix of dimensions > NSamples x NChannels (20073x10). Using my knowledge of the > timestamps of > events within the data file, I divided it up into two trials. Each > trial is > 4001 samples long, and there are six channels that I want to > analyze, so > I've pasted that data into smaller matrices (Trial1 and Trial2) > each with > dimensions 6 x 4001. Having done this, I input the following: > > data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} > data.fsample = 1000 > data.trial = {Trial1 Trial2} > data.time = {1:4001 1:4001} > > Here's the output those commands generate: > > data = > > label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' > 'EEG_C4'} fsample: 1000 > trial: {[6x4001 double] [6x4001 double]} > time: {[1x4001 double] [1x4001 double]} > > It would seem to me that I have created the datastructure defined > on the FAQ > site. However, the structure doesn't appear to be usable for > anything (my > guess is that a cfg structure is also necessary, but I haven't > found how to > create one that is functionally identical to the output of > preprocessing,define_trials, any of the read_xxx programs from > fileio)...I don't know > where to begin! I'd very much appreciate any help I could get. > Thanks,very happy holidays. > > Best, > Kenton Hokanson > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Sun Dec 30 10:49:26 2007 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Sun, 30 Dec 2007 09:49:26 -0000 Subject: Importing .acq dataformat In-Reply-To: <50106df10712281525r41ff99f1la5a3721056cc9a75@mail.gmail.com> Message-ID: Hi Kenton, There is no need to initialize a matrix with 21 columns if you only have 6 channels. You can only have 6 columns and if the labels are correct, Fieldtrip will know how to handle it. To do what you want you might find the following functions useful. 1) data2raw(), raw2data() (they are in fieldtrip/private subdirectory so to use them you need to change the name ‘private’ to something else, like ‘private1’ and add it to your path). With these functions you can convert a raw struct with cell arrays to a timelock-like struct with a multidimensional array that is much easier to handle. You can then manipulate it any way you want and convert the result back to raw if necessary. 2) appenddata() That might be even simpler. You just create a new raw struct with the additional channels and then append it to your first struct. Don’t be so sure that if your source is in ACC the best way to go about localizing it would be to put a lot of electrodes in the front of the head. Since it’s a deep source that would be hard to localize anyway and probably projects strongly to the whole scalp you would need good coverage of the whole head and in particular lower half of the head, which is not usually covered in standard montages, but more people now realize that it should be. You might find additional useful tips in Clin Neurophysiol. 2004 Oct;115(10):2195-222. EEG source imaging. Michel et al. When you feel more confident with Matlab, Fieldtrip and your data perhaps you could contribute back to the community by implementing a reader for your data format in the standard conforming to Fieldtrip fileio module HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:development :fileio"http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:deve lopment:fileio . This will be helpful for anyone who wants to read the .acq format into Fieldtrip and also other packages that also use this module. Good luck, Vladimir -----Original Message----- From: kentonhokanson at gmail.com [mailto:kentonhokanson at gmail.com] On Behalf Of Kenton Hokanson Sent: Friday, December 28, 2007 11:26 PM To: Vladimir Litvak Subject: Re: [FIELDTRIP] Importing .acq dataformat Hi Vladimir, Thanks a lot for all the advice and the other options. Following them up has been very informative. I've spent some time working through the MATLAB help file and the tutorials, and things are working well through topoplotER.m. More importantly, we're going to try to add some electrodes. We're interested mainly in one component which we believe will come from the ACC, so we'll focus on frontal electrodes and see how good we can get. I appreciate your candor through all this. If I could impose on you with one last question, I'd be grateful for a bit of help - The script I've put together to convert our data file into trial matrices looks like the following, where the trialK structure reads the trial start (.KS) and end (.KE) samples from an excel file, and they're then used to define the range of cells which are imported from the data file (data_all) and put into channels in the trial matrix. So, for trial 1, I start with T1 (a matrix of zeros, 4001samples x 21channels), then paste the six data channels (starting at the trialK.KS(1) start-point until the trialK.KE(1) end-point) into their appropriate columns according to the EEG1020.LAY file, then transpose the matrix to form the trial matrix and clear the matrix used to create it. This process repeats for each trial. It works fine, but if I were to change anything (for example, to add more channels), I would have to insert that line, with its appropriate trial number, in each of the 200 trials. I was wondering if there was a way to condense this, perhaps by changing the trial number (N wherever it appears in the form (N) or TN) to be defined by each cell in a vector I defined or by creating some sort of index in a cell array. I've thought about it, but I'm stumped again and would appreciate any streamlining advice. trialK.KS = xlsread('C:\Documents and Settings\Kenton Hokanson\Desktop\JESS_ALLTRIALS_XLS.xls', 1, 'E2:E82'); trialK.KE = xlsread('C:\Documents and Settings\Kenton Hokanson\Desktop\JESS_ALLTRIALS_XLS.xls', 1, 'F2:F82'); T1 = []; T1(1:4001,1:21) = 0; %Set all channels in EEG1020.LAY to zero T1(1:4001,5)=data_all(trialK.KS(1):trialK.KE(1),5); %F3 T1(1:4001,6)=data_all(trialK.KS(1):trialK.KE(1),6); %Fz T1(1:4001,7)=data_all( trialK.KS(1):trialK.KE(1),7); %F4 T1(1:4001,10)=data_all(trialK.KS(1):trialK.KE(1),4); %C3 T1(1:4001,11)=data_all(trialK.KS(1):trialK.KE(1),3); %Cz T1(1:4001,12)=data_all(trialK.KS(1):trialK.KE(1),8); %C4 TrialT1 = T1'; clear T1 T2 = []; T2(1:4001,1:21) = 0; T2(1:4001,5)=data_all(trialK.KS(2):trialK.KE(2),5); T2(1:4001,6)=data_all(trialK.KS(2):trialK.KE(2),6); T2(1:4001,7)=data_all(trialK.KS(2):trialK.KE(2),7); T2(1:4001,10)=data_all(trialK.KS(2):trialK.KE(2),4); T2(1:4001,11)=data_all(trialK.KS(2):trialK.KE(2),3); T2(1:4001,12)=data_all(trialK.KS(2):trialK.KE(2),8); TrialT2 = T2'; clear T2 ... Thanks again, Vladimir, and I'll certainly understand if you don't have time to address this. All the best, Kenton On Dec 25, 2007 3:24 PM, Vladimir Litvak < HYPERLINK "mailto:v.litvak at ion.ucl.ac.uk"v.litvak at ion.ucl.ac.uk> wrote: If all you have are 6 channels, you shouldn't waste your time. To get a meaningful localization you would need at least 18 and even then it'd be quite imprecise. What you should understand is that Fieldtrip has no GUI so you shouldn't expect any fancy windows to open or something magical happen with your data. Most functions require inputs so dragging them to the command line won't do much. Your second attempt is closer to the truth. It'll probably even work if you start with cfg=[]; So the bottom line is if you don't have more channels, just drop it. Even if you do, perhaps you should consider alternatives to Fieldtrip that will be simpler for you to use. BESA (HYPERLINK "http://www.besa.de/" \nwww.besa.de) is nice software that does source localization and has extensive GUI, but it's quite expensive. You can also look at EEGLAB (Google it). This is a free package which is simpler to use than Fieldtrip, but it only does source localization in very specific context that might not be suitable for you. If you are determined to stick with Fieldtrip, you should master basic Matlab programming and do the relevant tutorials from Fieldtrip website. I'm afraid there are no shortcuts here. The simplest way to get started is take one of the tutorial scripts and adapt it to your needs. But for this you should understand what you are doing. For timelockanalysis see if the empty cfg works and then look in the header of timelockanalysis.m for different options you can put in the cfg and go from there. You can look at HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentati on:tutorial:eventrelatedaveraging" \nhttp://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentat ion:tutorial:eventrelatedaveraging starting with 'Averaging the time-locked data'. Good luck, Vladimir -----Original Message----- From: HYPERLINK "mailto:kentonhokanson at gmail.com" \nkentonhokanson at gmail.com [mailto:HYPERLINK "mailto:kentonhokanson at gmail.com" \nkentonhokanson at gmail.com] On Behalf Of Kenton Hokanson Sent: Tuesday, December 25, 2007 10:06 PM To: Vladimir Litvak Subject: Re: [FIELDTRIP] Importing .acq dataformat Hi, Vladimir, My ultimate goal would be source localization. The two trials come from a data file of about 150 trials, which are all four second windows where the sample at 2.001 seconds is a stimulus. When we average the trials, soon after the stimulus there is a clear and reliable deflection; we would like to localize the source of the deflection. The software package we're using (AcqKnowledge) can filter, average, etc, but has no localization program. So, having set up the data structure, I would think my next step should be the TIMELOCKANLYSIS program. I'm such a novice, though, I haven't figured out the proper way to run it at all, and each of my attempts generates a new error message. Graphically dragging the program into the command window generates >> run('C:\Program Files\MATLAB71\work\fieldtrip-lite-20071210\fieldtrip-lite-20071210\time lockanalysis.m') ??? Error using ==> run Input argument "data" is undefined. while entering the function listed at the top of the program ([timelock] = timelockanalysis(cfg, data)) results in ??? Undefined function or variable 'cfg'. How far off base am I? Thanks so much for the reply, it's a relief to have a chance to actually make some progress. Best, Kenton On Dec 25, 2007 1:27 PM, Vladimir Litvak wrote: Hi, I'd drop the EEG_ part in the labels, but other then that your struct seems OK. The question it what is it you are trying to do and what do you mean by 'doesn't appear to be usable for anything' ? Best, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:HYPERLINK "mailto:FIELDTRIP at NIC.SURFNET.NL" \nFIELDTRIP at NIC.SURFNET.NL] On Behalf Of Kenton Hokanson Sent: Tuesday, December 25, 2007 8:07 PM To: HYPERLINK "mailto:FIELDTRIP at NIC.SURFNET.NL" \nFIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Importing .acq dataformat Hi everyone, Sorry, this is a rather basic yet lengthy question, but I've been working on my own for some time and am totally stumped. If there exists a more appropriate way to get an answer to this question than to email the entire list, please let me know; otherwise, please forgive my inexperience! I'm trying to use FieldTrip to analyze EEG data recorded using BioPac's "AcqKnowledge" data acquisition program (data files are saved with extension .acq). This is not a FieldTrip-compatible format, but using the FT FAQ ( HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat" \nhttp://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat ) I found the following information for importing my dataformat. "Alternatively, if you already are able to read the data into Matlab, you can reformat that data within Matlab into a datastructure that is compatible with FieldTrip. Raw data that is comparable with the output of preprocessing should consist of a structure with the fields data.label % cell-array containing strings, Nchan X 1 data.fsample % sampling frequency in Hz, single number data.trial % cell-array containing a data matrix for each trial (1 X Ntrial), each data matrix is Nchan X Nsamples data.time % cell-array containing a time axis for each trial (1 X Ntrial), each time axis is a 1 X Nsamples vector" I'm able to save my data file as a single MATLAB matrix of dimensions NSamples x NChannels (20073x10). Using my knowledge of the timestamps of events within the data file, I divided it up into two trials. Each trial is 4001 samples long, and there are six channels that I want to analyze, so I've pasted that data into smaller matrices (Trial1 and Trial2) each with dimensions 6 x 4001. Having done this, I input the following: data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} data.fsample = 1000 data.trial = {Trial1 Trial2} data.time = {1:4001 1:4001} Here's the output those commands generate: data = label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} fsample: 1000 trial: {[6x4001 double] [6x4001 double]} time: {[1x4001 double] [1x4001 double]} It would seem to me that I have created the datastructure defined on the FAQ site. However, the structure doesn't appear to be usable for anything (my guess is that a cfg structure is also necessary, but I haven't found how to create one that is functionally identical to the output of preprocessing, define_trials, any of the read_xxx programs from fileio)...I don't know where to begin! I'd very much appreciate any help I could get. Thanks, very happy holidays. Best, Kenton Hokanson ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. HYPERLINK "http://listserv.surfnet.nl/archives/fieldtrip.html" \nhttp://listserv.surfnet.nl/archives/fieldtrip.html HYPERLINK "http://www.ru.nl/fcdonders/fieldtrip/" \nhttp://www.ru.nl/fcdonders/fieldtrip/ No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 daria.osipova at FCDONDERS.RU.NL Tue Dec 4 14:25:40 2007 From: daria.osipova at FCDONDERS.RU.NL (Daria Osipova) Date: Tue, 4 Dec 2007 14:25:40 +0100 Subject: combineplanar for 275-ch CTF data Message-ID: Hi I am trying to analyze 275-channel data but having trouble with combineplanar. I want to calculate planar gradient for posterior channels only (86 channels) and here's my configuration: cfg = []; cfg.channel = channelselection({'MLO', 'MRO', 'MRP', 'MLP', 'MZP', 'MZO'}, data.label); cfg.planarmethod = 'sincos'; data_planar = megplanar(cfg, data); comb =combineplanar([], data_planar); data_planar.label contains 361 channels i.e. it includes 86*2=172 channels for which planar gradient has been calculated and the rest of the channels in the original non-planar form. When I use combineplanar, I get 322 channels some of which are the orginal non-planar channels, some are the result of the combined planar gradient and some are not combined planar gradient. I suspect this has something to do with checking for the layout (151 or 275 channels) since the same scheme seems to work ok for the old 151 -channel dataset. Thanks in advance. Bests, Dasha ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Tue Dec 4 14:44:35 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 4 Dec 2007 14:44:35 +0100 Subject: combineplanar for 275-ch CTF data In-Reply-To: <413a38c83f8dd.47556364@ru.nl> Message-ID: Dear Dasha, In order to compute the planar gradient of the magnetic field at the position of a given axial gradiometer, you always have to take the axial gradient of the magnetic field, measured by a bunch of neighbouring gradiometers, into account. I guess that the order in which you want to do things does not make sense in this context. First, you select a subset of sensors, and then you transform to the planar gradient. I would call megplanar without the subset of channels, and only select the subset of channels after having called combineplanar. Yours, Jan-Mathijs On Dec 4, 2007, at 2:25 PM, Daria Osipova wrote: > Hi > I am trying to analyze 275-channel data but having trouble with > combineplanar. I want to calculate planar gradient for posterior > channels only (86 channels) and here's my configuration: > cfg = []; > cfg.channel = channelselection({'MLO', 'MRO', 'MRP', 'MLP', 'MZP', > 'MZO'}, data.label); > cfg.planarmethod = 'sincos'; > data_planar = megplanar(cfg, data); > comb =combineplanar([], data_planar); > > data_planar.label contains 361 channels i.e. it includes 86*2=172 > channels for which planar gradient has been calculated and the rest > of the channels in the original non-planar form. > > When I use combineplanar, I get 322 channels some of which are the > orginal non-planar channels, some are the result of the combined > planar gradient and some are not combined planar gradient. > I suspect this has something to do with checking for the layout > (151 or 275 channels) since the same scheme seems to work ok for > the old 151 -channel dataset. > Thanks in advance. > Bests, Dasha > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Thu Dec 6 20:08:13 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 6 Dec 2007 14:08:13 -0500 Subject: clusterandanalysis on two dataset with different number oc channels Message-ID: Hello, I am processing my data to ready it for non parametric statistical testing. Since one or two channels when bad during different trials, I am faced with the prospect of comparing two datasets with diffeent number of channels (between trials comparison). I would like to know if this is expected to cause problems (my guess is it will). thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Dec 6 21:17:24 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 6 Dec 2007 21:17:24 +0100 Subject: clusterandanalysis on two dataset with different number oc channels In-Reply-To: Message-ID: Hi Sameer, > I am processing my data to ready it for non parametric statistical > testing. Since one or two channels when bad during different trials, I am > faced with the prospect of comparing two datasets with diffeent number of > channels (between trials comparison). I would like to know if this is > expected to cause problems (my guess is it will). I don't expect that this will cause problems. Let me know if it does. Greetings, Eric Maris > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jsgonzal at ING.UCHILE.CL Sat Dec 8 05:10:26 2007 From: jsgonzal at ING.UCHILE.CL (Sebastian Gonzalez) Date: Sat, 8 Dec 2007 01:10:26 -0300 Subject: Parallel Fieldtrip Message-ID: Hi, I was wandering if it is possible or is already done, to use intel TBB to build mex files to use in filedtrip. ("It is a library that helps you take advantage of multi-core processor performance without having to be a threading expert." from http://threadingbuildingblocks.org/ ) If it's done, I would like to know how, and if is not, I would like to try to rewrite some functions using TBB. Best regards, Sebastian Gonzalez ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Dec 11 09:56:30 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 11 Dec 2007 09:56:30 +0100 Subject: Parallel Fieldtrip In-Reply-To: <20071208011026.wmo2tev2io8c8k84@correo.cec.uchile.cl> Message-ID: On 8 Dec 2007, at 5:10, Sebastian Gonzalez wrote: > I was wandering if it is possible or is already done, to use intel > TBB to build mex files to use in filedtrip. ("It is a library that > helps you take advantage of multi-core processor performance > without having to be a threading expert." from http:// > threadingbuildingblocks.org/ ) > > If it's done, I would like to know how, and if is not, I would like > to try to rewrite some functions using TBB. Hi Sebastian In the past there has been some parallelism geared toward running FieldTrip on a linux cluster (see http://oase.uci.ru.nl/~roberto/ index.php/mentat), but that was too difficult to maintain and therefore I removed it. Recently I evaluated StarP (http:// www.interactivesupercomputing.com) and the Distributed Computing Toolbox+Engine (http://www.mathworks.com/products/distribtb/). StarP was not suitable because of not supporting the Matlab toolboxes on the "computing engines", and the DCT was not optimal because of the relatively slow data transport protocol between the master node and the engines. I will continue looking into DCT to see whether it can be tweaked to prevent the data transport between cluster nodes being the bottleneck. Your sugegstion of using multithreading in a mex file is new to me. FieldTrip comes with 8 mex files, most of them related to forward computation. That means that speeding these mex files up will only impact the sourceanalysis and dipolefitting function. For sourceanalysis (which uses a fixed and pre-defined dipole grid), the prepare_leadfield function is already a good way of speeding up the computations. Although I like the idea, I doubt whether working on those 8 mex files will result in a noticeable speed increase. But that of course depends a lot on the exact nature of the computations that you do a lot. Let me give a list of functions and what they are involved in: * meg_leadfield1.mexa64 This one is used for MEG forward modelling using single and local- spheres models. * lmoutr.mexa64 * ptriproj.mexa64 * routlm.mexa64 * solid_angle.mexa64 These are used for forward computation in the BEM-EEG case, but only in the preparatory phase (i.e. not while iterating over dipole positions). They are also used for determining which dipoles are inside the head of a volume conduction model (which is done for almost all forward computation methods, but also only once). After one call to prepare_leadfield and these functions would not be used any more in the sourceanalysis function. * plgndr.mexa64 This is used for 3 and 4-sphere EEG forward computation, and will be called on each iteration in dipolefitting. * read_24bit.mexa64 This is for reading BDF files. * splint_gh.mexa64 This is for computing the EEG surface laplacian. The source code of these mex files is included in the fieldtrip release version (private/mex directory). I presume that you are aware of the Matlab profiler: that will give you a good overview of the time spent in these mex files, compared to teh time spent in other parts of the code. Subtracting the time spent in the mex files from the total time gives you the maximum speed increase that can be achieved by optimizing the mex files (i.e. if 20% of the time would be spent in a mex file, then speeding up that mex file to infinitely fast would result in 0% time spent in that mex file, but you would still spend the 80% of the time in the other parts of the code). I am curious to see how much it can be sped up. best regards, Robert PS I am also not aware of people having tried to speed up the standard Matlab BLAS computations as explained here http:// www.mathworks.com/support/solutions/data/1-34HE9M.html. It would also be interesting to see how muct that might help. PS ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Dec 13 12:10:58 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 13 Dec 2007 12:10:58 +0100 Subject: virtual electrodes in fieldtrip Message-ID: Dear Christine, I forward your question to the rest of the mailing-list, so that other people can participate in the discussion as well. > I saw in the fieldtrip-mailinglist that you had been working on > virtualelectrodes; since I'm trying to do this analysis with > fieldtrip, I would be > glad if you could give me some advice on how to implement the > analysis best. > It seemed that you had found a good solution using SAM weights > files created > in CTF and reading them in into fieldtrip. Is there a way to create > theweights directly in fieldtrip? Yes, it is possible to do it in fieldtrip. If you are planning to do a 'SAM'-like analysis, the lcvm-beamformer is the thing you should use. The weights are outputted in the output of sourceanalysis, when you specify cfg.keepfilter = 'yes'; > I'm using the dics beamforming > method right > now but I think you proposed to use lcmv instead and use timelock > data as > input? Is there a routine for this type of analysis? Please let me > know if > you any idea on this! It completely depends on what you exactly want to do, whether you should use DICS, or the time-domain lcmv-beamformer (DICS is just the frequency domain analogue of the traditional 'lcmv'-beamformer). If it is your purpose to create TFRs on virtual channels (such as what is facilitated by the CTF-software in the context of a SAM-analysis) you should use 'lcmv' as a method in your sourceanalysis. There is no ready-made script which concatenates all the analysis steps, but I would approach it as follows: Perform timelockanalysis on your data, because you have to compute the sensor-level covariance for a particular time-window of interest. This might also involve some bandpass-filtering of the data. Then perform sourceanalysis (using the result of timelockanalysis), and specify the locations of your virtual channel(s) in cfg.grid.pos, and cfg.keepfilter='yes'. The output of sourceanalysis will contain the filter weights in source.avg.filter, and the virtual channel data in source.avg.mom. However, this will be the average across all trials. If you would want to effectively compute the single-trial virtual channel data, you can easily recover this by pre-multiplying the single trial representations, as present in your timelocked data-structure: source.avg.filter{x}*squeeze(timelock.trial(y,:,:)) Good luck, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Tue Dec 18 13:43:10 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Tue, 18 Dec 2007 13:43:10 +0100 Subject: PhD student position in cognitive neuroscience Message-ID: An HTML attachment was scrubbed... URL: From soren.r.christensen at GSK.COM Tue Dec 18 14:03:35 2007 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Tue, 18 Dec 2007 13:03:35 +0000 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 15-Dec-2007 and will not return until 02-Jan-2008. Back 2nd Jan 2008 ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From linpe at NINDS.NIH.GOV Tue Dec 18 19:33:16 2007 From: linpe at NINDS.NIH.GOV (Peter Lin) Date: Tue, 18 Dec 2007 19:33:16 +0100 Subject: corticomuscular coherence demo Message-ID: > I was trying the corticomuscular coherence demo off of fieldtrip. Not > sure how to implement the trial_left_fun function. I created the cfg > using the initial few instructiosn in the documentation. But when I > get to meg = preprocessing(cfg), matlab asked for a DEFINETRIAL > prestep. > Not sure how what steps to take to load the dataset using trial script > at the appendix. > > Thanks, > > Peter > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Wed Dec 19 09:19:39 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 19 Dec 2007 09:19:39 +0100 Subject: corticomuscular coherence demo In-Reply-To: Message-ID: Hi Peter, I don't know if you already went through the preprocessing tutorials. These give useful background on how you go from the raw data, to a fieldtrip data-structure. The "trialfun_left" in the appendix is a snippet of code, which you could copy and paste into your editor. If you save it as trialfun_left.m, and the file's location is in your matlab-path, this function will be called by definetrial, in order to identify the begin and endsamples of the relevant pieces of data. Yours, Jan-Mathijs On Dec 18, 2007, at 7:33 PM, Peter Lin wrote: >> I was trying the corticomuscular coherence demo off of fieldtrip. >> Not >> sure how to implement the trial_left_fun function. I created the cfg >> using the initial few instructiosn in the documentation. But when I >> get to meg = preprocessing(cfg), matlab asked for a DEFINETRIAL >> prestep. >> Not sure how what steps to take to load the dataset using trial >> script >> at the appendix. >> >> Thanks, >> >> Peter >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Wed Dec 19 22:49:47 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 19 Dec 2007 21:49:47 +0000 Subject: 3 post doc positions at ccni glasgow Message-ID: 2 Postdoctoral Research Assistants (Level 7) / Postdoctoral Research Fellow (Level 8) ESRC/MRC project “Social Interactions: A Cognitive Neurosciences Approach” The project will investigate (1) the immediate processing of social signals from the voice, face and bodily movement, (2) how such signals support interactive alignment of social behaviours (associated with pupil dilation, blinking, yawning etc.), and, (3) the mechanisms that underlie joint attention and action. The project will also produce a substantial database of parameterised social signals from body, voice and face. 1. Applications are invited for a Research Assistant to work with Professor Simon Garrod. The successful candidate will contribute to the design, running and analysis of behavioural experiments investigating alignment of autonomic social signals (e.g., blinking, yawning, pupil dilation). The candidate would also be expected to become familiar with brain imaging techniques (such as fMRI, MEG and EEG) with a view to refining some of the designs for subsequent neuro- imaging studies. This post is available from 1 January 2008, funding is available for up to three years in the first instance. You will be qualified, with a PhD in psychology, cognitive neuroscience or a related discipline. You will also have experience of running cognitive and other behavioural studies. Limited experience with brain imaging techniques will be in your favour and you will have good programming skills, particularly with MATLAB. You should also have a strong interest in pursuing a research career. Informal enquiries may be made to Professor Simon Garrod (+44 (0)141 330 5033) email: simon at psy.gla.ac.uk . 2. Applications are invited for a Research Fellow to work with Professors Philippe Schyns. The successful candidate will be responsible for managing the Social Signals Database. This will involve measuring, rendering and organising the Social Signal Database which consists of dynamic face, body and voice stimuli acquired in a large sample of the population. It will also involve responsibility for the supervision, mentoring and coaching of less experienced research staff and graduate students in the subject area. You will be qualified, with a PhD, or equivalent, in computing science or a related discipline. You will also have experience in acquisition and rendering of dynamic 3D Audio and Video data, in writing system and user documentation for the software and in the development and maintenance of databases. You should also have excellent skills in project management. Finally, you should have a strong interest in pursuing a research career. Informal enquiries may be made to Professor P Schyns, (+44 (0)141 330 4937); e-mail p.schyns at psy.gla.ac.uk 3. Applications are invited for a Research Assistant to work with Professors Philippe Schyns. The successful candidate will work on the Social Signal Database. This will involve measuring, rendering and organising social signals which consist of dynamic face, body and voice stimuli acquired in a large sample of the population. You will be qualified, with a PhD, or equivalent, in computing science or a related discipline. You will also have experience in acquisition and rendering of dynamic 3D Audio and Video data, in writing system and user documentation for the software and in the development and maintenance of databases. Finally, you should have a strong interest in pursuing a research career. Informal enquiries may be made to Professor P Schyns, (+44 (0)141 330 4937); e-mail p.schyns at psy.gla.ac.uk These posts are available from 1 January 2008 for either 3 or 4 years, however, continuation of the grant is dependent on a successful report after year 2. For further details about all three posts, please contact Heather Robertson, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0) 141 330 6173, email h.robertson at psy.gla.ac.uk For an application pack, please see our website at: http:// www.gla.ac.uk/jobs/vacancies/researchandteaching Specific job descriptions for each role can be viewed at: 1. Ref: 13806/DPO/A3 (Research Assistant) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13806ra/#d.en. 56276 2. Ref: 13890/DPO/A3 (Research Fellow) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13890ra/#d.en. 56280 3. Ref: 13889/DPO/A3 (Research Assistant) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13889ra/#d.en. 56277 Completed applications comprising of: applicant information form, three copies of covering letter, C.V. (including list of publications and names) and contact details of two referees, should be submitted by post to: Heather Robertson, Department of Psychology,University of Glasgow, G12 8QQ. We regret that we cannot accept applications by email. Closing date: Tuesday 8th January 2008 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 kenton.hokanson at POMONA.EDU Tue Dec 25 21:06:34 2007 From: kenton.hokanson at POMONA.EDU (Kenton Hokanson) Date: Tue, 25 Dec 2007 12:06:34 -0800 Subject: Importing .acq dataformat Message-ID: Hi everyone, Sorry, this is a rather basic yet lengthy question, but I've been working on my own for some time and am totally stumped. If there exists a more appropriate way to get an answer to this question than to email the entire list, please let me know; otherwise, please forgive my inexperience! I'm trying to use FieldTrip to analyze EEG data recorded using BioPac's "AcqKnowledge" data acquisition program (data files are saved with extension .acq). This is not a FieldTrip-compatible format, but using the FT FAQ ( http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat) I found the following information for importing my dataformat. "Alternatively, if you already are able to read the data into Matlab, you can reformat that data within Matlab into a datastructure that is compatible with FieldTrip. Raw data that is comparable with the output of preprocessing should consist of a structure with the fields data.label % cell-array containing strings, Nchan X 1 data.fsample % sampling frequency in Hz, single number data.trial % cell-array containing a data matrix for each trial (1 X Ntrial), each data matrix is Nchan X Nsamples data.time % cell-array containing a time axis for each trial (1 X Ntrial), each time axis is a 1 X Nsamples vector" I'm able to save my data file as a single MATLAB matrix of dimensions NSamples x NChannels (20073x10). Using my knowledge of the timestamps of events within the data file, I divided it up into two trials. Each trial is 4001 samples long, and there are six channels that I want to analyze, so I've pasted that data into smaller matrices (Trial1 and Trial2) each with dimensions 6 x 4001. Having done this, I input the following: data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} data.fsample = 1000 data.trial = {Trial1 Trial2} data.time = {1:4001 1:4001} Here's the output those commands generate: data = label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} fsample: 1000 trial: {[6x4001 double] [6x4001 double]} time: {[1x4001 double] [1x4001 double]} It would seem to me that I have created the datastructure defined on the FAQ site. However, the structure doesn't appear to be usable for anything (my guess is that a cfg structure is also necessary, but I haven't found how to create one that is functionally identical to the output of preprocessing, define_trials, any of the read_xxx programs from fileio)...I don't know where to begin! I'd very much appreciate any help I could get. Thanks, very happy holidays. Best, Kenton Hokanson ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 jan.schoffelen at FCDONDERS.RU.NL Thu Dec 27 14:32:12 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 27 Dec 2007 14:32:12 +0100 Subject: Importing .acq dataformat Message-ID: Dear Kenton, It seems to me as if you're almost there. Good work. I can imagine that fieldtrip crashes when it finds a cfg-field missing in the data-structure. You can bypass this by specifying data.cfg = [ ]; This should do the trick. The cfg of the previous fieldtrip-step is stored in the output of many of the high-level fieldtrip-functions (such as preprocessing, freqanalysis, sourceanalysis) in order to keep track of the entire pipeline of analysis (provided you stay within fieldtrip for your entire analysis). However, it is not an essential field in the data-structure for subsequent steps (despite the fact that it apparently causes some unwanted crashes). Yours, Jan-Mathijs ----- Original Message ----- From: Kenton Hokanson Date: Tuesday, December 25, 2007 9:06 pm Subject: [FIELDTRIP] Importing .acq dataformat > Hi everyone, > > Sorry, this is a rather basic yet lengthy question, but I've been > working on > my own for some time and am totally stumped. If there exists a more > appropriate way to get an answer to this question than to email the > entirelist, please let me know; otherwise, please forgive my > inexperience!I'm trying to use FieldTrip to analyze EEG data > recorded using BioPac's > "AcqKnowledge" data acquisition program (data files are saved with > extension.acq). This is not a FieldTrip-compatible format, but > using the FT FAQ ( > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat) I > found the following information for importing my dataformat. > > "Alternatively, if you already are able to read the data into > Matlab, you > can reformat that data within Matlab into a datastructure that is > compatiblewith FieldTrip. Raw data that is comparable with the > output of preprocessing > should consist of a structure with the fields > > data.label % cell-array containing strings, Nchan X 1 > data.fsample % sampling frequency in Hz, single number > data.trial % cell-array containing a data matrix for each trial > (1 X > Ntrial), each data matrix is Nchan X Nsamples > data.time % cell-array containing a time axis for each trial (1 X > Ntrial), each time axis is a 1 X Nsamples vector" > > I'm able to save my data file as a single MATLAB matrix of dimensions > NSamples x NChannels (20073x10). Using my knowledge of the > timestamps of > events within the data file, I divided it up into two trials. Each > trial is > 4001 samples long, and there are six channels that I want to > analyze, so > I've pasted that data into smaller matrices (Trial1 and Trial2) > each with > dimensions 6 x 4001. Having done this, I input the following: > > data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} > data.fsample = 1000 > data.trial = {Trial1 Trial2} > data.time = {1:4001 1:4001} > > Here's the output those commands generate: > > data = > > label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' > 'EEG_C4'} fsample: 1000 > trial: {[6x4001 double] [6x4001 double]} > time: {[1x4001 double] [1x4001 double]} > > It would seem to me that I have created the datastructure defined > on the FAQ > site. However, the structure doesn't appear to be usable for > anything (my > guess is that a cfg structure is also necessary, but I haven't > found how to > create one that is functionally identical to the output of > preprocessing,define_trials, any of the read_xxx programs from > fileio)...I don't know > where to begin! I'd very much appreciate any help I could get. > Thanks,very happy holidays. > > Best, > Kenton Hokanson > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Sun Dec 30 10:49:26 2007 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Sun, 30 Dec 2007 09:49:26 -0000 Subject: Importing .acq dataformat In-Reply-To: <50106df10712281525r41ff99f1la5a3721056cc9a75@mail.gmail.com> Message-ID: Hi Kenton, There is no need to initialize a matrix with 21 columns if you only have 6 channels. You can only have 6 columns and if the labels are correct, Fieldtrip will know how to handle it. To do what you want you might find the following functions useful. 1) data2raw(), raw2data() (they are in fieldtrip/private subdirectory so to use them you need to change the name ‘private’ to something else, like ‘private1’ and add it to your path). With these functions you can convert a raw struct with cell arrays to a timelock-like struct with a multidimensional array that is much easier to handle. You can then manipulate it any way you want and convert the result back to raw if necessary. 2) appenddata() That might be even simpler. You just create a new raw struct with the additional channels and then append it to your first struct. Don’t be so sure that if your source is in ACC the best way to go about localizing it would be to put a lot of electrodes in the front of the head. Since it’s a deep source that would be hard to localize anyway and probably projects strongly to the whole scalp you would need good coverage of the whole head and in particular lower half of the head, which is not usually covered in standard montages, but more people now realize that it should be. You might find additional useful tips in Clin Neurophysiol. 2004 Oct;115(10):2195-222. EEG source imaging. Michel et al. When you feel more confident with Matlab, Fieldtrip and your data perhaps you could contribute back to the community by implementing a reader for your data format in the standard conforming to Fieldtrip fileio module HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:development :fileio"http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:deve lopment:fileio . This will be helpful for anyone who wants to read the .acq format into Fieldtrip and also other packages that also use this module. Good luck, Vladimir -----Original Message----- From: kentonhokanson at gmail.com [mailto:kentonhokanson at gmail.com] On Behalf Of Kenton Hokanson Sent: Friday, December 28, 2007 11:26 PM To: Vladimir Litvak Subject: Re: [FIELDTRIP] Importing .acq dataformat Hi Vladimir, Thanks a lot for all the advice and the other options. Following them up has been very informative. I've spent some time working through the MATLAB help file and the tutorials, and things are working well through topoplotER.m. More importantly, we're going to try to add some electrodes. We're interested mainly in one component which we believe will come from the ACC, so we'll focus on frontal electrodes and see how good we can get. I appreciate your candor through all this. If I could impose on you with one last question, I'd be grateful for a bit of help - The script I've put together to convert our data file into trial matrices looks like the following, where the trialK structure reads the trial start (.KS) and end (.KE) samples from an excel file, and they're then used to define the range of cells which are imported from the data file (data_all) and put into channels in the trial matrix. So, for trial 1, I start with T1 (a matrix of zeros, 4001samples x 21channels), then paste the six data channels (starting at the trialK.KS(1) start-point until the trialK.KE(1) end-point) into their appropriate columns according to the EEG1020.LAY file, then transpose the matrix to form the trial matrix and clear the matrix used to create it. This process repeats for each trial. It works fine, but if I were to change anything (for example, to add more channels), I would have to insert that line, with its appropriate trial number, in each of the 200 trials. I was wondering if there was a way to condense this, perhaps by changing the trial number (N wherever it appears in the form (N) or TN) to be defined by each cell in a vector I defined or by creating some sort of index in a cell array. I've thought about it, but I'm stumped again and would appreciate any streamlining advice. trialK.KS = xlsread('C:\Documents and Settings\Kenton Hokanson\Desktop\JESS_ALLTRIALS_XLS.xls', 1, 'E2:E82'); trialK.KE = xlsread('C:\Documents and Settings\Kenton Hokanson\Desktop\JESS_ALLTRIALS_XLS.xls', 1, 'F2:F82'); T1 = []; T1(1:4001,1:21) = 0; %Set all channels in EEG1020.LAY to zero T1(1:4001,5)=data_all(trialK.KS(1):trialK.KE(1),5); %F3 T1(1:4001,6)=data_all(trialK.KS(1):trialK.KE(1),6); %Fz T1(1:4001,7)=data_all( trialK.KS(1):trialK.KE(1),7); %F4 T1(1:4001,10)=data_all(trialK.KS(1):trialK.KE(1),4); %C3 T1(1:4001,11)=data_all(trialK.KS(1):trialK.KE(1),3); %Cz T1(1:4001,12)=data_all(trialK.KS(1):trialK.KE(1),8); %C4 TrialT1 = T1'; clear T1 T2 = []; T2(1:4001,1:21) = 0; T2(1:4001,5)=data_all(trialK.KS(2):trialK.KE(2),5); T2(1:4001,6)=data_all(trialK.KS(2):trialK.KE(2),6); T2(1:4001,7)=data_all(trialK.KS(2):trialK.KE(2),7); T2(1:4001,10)=data_all(trialK.KS(2):trialK.KE(2),4); T2(1:4001,11)=data_all(trialK.KS(2):trialK.KE(2),3); T2(1:4001,12)=data_all(trialK.KS(2):trialK.KE(2),8); TrialT2 = T2'; clear T2 ... Thanks again, Vladimir, and I'll certainly understand if you don't have time to address this. All the best, Kenton On Dec 25, 2007 3:24 PM, Vladimir Litvak < HYPERLINK "mailto:v.litvak at ion.ucl.ac.uk"v.litvak at ion.ucl.ac.uk> wrote: If all you have are 6 channels, you shouldn't waste your time. To get a meaningful localization you would need at least 18 and even then it'd be quite imprecise. What you should understand is that Fieldtrip has no GUI so you shouldn't expect any fancy windows to open or something magical happen with your data. Most functions require inputs so dragging them to the command line won't do much. Your second attempt is closer to the truth. It'll probably even work if you start with cfg=[]; So the bottom line is if you don't have more channels, just drop it. Even if you do, perhaps you should consider alternatives to Fieldtrip that will be simpler for you to use. BESA (HYPERLINK "http://www.besa.de/" \nwww.besa.de) is nice software that does source localization and has extensive GUI, but it's quite expensive. You can also look at EEGLAB (Google it). This is a free package which is simpler to use than Fieldtrip, but it only does source localization in very specific context that might not be suitable for you. If you are determined to stick with Fieldtrip, you should master basic Matlab programming and do the relevant tutorials from Fieldtrip website. I'm afraid there are no shortcuts here. The simplest way to get started is take one of the tutorial scripts and adapt it to your needs. But for this you should understand what you are doing. For timelockanalysis see if the empty cfg works and then look in the header of timelockanalysis.m for different options you can put in the cfg and go from there. You can look at HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentati on:tutorial:eventrelatedaveraging" \nhttp://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentat ion:tutorial:eventrelatedaveraging starting with 'Averaging the time-locked data'. Good luck, Vladimir -----Original Message----- From: HYPERLINK "mailto:kentonhokanson at gmail.com" \nkentonhokanson at gmail.com [mailto:HYPERLINK "mailto:kentonhokanson at gmail.com" \nkentonhokanson at gmail.com] On Behalf Of Kenton Hokanson Sent: Tuesday, December 25, 2007 10:06 PM To: Vladimir Litvak Subject: Re: [FIELDTRIP] Importing .acq dataformat Hi, Vladimir, My ultimate goal would be source localization. The two trials come from a data file of about 150 trials, which are all four second windows where the sample at 2.001 seconds is a stimulus. When we average the trials, soon after the stimulus there is a clear and reliable deflection; we would like to localize the source of the deflection. The software package we're using (AcqKnowledge) can filter, average, etc, but has no localization program. So, having set up the data structure, I would think my next step should be the TIMELOCKANLYSIS program. I'm such a novice, though, I haven't figured out the proper way to run it at all, and each of my attempts generates a new error message. Graphically dragging the program into the command window generates >> run('C:\Program Files\MATLAB71\work\fieldtrip-lite-20071210\fieldtrip-lite-20071210\time lockanalysis.m') ??? Error using ==> run Input argument "data" is undefined. while entering the function listed at the top of the program ([timelock] = timelockanalysis(cfg, data)) results in ??? Undefined function or variable 'cfg'. How far off base am I? Thanks so much for the reply, it's a relief to have a chance to actually make some progress. Best, Kenton On Dec 25, 2007 1:27 PM, Vladimir Litvak wrote: Hi, I'd drop the EEG_ part in the labels, but other then that your struct seems OK. The question it what is it you are trying to do and what do you mean by 'doesn't appear to be usable for anything' ? Best, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:HYPERLINK "mailto:FIELDTRIP at NIC.SURFNET.NL" \nFIELDTRIP at NIC.SURFNET.NL] On Behalf Of Kenton Hokanson Sent: Tuesday, December 25, 2007 8:07 PM To: HYPERLINK "mailto:FIELDTRIP at NIC.SURFNET.NL" \nFIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Importing .acq dataformat Hi everyone, Sorry, this is a rather basic yet lengthy question, but I've been working on my own for some time and am totally stumped. If there exists a more appropriate way to get an answer to this question than to email the entire list, please let me know; otherwise, please forgive my inexperience! I'm trying to use FieldTrip to analyze EEG data recorded using BioPac's "AcqKnowledge" data acquisition program (data files are saved with extension .acq). This is not a FieldTrip-compatible format, but using the FT FAQ ( HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat" \nhttp://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat ) I found the following information for importing my dataformat. "Alternatively, if you already are able to read the data into Matlab, you can reformat that data within Matlab into a datastructure that is compatible with FieldTrip. Raw data that is comparable with the output of preprocessing should consist of a structure with the fields data.label % cell-array containing strings, Nchan X 1 data.fsample % sampling frequency in Hz, single number data.trial % cell-array containing a data matrix for each trial (1 X Ntrial), each data matrix is Nchan X Nsamples data.time % cell-array containing a time axis for each trial (1 X Ntrial), each time axis is a 1 X Nsamples vector" I'm able to save my data file as a single MATLAB matrix of dimensions NSamples x NChannels (20073x10). Using my knowledge of the timestamps of events within the data file, I divided it up into two trials. Each trial is 4001 samples long, and there are six channels that I want to analyze, so I've pasted that data into smaller matrices (Trial1 and Trial2) each with dimensions 6 x 4001. Having done this, I input the following: data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} data.fsample = 1000 data.trial = {Trial1 Trial2} data.time = {1:4001 1:4001} Here's the output those commands generate: data = label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} fsample: 1000 trial: {[6x4001 double] [6x4001 double]} time: {[1x4001 double] [1x4001 double]} It would seem to me that I have created the datastructure defined on the FAQ site. However, the structure doesn't appear to be usable for anything (my guess is that a cfg structure is also necessary, but I haven't found how to create one that is functionally identical to the output of preprocessing, define_trials, any of the read_xxx programs from fileio)...I don't know where to begin! I'd very much appreciate any help I could get. Thanks, very happy holidays. Best, Kenton Hokanson ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. HYPERLINK "http://listserv.surfnet.nl/archives/fieldtrip.html" \nhttp://listserv.surfnet.nl/archives/fieldtrip.html HYPERLINK "http://www.ru.nl/fcdonders/fieldtrip/" \nhttp://www.ru.nl/fcdonders/fieldtrip/ No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 daria.osipova at FCDONDERS.RU.NL Tue Dec 4 14:25:40 2007 From: daria.osipova at FCDONDERS.RU.NL (Daria Osipova) Date: Tue, 4 Dec 2007 14:25:40 +0100 Subject: combineplanar for 275-ch CTF data Message-ID: Hi I am trying to analyze 275-channel data but having trouble with combineplanar. I want to calculate planar gradient for posterior channels only (86 channels) and here's my configuration: cfg = []; cfg.channel = channelselection({'MLO', 'MRO', 'MRP', 'MLP', 'MZP', 'MZO'}, data.label); cfg.planarmethod = 'sincos'; data_planar = megplanar(cfg, data); comb =combineplanar([], data_planar); data_planar.label contains 361 channels i.e. it includes 86*2=172 channels for which planar gradient has been calculated and the rest of the channels in the original non-planar form. When I use combineplanar, I get 322 channels some of which are the orginal non-planar channels, some are the result of the combined planar gradient and some are not combined planar gradient. I suspect this has something to do with checking for the layout (151 or 275 channels) since the same scheme seems to work ok for the old 151 -channel dataset. Thanks in advance. Bests, Dasha ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Tue Dec 4 14:44:35 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 4 Dec 2007 14:44:35 +0100 Subject: combineplanar for 275-ch CTF data In-Reply-To: <413a38c83f8dd.47556364@ru.nl> Message-ID: Dear Dasha, In order to compute the planar gradient of the magnetic field at the position of a given axial gradiometer, you always have to take the axial gradient of the magnetic field, measured by a bunch of neighbouring gradiometers, into account. I guess that the order in which you want to do things does not make sense in this context. First, you select a subset of sensors, and then you transform to the planar gradient. I would call megplanar without the subset of channels, and only select the subset of channels after having called combineplanar. Yours, Jan-Mathijs On Dec 4, 2007, at 2:25 PM, Daria Osipova wrote: > Hi > I am trying to analyze 275-channel data but having trouble with > combineplanar. I want to calculate planar gradient for posterior > channels only (86 channels) and here's my configuration: > cfg = []; > cfg.channel = channelselection({'MLO', 'MRO', 'MRP', 'MLP', 'MZP', > 'MZO'}, data.label); > cfg.planarmethod = 'sincos'; > data_planar = megplanar(cfg, data); > comb =combineplanar([], data_planar); > > data_planar.label contains 361 channels i.e. it includes 86*2=172 > channels for which planar gradient has been calculated and the rest > of the channels in the original non-planar form. > > When I use combineplanar, I get 322 channels some of which are the > orginal non-planar channels, some are the result of the combined > planar gradient and some are not combined planar gradient. > I suspect this has something to do with checking for the layout > (151 or 275 channels) since the same scheme seems to work ok for > the old 151 -channel dataset. > Thanks in advance. > Bests, Dasha > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Thu Dec 6 20:08:13 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 6 Dec 2007 14:08:13 -0500 Subject: clusterandanalysis on two dataset with different number oc channels Message-ID: Hello, I am processing my data to ready it for non parametric statistical testing. Since one or two channels when bad during different trials, I am faced with the prospect of comparing two datasets with diffeent number of channels (between trials comparison). I would like to know if this is expected to cause problems (my guess is it will). thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Dec 6 21:17:24 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 6 Dec 2007 21:17:24 +0100 Subject: clusterandanalysis on two dataset with different number oc channels In-Reply-To: Message-ID: Hi Sameer, > I am processing my data to ready it for non parametric statistical > testing. Since one or two channels when bad during different trials, I am > faced with the prospect of comparing two datasets with diffeent number of > channels (between trials comparison). I would like to know if this is > expected to cause problems (my guess is it will). I don't expect that this will cause problems. Let me know if it does. Greetings, Eric Maris > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jsgonzal at ING.UCHILE.CL Sat Dec 8 05:10:26 2007 From: jsgonzal at ING.UCHILE.CL (Sebastian Gonzalez) Date: Sat, 8 Dec 2007 01:10:26 -0300 Subject: Parallel Fieldtrip Message-ID: Hi, I was wandering if it is possible or is already done, to use intel TBB to build mex files to use in filedtrip. ("It is a library that helps you take advantage of multi-core processor performance without having to be a threading expert." from http://threadingbuildingblocks.org/ ) If it's done, I would like to know how, and if is not, I would like to try to rewrite some functions using TBB. Best regards, Sebastian Gonzalez ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Dec 11 09:56:30 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 11 Dec 2007 09:56:30 +0100 Subject: Parallel Fieldtrip In-Reply-To: <20071208011026.wmo2tev2io8c8k84@correo.cec.uchile.cl> Message-ID: On 8 Dec 2007, at 5:10, Sebastian Gonzalez wrote: > I was wandering if it is possible or is already done, to use intel > TBB to build mex files to use in filedtrip. ("It is a library that > helps you take advantage of multi-core processor performance > without having to be a threading expert." from http:// > threadingbuildingblocks.org/ ) > > If it's done, I would like to know how, and if is not, I would like > to try to rewrite some functions using TBB. Hi Sebastian In the past there has been some parallelism geared toward running FieldTrip on a linux cluster (see http://oase.uci.ru.nl/~roberto/ index.php/mentat), but that was too difficult to maintain and therefore I removed it. Recently I evaluated StarP (http:// www.interactivesupercomputing.com) and the Distributed Computing Toolbox+Engine (http://www.mathworks.com/products/distribtb/). StarP was not suitable because of not supporting the Matlab toolboxes on the "computing engines", and the DCT was not optimal because of the relatively slow data transport protocol between the master node and the engines. I will continue looking into DCT to see whether it can be tweaked to prevent the data transport between cluster nodes being the bottleneck. Your sugegstion of using multithreading in a mex file is new to me. FieldTrip comes with 8 mex files, most of them related to forward computation. That means that speeding these mex files up will only impact the sourceanalysis and dipolefitting function. For sourceanalysis (which uses a fixed and pre-defined dipole grid), the prepare_leadfield function is already a good way of speeding up the computations. Although I like the idea, I doubt whether working on those 8 mex files will result in a noticeable speed increase. But that of course depends a lot on the exact nature of the computations that you do a lot. Let me give a list of functions and what they are involved in: * meg_leadfield1.mexa64 This one is used for MEG forward modelling using single and local- spheres models. * lmoutr.mexa64 * ptriproj.mexa64 * routlm.mexa64 * solid_angle.mexa64 These are used for forward computation in the BEM-EEG case, but only in the preparatory phase (i.e. not while iterating over dipole positions). They are also used for determining which dipoles are inside the head of a volume conduction model (which is done for almost all forward computation methods, but also only once). After one call to prepare_leadfield and these functions would not be used any more in the sourceanalysis function. * plgndr.mexa64 This is used for 3 and 4-sphere EEG forward computation, and will be called on each iteration in dipolefitting. * read_24bit.mexa64 This is for reading BDF files. * splint_gh.mexa64 This is for computing the EEG surface laplacian. The source code of these mex files is included in the fieldtrip release version (private/mex directory). I presume that you are aware of the Matlab profiler: that will give you a good overview of the time spent in these mex files, compared to teh time spent in other parts of the code. Subtracting the time spent in the mex files from the total time gives you the maximum speed increase that can be achieved by optimizing the mex files (i.e. if 20% of the time would be spent in a mex file, then speeding up that mex file to infinitely fast would result in 0% time spent in that mex file, but you would still spend the 80% of the time in the other parts of the code). I am curious to see how much it can be sped up. best regards, Robert PS I am also not aware of people having tried to speed up the standard Matlab BLAS computations as explained here http:// www.mathworks.com/support/solutions/data/1-34HE9M.html. It would also be interesting to see how muct that might help. PS ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Thu Dec 13 12:10:58 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 13 Dec 2007 12:10:58 +0100 Subject: virtual electrodes in fieldtrip Message-ID: Dear Christine, I forward your question to the rest of the mailing-list, so that other people can participate in the discussion as well. > I saw in the fieldtrip-mailinglist that you had been working on > virtualelectrodes; since I'm trying to do this analysis with > fieldtrip, I would be > glad if you could give me some advice on how to implement the > analysis best. > It seemed that you had found a good solution using SAM weights > files created > in CTF and reading them in into fieldtrip. Is there a way to create > theweights directly in fieldtrip? Yes, it is possible to do it in fieldtrip. If you are planning to do a 'SAM'-like analysis, the lcvm-beamformer is the thing you should use. The weights are outputted in the output of sourceanalysis, when you specify cfg.keepfilter = 'yes'; > I'm using the dics beamforming > method right > now but I think you proposed to use lcmv instead and use timelock > data as > input? Is there a routine for this type of analysis? Please let me > know if > you any idea on this! It completely depends on what you exactly want to do, whether you should use DICS, or the time-domain lcmv-beamformer (DICS is just the frequency domain analogue of the traditional 'lcmv'-beamformer). If it is your purpose to create TFRs on virtual channels (such as what is facilitated by the CTF-software in the context of a SAM-analysis) you should use 'lcmv' as a method in your sourceanalysis. There is no ready-made script which concatenates all the analysis steps, but I would approach it as follows: Perform timelockanalysis on your data, because you have to compute the sensor-level covariance for a particular time-window of interest. This might also involve some bandpass-filtering of the data. Then perform sourceanalysis (using the result of timelockanalysis), and specify the locations of your virtual channel(s) in cfg.grid.pos, and cfg.keepfilter='yes'. The output of sourceanalysis will contain the filter weights in source.avg.filter, and the virtual channel data in source.avg.mom. However, this will be the average across all trials. If you would want to effectively compute the single-trial virtual channel data, you can easily recover this by pre-multiplying the single trial representations, as present in your timelocked data-structure: source.avg.filter{x}*squeeze(timelock.trial(y,:,:)) Good luck, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From t.schneider at UKE.UNI-HAMBURG.DE Tue Dec 18 13:43:10 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Tue, 18 Dec 2007 13:43:10 +0100 Subject: PhD student position in cognitive neuroscience Message-ID: An HTML attachment was scrubbed... URL: From soren.r.christensen at GSK.COM Tue Dec 18 14:03:35 2007 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Tue, 18 Dec 2007 13:03:35 +0000 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 15-Dec-2007 and will not return until 02-Jan-2008. Back 2nd Jan 2008 ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From linpe at NINDS.NIH.GOV Tue Dec 18 19:33:16 2007 From: linpe at NINDS.NIH.GOV (Peter Lin) Date: Tue, 18 Dec 2007 19:33:16 +0100 Subject: corticomuscular coherence demo Message-ID: > I was trying the corticomuscular coherence demo off of fieldtrip. Not > sure how to implement the trial_left_fun function. I created the cfg > using the initial few instructiosn in the documentation. But when I > get to meg = preprocessing(cfg), matlab asked for a DEFINETRIAL > prestep. > Not sure how what steps to take to load the dataset using trial script > at the appendix. > > Thanks, > > Peter > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Wed Dec 19 09:19:39 2007 From: jan.schoffelen at FCDONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 19 Dec 2007 09:19:39 +0100 Subject: corticomuscular coherence demo In-Reply-To: Message-ID: Hi Peter, I don't know if you already went through the preprocessing tutorials. These give useful background on how you go from the raw data, to a fieldtrip data-structure. The "trialfun_left" in the appendix is a snippet of code, which you could copy and paste into your editor. If you save it as trialfun_left.m, and the file's location is in your matlab-path, this function will be called by definetrial, in order to identify the begin and endsamples of the relevant pieces of data. Yours, Jan-Mathijs On Dec 18, 2007, at 7:33 PM, Peter Lin wrote: >> I was trying the corticomuscular coherence demo off of fieldtrip. >> Not >> sure how to implement the trial_left_fun function. I created the cfg >> using the initial few instructiosn in the documentation. But when I >> get to meg = preprocessing(cfg), matlab asked for a DEFINETRIAL >> prestep. >> Not sure how what steps to take to load the dataset using trial >> script >> at the appendix. >> >> Thanks, >> >> Peter >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Wed Dec 19 22:49:47 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 19 Dec 2007 21:49:47 +0000 Subject: 3 post doc positions at ccni glasgow Message-ID: 2 Postdoctoral Research Assistants (Level 7) / Postdoctoral Research Fellow (Level 8) ESRC/MRC project “Social Interactions: A Cognitive Neurosciences Approach” The project will investigate (1) the immediate processing of social signals from the voice, face and bodily movement, (2) how such signals support interactive alignment of social behaviours (associated with pupil dilation, blinking, yawning etc.), and, (3) the mechanisms that underlie joint attention and action. The project will also produce a substantial database of parameterised social signals from body, voice and face. 1. Applications are invited for a Research Assistant to work with Professor Simon Garrod. The successful candidate will contribute to the design, running and analysis of behavioural experiments investigating alignment of autonomic social signals (e.g., blinking, yawning, pupil dilation). The candidate would also be expected to become familiar with brain imaging techniques (such as fMRI, MEG and EEG) with a view to refining some of the designs for subsequent neuro- imaging studies. This post is available from 1 January 2008, funding is available for up to three years in the first instance. You will be qualified, with a PhD in psychology, cognitive neuroscience or a related discipline. You will also have experience of running cognitive and other behavioural studies. Limited experience with brain imaging techniques will be in your favour and you will have good programming skills, particularly with MATLAB. You should also have a strong interest in pursuing a research career. Informal enquiries may be made to Professor Simon Garrod (+44 (0)141 330 5033) email: simon at psy.gla.ac.uk . 2. Applications are invited for a Research Fellow to work with Professors Philippe Schyns. The successful candidate will be responsible for managing the Social Signals Database. This will involve measuring, rendering and organising the Social Signal Database which consists of dynamic face, body and voice stimuli acquired in a large sample of the population. It will also involve responsibility for the supervision, mentoring and coaching of less experienced research staff and graduate students in the subject area. You will be qualified, with a PhD, or equivalent, in computing science or a related discipline. You will also have experience in acquisition and rendering of dynamic 3D Audio and Video data, in writing system and user documentation for the software and in the development and maintenance of databases. You should also have excellent skills in project management. Finally, you should have a strong interest in pursuing a research career. Informal enquiries may be made to Professor P Schyns, (+44 (0)141 330 4937); e-mail p.schyns at psy.gla.ac.uk 3. Applications are invited for a Research Assistant to work with Professors Philippe Schyns. The successful candidate will work on the Social Signal Database. This will involve measuring, rendering and organising social signals which consist of dynamic face, body and voice stimuli acquired in a large sample of the population. You will be qualified, with a PhD, or equivalent, in computing science or a related discipline. You will also have experience in acquisition and rendering of dynamic 3D Audio and Video data, in writing system and user documentation for the software and in the development and maintenance of databases. Finally, you should have a strong interest in pursuing a research career. Informal enquiries may be made to Professor P Schyns, (+44 (0)141 330 4937); e-mail p.schyns at psy.gla.ac.uk These posts are available from 1 January 2008 for either 3 or 4 years, however, continuation of the grant is dependent on a successful report after year 2. For further details about all three posts, please contact Heather Robertson, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0) 141 330 6173, email h.robertson at psy.gla.ac.uk For an application pack, please see our website at: http:// www.gla.ac.uk/jobs/vacancies/researchandteaching Specific job descriptions for each role can be viewed at: 1. Ref: 13806/DPO/A3 (Research Assistant) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13806ra/#d.en. 56276 2. Ref: 13890/DPO/A3 (Research Fellow) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13890ra/#d.en. 56280 3. Ref: 13889/DPO/A3 (Research Assistant) http://www.gla.ac.uk/jobs/vacancies/researchandteaching/13889ra/#d.en. 56277 Completed applications comprising of: applicant information form, three copies of covering letter, C.V. (including list of publications and names) and contact details of two referees, should be submitted by post to: Heather Robertson, Department of Psychology,University of Glasgow, G12 8QQ. We regret that we cannot accept applications by email. Closing date: Tuesday 8th January 2008 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 kenton.hokanson at POMONA.EDU Tue Dec 25 21:06:34 2007 From: kenton.hokanson at POMONA.EDU (Kenton Hokanson) Date: Tue, 25 Dec 2007 12:06:34 -0800 Subject: Importing .acq dataformat Message-ID: Hi everyone, Sorry, this is a rather basic yet lengthy question, but I've been working on my own for some time and am totally stumped. If there exists a more appropriate way to get an answer to this question than to email the entire list, please let me know; otherwise, please forgive my inexperience! I'm trying to use FieldTrip to analyze EEG data recorded using BioPac's "AcqKnowledge" data acquisition program (data files are saved with extension .acq). This is not a FieldTrip-compatible format, but using the FT FAQ ( http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat) I found the following information for importing my dataformat. "Alternatively, if you already are able to read the data into Matlab, you can reformat that data within Matlab into a datastructure that is compatible with FieldTrip. Raw data that is comparable with the output of preprocessing should consist of a structure with the fields data.label % cell-array containing strings, Nchan X 1 data.fsample % sampling frequency in Hz, single number data.trial % cell-array containing a data matrix for each trial (1 X Ntrial), each data matrix is Nchan X Nsamples data.time % cell-array containing a time axis for each trial (1 X Ntrial), each time axis is a 1 X Nsamples vector" I'm able to save my data file as a single MATLAB matrix of dimensions NSamples x NChannels (20073x10). Using my knowledge of the timestamps of events within the data file, I divided it up into two trials. Each trial is 4001 samples long, and there are six channels that I want to analyze, so I've pasted that data into smaller matrices (Trial1 and Trial2) each with dimensions 6 x 4001. Having done this, I input the following: data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} data.fsample = 1000 data.trial = {Trial1 Trial2} data.time = {1:4001 1:4001} Here's the output those commands generate: data = label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} fsample: 1000 trial: {[6x4001 double] [6x4001 double]} time: {[1x4001 double] [1x4001 double]} It would seem to me that I have created the datastructure defined on the FAQ site. However, the structure doesn't appear to be usable for anything (my guess is that a cfg structure is also necessary, but I haven't found how to create one that is functionally identical to the output of preprocessing, define_trials, any of the read_xxx programs from fileio)...I don't know where to begin! I'd very much appreciate any help I could get. Thanks, very happy holidays. Best, Kenton Hokanson ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 jan.schoffelen at FCDONDERS.RU.NL Thu Dec 27 14:32:12 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 27 Dec 2007 14:32:12 +0100 Subject: Importing .acq dataformat Message-ID: Dear Kenton, It seems to me as if you're almost there. Good work. I can imagine that fieldtrip crashes when it finds a cfg-field missing in the data-structure. You can bypass this by specifying data.cfg = [ ]; This should do the trick. The cfg of the previous fieldtrip-step is stored in the output of many of the high-level fieldtrip-functions (such as preprocessing, freqanalysis, sourceanalysis) in order to keep track of the entire pipeline of analysis (provided you stay within fieldtrip for your entire analysis). However, it is not an essential field in the data-structure for subsequent steps (despite the fact that it apparently causes some unwanted crashes). Yours, Jan-Mathijs ----- Original Message ----- From: Kenton Hokanson Date: Tuesday, December 25, 2007 9:06 pm Subject: [FIELDTRIP] Importing .acq dataformat > Hi everyone, > > Sorry, this is a rather basic yet lengthy question, but I've been > working on > my own for some time and am totally stumped. If there exists a more > appropriate way to get an answer to this question than to email the > entirelist, please let me know; otherwise, please forgive my > inexperience!I'm trying to use FieldTrip to analyze EEG data > recorded using BioPac's > "AcqKnowledge" data acquisition program (data files are saved with > extension.acq). This is not a FieldTrip-compatible format, but > using the FT FAQ ( > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat) I > found the following information for importing my dataformat. > > "Alternatively, if you already are able to read the data into > Matlab, you > can reformat that data within Matlab into a datastructure that is > compatiblewith FieldTrip. Raw data that is comparable with the > output of preprocessing > should consist of a structure with the fields > > data.label % cell-array containing strings, Nchan X 1 > data.fsample % sampling frequency in Hz, single number > data.trial % cell-array containing a data matrix for each trial > (1 X > Ntrial), each data matrix is Nchan X Nsamples > data.time % cell-array containing a time axis for each trial (1 X > Ntrial), each time axis is a 1 X Nsamples vector" > > I'm able to save my data file as a single MATLAB matrix of dimensions > NSamples x NChannels (20073x10). Using my knowledge of the > timestamps of > events within the data file, I divided it up into two trials. Each > trial is > 4001 samples long, and there are six channels that I want to > analyze, so > I've pasted that data into smaller matrices (Trial1 and Trial2) > each with > dimensions 6 x 4001. Having done this, I input the following: > > data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} > data.fsample = 1000 > data.trial = {Trial1 Trial2} > data.time = {1:4001 1:4001} > > Here's the output those commands generate: > > data = > > label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' > 'EEG_C4'} fsample: 1000 > trial: {[6x4001 double] [6x4001 double]} > time: {[1x4001 double] [1x4001 double]} > > It would seem to me that I have created the datastructure defined > on the FAQ > site. However, the structure doesn't appear to be usable for > anything (my > guess is that a cfg structure is also necessary, but I haven't > found how to > create one that is functionally identical to the output of > preprocessing,define_trials, any of the read_xxx programs from > fileio)...I don't know > where to begin! I'd very much appreciate any help I could get. > Thanks,very happy holidays. > > Best, > Kenton Hokanson > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss 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 Sun Dec 30 10:49:26 2007 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Sun, 30 Dec 2007 09:49:26 -0000 Subject: Importing .acq dataformat In-Reply-To: <50106df10712281525r41ff99f1la5a3721056cc9a75@mail.gmail.com> Message-ID: Hi Kenton, There is no need to initialize a matrix with 21 columns if you only have 6 channels. You can only have 6 columns and if the labels are correct, Fieldtrip will know how to handle it. To do what you want you might find the following functions useful. 1) data2raw(), raw2data() (they are in fieldtrip/private subdirectory so to use them you need to change the name ‘private’ to something else, like ‘private1’ and add it to your path). With these functions you can convert a raw struct with cell arrays to a timelock-like struct with a multidimensional array that is much easier to handle. You can then manipulate it any way you want and convert the result back to raw if necessary. 2) appenddata() That might be even simpler. You just create a new raw struct with the additional channels and then append it to your first struct. Don’t be so sure that if your source is in ACC the best way to go about localizing it would be to put a lot of electrodes in the front of the head. Since it’s a deep source that would be hard to localize anyway and probably projects strongly to the whole scalp you would need good coverage of the whole head and in particular lower half of the head, which is not usually covered in standard montages, but more people now realize that it should be. You might find additional useful tips in Clin Neurophysiol. 2004 Oct;115(10):2195-222. EEG source imaging. Michel et al. When you feel more confident with Matlab, Fieldtrip and your data perhaps you could contribute back to the community by implementing a reader for your data format in the standard conforming to Fieldtrip fileio module HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:development :fileio"http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:deve lopment:fileio . This will be helpful for anyone who wants to read the .acq format into Fieldtrip and also other packages that also use this module. Good luck, Vladimir -----Original Message----- From: kentonhokanson at gmail.com [mailto:kentonhokanson at gmail.com] On Behalf Of Kenton Hokanson Sent: Friday, December 28, 2007 11:26 PM To: Vladimir Litvak Subject: Re: [FIELDTRIP] Importing .acq dataformat Hi Vladimir, Thanks a lot for all the advice and the other options. Following them up has been very informative. I've spent some time working through the MATLAB help file and the tutorials, and things are working well through topoplotER.m. More importantly, we're going to try to add some electrodes. We're interested mainly in one component which we believe will come from the ACC, so we'll focus on frontal electrodes and see how good we can get. I appreciate your candor through all this. If I could impose on you with one last question, I'd be grateful for a bit of help - The script I've put together to convert our data file into trial matrices looks like the following, where the trialK structure reads the trial start (.KS) and end (.KE) samples from an excel file, and they're then used to define the range of cells which are imported from the data file (data_all) and put into channels in the trial matrix. So, for trial 1, I start with T1 (a matrix of zeros, 4001samples x 21channels), then paste the six data channels (starting at the trialK.KS(1) start-point until the trialK.KE(1) end-point) into their appropriate columns according to the EEG1020.LAY file, then transpose the matrix to form the trial matrix and clear the matrix used to create it. This process repeats for each trial. It works fine, but if I were to change anything (for example, to add more channels), I would have to insert that line, with its appropriate trial number, in each of the 200 trials. I was wondering if there was a way to condense this, perhaps by changing the trial number (N wherever it appears in the form (N) or TN) to be defined by each cell in a vector I defined or by creating some sort of index in a cell array. I've thought about it, but I'm stumped again and would appreciate any streamlining advice. trialK.KS = xlsread('C:\Documents and Settings\Kenton Hokanson\Desktop\JESS_ALLTRIALS_XLS.xls', 1, 'E2:E82'); trialK.KE = xlsread('C:\Documents and Settings\Kenton Hokanson\Desktop\JESS_ALLTRIALS_XLS.xls', 1, 'F2:F82'); T1 = []; T1(1:4001,1:21) = 0; %Set all channels in EEG1020.LAY to zero T1(1:4001,5)=data_all(trialK.KS(1):trialK.KE(1),5); %F3 T1(1:4001,6)=data_all(trialK.KS(1):trialK.KE(1),6); %Fz T1(1:4001,7)=data_all( trialK.KS(1):trialK.KE(1),7); %F4 T1(1:4001,10)=data_all(trialK.KS(1):trialK.KE(1),4); %C3 T1(1:4001,11)=data_all(trialK.KS(1):trialK.KE(1),3); %Cz T1(1:4001,12)=data_all(trialK.KS(1):trialK.KE(1),8); %C4 TrialT1 = T1'; clear T1 T2 = []; T2(1:4001,1:21) = 0; T2(1:4001,5)=data_all(trialK.KS(2):trialK.KE(2),5); T2(1:4001,6)=data_all(trialK.KS(2):trialK.KE(2),6); T2(1:4001,7)=data_all(trialK.KS(2):trialK.KE(2),7); T2(1:4001,10)=data_all(trialK.KS(2):trialK.KE(2),4); T2(1:4001,11)=data_all(trialK.KS(2):trialK.KE(2),3); T2(1:4001,12)=data_all(trialK.KS(2):trialK.KE(2),8); TrialT2 = T2'; clear T2 ... Thanks again, Vladimir, and I'll certainly understand if you don't have time to address this. All the best, Kenton On Dec 25, 2007 3:24 PM, Vladimir Litvak < HYPERLINK "mailto:v.litvak at ion.ucl.ac.uk"v.litvak at ion.ucl.ac.uk> wrote: If all you have are 6 channels, you shouldn't waste your time. To get a meaningful localization you would need at least 18 and even then it'd be quite imprecise. What you should understand is that Fieldtrip has no GUI so you shouldn't expect any fancy windows to open or something magical happen with your data. Most functions require inputs so dragging them to the command line won't do much. Your second attempt is closer to the truth. It'll probably even work if you start with cfg=[]; So the bottom line is if you don't have more channels, just drop it. Even if you do, perhaps you should consider alternatives to Fieldtrip that will be simpler for you to use. BESA (HYPERLINK "http://www.besa.de/" \nwww.besa.de) is nice software that does source localization and has extensive GUI, but it's quite expensive. You can also look at EEGLAB (Google it). This is a free package which is simpler to use than Fieldtrip, but it only does source localization in very specific context that might not be suitable for you. If you are determined to stick with Fieldtrip, you should master basic Matlab programming and do the relevant tutorials from Fieldtrip website. I'm afraid there are no shortcuts here. The simplest way to get started is take one of the tutorial scripts and adapt it to your needs. But for this you should understand what you are doing. For timelockanalysis see if the empty cfg works and then look in the header of timelockanalysis.m for different options you can put in the cfg and go from there. You can look at HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentati on:tutorial:eventrelatedaveraging" \nhttp://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentat ion:tutorial:eventrelatedaveraging starting with 'Averaging the time-locked data'. Good luck, Vladimir -----Original Message----- From: HYPERLINK "mailto:kentonhokanson at gmail.com" \nkentonhokanson at gmail.com [mailto:HYPERLINK "mailto:kentonhokanson at gmail.com" \nkentonhokanson at gmail.com] On Behalf Of Kenton Hokanson Sent: Tuesday, December 25, 2007 10:06 PM To: Vladimir Litvak Subject: Re: [FIELDTRIP] Importing .acq dataformat Hi, Vladimir, My ultimate goal would be source localization. The two trials come from a data file of about 150 trials, which are all four second windows where the sample at 2.001 seconds is a stimulus. When we average the trials, soon after the stimulus there is a clear and reliable deflection; we would like to localize the source of the deflection. The software package we're using (AcqKnowledge) can filter, average, etc, but has no localization program. So, having set up the data structure, I would think my next step should be the TIMELOCKANLYSIS program. I'm such a novice, though, I haven't figured out the proper way to run it at all, and each of my attempts generates a new error message. Graphically dragging the program into the command window generates >> run('C:\Program Files\MATLAB71\work\fieldtrip-lite-20071210\fieldtrip-lite-20071210\time lockanalysis.m') ??? Error using ==> run Input argument "data" is undefined. while entering the function listed at the top of the program ([timelock] = timelockanalysis(cfg, data)) results in ??? Undefined function or variable 'cfg'. How far off base am I? Thanks so much for the reply, it's a relief to have a chance to actually make some progress. Best, Kenton On Dec 25, 2007 1:27 PM, Vladimir Litvak wrote: Hi, I'd drop the EEG_ part in the labels, but other then that your struct seems OK. The question it what is it you are trying to do and what do you mean by 'doesn't appear to be usable for anything' ? Best, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:HYPERLINK "mailto:FIELDTRIP at NIC.SURFNET.NL" \nFIELDTRIP at NIC.SURFNET.NL] On Behalf Of Kenton Hokanson Sent: Tuesday, December 25, 2007 8:07 PM To: HYPERLINK "mailto:FIELDTRIP at NIC.SURFNET.NL" \nFIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Importing .acq dataformat Hi everyone, Sorry, this is a rather basic yet lengthy question, but I've been working on my own for some time and am totally stumped. If there exists a more appropriate way to get an answer to this question than to email the entire list, please let me know; otherwise, please forgive my inexperience! I'm trying to use FieldTrip to analyze EEG data recorded using BioPac's "AcqKnowledge" data acquisition program (data files are saved with extension .acq). This is not a FieldTrip-compatible format, but using the FT FAQ ( HYPERLINK "http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat" \nhttp://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat ) I found the following information for importing my dataformat. "Alternatively, if you already are able to read the data into Matlab, you can reformat that data within Matlab into a datastructure that is compatible with FieldTrip. Raw data that is comparable with the output of preprocessing should consist of a structure with the fields data.label % cell-array containing strings, Nchan X 1 data.fsample % sampling frequency in Hz, single number data.trial % cell-array containing a data matrix for each trial (1 X Ntrial), each data matrix is Nchan X Nsamples data.time % cell-array containing a time axis for each trial (1 X Ntrial), each time axis is a 1 X Nsamples vector" I'm able to save my data file as a single MATLAB matrix of dimensions NSamples x NChannels (20073x10). Using my knowledge of the timestamps of events within the data file, I divided it up into two trials. Each trial is 4001 samples long, and there are six channels that I want to analyze, so I've pasted that data into smaller matrices (Trial1 and Trial2) each with dimensions 6 x 4001. Having done this, I input the following: data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} data.fsample = 1000 data.trial = {Trial1 Trial2} data.time = {1:4001 1:4001} Here's the output those commands generate: data = label: {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'} fsample: 1000 trial: {[6x4001 double] [6x4001 double]} time: {[1x4001 double] [1x4001 double]} It would seem to me that I have created the datastructure defined on the FAQ site. However, the structure doesn't appear to be usable for anything (my guess is that a cfg structure is also necessary, but I haven't found how to create one that is functionally identical to the output of preprocessing, define_trials, any of the read_xxx programs from fileio)...I don't know where to begin! I'd very much appreciate any help I could get. Thanks, very happy holidays. Best, Kenton Hokanson ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. HYPERLINK "http://listserv.surfnet.nl/archives/fieldtrip.html" \nhttp://listserv.surfnet.nl/archives/fieldtrip.html HYPERLINK "http://www.ru.nl/fcdonders/fieldtrip/" \nhttp://www.ru.nl/fcdonders/fieldtrip/ No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: 24/12/2007 11:19 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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: