From r.thomas at nin.knaw.nl Mon Dec 1 16:31:53 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Mon, 1 Dec 2014 15:31:53 +0000 Subject: [FieldTrip] Easycap 128 XYZ coordinates Message-ID: ?Dear all, Is there anywhere I could download a Easycap 128 channel electrode coordinate file? On the website of easycap there is only the 64 channel. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From dm4 at bu.edu Mon Dec 1 22:00:48 2014 From: dm4 at bu.edu (Deepshikha Moolchandani) Date: Mon, 1 Dec 2014 16:00:48 -0500 Subject: [FieldTrip] Probem with cross frequency phase-amplitude example in FieldTrip tutorial Message-ID: Dear all I am working on the cross frequency phase-amplitude coupling and I tried to run the following code provided in the tutorial in the latest version of FieldTrip (fieldtrip-lite-20141125) "" *Calculate coherence between power and raw* % mtmconvol cfg = []; cfg.method = 'mtmconvol'; cfg.channel = 'mix'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 2:2:60; cfg.toi = data.time{1}(3001:7000); %power is calculated at every sample cfg.t_ftimwin = 4./cfg.foi; %timewindow used to calculated power is 4 cycles long and therefore differs over frequencies cfg.keeptrials = 'yes'; freq1 = ft_freqanalysis(cfg,data); % Make data same length as freq1 data_cut = data; for iTr = 1:length(data.trial) data_cut.trial{iTr} = data.trial{iTr}(:,3001:7000); data_cut.time{iTr} = data.time{iTr}(3001:7000); end data_app = ft_appenddata([],data_cut, freq1); %contains original channel and channels with power %FieldTrip automatically converts the freq1 data to raw data. % mtmfft output cross-spectral-density between mix(raw) and freq1 cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.taper = 'hanning'; cfg.foilim = [2 60]; cfg.keeptrials = 'no'; cfg.pad = 4; cfg.channelcmb = {'mix' 'mix at 2Hz'; 'mix' 'mix at 4Hz'; 'mix' 'mix at 6Hz'; 'mix' 'mix at 8Hz'; 'mix' 'mix at 10Hz'; 'mix' 'mix at 12Hz'; 'mix' 'mix at 14Hz'; 'mix' 'mix at 16Hz'; 'mix' 'mix at 18Hz'; 'mix' 'mix at 20Hz'; 'mix' 'mix at 22Hz'; 'mix' 'mix at 24Hz'; 'mix' 'mix at 26Hz'; 'mix' 'mix at 28Hz'; 'mix' 'mix at 30Hz'; 'mix' 'mix at 32Hz'; 'mix' 'mix at 34Hz'; 'mix' 'mix at 36Hz'; 'mix' 'mix at 38Hz'; 'mix' 'mix at 40Hz'; 'mix' 'mix at 42Hz'; 'mix' 'mix at 44Hz'; 'mix' 'mix at 46Hz'; 'mix' 'mix at 48Hz'; 'mix' 'mix at 50Hz'; 'mix' 'mix at 52Hz'; 'mix' 'mix at 54Hz'; 'mix' 'mix at 56Hz'; 'mix' 'mix at 58Hz'; 'mix' 'mix at 60Hz';}; freq2 = ft_freqanalysis(cfg,data_app); % calculate coherence coh = ft_freqdescriptives([],freq2); coh.freq2 = [2:2:60]; figure; imagesc(coh.freq, coh.freq2, coh.cohspctrm) axis xy print -dpng phalow_amphigh_fig5.png"" It gives me the following error "Reference to non-existent field 'cohspctrm'." Can anyone tell me if I'm doing something wrong or is there a problem in the code? Any help would be appreciated. Best Deepshikha Moolchandani Research Assistant Brain and Vision Research Lab Boston University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Mon Dec 1 22:27:09 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Mon, 1 Dec 2014 22:27:09 +0100 Subject: [FieldTrip] Probem with cross frequency phase-amplitude example in FieldTrip tutorial In-Reply-To: References: Message-ID: Hey, Try figure; imagesc(coh.freq, coh.freq2, coh.powspctrm) ; % change coh.cohspctrm -> coh.powspctrm That should to the trick. If it works please modify the code on the page too. :) -- Regards, Kousik Sarathy, S -------------- next part -------------- An HTML attachment was scrubbed... URL: From balperin07 at gmail.com Tue Dec 2 07:41:39 2014 From: balperin07 at gmail.com (Brittany Alperin) Date: Mon, 1 Dec 2014 22:41:39 -0800 Subject: [FieldTrip] error running FFT when importing eeglab data with interpolated channels Message-ID: Hello I have preprocessed my data using EEGlab and am running an FFT using fieldtrip. I convert my EEGlab dataset to fieldtrip format using: data = eeglab2fieldtrip(EEG,'preprocessing','none'); No error occurs when I convert the data. My FFT code is: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [4 7]; cfg.output = 'pow'; freq = ft_freqanalysis(cfg,data); When I try to run the FFT, I get the following error: Reference to non-existent field 'trial'. Error in ft_freqanalysis (line 382) ntrials = numel(data.trial); Error in FFT_MIST (line 22) freq = ft_freqanalysis(cfg,data); Error in Batch_FFT_MIST (line 11) FFT_MIST(subj); Error in run (line 63) evalin('caller', [script ';']); Interestingly, I only get this error when I try running an FFT on data that has had channels interpolated using EEGlab's interpolation function. I have 36 channels, but when I've interpolated some, fieldtrip seems to think the interpolated channels have been deleted. I.e., instead of saying "the input is raw data with 36 channels and 118 trials" it will say "the input is raw data with 34 channels and 118 trials". Does anyone know why interpolating channels in EEGlab would throw fieldtrip off? Is there anyway I can correct for this? Thanks, Brittany -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Dec 2 09:26:29 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 2 Dec 2014 08:26:29 +0000 Subject: [FieldTrip] error running FFT when importing eeglab data with interpolated channels In-Reply-To: References: Message-ID: <53F547A0-E8CA-41F2-8AF6-5C808D35546F@donders.ru.nl> Hi Brittany It seems that eeglab2fieldtrip does not know how to deal with the EEG structure once it has interpolated channels in it. This case was probably not considered when implementing the function. Can you report it on http://bugzilla.fcdonders.nl and share a small EEGLAB dataset with it (using http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers)? best regards Robert On 02 Dec 2014, at 06:41, Brittany Alperin wrote: > Hello > > I have preprocessed my data using EEGlab and am running an FFT using fieldtrip. I convert my EEGlab dataset to fieldtrip format using: > data = eeglab2fieldtrip(EEG,'preprocessing','none'); > > No error occurs when I convert the data. My FFT code is: > cfg = []; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.foilim = [4 7]; > cfg.output = 'pow'; > freq = ft_freqanalysis(cfg,data); > > When I try to run the FFT, I get the following error: > > Reference to non-existent field 'trial'. > > Error in ft_freqanalysis (line 382) > ntrials = numel(data.trial); > > Error in FFT_MIST (line 22) > freq = ft_freqanalysis(cfg,data); > > Error in Batch_FFT_MIST (line 11) > FFT_MIST(subj); > > Error in run (line 63) > evalin('caller', [script ';']); > > Interestingly, I only get this error when I try running an FFT on data that has had channels interpolated using EEGlab's interpolation function. > > I have 36 channels, but when I've interpolated some, fieldtrip seems to think the interpolated channels have been deleted. I.e., instead of saying "the input is raw data with 36 channels and 118 trials" it will say "the input is raw data with 34 channels and 118 trials". > > Does anyone know why interpolating channels in EEGlab would throw fieldtrip off? Is there anyway I can correct for this? > > Thanks, > Brittany > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue Dec 2 09:30:07 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 2 Dec 2014 08:30:07 +0000 Subject: [FieldTrip] Easycap 128 XYZ coordinates In-Reply-To: References: Message-ID: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl> Dear Rajat, You can find one in fieldtrip/template/electrode/GSN-HydroCel-128.sfp. Note that there is also a 129 channel version, I don’t know the detailled difference. See http://fieldtrip.fcdonders.nl/template/electrode for the documentation. best regards, Robert On 01 Dec 2014, at 15:31, Rajat Thomas wrote: > ​Dear all, > > Is there anywhere I could download a Easycap 128 channel electrode > coordinate file? On the website of easycap there is only the 64 channel. > > Thanks. > > Rajat > > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.goeldi at psychologie.uzh.ch Tue Dec 2 10:47:52 2014 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Tue, 2 Dec 2014 10:47:52 +0100 Subject: [FieldTrip] Antwort: Re: Easycap 128 XYZ coordinates In-Reply-To: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl> References: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl>, Message-ID: Hi The 129 channel version includes the Cz electrode, the 128 version does not. Unfortunately these electrode positions did not work well for me. I assumed the coordinates are in MNI space (and I might be wrong here). But when I fit it to the template of the MNI head the electrodes do not match. The frontal part is ok, but the parietal electrodes disappear into the head. Looks like the reference head is too small. The electrode positions have to be rearranged manually. I found a template file in spm12 (might also be around in spm8) in ./spm12/EEGtemplates/egi128_GSN_HydroCel.sfp (here the 128 version includes the Cz electrode). This fits perfectly onto the MNI template head. Maybe someone with more experience can verify this discrepancy? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: Robert Oostenveld Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 02.12.2014 09:41 Betreff: Re: [FieldTrip] Easycap 128 XYZ coordinates Dear Rajat, You can find one in fieldtrip/template/electrode/GSN-HydroCel-128.sfp. Note that there is also a 129 channel version, I don’t know the detailled difference. See http://fieldtrip.fcdonders.nl/template/electrode for the documentation. best regards, Robert On 01 Dec 2014, at 15:31, Rajat Thomas wrote: ​Dear all, Is there anywhere I could download a Easycap 128 channel electrode coordinate file? On the website of easycap there is only the 64 channel. Thanks.  Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.Hanslmayr at bham.ac.uk Tue Dec 2 16:52:02 2014 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Tue, 2 Dec 2014 15:52:02 +0000 Subject: [FieldTrip] Lecturer / Senior Lecturer Positions available at the University of Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CEADEDB542@EX8.adf.bham.ac.uk> The School of Psychology at the University of Birmingham (http://www.birmingham.ac.uk/schools/psychology/index.aspx) is currently seeking to fill lecturer / senior lecturer positions. The School seeks to appoint individuals in areas that complement existing strengths within the School and who use advanced neuroscience approaches with a focus in the areas of cognitive and behavioural neuroscience, computational neuroscience and cognitive robotics, sensory motor control, or development throughout the lifespan. The school particularly welcomes applications from individuals doing translational neuroscience in any of the above areas to complement the development of the University's £24M Institute for Translational Medicine in which Psychology is a partner. Exceptional candidates may be considered for the conferment of the title of Reader. Further information and a link to the job application can be found here: http://www.jobs.ac.uk/job/AJZ482/lecturers-senior-lecturers/ Best wishes, Simon Dr. Simon Hanslmayr Senior Lecturer School of Psychology University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.psychologie.uni-konstanz.de/en/cognition-and-oscillations-lab/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From constantino.mendezbertolo at ctb.upm.es Tue Dec 2 18:50:11 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Tue, 2 Dec 2014 18:50:11 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") Message-ID: Dear fieldtrippers, We are doing beamformer with ERF acquired with an Elekta-Neuromag. Regardless our different approaches, we always end with the same problem at the end of the pipeline - the 'inside' field slightly varies between subjects. I attach a plot of the difference between the inside field of two different subjects where one can see that there are truly minor differences. We follow the standard pipeline, I think. We use a template grid and template mri for all the subjects, which we realign using individual headpoints. The resulting leadfield (every subject has the same numbers of dipoles) is used in the sourceanalysis ('lcmv'), and the difference between pre and post periods is first interpolated (using the individual mri aligned) and finally normalized. We also tried using volumereslice before interpolate. Individual results seem coherent but not matter what we end up with different 'inside' fields and sourcegrandaverage complains about that. We are using the fieldtrip-20141201 version and if we use the fieldtrip-20111101 sourcegrandaverage does not complain about that. I don't want to make a really complex mail so I leave it here looking forward to hear input from anybody and willing to give more precise information, Peace! T -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: s5.inside minus s6.inside.jpg Type: image/jpeg Size: 29910 bytes Desc: not available URL: From m.lizarazu at bcbl.eu Wed Dec 3 11:43:36 2014 From: m.lizarazu at bcbl.eu (Mikel Lizarazu) Date: Wed, 3 Dec 2014 11:43:36 +0100 (CET) Subject: [FieldTrip] problems in the fieldtrip2fiff function Message-ID: <303218278.4196758.1417603416701.JavaMail.root@bcbl.eu> Hi all, I would like to convert a Fieldtrip raw data structure to a .fif file, so I can do further analysis using Neuromag software. I am trying to use the fieldtrip2fiff function as in the example, but it is not working: cfg = []; cfg.dataset = 'test.fif'; data = ft_preprocessing(cfg) fieldtrip2fiff('new_test.fif',data) This is the error I am getting: ??? Error using ==> fiff_start_file at 35 Permission denied Error in ==> fiff_start_writing_raw at 54 fid = fiff_start_file(name); Error in ==> fieldtrip2fiff at 124 [outfid, cals] = fiff_start_writing_raw(fifffile, info); I checked this problem in the discussion list and it seems to be unsolved.I downloaded the newest version of Fieldtrip and I checked the writing permissions of my OS (the function [fid, message]=fopen('new_test.fif','w+','ieee-be') works fine). Maybe you are using another code or you have modified this function. Thank you for your time. Best, Mikel -- Mikel Lizarazu Predoctoral researcher www.bcbl.eu Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer -------------- next part -------------- An HTML attachment was scrubbed... URL: From DrakesmithM at cardiff.ac.uk Wed Dec 3 12:32:21 2014 From: DrakesmithM at cardiff.ac.uk (Mark Drakesmith) Date: Wed, 3 Dec 2014 11:32:21 +0000 Subject: [FieldTrip] Post-Doc position in Cognitive Neuroscience / Neuroimaging, Cardiff University Message-ID: <547EF4C5.8040300@cardiff.ac.uk> Dear all Please see link for detail of a post-doctoral vacancy at Cardiff University, starting January 2015. http://www.jobs.ac.uk/job/AKB322/research-associate-neuroimaging/ Many thanks Mark Drakesmith CUBRIC / NMHRI, Cardiff University From tzvetan.popov at uni-konstanz.de Wed Dec 3 16:55:52 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 3 Dec 2014 16:55:52 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") In-Reply-To: References: Message-ID: Peace T, this is due to the unnecessary interpolating and normalizing back and forth where due to some edge irregularities you end up with slightly different inside fields. Using mni aligned grids is actually meant to circumvent the need for normalizing etc. In general you should use ft_sourceinterpolate in order to visualize 1). single subject data (this worked for you) 2). output data from ft_sourcegrandaverage or 3) output from ft_sourcestatistics. Because you are using the mni template approach you’ll never use ft_volumenormalize in your pipeline. So in order to make 2) and 3) work you should exchange the single subject source.dim and source.pos fields with template_grid.dim and template_grid.pos respectively. Subsequently you can call ft_sourcegrandaverage with all your subjects as an input and use the output to interpolate onto the mni template brain. good luck tzvetan > Dear fieldtrippers, > > We are doing beamformer with ERF acquired with an Elekta-Neuromag. Regardless our different approaches, we always end with the same problem at the end of the pipeline - the 'inside' field slightly varies between subjects. I attach a plot of the difference between the inside field of two different subjects where one can see that there are truly minor differences. > > We follow the standard pipeline, I think. We use a template grid and template mri for all the subjects, which we realign using individual headpoints. The resulting leadfield (every subject has the same numbers of dipoles) is used in the sourceanalysis ('lcmv'), and the difference between pre and post periods is first interpolated (using the individual mri aligned) and finally normalized. We also tried using volumereslice before interpolate. > > Individual results seem coherent but not matter what we end up with different 'inside' fields and sourcegrandaverage complains about that. We are using the fieldtrip-20141201 version and if we use the fieldtrip-20111101 sourcegrandaverage does not complain about that. > > I don't want to make a really complex mail so I leave it here looking forward to hear input from anybody and willing to give more precise information, > > Peace! > T > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From constantino.mendezbertolo at ctb.upm.es Wed Dec 3 17:47:17 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Wed, 3 Dec 2014 17:47:17 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") In-Reply-To: References: Message-ID: Dear Tzvetan, Thank you very much, it worked like a charm: substituting .dim and .pos for the one in our template, then averaging and then interpolating. May the gods of beamformer always light up your way, T 2014-12-03 16:55 GMT+01:00 Tzvetan Popov : > Peace T, > this is due to the unnecessary interpolating and normalizing back and > forth where due to some edge irregularities you end up with slightly > different inside fields. Using mni aligned grids is actually meant to > circumvent the need for normalizing etc. > In general you should use ft_sourceinterpolate in order to visualize 1). > single subject data (this worked for you) 2). output data from > ft_sourcegrandaverage or 3) output from ft_sourcestatistics. Because you > are using the mni template approach you’ll never use ft_volumenormalize in > your pipeline. So in order to make 2) and 3) work you should exchange the > single subject source.dim and source.pos fields with template_grid.dim and > template_grid.pos respectively. Subsequently you can call > ft_sourcegrandaverage with all your subjects as an input and use the output > to interpolate onto the mni template brain. > > good luck > tzvetan > > > > Dear fieldtrippers, > > We are doing beamformer with ERF acquired with an Elekta-Neuromag. > Regardless our different approaches, we always end with the same problem at > the end of the pipeline - the 'inside' field slightly varies between > subjects. I attach a plot of the difference between the inside field of two > different subjects where one can see that there are truly minor differences. > > We follow the standard pipeline, I think. We use a template grid and > template mri for all the subjects, which we realign using individual > headpoints. The resulting leadfield (every subject has the same numbers of > dipoles) is used in the sourceanalysis ('lcmv'), and the difference between > pre and post periods is first interpolated (using the individual mri > aligned) and finally normalized. We also tried using volumereslice before > interpolate. > > Individual results seem coherent but not matter what we end up with > different 'inside' fields and sourcegrandaverage complains about that. We > are using the fieldtrip-20141201 version and if we use > the fieldtrip-20111101 sourcegrandaverage does not complain about that. > > I don't want to make a really complex mail so I leave it here looking > forward to hear input from anybody and willing to give more precise > information, > > Peace! > T > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From assaf.harel at wright.edu Wed Dec 3 22:43:02 2014 From: assaf.harel at wright.edu (Harel, Assaf) Date: Wed, 3 Dec 2014 21:43:02 +0000 Subject: [FieldTrip] Ph.D. position - Human Neuroscience and Visual Cognition Lab, Wright State University Message-ID: Two Ph.D. positions are now available at the Human Neuroscience and Visual Cognition Lab at the Department of Psychology, Wright State University beginning Fall 2015. The newly established lab is headed by Dr. Assaf Harel and investigates high-level vision and its neural substrates. We are interested in how visual recognition occurs in real-world settings and adopt a neuroergonomic approach to study the applied aspects of high-level vision. For this purpose, we employ a diversity of cognitive neuroscience methods, including EEG, fMRI, and psychophysics. Topics of research include visual expertise, object and scene recognition, categorization and perceptual learning. For more information on the lab, contact Dr. Assaf Harel at: assaf.harel at wright.edu. The Department of Psychology is housed in the College of Science and Mathematics, offers a Ph.D. in Human Factors and Industrial/ Organizational Psychology, and has 3 undergraduate concentration areas: (1) Cognition and Perception, (2) Industrial/ Organizational, and (3) Behavioral Neuroscience. Wright State University was recently ranked among the "Best in the Midwest" universities by The Princeton Review, listed among 260 Best National Universities in the annual "America's Best Colleges" rankings by U.S. News and World Report, and ranked fourth nationally among universities with limited numbers of doctoral programs in the Faculty Scholarly Productivity Index. For more information on the department and the graduate program go to: http://science-math.wright.edu/psychology/programs/graduate-program-overview. Application deadline is January 1, 2015. -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Thu Dec 4 11:24:30 2014 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Thu, 04 Dec 2014 11:24:30 +0100 Subject: [FieldTrip] =?utf-8?q?How_to_reverse_trial_order=3F?= Message-ID: <13b4-54803680-49-743e7e00@142888300> Dear Fieldtrippers, I would like to reverse the order of my trials (last trial to first position, first trial to last position). Is there a function for this (eg. sth like ft_reverse_trials?). Thank you very much!! Best regards, Barbara From julian.keil at gmail.com Thu Dec 4 12:06:52 2014 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 4 Dec 2014 12:06:52 +0100 Subject: [FieldTrip] How to reverse trial order? In-Reply-To: <13b4-54803680-49-743e7e00@142888300> References: <13b4-54803680-49-743e7e00@142888300> Message-ID: <5BCE878D-65A4-44F9-A284-7EAD22AD3898@gmail.com> Hi Barbara, this can be solved by basic Matlab: Use the fliplr command to flip the trials. For Example: data.trial = fliplr(data.trial); Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 04.12.2014 um 11:24 schrieb Barbara Schorr: > Dear Fieldtrippers, > > I would like to reverse the order of my trials (last trial to first position, first trial to last position). > Is there a function for this (eg. sth like ft_reverse_trials?). > > Thank you very much!! > > Best regards, > Barbara > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Thu Dec 4 12:31:23 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 4 Dec 2014 12:31:23 +0100 Subject: [FieldTrip] Surface laplacian Message-ID: Dear all, I'm interested to apply surface laplacian on my EEG data, however, I was not sure where I can locate information regarding electrode definition. Would someone please show me how I could create an electrode definition file? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Fri Dec 5 22:20:36 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Fri, 5 Dec 2014 21:20:36 +0000 Subject: [FieldTrip] about detrend Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Fri Dec 5 23:11:22 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 17:11:22 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54822D8A.8000700@hms.harvard.edu> Hi Yun, Detrending a data set only removes the regression line. It does not ensure that the process has zero mean, which translates to a zero DC component in frequency space. The most direct way to ensure zero DC is simply to remove the trial mean from each epoch. Best, Alexander Alexander Nakhnikian, Ph.D. Post Doctoral Fellow, Clinical Research Training Program Harvard Medical School Boston VA Healthcare System, Brockton MA On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting cfg.detrend > = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Fri Dec 5 23:19:07 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 17:19:07 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54822F5B.3050407@hms.harvard.edu> Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting cfg.detrend > = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Fri Dec 5 23:19:28 2014 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Fri, 5 Dec 2014 17:19:28 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: Hi Yun, If I'm right, just by high-pass filtering your data you should be able to remove the DC component of it. Best Rodrigo On Fri, Dec 5, 2014 at 4:20 PM, Yun Wen wrote: > Hi all, I want to remove DC offset before applying the high-pass filter. > I was wondering if I can achieve that by putting cfg.detrend = 'yes' > before cfg.hpfilter = 'yes', something like: > > > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > > > Thank you in advance. > > > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Sat Dec 6 00:20:19 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Fri, 5 Dec 2014 23:20:19 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <54822F5B.3050407@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I'd better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Sat Dec 6 02:13:59 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 20:13:59 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54825857.9010807@hms.harvard.edu> It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: > > Hi, Alexander & Rodrigo. Thank you very much for your help. I > collected my data with DC recordings (BioSemi system). I have seen > some discussion on the DC offset: > > http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html > > http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html > > It seems to me that I’d better remove DC offset of continuous data > before high-pass filter. Am I right? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *Alexander > Nakhnikian > *Sent:* Friday, December 05, 2014 10:19 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > Hello Again, > > I think there's an error in my response. I think removing the linear > trend should also set the mean to zero already since the best fit line > incorporates vertical offset. Sorry about that. > > A > > > > On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting > cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Sat Dec 6 08:49:54 2014 From: cb802 at cam.ac.uk (Christopher Brown) Date: Sat, 06 Dec 2014 07:49:54 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics Message-ID: <74e335a2b663ec3b9d1dff326e5d0ba8@cam.ac.uk> Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- DR CHRISTOPHER BROWN _Research Associate __| CamPain Group __| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge_ Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Sat Dec 6 12:33:42 2014 From: cb802 at cam.ac.uk (=?utf-8?B?RHIgQyBBIEJyb3du?=) Date: Sat, 06 Dec 2014 11:33:42 +0000 Subject: [FieldTrip] =?utf-8?q?Cluster_analysis_on_correlation_statistics?= Message-ID: Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Sat Dec 6 16:33:16 2014 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Sat, 6 Dec 2014 15:33:16 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <95C9A440AA5AB042A81E170A4573A15A6F351F@exprd03.hosting.ru.nl> Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 From Yun.Wen at nottingham.ac.uk Sun Dec 7 11:53:26 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Sun, 7 Dec 2014 10:53:26 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <54825857.9010807@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I'd better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Sun Dec 7 17:50:01 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Sun, 7 Dec 2014 11:50:01 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54848539.5010000@hms.harvard.edu> I would. Baseline correction removes background components from the ERP but it does remove linear offset that is part of the post-stimulus time series. In addition to getting ride of DC, detrending also removes certain non-stationarities and reduces the severity of edge effects. I use it as a matter of course unless there is a compelling reason to omit it from the analysis pipeline. On 12/7/14, 5:53 AM, Yun Wen wrote: > > Hi, Alexander. Thank you for your help. Do you suggest that I do > baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend > = 'yes' on epoched data? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *Alexander > Nakhnikian > *Sent:* Saturday, December 06, 2014 1:14 AM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > It looks as though the take home message is that in theory high pass > filters remove DC but you can't be sure how they will interact with > empirical data since there is no perfect filter in the real world. If > other people report substantial artifacts after filtering data without > removing the DC component I suggest getting rid of it. To answer your > original question, assuming you're detrending each epoch individually > it should remove the DC component or at least reduce it substantially. > > I hope that helps. > > > > On 12/5/14, 6:20 PM, Yun Wen wrote: > > Hi, Alexander & Rodrigo. Thank you very much for your help. I > collected my data with DC recordings (BioSemi system). I have seen > some discussion on the DC offset: > > http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html > > http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html > > It seems to me that I’d better remove DC offset of continuous data > before high-pass filter. Am I right? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] > *On Behalf Of *Alexander Nakhnikian > *Sent:* Friday, December 05, 2014 10:19 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > Hello Again, > > I think there's an error in my response. I think removing the > linear trend should also set the mean to zero already since the > best fit line incorporates vertical offset. Sorry about that. > > A > > > > > On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the > high-pass filter. I was wondering if I can achieve that by > putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', > something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Mon Dec 8 09:55:36 2014 From: cb802 at cam.ac.uk (=?utf-8?B?RHIgQyBBIEJyb3du?=) Date: Mon, 08 Dec 2014 08:55:36 +0000 Subject: [FieldTrip] =?utf-8?q?Cluster_analysis_on_correlation_statistics?= Message-ID: Hi Tom Great! That would be really helpful, thank you. I'm still learning fieldtrip so it be interesting to see how it works. The ft_statistics_montecarlo function implies that a custom statistic of choice can be used but I haven't looked deep enough into the function yet to get a could understanding of it. If anything publishable comes out of it I can acknowledge you if you wish? Best wishes Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Marshall, T.R. (Tom)" To: "FieldTrip discussion list" Subject: [FieldTrip] Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 15:33 Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:10:53 2014 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:10:53 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <001f01d012c6$deb62d10$9c228730$@artinis.com> Hi Tom, Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). that’s correct, Tom ;) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Dr C A Brown Sent: Monday, December 8, 2014 9:56 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hi Tom Great! That would be really helpful, thank you. I'm still learning fieldtrip so it be interesting to see how it works. The ft_statistics_montecarlo function implies that a custom statistic of choice can be used but I haven't looked deep enough into the function yet to get a could understanding of it. If anything publishable comes out of it I can acknowledge you if you wish? Best wishes Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Marshall, T.R. (Tom)" > To: "FieldTrip discussion list" > Subject: [FieldTrip] Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 15:33 Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Dec 8 10:17:56 2014 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 08 Dec 2014 10:17:56 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <54856CC4.8050902@fcdonders.ru.nl> Hi Chris, For getting to grips with the cluster-based permutation framework, the best starting point is Eric Maris and Robert Oostenveld's 2007 Journal of Neuroscience Methods paper ('Nonparametric statistical testing of EEG- and MEG-data'). It's designed with cognitive neuroscientists (rather than statisticians) in mind so is not too daunting a read ;) Best, Tom On 12/8/2014 9:55 AM, Dr C A Brown wrote: > Hi Tom > > Great! That would be really helpful, thank you. I'm still learning > fieldtrip so it be interesting to see how it works. The > ft_statistics_montecarlo function implies that a custom statistic of > choice can be used but I haven't looked deep enough into the function > yet to get a could understanding of it. > > If anything publishable comes out of it I can acknowledge you if you wish? > > Best wishes > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Marshall, T.R. (Tom)" > To: "FieldTrip discussion list" > Subject: [FieldTrip] Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 15:33 > > Hi Chris, > > I wrote some functions for doing this a while ago and would be happy to share them. > > Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). > > Best, > Tom > ________________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] > Sent: 06 December 2014 12:33 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. > > Kind regards > > Chris > > -- > > Dr Christopher Brown > Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:18:09 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:18:09 +0100 Subject: [FieldTrip] about detrend In-Reply-To: <54848539.5010000@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> <54848539.5010000@hms.harvard.edu> Message-ID: <002901d012c7$e2d005a0$a87010e0$@artinis.com> Hey guys, FieldTrip is subtracting the DC component prior to filtering to reduce artifacts arising from DC components (and then adding it back). FieldTrip is doing this always, i.e. also if you do not want a demeaned signal. As FieldTrip is open source, you can easily check all this by browsing through the functions yourself.Then you’ll also see the order in which preprocessing options are applied. They do NOT depend on the how you set them in your script, but follow a hard-coded logic. First the detrending/demeaning (called polyremoval in FieldTrip) is applied, and then the filters are applied. For checking these things yourself, checkout the fieldtrip/private/preproc.m function and the fieldtrip/preproc/ft_preproc_*filter. functions. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Sunday, December 7, 2014 5:50 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend I would. Baseline correction removes background components from the ERP but it does remove linear offset that is part of the post-stimulus time series. In addition to getting ride of DC, detrending also removes certain non-stationarities and reduces the severity of edge effects. I use it as a matter of course unless there is a compelling reason to omit it from the analysis pipeline. On 12/7/14, 5:53 AM, Yun Wen wrote: Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:19:56 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:19:56 +0100 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> oh and another thing: in FieldTrip, detrending inherently also demeans, or in other words, if the fitted first order polynomial is removed, also the zeroth order polynomial is. -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Yun Wen Sent: Sunday, December 7, 2014 11:53 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Mon Dec 8 15:56:02 2014 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Mon, 8 Dec 2014 14:56:02 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Hi Chris, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. For correlating/regressing single trial data of a single subject, you use the ft_statfun_indepsamplesregrT (with the units-of-observations being the trials, which each correspond to one column of your design matrix). For correlating/regressing subject-averaged data of a group of subjects, you also use the ft_statfun_indepsamplesregrT (with the units-of-observations being the subjects, which each correspond to one column of your design matrix). Note, in this case your behavioral data (accuracy or RT) or also subject averages. Best, Eric Maris ________________________________ Van: Dr C A Brown [cb802 at cam.ac.uk] Verzonden: zaterdag 6 december 2014 12:33 Aan: fieldtrip at science.ru.nl Onderwerp: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Mon Dec 8 16:05:18 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Mon, 8 Dec 2014 16:05:18 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Message-ID: Hey Chris, We've recently included a function, ft_statfun_intersubcorr, that seems to do what you're asking for (i.e. a brain-behavior correlation across subject/trials). It works fine, but given that it hasn't been fully accommodated, it has yet not been documented. Please check the help for further instructions on how to use this function. Best regards, Arjen 2014-12-08 15:56 GMT+01:00 Maris, E.G.G. (Eric) : > Hi Chris, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across subjects, > with a behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > For correlating/regressing single trial data of a single subject, you use > the ft_statfun_indepsamplesregrT (with the units-of-observations being the > trials, which each correspond to one column of your design matrix). > > For correlating/regressing subject-averaged data of a group of subjects, > you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral data > (accuracy or RT) or also subject averages. > > Best, > > Eric Maris > > > > ------------------------------ > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across subjects, > with a behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about this on > this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will embark > on writing it myself and sharing my results with everyone for feedback. > Being new to Fieldtrip I would greatly appreciate any collaborative help > with this. May I check my understanding on something before getting > started: To allow for multiple comparisons correction using monte carlo for > example, as part of a cluster analysis, I presume the output of the > function must be t values rather than correlation coefficients? Any other > hints as to how to write this are most welcome. > > Kind regards > > Chris > -- > > *Dr Christopher Brown* *Research Associate **| CamPain Group **| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge* > > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Dec 8 16:10:24 2014 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 08 Dec 2014 16:10:24 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Message-ID: <5485BF60.8030100@fcdonders.ru.nl> Hm... it seems that I may have reinvented the wheel (or perhaps invented a cruder wheel before Eric and co provided this more streamlined one). Eric, can indepsamplesregrT also compute nonparametric correlation coefficients (eg Spearman)? Best, Tom On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: > Hi Chris, > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across > subjects, with a behavioral variable. Not linear regression across > conditions as is already implemented in the ft_statfun_depsamplesregrT > function. > For correlating/regressing single trial data of a single subject, you > use the ft_statfun_indepsamplesregrT (with the units-of-observations > being the trials, which each correspond to one column of your design > matrix). > For correlating/regressing subject-averaged data of a group of > subjects, you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral > data (accuracy or RT) or also subject averages. > Best, > Eric Maris > ------------------------------------------------------------------------ > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across > subjects, with a behavioral variable. Not linear regression across > conditions as is already implemented in the ft_statfun_depsamplesregrT > function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about > this on this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will > embark on writing it myself and sharing my results with everyone for > feedback. Being new to Fieldtrip I would greatly appreciate any > collaborative help with this. May I check my understanding on > something before getting started: To allow for multiple comparisons > correction using monte carlo for example, as part of a cluster > analysis, I presume the output of the function must be t values rather > than correlation coefficients? Any other hints as to how to write this > are most welcome. > > Kind regards > > Chris > > -- > *Dr Christopher Brown* > /Research Associate//| CamPain Group//| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge/ > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Mon Dec 8 16:15:56 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Mon, 8 Dec 2014 15:15:56 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B689E@EXCHANGE2.ad.nottingham.ac.uk> Hi, Jörn & Alexander. Thank you for all the explanations. ☺ Best, Yun ~*~*~*~*~*~*~*~*~*~*~*~*~ Yun Wen 温韫 PhD Candidate Rm A25, School of Psychology University of Nottingham University Park, NG7 2RD Phone: +44 [0]115 846-8129 Tout finit toujours bien, si ça ne va pas, c'est que ce n'est pas la fin. From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of J?rn M. Horschig Sent: Monday, December 08, 2014 9:20 AM To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] about detrend oh and another thing: in FieldTrip, detrending inherently also demeans, or in other words, if the fitted first order polynomial is removed, also the zeroth order polynomial is. -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Yun Wen Sent: Sunday, December 7, 2014 11:53 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Tue Dec 9 12:27:55 2014 From: cb802 at cam.ac.uk (Dr Christopher Brown) Date: Tue, 9 Dec 2014 11:27:55 -0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <5485BF60.8030100@fcdonders.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> <5485BF60.8030100@fcdonders.ru.nl> Message-ID: <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> Dear Eric, Tom, Arjen Thanks for the information and it's good to know the functionality I need is already there. Just to clarify, I understand the situation as thus (please correct any errors of understanding): - The ft_statfun_indepsamplesregrT function can be used to calculate parametric linear regression statistics with ivar as the independent variable of interest, e.g. a behavioural variable across trials or subjects, and uvar as units (e.g. trials or subjects). - The new ft_statfun_intersubcorr can calculate Spearman correlation statistics between subjects (but not between trials), and doesn't currently have a parametric (e.g., Pearson's) option, although this appears to be covered by the ft_statfun_indepsamplesregrT function anyway. By the way, in the ft_statfun_intersubcorr description/instructions, some of the text appears to refer to ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the behavioural variable of interest rather than "conditions that must be compared" as currently stated? Also, what is the reason this function cannot be used across trials within a subject? Best wishes Chris Dr Christopher Brown Research Associate | CamPain Research Group | Department of Anaesthesia | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Tom Marshall Sent: 08 December 2014 15:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hm... it seems that I may have reinvented the wheel (or perhaps invented a cruder wheel before Eric and co provided this more streamlined one). Eric, can indepsamplesregrT also compute nonparametric correlation coefficients (eg Spearman)? Best, Tom On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: Hi Chris, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. For correlating/regressing single trial data of a single subject, you use the ft_statfun_indepsamplesregrT (with the units-of-observations being the trials, which each correspond to one column of your design matrix). For correlating/regressing subject-averaged data of a group of subjects, you also use the ft_statfun_indepsamplesregrT (with the units-of-observations being the subjects, which each correspond to one column of your design matrix). Note, in this case your behavioral data (accuracy or RT) or also subject averages. Best, Eric Maris _____ Van: Dr C A Brown [ cb802 at cam.ac.uk] Verzonden: zaterdag 6 december 2014 12:33 Aan: fieldtrip at science.ru.nl Onderwerp: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Dec 9 12:40:58 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 9 Dec 2014 12:40:58 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> <5485BF60.8030100@fcdonders.ru.nl> <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> Message-ID: Hi Chris, Quick reply: - The new ft_statfun_intersubcorr can calculate Spearman correlation statistics between subjects (but not between trials), and doesn’t currently have a parametric (e.g., Pearson’s) option, although this appears to be covered by the ft_statfun_indepsamplesregrT function anyway. > I implemented a cfg.type, allowing the specification of the correlation statistics option (e.g. Pearson), but haven't yet tested it. By the way, in the ft_statfun_intersubcorr description/instructions, some of the text appears to refer to ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the behavioural variable of interest rather than “conditions that must be compared” as currently stated? Also, what is the reason this function cannot be used across trials within a subject? > ft_statfun_intersubcorr was implemented last week on request. the documentation was taken from ft_statfun_depsamplesT and needs to be updated (thanks for reminding). The function computes a correlation across observations (subjects/trials) where one input is neural data, and the other behavior (enforce a match of dimension and size), and then transforms it to a t-value. Theoretically therefore the function could also be used to calculate a correlation statistics across trials in a subject. >> Btw, I didn't see Eric's reply before. But if you get it to work with ft_statfun_indepsamplesregr, I'd go for that. best regards, arjen 2014-12-09 12:27 GMT+01:00 Dr Christopher Brown : > Dear Eric, Tom, Arjen > > > > Thanks for the information and it’s good to know the functionality I need > is already there. Just to clarify, I understand the situation as thus > (please correct any errors of understanding): > > - The ft_statfun_indepsamplesregrT function can be used to > calculate parametric linear regression statistics with ivar as the > independent variable of interest, e.g. a behavioural variable across trials > or subjects, and uvar as units (e.g. trials or subjects). > > - The new ft_statfun_intersubcorr can calculate Spearman > correlation statistics between subjects (but not between trials), and > doesn’t currently have a parametric (e.g., Pearson’s) option, although this > appears to be covered by the ft_statfun_indepsamplesregrT function > anyway. By the way, in the ft_statfun_intersubcorr > description/instructions, some of the text appears to refer to > ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the > behavioural variable of interest rather than “conditions that must be > compared” as currently stated? Also, what is the reason this function > cannot be used across trials within a subject? > > > > Best wishes > > Chris > > > > *Dr Christopher Brown* > > *Research Associate | CamPain Research Group | Department of Anaesthesia | > University of Cambridge* > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Tom Marshall > *Sent:* 08 December 2014 15:10 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Cluster analysis on correlation statistics > > > > Hm... it seems that I may have reinvented the wheel (or perhaps invented a > cruder wheel before Eric and co provided this more streamlined one). > > Eric, can indepsamplesregrT also compute nonparametric correlation > coefficients (eg Spearman)? > > Best, > Tom > > On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: > > Hi Chris, > > > > Just to clarify my last email: I'm referring to correlation between either > single trial data within subject, or averaged ERPs across subjects, with a > behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > > > For correlating/regressing single trial data of a single subject, you use > the ft_statfun_indepsamplesregrT (with the units-of-observations being the > trials, which each correspond to one column of your design matrix). > > > > For correlating/regressing subject-averaged data of a group of subjects, > you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral data > (accuracy or RT) or also subject averages. > > > > Best, > > > > Eric Maris > > > > > > > ------------------------------ > > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > > > Just to clarify my last email: I'm referring to correlation between either > single trial data within subject, or averaged ERPs across subjects, with a > behavioral variable. Not linear regression across conditions as is already > implemented in the ft_statfun_depsamplesregrT function. > > > > Many thanks > > Chris > > > > Dr Christopher Brown > > Research Associate > > > > Sent from a mobile device, please excuse my brevity. > > > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about this on > this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will embark > on writing it myself and sharing my results with everyone for feedback. > Being new to Fieldtrip I would greatly appreciate any collaborative help > with this. May I check my understanding on something before getting > started: To allow for multiple comparisons correction using monte carlo for > example, as part of a cluster analysis, I presume the output of the > function must be t values rather than correlation coefficients? Any other > hints as to how to write this are most welcome. > > Kind regards > > Chris > > -- > > *Dr Christopher Brown* > > *Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge* > > > > Box 93 > > Addenbrooke's Hospital > > Hills Road > > Cambridge CB2 0QQ > > > > 01223 256 995 > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Tue Dec 9 23:51:50 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Tue, 9 Dec 2014 23:51:50 +0100 Subject: [FieldTrip] (no subject) Message-ID: Hey Fieldtrippers, I am fighting with a self defined trialfunction. Basically I want to cut always at one event called ceck. If there is another event in the piece cut out, called resp I want to log the distance between the two of them. I tried function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('pres', {event.value}))).value]'; sample = [event(find(strcmp('pres', {event.value}))).sample]'; % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = sample + pretrig trlend = sample + posttrig offset = sample - sample + pretrig RT = sample2 - sample newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl]; end But the problem is, that not always there is this second event, so length(sample1) is not equal to length (sample2). Now I would just like that every time when event 2 is missing sample 2 is just set to zero, so that the two vectors have the same length and the function is working. Is this possible? Thanks a million Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Dec 10 07:19:28 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Dec 2014 07:19:28 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Het katrin, you could make a couple of conditional if statements (eg creating and changing the value of a variable event1ctr). For example, conceptually: Event1ctr = 0 Loop start If event1 & event1ctr == 0 Event1ctr = 1 Elseif event1 & event1ctr Trl = ... with a zero for trlend # no event2 found Event1ctr = 0 End If event2 Trl = ... # normal trial Event1ctr= 0 End Loop end Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" het volgende: > Hey Fieldtrippers, > > I am fighting with a self defined trialfunction. > Basically I want to cut always at one event called ceck. If there is > another event in the piece cut out, called resp I want to log the distance > between the two of them. > I tried > > function [trl, event] = response_trialfun(cfg); > > % read the header information and the events from the data > hdr = ft_read_header(cfg.dataset); > event = ft_read_event(cfg.dataset); > > > % search for "trigger" events > value = [event(find(strcmp('pres', {event.value}))).value]'; > sample = [event(find(strcmp('pres', {event.value}))).sample]'; > > % search for "trigger" events > value2 = [event(find(strcmp('resp', {event.value}))).value]'; > sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; > > % determine the number of samples before and after the trigger > pretrig = -round(cfg.trialdef.prestim * hdr.Fs); > posttrig = round(cfg.trialdef.poststim * hdr.Fs); > > trl = []; > > trlbegin = sample + pretrig > trlend = sample + posttrig > offset = sample - sample + pretrig > RT = sample2 - sample > > newtrl = [trlbegin trlend offset RT]; > trl = [trl; newtrl]; > > end > > > But the problem is, that not always there is this second event, so > length(sample1) is not equal to length (sample2). Now I would just like > that every time when event 2 is missing sample 2 is just set to zero, so > that the two vectors have the same length and the function is working. Is > this possible? > Thanks a million > Katrin > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Wed Dec 10 12:56:19 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Wed, 10 Dec 2014 12:56:19 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Hey Arjen, hey all, so, I used some if statements, yes, and now I really get lists of trialbegin, trialend, offset and RT as I wanted them, however at the end only one segment (with the last infos of the lists) is created. I just don't get what is wrong. Could you have another short look? Thanks a million Katrin function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('ceck', {event.value}))).value]'; sample = [event(find(strcmp('ceck', {event.value}))).sample]' % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]' % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = []; trlend = [] offset = []; RT = []; i=7 %delete training trials j=1 k=1 while i <= (length(sample)) if sample2(j)-sample(i)<=2500 & sample2(j)-sample(i)>=1 % find resp appearing after ceck within RT-window trlbegin (k) = sample (i) + pretrig; trlend (k) = sample (i) + posttrig; offset (k) = sample (i) - sample (i) + pretrig; RT(k) = sample2 (j) - sample (i); i=i+1 j=j+1 k=k+1 elseif sample2(j)-sample(i)<=0 j=j+1 else i=i+1 end end newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl] 2014-12-10 7:19 GMT+01:00 Arjen Stolk : > Het katrin, you could make a couple of conditional if statements (eg > creating and changing the value of a variable event1ctr). For example, > conceptually: > > Event1ctr = 0 > > Loop start > > If event1 & event1ctr == 0 > Event1ctr = 1 > Elseif event1 & event1ctr > Trl = ... with a zero for trlend # no event2 found > Event1ctr = 0 > End > > If event2 > Trl = ... # normal trial > Event1ctr= 0 > End > > Loop end > Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" > het volgende: > >> Hey Fieldtrippers, >> >> I am fighting with a self defined trialfunction. >> Basically I want to cut always at one event called ceck. If there is >> another event in the piece cut out, called resp I want to log the distance >> between the two of them. >> I tried >> >> function [trl, event] = response_trialfun(cfg); >> >> % read the header information and the events from the data >> hdr = ft_read_header(cfg.dataset); >> event = ft_read_event(cfg.dataset); >> >> >> % search for "trigger" events >> value = [event(find(strcmp('pres', {event.value}))).value]'; >> sample = [event(find(strcmp('pres', {event.value}))).sample]'; >> >> % search for "trigger" events >> value2 = [event(find(strcmp('resp', {event.value}))).value]'; >> sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; >> >> % determine the number of samples before and after the trigger >> pretrig = -round(cfg.trialdef.prestim * hdr.Fs); >> posttrig = round(cfg.trialdef.poststim * hdr.Fs); >> >> trl = []; >> >> trlbegin = sample + pretrig >> trlend = sample + posttrig >> offset = sample - sample + pretrig >> RT = sample2 - sample >> >> newtrl = [trlbegin trlend offset RT]; >> trl = [trl; newtrl]; >> >> end >> >> >> But the problem is, that not always there is this second event, so >> length(sample1) is not equal to length (sample2). Now I would just like >> that every time when event 2 is missing sample 2 is just set to zero, so >> that the two vectors have the same length and the function is working. Is >> this possible? >> Thanks a million >> Katrin >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Wed Dec 10 23:16:29 2014 From: joseluisblues at gmail.com (Jose) Date: Wed, 10 Dec 2014 23:16:29 +0100 Subject: [FieldTrip] Micromed data Message-ID: Dear fellows, I am a beginner in FT, and I need some help. I am analysing EEG Micromed data, which give as ouputs .trc or .edf files. I am trying to workout the edf files, which store the actual 29 electrodes recorded during the experiment, I have troubles putting the data in FT format, Either with: hdr = ft_read_header(data); event = ft_read_event(data); data_2 = ft_read_data(data); I obtain 405 events, which are 1s longer (1024 samples). This is actually more related to the frequency sampling, and it is nothing related to the structures of the trials, Has anybody experience with Micromed data?, Thanks in advance, José Luis -- José Luis ULLOA FULGERI 33 (0)6.29.50.64.93 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Dec 11 08:53:56 2014 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 11 Dec 2014 08:53:56 +0100 Subject: [FieldTrip] Micromed data In-Reply-To: References: Message-ID: <002801d01517$9dfdee40$d9f9cac0$@artinis.com> Hi José, you might want to start looking here: http://fieldtrip.fcdonders.nl/getting_started and then head to one of the tutorials on preprocessing or read the walkthrough. That should help to get you started. As a hint, you can better use ft_preprocessing rather than ft_read_XXX. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jose Sent: Wednesday, December 10, 2014 11:16 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Micromed data Dear fellows, I am a beginner in FT, and I need some help. I am analysing EEG Micromed data, which give as ouputs .trc or .edf files. I am trying to workout the edf files, which store the actual 29 electrodes recorded during the experiment, I have troubles putting the data in FT format, Either with: hdr = ft_read_header(data); event = ft_read_event(data); data_2 = ft_read_data(data); I obtain 405 events, which are 1s longer (1024 samples). This is actually more related to the frequency sampling, and it is nothing related to the structures of the trials, Has anybody experience with Micromed data?, Thanks in advance, José Luis -- José Luis ULLOA FULGERI 33 (0)6.29.50.64.93 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Dec 11 15:35:45 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 11 Dec 2014 14:35:45 +0000 Subject: [FieldTrip] Beamformer source timeseries Message-ID: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> Dear Fieldtrippers, Sorry if I not gotten to the right tutorial page. I have an EEG dataset with 128 electrodes. What I would like is, if there are N sources found using a Beamformer, I would like N timeseries corresponding to these sources which have been split in to trials as in my original sensor-space data. Instead in the tutorial, it is about getting beta power at various locations. Any help on obtaining this would be very useful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Dec 11 15:48:04 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Thu, 11 Dec 2014 15:48:04 +0100 Subject: [FieldTrip] Beamformer source timeseries In-Reply-To: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> References: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> Message-ID: <005401d01551$78af40f0$6a0dc2d0$@artinis.com> Hey Rajat, an example of what you want can be found here: http://fieldtrip.fcdonders.nl/tutorial/shared/virtual_sensors Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Rajat Thomas Sent: Thursday, December 11, 2014 3:36 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Beamformer source timeseries Dear Fieldtrippers, Sorry if I not gotten to the right tutorial page. I have an EEG dataset with 128 electrodes. What I would like is, if there are N sources found using a Beamformer, I would like N timeseries corresponding to these sources which have been split in to trials as in my original sensor-space data. Instead in the tutorial, it is about getting beta power at various locations. Any help on obtaining this would be very useful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jb4590 at nyu.edu Thu Dec 11 19:50:20 2014 From: jb4590 at nyu.edu (Julia Basso) Date: Thu, 11 Dec 2014 13:50:20 -0500 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip Message-ID: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia *Julia C. Basso, PhDPost-doctoral Research AssociateNew York UniversityCenter for Neural ScienceSuzuki Laboratorywww.suzukilab.com * -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Fri Dec 12 10:51:20 2014 From: n.lam at fcdonders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Fri, 12 Dec 2014 09:51:20 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: , Message-ID: Hi Katrin, Not sure if you solved it yet, but it looks like you need to update 'newtrl' and 'trl' within your while loop, and not outside of the loop. Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of KatrinH Heimann [katrinheimann at gmail.com] Sent: 10 December 2014 12:56 To: FieldTrip discussion list Subject: Re: [FieldTrip] (no subject) Hey Arjen, hey all, so, I used some if statements, yes, and now I really get lists of trialbegin, trialend, offset and RT as I wanted them, however at the end only one segment (with the last infos of the lists) is created. I just don't get what is wrong. Could you have another short look? Thanks a million Katrin function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('ceck', {event.value}))).value]'; sample = [event(find(strcmp('ceck', {event.value}))).sample]' % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]' % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = []; trlend = [] offset = []; RT = []; i=7 %delete training trials j=1 k=1 while i <= (length(sample)) if sample2(j)-sample(i)<=2500 & sample2(j)-sample(i)>=1 % find resp appearing after ceck within RT-window trlbegin (k) = sample (i) + pretrig; trlend (k) = sample (i) + posttrig; offset (k) = sample (i) - sample (i) + pretrig; RT(k) = sample2 (j) - sample (i); i=i+1 j=j+1 k=k+1 elseif sample2(j)-sample(i)<=0 j=j+1 else i=i+1 end end newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl] 2014-12-10 7:19 GMT+01:00 Arjen Stolk >: Het katrin, you could make a couple of conditional if statements (eg creating and changing the value of a variable event1ctr). For example, conceptually: Event1ctr = 0 Loop start If event1 & event1ctr == 0 Event1ctr = 1 Elseif event1 & event1ctr Trl = ... with a zero for trlend # no event2 found Event1ctr = 0 End If event2 Trl = ... # normal trial Event1ctr= 0 End Loop end Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" > het volgende: Hey Fieldtrippers, I am fighting with a self defined trialfunction. Basically I want to cut always at one event called ceck. If there is another event in the piece cut out, called resp I want to log the distance between the two of them. I tried function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('pres', {event.value}))).value]'; sample = [event(find(strcmp('pres', {event.value}))).sample]'; % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = sample + pretrig trlend = sample + posttrig offset = sample - sample + pretrig RT = sample2 - sample newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl]; end But the problem is, that not always there is this second event, so length(sample1) is not equal to length (sample2). Now I would just like that every time when event 2 is missing sample 2 is just set to zero, so that the two vectors have the same length and the function is working. Is this possible? Thanks a million Katrin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.kristensen at gipsa-lab.grenoble-inp.fr Fri Dec 12 15:49:10 2014 From: emmanuelle.kristensen at gipsa-lab.grenoble-inp.fr (Kristensen Emmanuelle) Date: Fri, 12 Dec 2014 15:49:10 +0100 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? In-Reply-To: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr> Message-ID: <548B0066.3090309@gipsa-lab.grenoble-inp.fr> Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Fri Dec 12 23:24:17 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Dec 2014 22:24:17 +0000 Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From spa268 at nyu.edu Sat Dec 13 14:04:25 2014 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Sat, 13 Dec 2014 07:04:25 -0600 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: Hello Emmanuelle, I don't think a high-pass filter can replace demeaning. A high-pass filter removes a linear trend, but not a fixed value. Imagine a case where a trial is a flat line at 100 uV for the whole epoch; demeaning would change this trial to 0 uV for the whole epoch, whereas a high-pass filter would (I think) not change it. Detrending, on the other hand, removes a linear trend. There was a discussion very recently on this list discussing detrending vs. high-pass filtering, so you may be interested in checking it out. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Sat Dec 13 14:49:32 2014 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Sat, 13 Dec 2014 14:49:32 +0100 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) Message-ID: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory . Hope this helps, Haiteng On 13 December 2014 at 12:00, wrote: > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Correction baseline : removing the mean value or high-pass > filtering ? (Kristensen Emmanuelle) > 2. Question about how to reduce the file size (Caspar, Emilie) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1ceca823/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Fri, 12 Dec 2014 22:24:17 +0000 > From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size > Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> > Content-Type: text/plain; charset="us-ascii" > > Dear Fieltrippers, > I did a pilot study on one participant today. Now that I'm trying to > analyze my data, I realize that the size file is too big for my computer > (size = 3Gb). Even after one hour, the filters (high pass + low pass) were > not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the > filters. > > I know that there is "ft_resampledata", and I did it to reduce the actual > sample rate (= 2048) to 256. However, even with this procedure my computer > is crashing (even with 16 Go RAM). In addition, I'm not sure that I can > resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I need > (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for > next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1fa62a62/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 49, Issue 12 > ***************************************** > -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Sun Dec 14 21:44:34 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Sun, 14 Dec 2014 20:44:34 +0000 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: Dear Haiteng Thank you for your suggestion. I tried but again, the downsample with this procedure takes more than 40 minutes (I gave up after this time period and stopped the script, the computer was crashing). Perhaps one could tell if the following is correct? I'm maybe wrong somewhere. chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} chansEEG = 1:64; nchans=length(chansEEG); display('downsample each channel') for i=1:nchans cfgp = []; cfgp.dataset = [ file.name]; cfgp.channel = 'all'; datp = ft_preprocessing(cfgp); cfgr = []; cfgr.resamplefs = 512; datr{i} = ft_resampledata(cfgr, datp); clear datp cfg = []; datall = ft_appenddata(cfg, datr{:}); display('Filters') cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = bpfilterRange; cfg.bpfiltord = bpfilterOrder; cfg.reref = 'yes'; cfg.refchannel = chansRef; allData_preprosses = ft_preprocessing(cfg, datall); Thanks again! Emilie On 13 déc. 2014, at 14:49, Haiteng Jiang > wrote: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. Hope this helps, Haiteng On 13 December 2014 at 12:00, > wrote: Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Correction baseline : removing the mean value or high-pass filtering ? (Kristensen Emmanuelle) 2. Question about how to reduce the file size (Caspar, Emilie) ---------------------------------------------------------------------- Message: 1 Date: Fri, 12 Dec 2014 15:49:10 +0100 From: Kristensen Emmanuelle > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 12 Dec 2014 22:24:17 +0000 From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> Content-Type: text/plain; charset="us-ascii" Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 12 ***************************************** -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Dec 14 22:13:23 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sun, 14 Dec 2014 22:13:23 +0100 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: Hi Emilie, It seems from the code pasted that you're still trying to read all channels in at once: cfgp.channel = 'all'; Try reading in & downsampling one channel at a time, as Haiteng suggested with the following link: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory Hope that solves it for you, Arjen 2014-12-14 21:44 GMT+01:00 Caspar, Emilie : > > Dear Haiteng > > Thank you for your suggestion. I tried but again, the downsample with > this procedure takes more than 40 minutes (I gave up after this time period > and stopped the script, the computer was crashing). > > Perhaps one could tell if the following is correct? I'm maybe wrong > somewhere. > > chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} > chansEEG = 1:64; > nchans=length(chansEEG); > > display('downsample each channel') > > for i=1:nchans > cfgp = []; > cfgp.dataset = [ file.name]; > cfgp.channel = 'all'; > datp = ft_preprocessing(cfgp); > > > cfgr = []; > cfgr.resamplefs = 512; > datr{i} = ft_resampledata(cfgr, datp); > > > clear datp > > cfg = []; > datall = ft_appenddata(cfg, datr{:}); > > > display('Filters') > > > cfg = []; > cfg.bpfilter = 'yes'; > cfg.bpfreq = bpfilterRange; > cfg.bpfiltord = bpfilterOrder; > cfg.reref = 'yes'; > cfg.refchannel = chansRef; > allData_preprosses = ft_preprocessing(cfg, datall); > > Thanks again! > > Emilie > > On 13 déc. 2014, at 14:49, Haiteng Jiang wrote: > > Hi Emilie, > You can read each channel and then down sample. In the end , you > append all the channel. For more information and how to , you can refer to > the FAQ: > http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory > . > > Hope this helps, > Haiteng > > On 13 December 2014 at 12:00, wrote: >> >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> 1. Correction baseline : removing the mean value or high-pass >> filtering ? (Kristensen Emmanuelle) >> 2. Question about how to reduce the file size (Caspar, Emilie) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 12 Dec 2014 15:49:10 +0100 >> From: Kristensen Emmanuelle >> >> To: FieldTrip discussion list >> Subject: [FieldTrip] Correction baseline : removing the mean value or >> high-pass filtering ? >> Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> >> Content-Type: text/plain; charset="utf-8"; Format="flowed" >> >> Hi, >> I would need your opinion, please. >> Generally, the baseline correction means to remove a mean value from >> each epoch. I am wondering if a high pass filter, applied on the whole >> recorded signal, can perform the baseline correction. >> What do you think? >> Regards >> Emmanuelle >> >> -- >> Emmanuelle KRISTENSEN >> Doctorante au Gipsa-Lab >> Equipe VIBS >> >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1ceca823/attachment-0001.html >> > >> >> ------------------------------ >> >> Message: 2 >> Date: Fri, 12 Dec 2014 22:24:17 +0000 >> From: "Caspar, Emilie" >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Question about how to reduce the file size >> Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> >> Content-Type: text/plain; charset="us-ascii" >> >> Dear Fieltrippers, >> I did a pilot study on one participant today. Now that I'm trying to >> analyze my data, I realize that the size file is too big for my computer >> (size = 3Gb). Even after one hour, the filters (high pass + low pass) were >> not yet achieved. >> >> So I would like to see how to reduce the size of my sample BEFORE the >> filters. >> >> I know that there is "ft_resampledata", and I did it to reduce the actual >> sample rate (= 2048) to 256. However, even with this procedure my computer >> is crashing (even with 16 Go RAM). In addition, I'm not sure that I can >> resample before filtering (I read different informations). >> >> Another way I was thinking about was to pre-select electrodes that I need >> (only 6 electrodes on 64). But here I have two questions: >> - Can I pre-process only some electrodes? Does it really reduce size for >> next preprocesses? >> - Is this the correct way to ask? As it crashes, not sure it works. >> >> cfg = []; >> cfg.dataset = [ file.name]; >> cfg.channel = 'B5', 'B6', 'B15', 'B16'; >> allData_prepross = ft_preprocessing(cfg); >> cfg.resamplefs = 256; >> DataSample = ft_resampledata(cfg, allData_prepross) >> >> >> I would appreciate pieces of advice! >> >> Many thanks :) >> >> Emilie >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1fa62a62/attachment-0001.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 49, Issue 12 >> ***************************************** >> > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Mon Dec 15 10:03:38 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Mon, 15 Dec 2014 09:03:38 +0000 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: <4C066F35-6488-4360-AD67-ABD826680A31@live.ucl.ac.uk> It works indeed, I have understood my mistake. Thank you! On 14 déc. 2014, at 22:13, Arjen Stolk > wrote: Hi Emilie, It seems from the code pasted that you're still trying to read all channels in at once: cfgp.channel = 'all'; Try reading in & downsampling one channel at a time, as Haiteng suggested with the following link: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory Hope that solves it for you, Arjen 2014-12-14 21:44 GMT+01:00 Caspar, Emilie >: Dear Haiteng Thank you for your suggestion. I tried but again, the downsample with this procedure takes more than 40 minutes (I gave up after this time period and stopped the script, the computer was crashing). Perhaps one could tell if the following is correct? I'm maybe wrong somewhere. chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} chansEEG = 1:64; nchans=length(chansEEG); display('downsample each channel') for i=1:nchans cfgp = []; cfgp.dataset = [ file.name]; cfgp.channel = 'all'; datp = ft_preprocessing(cfgp); cfgr = []; cfgr.resamplefs = 512; datr{i} = ft_resampledata(cfgr, datp); clear datp cfg = []; datall = ft_appenddata(cfg, datr{:}); display('Filters') cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = bpfilterRange; cfg.bpfiltord = bpfilterOrder; cfg.reref = 'yes'; cfg.refchannel = chansRef; allData_preprosses = ft_preprocessing(cfg, datall); Thanks again! Emilie On 13 déc. 2014, at 14:49, Haiteng Jiang > wrote: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. Hope this helps, Haiteng On 13 December 2014 at 12:00, > wrote: Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Correction baseline : removing the mean value or high-pass filtering ? (Kristensen Emmanuelle) 2. Question about how to reduce the file size (Caspar, Emilie) ---------------------------------------------------------------------- Message: 1 Date: Fri, 12 Dec 2014 15:49:10 +0100 From: Kristensen Emmanuelle > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 12 Dec 2014 22:24:17 +0000 From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> Content-Type: text/plain; charset="us-ascii" Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 12 ***************************************** -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.wutz-1 at unitn.it Mon Dec 15 10:15:03 2014 From: andreas.wutz-1 at unitn.it (Wutz, Andreas Gerhard) Date: Mon, 15 Dec 2014 10:15:03 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <548B0066.3090309@gipsa-lab.grenoble-inp.fr> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> Message-ID: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> Dear all, I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. Thank you very much for your suggestions. Best, Andreas Andreas Wutz Post-Doctoral researcher at the Melcher Active Perception Lab CIMeC - Center for Mind/Brain Sciences Università degli studi di Trento ________________________________________ From tzvetan.popov at uni-konstanz.de Mon Dec 15 10:58:08 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 15 Dec 2014 10:58:08 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> Message-ID: <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> Hi Andreas, ft_selectdata is probably what you need. best tzvetan > Dear all, > > I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. > > Thank you very much for your suggestions. > Best, > Andreas > > Andreas Wutz > Post-Doctoral researcher at the Melcher Active Perception Lab > CIMeC - Center for Mind/Brain Sciences > Università degli studi di Trento > ________________________________________ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Mon Dec 15 14:36:18 2014 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Mon, 15 Dec 2014 14:36:18 +0100 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? In-Reply-To: References: Message-ID: Hi Emmanuelle, any high-pass filter will at least attenuate the DC offset (the mean) and a linear trend (by definition). A properly designed high-pass filter should have > 80-100 dB DC attenuation and thus, completely remove the DC offset from the data in most cases. As there are exceptions with extreme DC offsets, quite frequently observed for example in BioSemi EEG recordings, the mean is additionally subtracted from the data before high-pass (and band-pass) filtering in Fieldtrip. Have a look at the filter’s frequency response if available. And yes, your reasoning is correct: a high-pass filter can be used to replace baseline correction in particular applications. This can for example be recommended if you cannot define a clean baseline as for example in many language studies (for detailed discussion see Urbach and Kutas, 2006, doi:10.1016/j.biopsycho.2005.11.012). Baseline correction would remove the mean baseline ERP topography from the data. Possible (but not necessary) drawback is that you might need higher high-pass cutoff frequencies to remove slow drifts from the data. Take care of possible filter distortions with cutoff frequencies > ~.1 Hz (see Acunzo et al., 2012, pre-print version available here: http://homepages.inf.ed.ac.uk/mvanross/reprints/Acunzo_et_al_in_press_lo_res.pdf and Widmann et al., 2014, pre-print version available here: http://www.uni-leipzig.de/~biocog/eprints/widmann_a2014jneuroscimethods.pdf for discussion). Hope this helps! Best, Andreas > Am 13.12.2014 um 14:04 schrieb Stephen Politzer-Ahles : > > Hello Emmanuelle, > > I don't think a high-pass filter can replace demeaning. A high-pass filter removes a linear trend, but not a fixed value. Imagine a case where a trial is a flat line at 100 uV for the whole epoch; demeaning would change this trial to 0 uV for the whole epoch, whereas a high-pass filter would (I think) not change it. > > Detrending, on the other hand, removes a linear trend. There was a discussion very recently on this list discussing detrending vs. high-pass filtering, so you may be interested in checking it out. > > Best, > Steve > > > > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > > > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From andreas.wutz-1 at unitn.it Mon Dec 15 15:41:52 2014 From: andreas.wutz-1 at unitn.it (Wutz, Andreas Gerhard) Date: Mon, 15 Dec 2014 15:41:52 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it>, <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> Message-ID: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10F@MBX.unitn.it> Thx Tzvetan for pointing to the ft_selectdata function. Unfortunately, I don't think it really does what I want it to do. I really only want to shift the time axis backwards for a certain interval per subject and not make a selection of data segments. Maybe I am getting something wrong how ft_selectdata works ...? Anyways, I already re-ran the pipeline from scratch. Thx again, Tzvetan. Hope to see you soon again! Andi Andreas Wutz Post-Doctoral researcher at the Melcher Active Perception Lab CIMeC - Center for Mind/Brain Sciences Università degli studi di Trento ________________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] im Auftrag von Tzvetan Popov [tzvetan.popov at uni-konstanz.de] Gesendet: Montag, 15. Dezember 2014 10:58 An: FieldTrip discussion list Betreff: Re: [FieldTrip] redefine time axis on time-frequency representations Hi Andreas, ft_selectdata is probably what you need. best tzvetan > Dear all, > > I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. > > Thank you very much for your suggestions. > Best, > Andreas > > Andreas Wutz > Post-Doctoral researcher at the Melcher Active Perception Lab > CIMeC - Center for Mind/Brain Sciences > Università degli studi di Trento > ________________________________________ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.thomas at nin.knaw.nl Tue Dec 16 16:01:41 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Tue, 16 Dec 2014 15:01:41 +0000 Subject: [FieldTrip] Active Electrodes and TMS Message-ID: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> ?Dear Fieldtrippers, Is it possible to use TMS with Active Electrodes if say the electrodes are in the Visual area and the TMS pulses are far away on the motor cortex or thereabouts? Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Tue Dec 16 16:20:13 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 16 Dec 2014 15:20:13 +0000 Subject: [FieldTrip] Active Electrodes and TMS In-Reply-To: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> References: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> Message-ID: <17DBF494-ED1C-4ECE-84F3-6210E4DB46DF@fcdonders.ru.nl> Dear Rajat, I would suggest asking the manufacturer of the electrodes. Often they are aware if any researchers are doing this and whether it is feasible and will not break the amplifiers in the electrodes. Best, Jim On 16 Dec 2014, at 16:06, Rajat Thomas > wrote: ​Dear Fieldtrippers, Is it possible to use TMS with Active Electrodes if say the electrodes are in the Visual area and the TMS pulses are far away on the motor cortex or thereabouts? Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Dec 17 11:45:09 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 17 Dec 2014 11:45:09 +0100 Subject: [FieldTrip] problem with surface Laplacian Message-ID: Dear all, I have 60 channel EEG resting state data, and after discarding bad channels, I am left with 48 channels common to all subjects. I applied scalp current density to my data before extracting power information from my EEG data. The EEG cap that I used was in a 10-10 system, and I don't have the electrode position file. Hence, I used the default electrode position file named 'standard_1005.elc' for the purpose. Here's the part of my script for the surface Laplacian: cfg_neighb.method = 'template'; cfg_neighb.layout = 'EEG1010.lay'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'no'; neighbours = ft_prepare_neighbours(cfg_neighb, data7); cfg = []; cfg.method = 'finite'; cfg.elecfile = 'standard_1005.elc'; cfg.elec = ft_read_sens(cfg.elecfile); cfg.trials = 'all'; cfg.neighbours = neighbours; cfg.conductivity = 0.33; data8 = ft_scalpcurrentdensity(cfg, data7); When I tried to extract power from data8 (after surface Laplacian), I keep getting an error message (see below). I'm not sure why this would be the case, and would appreciate very much if someone could help me resolve the error! Thank you! Here's my script for extracting the power: cfg = []; cfg.output = 'pow'; cfg.channel = {'all'}; cfg.method = 'mtmfft'; cfg.keeptrials = 'no'; cfg.tapsmofrq = 5; cfg.layout = 'EEG1010.lay'; % for frequencies up to 30 Hz cfg.foilim = [1 30]; % either the full range of frequencies (data2.hdr.Fs/2) or up to 100 Hz cfg.taper = 'hanning'; % find the index for the c200 condition pre_c200_idx = find(data8.trialinfo == 200); cfg.trials = pre_c200_idx; LF_pre_c200 = ft_freqanalysis(cfg, data8); Here's the output plus error message: the input is raw data with 48 channels and 343 trials Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 223) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 209) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Dec 17 15:07:24 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 17 Dec 2014 09:07:24 -0500 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: It seems like the issue is between the number of channels in your input (48) is different from the number of channels in the sensor description (60). You should use ft_channelrepair to interpolate the removed channels, and then it should work barring any other issues. On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee wrote: > > Dear all, > > I have 60 channel EEG resting state data, and after discarding bad > channels, I am left with 48 channels common to all subjects. > > I applied scalp current density to my data before extracting power > information from my EEG data. The EEG cap that I used was in a 10-10 > system, and I don't have the electrode position file. Hence, I used the > default electrode position file named 'standard_1005.elc' for the purpose. > > Here's the part of my script for the surface Laplacian: > > > cfg_neighb.method = 'template'; > cfg_neighb.layout = 'EEG1010.lay'; > cfg_neighb.channel = 'all'; > cfg_neighb.feedback = 'no'; > > neighbours = ft_prepare_neighbours(cfg_neighb, data7); > > cfg = []; > cfg.method = 'finite'; > cfg.elecfile = 'standard_1005.elc'; > cfg.elec = ft_read_sens(cfg.elecfile); > cfg.trials = 'all'; > cfg.neighbours = neighbours; > cfg.conductivity = 0.33; > > data8 = ft_scalpcurrentdensity(cfg, data7); > > When I tried to extract power from data8 (after surface Laplacian), I keep > getting an error message (see below). I'm not sure why this would be the > case, and would appreciate very much if someone could help me resolve the > error! > > Thank you! > > Here's my script for extracting the power: > cfg = []; > cfg.output = 'pow'; > cfg.channel = {'all'}; > cfg.method = 'mtmfft'; > cfg.keeptrials = 'no'; > cfg.tapsmofrq = 5; > cfg.layout = 'EEG1010.lay'; > > % for frequencies up to 30 Hz > cfg.foilim = [1 30]; % either the full range of frequencies > (data2.hdr.Fs/2) or up to 100 Hz > cfg.taper = 'hanning'; > > % find the index for the c200 condition > pre_c200_idx = find(data8.trialinfo == 200); > cfg.trials = pre_c200_idx; > LF_pre_c200 = ft_freqanalysis(cfg, data8); > > Here's the output plus error message: > > the input is raw data with 48 channels and 343 trials > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 223) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 209) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', > cfg.feedback, 'hassampleinfo', 'yes'); > > Best regards, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Dec 17 15:25:11 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 17 Dec 2014 15:25:11 +0100 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: Hi, Would it possible to change the number of channels in the sensor description? There are some channels that I cannot repair, hence, I decided to discard them completely from the analyses. Cheers, Hweeling On 17 December 2014 at 15:07, Max Cantor wrote: > > It seems like the issue is between the number of channels in your input > (48) is different from the number of channels in the sensor description > (60). You should use ft_channelrepair to interpolate the removed channels, > and then it should work barring any other issues. > > On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee > wrote: > >> Dear all, >> >> I have 60 channel EEG resting state data, and after discarding bad >> channels, I am left with 48 channels common to all subjects. >> >> I applied scalp current density to my data before extracting power >> information from my EEG data. The EEG cap that I used was in a 10-10 >> system, and I don't have the electrode position file. Hence, I used the >> default electrode position file named 'standard_1005.elc' for the purpose. >> >> Here's the part of my script for the surface Laplacian: >> >> >> cfg_neighb.method = 'template'; >> cfg_neighb.layout = 'EEG1010.lay'; >> cfg_neighb.channel = 'all'; >> cfg_neighb.feedback = 'no'; >> >> neighbours = ft_prepare_neighbours(cfg_neighb, data7); >> >> cfg = []; >> cfg.method = 'finite'; >> cfg.elecfile = 'standard_1005.elc'; >> cfg.elec = ft_read_sens(cfg.elecfile); >> cfg.trials = 'all'; >> cfg.neighbours = neighbours; >> cfg.conductivity = 0.33; >> >> data8 = ft_scalpcurrentdensity(cfg, data7); >> >> When I tried to extract power from data8 (after surface Laplacian), I >> keep getting an error message (see below). I'm not sure why this would be >> the case, and would appreciate very much if someone could help me resolve >> the error! >> >> Thank you! >> >> Here's my script for extracting the power: >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = {'all'}; >> cfg.method = 'mtmfft'; >> cfg.keeptrials = 'no'; >> cfg.tapsmofrq = 5; >> cfg.layout = 'EEG1010.lay'; >> >> % for frequencies up to 30 Hz >> cfg.foilim = [1 30]; % either the full range of frequencies >> (data2.hdr.Fs/2) or up to 100 Hz >> cfg.taper = 'hanning'; >> >> % find the index for the c200 condition >> pre_c200_idx = find(data8.trialinfo == 200); >> cfg.trials = pre_c200_idx; >> LF_pre_c200 = ft_freqanalysis(cfg, data8); >> >> Here's the output plus error message: >> >> the input is raw data with 48 channels and 343 trials >> Error using ft_datatype_sens (line 375) >> inconsistent number of channels in sensor description >> >> Error in ft_datatype_raw (line 138) >> data.elec = ft_datatype_sens(data.elec); >> >> Error in ft_checkdata (line 223) >> data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); >> >> Error in ft_freqanalysis (line 209) >> data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, >> 'feedback', >> cfg.feedback, 'hassampleinfo', 'yes'); >> >> Best regards, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Dec 17 15:30:31 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 17 Dec 2014 09:30:31 -0500 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: Why were you not able to repair them? Is it that they are neighbors, so linear interpolation won't work? I can't speak to this too much as I haven't tried it, but I've been looking into spline and if this is your problem spline could work. Otherwise I imagine you could manually edit / create a new elec or layout file (in matlab or in a text editor), which wouldn't be a bad idea anyway. I did this for our system as we could not find a premade one, but we use equidistant caps so it was pretty straightforward. However, I don't know if there would be any negative implications with removing the electrodes from the layout/elec file(s) altogether. On Wed, Dec 17, 2014 at 9:25 AM, Hwee Ling Lee wrote: > > Hi, > > Would it possible to change the number of channels in the sensor > description? There are some channels that I cannot repair, hence, I decided > to discard them completely from the analyses. > > Cheers, > Hweeling > > > On 17 December 2014 at 15:07, Max Cantor wrote: >> >> It seems like the issue is between the number of channels in your input >> (48) is different from the number of channels in the sensor description >> (60). You should use ft_channelrepair to interpolate the removed channels, >> and then it should work barring any other issues. >> >> On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee >> wrote: >> >>> Dear all, >>> >>> I have 60 channel EEG resting state data, and after discarding bad >>> channels, I am left with 48 channels common to all subjects. >>> >>> I applied scalp current density to my data before extracting power >>> information from my EEG data. The EEG cap that I used was in a 10-10 >>> system, and I don't have the electrode position file. Hence, I used the >>> default electrode position file named 'standard_1005.elc' for the purpose. >>> >>> Here's the part of my script for the surface Laplacian: >>> >>> >>> cfg_neighb.method = 'template'; >>> cfg_neighb.layout = 'EEG1010.lay'; >>> cfg_neighb.channel = 'all'; >>> cfg_neighb.feedback = 'no'; >>> >>> neighbours = ft_prepare_neighbours(cfg_neighb, data7); >>> >>> cfg = []; >>> cfg.method = 'finite'; >>> cfg.elecfile = 'standard_1005.elc'; >>> cfg.elec = ft_read_sens(cfg.elecfile); >>> cfg.trials = 'all'; >>> cfg.neighbours = neighbours; >>> cfg.conductivity = 0.33; >>> >>> data8 = ft_scalpcurrentdensity(cfg, data7); >>> >>> When I tried to extract power from data8 (after surface Laplacian), I >>> keep getting an error message (see below). I'm not sure why this would be >>> the case, and would appreciate very much if someone could help me resolve >>> the error! >>> >>> Thank you! >>> >>> Here's my script for extracting the power: >>> cfg = []; >>> cfg.output = 'pow'; >>> cfg.channel = {'all'}; >>> cfg.method = 'mtmfft'; >>> cfg.keeptrials = 'no'; >>> cfg.tapsmofrq = 5; >>> cfg.layout = 'EEG1010.lay'; >>> >>> % for frequencies up to 30 Hz >>> cfg.foilim = [1 30]; % either the full range of frequencies >>> (data2.hdr.Fs/2) or up to 100 Hz >>> cfg.taper = 'hanning'; >>> >>> % find the index for the c200 condition >>> pre_c200_idx = find(data8.trialinfo == 200); >>> cfg.trials = pre_c200_idx; >>> LF_pre_c200 = ft_freqanalysis(cfg, data8); >>> >>> Here's the output plus error message: >>> >>> the input is raw data with 48 channels and 343 trials >>> Error using ft_datatype_sens (line 375) >>> inconsistent number of channels in sensor description >>> >>> Error in ft_datatype_raw (line 138) >>> data.elec = ft_datatype_sens(data.elec); >>> >>> Error in ft_checkdata (line 223) >>> data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); >>> >>> Error in ft_freqanalysis (line 209) >>> data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, >>> 'feedback', >>> cfg.feedback, 'hassampleinfo', 'yes'); >>> >>> Best regards, >>> Hweeling >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> -- >> Max Cantor >> Lab Manager >> Computational Neurolinguistics Lab >> University of Michigan >> > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laszlo.Grand at libd.org Wed Dec 17 20:28:15 2014 From: Laszlo.Grand at libd.org (Laszlo Grand) Date: Wed, 17 Dec 2014 19:28:15 +0000 Subject: [FieldTrip] Common mode artifact rejection Message-ID: <77A47164-4C7B-4463-90BE-60E0879383BD@libd.org> Hello Fieldtrippers, I need to remove artifact (low frequency: 0-7 Hz) that appears strongly on all channels in my EEG data. It's already recorded so I can't use hardware solutions. Please let me know how to remove only the common mode noise from the data. Thank you, Laszlo -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Dec 18 15:02:20 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 18 Dec 2014 15:02:20 +0100 Subject: [FieldTrip] special issue "Brain Oscillations in Human Communication" for Frontiers in Human Neuroscience References: <5492D07E.7060207@glasgow.ac.uk> Message-ID: <9AA746D1-D306-49B6-AAE5-95CE5135AEB5@donders.ru.nl> Begin forwarded message: > Dear Colleagues, > > I am currently co-hosting the special issue "Brain Oscillations in Human Communication" for Frontiers in Human Neuroscience (IF: 2.9). > > We would be delighted if you considered contributing a research article, a review or a perspective article. Besides the obvious topic of communication, we are also interested in purely methodological papers on spectral data analysis. > > Please visit our website for more information: http://journal.frontiersin.org/ResearchTopic/3111 > > If you have any questions, do not hesitate to contact one of us: > > Anne Keitel (anne.keitel at glasgow.ac.uk) > Johanna Rimmele (j.rimmele at uke.de) > Joachim Gross (joachim.gross at glasgow.ac.uk) > > > Many thanks and happy holidays! > Anne > > Topic Summary: > > Brain Oscillations in Human Communication > Anne Keitel (University of Glasgow) > Johanna Rimmele (University Medical Center Hamburg-Eppendorf) > Joachim Gross (University of Glasgow) > > Abstract deadline: 01.05.2015 > Manuscript deadline: 01.09.2015 > > > -- > Dr. Anne Keitel > Centre for Cognitive Neuroimaging > Institute of Neuroscience and Psychology > University of Glasgow > anne.keitel at glasgow.ac.uk > +44 141 330 5003 -------------- next part -------------- An HTML attachment was scrubbed... URL: From widmann at uni-leipzig.de Thu Dec 18 15:51:26 2014 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Thu, 18 Dec 2014 15:51:26 +0100 Subject: [FieldTrip] MMN 2015 - 7th Mismatch Negativity Conference Message-ID: Dear Colleague, We are happy to announce that the MMN 2015 website (https://event.uni-leipzig.de/mmn2015/) is now open for registration and poster abstract submission. The conference, "Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015)", will be held at the University of Leipzig, Germany, from 8-11 September 2015. The conference covers the state of the art in methods, theory and application (basic and clinical research) of the MMN. It will also incorporate other error signals of the brain. Moreover, there will be hands-on pre-conference workshops on methodological aspects of MMN research and on the visual MMN. The University of Leipzig is one of the oldest German universities and the birthplace of experimental psychology. Based on this long tradition, Leipzig has become a powerhouse of modern cognitive neuroscience. The city offers many opportunities for those interested in intellectual, musical, and architectural heritage. The deadline for both early-bird registration and poster abstract submission is 31 March 2015. We look forward to welcoming you in Leipzig for an inspiring MMN 2015 conference. Kind regards, Erich Schröger and the organization team -- Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015) University of Leipzig, 8-11 September 2015 Web: https://event.uni-leipzig.de/mmn2015/ Email: mmn2015 at uni-leipzig.de From r.thomas at nin.knaw.nl Fri Dec 19 13:58:34 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Fri, 19 Dec 2014 12:58:34 +0000 Subject: [FieldTrip] ECG recording Message-ID: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Dec 21 00:30:07 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sat, 20 Dec 2014 23:30:07 +0000 Subject: [FieldTrip] ECG recording In-Reply-To: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> Message-ID: Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Sun Dec 21 03:41:33 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Sun, 21 Dec 2014 02:41:33 +0000 Subject: [FieldTrip] ECG recording In-Reply-To: References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl>, Message-ID: Hi Rajat, I am using a Neuromag Elekta system. Provided I use bioleads to pick up ECG and EOG, when I run an ICA, ECG is picked up and removed very tidily. We use leads above and below each eye (EOG), plus a lead on each wrist (ECG) and the elbow for ground. In this case, running an ICA automatically and clearly picks up EOG and ECG and these can be removed cleanly. Previously I was not using bioleads. In that case, I only had data from the MEG sensors. When I ran the ICA, it was more difficult to identify a clean ECG component. But it was still possible to see components which were largely ECG and EOG, and these could be removed. No ideal, but still possible. If your system allows use of bioleads, use these and run ft_componentanalysis followed by ft_rejectcomponent on preprocessed data. If not, just run the ft_componentanalysis and ft_rejectcomponent anyway. ECG should still be able to be identified. Hope that helps! Kaelasha ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: Sunday, 21 December 2014 10:30 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Sun Dec 21 11:33:08 2014 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Sun, 21 Dec 2014 10:33:08 +0000 (UTC) Subject: [FieldTrip] fieldtrip Digest, Vol 49, Issue 19 In-Reply-To: References: Message-ID: <1020598356.57107.1419157988254.JavaMail.yahoo@jws11131.mail.ir2.yahoo.com>  Dear Rajat, maybe you can use the same method as the EOG removing. For instance you can record an ECG channel using on the two wrists as it was an EEG channel, and then you can use the ICA decomposition the remove such artifact (if it is present). Ivano Send fieldtrip mailing list submissions to     fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to     fieldtrip-request at science.ru.nl You can reach the person managing the list at     fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:   1. ECG recording (Rajat Thomas) ---------------------------------------------------------------------- Message: 1 Date: Fri, 19 Dec 2014 12:58:34 +0000 From: Rajat Thomas To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] ECG recording Message-ID:     <1022bf6ed399450d97be4e0b3ca09df5 at EXNHI01.herseninstituut.knaw.nl> Content-Type: text/plain; charset="us-ascii" Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 19 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 22 13:23:17 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 22 Dec 2014 13:23:17 +0100 Subject: [FieldTrip] ECG recording In-Reply-To: References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl>, Message-ID: <003701d01de2$114567c0$33d03740$@artinis.com> Hi Rajat, on the FieldTrip wiki is an example page showing one way how to deal with the heartbeat in MEG recordings. It is very closely related to what Kaelasha and Ivano proposed: http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica _to_remove_ecg_artifacts Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Kaelasha Tyler Sent: Sunday, December 21, 2014 3:42 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hi Rajat, I am using a Neuromag Elekta system. Provided I use bioleads to pick up ECG and EOG, when I run an ICA, ECG is picked up and removed very tidily. We use leads above and below each eye (EOG), plus a lead on each wrist (ECG) and the elbow for ground. In this case, running an ICA automatically and clearly picks up EOG and ECG and these can be removed cleanly. Previously I was not using bioleads. In that case, I only had data from the MEG sensors. When I ran the ICA, it was more difficult to identify a clean ECG component. But it was still possible to see components which were largely ECG and EOG, and these could be removed. No ideal, but still possible. If your system allows use of bioleads, use these and run ft_componentanalysis followed by ft_rejectcomponent on preprocessed data. If not, just run the ft_componentanalysis and ft_rejectcomponent anyway. ECG should still be able to be identified. Hope that helps! Kaelasha _____ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: Sunday, 21 December 2014 10:30 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Tue Dec 23 16:25:01 2014 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 23 Dec 2014 16:25:01 +0100 Subject: [FieldTrip] ft_rejectcomponent with or withouth data input Message-ID: Dear Fieldtrip users, I would like to ask for one explanation. Could anyone in more detail explain the difference between ft_rejectcomponent(cfg, comp) and ft_rejectcomponent(cfg, comp, data)? I am not sure which one I should use. I have read available information about that and tried out both methods. I understand that data input will lead to back-projection of the data into the original subspace. However I am still not sure which one I should use. Furthermore, in the ICA calculation I have used cfg.runica.pca for data dimensionality reduction. Any clarification of this issue would be greatly appreciated! Thank you in advance! All the best and happy holidays, Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon Dec 29 13:00:37 2014 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 29 Dec 2014 12:00:37 +0000 Subject: [FieldTrip] ft_rejectcomponent with or withouth data input In-Reply-To: References: Message-ID: Dear Nenad, One difference is that 'data' need not be the same 'data' that was used to create 'comp'. For example, you can have 'data' which is the original/raw data, then do some preprocessing on it to create 'data1'. Then call comp=ft_componentanalysis(cfg,data1). Then you can decide which components to reject from comp but apply this rejection to 'data' rather than 'data1'. (e.g. http://mailman.science.ru.nl/pipermail/fieldtrip/2013-October/007118.html or http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007608.html) In your case of calling PCA for dimensionality reduction, let's say for example your 'data' has 100 channels and you set PCA to 50. Then 'comp' will have 50 components (rank 50). Let's say you want to reject 2 components. Then the output of ft_rejectcomponent(cfg,comp) will end up in channel space (100 channels) but of only rank 48. However, the output of ft_rejectcomponent(cfg,comp,data) will be in channel space (100 channels) but of rank 98. There are additional differences, such as mentioned in the 'help documentation' of ft_rejectcomponent, namely "Please use this option of including data as input, if you wish to use the output data.grad in further computation, for example for leadfield computation." This is for the data.grad.tra to be updated appropriately for leadfields. Hope that helps, and perhaps there should be a FAQ on the wiki for this. Regards, Johanna 2014-12-23 15:25 GMT+00:00 Nenad Polomac : > Dear Fieldtrip users, > > I would like to ask for one explanation. Could anyone in more detail > explain the difference between ft_rejectcomponent(cfg, comp) and > ft_rejectcomponent(cfg, comp, data)? I am not sure which one I should use. > I have read available information about that and tried out both methods. I > understand that data input will lead to back-projection of the data into > the original subspace. However I am still not sure which one I should use. > Furthermore, in the ICA calculation I have used cfg.runica.pca for data > dimensionality reduction. > > Any clarification of this issue would be greatly appreciated! > > Thank you in advance! > > All the best and happy holidays, > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sclar028 at uottawa.ca Tue Dec 30 16:55:47 2014 From: sclar028 at uottawa.ca (Stephen Clarke) Date: Tue, 30 Dec 2014 10:55:47 -0500 Subject: [FieldTrip] Fwd: cfg In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Stephen Clarke Date: Tue, Dec 30, 2014 at 10:11 AM Subject: cfg To: fieldtrip at science.ru.nl Hello, A colleague and I are interested in using wavelets to analyze resting state (rMEG) and working memory (tMEG) data from the Human Connectome Project, in order to directly compare resting state and working memory conditions. It appears that ft_freqanalysis.m works with the preprocessed HCP data. Our question concerns the cfg structures. For rMEG, the data.time structure is 1x147 cell, where each cell is a 1x1018 double, each going from 0 to 1.9995 (0.001966075273231 increments). tMEG recordings have been divided into epochs for TIM (onset of image) and TRESP (onset of response). The data.time structure is a 1x166 cell, where each cell is a 1x2035 double, each going from -1.4996 to 2.4994 (0.002 increments). If we use the same cfg.foi / cfg.toi inputs for each case, we get cfg.freq structures which are not equivalent. E.g., when using % cfg = []; % cfg.channel = 'MEG'; % cfg.method = 'wavelet'; % cfg.width = 7; % cfg.output = 'pow'; % cfg.foi = 1:0.01:100; % cfg.toi = -0.5:0.1:1.5; The TFRwave.freq outputs using this code are: rMEG: cfg.freq --> size 1x200. tMEG: cgf.freq --> size 1x400. As well, we get several warnings: “the input is raw data with 244 channels and 144 trials”, which it is not (it is preprocessed data). “the trial definition in the configuration is inconsistent with the actual data” “reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording” By using different cfg inputs to account for differences in the time sampling for the resting and working memory data, we get similar errors, though both output .freq structures are ~1x400 in this case. %%for resting state cfg_rs cfg_rs.foi = 1:0.01:200; cfg_rs.toi = -1.5:0.002:2.5; %%for wm data cfg_wm cfg_wm.foi = 1:0.01:100; cfg_wm.toi = 0:0.0019:2; Any advice on appropriate configuration structures for wavelet analysis of this data would be greatly appreciated. Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at fcdonders.ru.nl Tue Dec 30 18:34:17 2014 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 30 Dec 2014 17:34:17 +0000 Subject: [FieldTrip] cfg In-Reply-To: References: Message-ID: Dear Steve, Great that you guys are interested in our HCP data! Although indeed the processed data are represented as fieldtrip-structures I think the most appropriate platform would be to ask this question on the HCP-users platform. You can subscribe to the users list on: http://www.humanconnectome.org/contact/#subscribe For rMEG, the data.time structure is 1x147 cell, where each cell is a 1x1018 double, each going from 0 to 1.9995 (0.001966075273231 increments). Indeed, this is the consequence of us manually chopping up the 3-minute or so recording into 2 second epochs, and removing some blatantly bad segments of data. Note that the time axis is arbitrary and does not have a meaningful relationship to a physical experimental event. As well, we get several warnings: “the input is raw data with 244 channels and 144 trials”, which it is not (it is preprocessed data). “the trial definition in the configuration is inconsistent with the actual data “reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording” Don’t worry about these specific warnings at the moment By using different cfg inputs to account for differences in the time sampling for the resting and working memory data, we get similar errors, though both output .freq structures are ~1x400 in this case. %%for resting state cfg_rs cfg_rs.foi = 1:0.01:200; cfg_rs.toi = -1.5:0.002:2.5; %%for wm data cfg_wm cfg_wm.foi = 1:0.01:100; cfg_wm.toi = 0:0.0019:2; Any advice on appropriate configuration structures for wavelet analysis of this data would be greatly appreciated. At first glance the frequency resolution requested is far too high. Given the finite and discrete sampling, not all requested frequencies can be exactly estimated. Fieldtrip will do its best, but will round off the requested frequencies to the nearest estimable one. A more meaningful cfg.foi would be 1:1:100 or so. I suggest to read up a bit about spectral analysis on the tutorial section of our Fieldtrip website. Best, Jan-Mathijs -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Mon Dec 1 16:31:53 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Mon, 1 Dec 2014 15:31:53 +0000 Subject: [FieldTrip] Easycap 128 XYZ coordinates Message-ID: ?Dear all, Is there anywhere I could download a Easycap 128 channel electrode coordinate file? On the website of easycap there is only the 64 channel. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From dm4 at bu.edu Mon Dec 1 22:00:48 2014 From: dm4 at bu.edu (Deepshikha Moolchandani) Date: Mon, 1 Dec 2014 16:00:48 -0500 Subject: [FieldTrip] Probem with cross frequency phase-amplitude example in FieldTrip tutorial Message-ID: Dear all I am working on the cross frequency phase-amplitude coupling and I tried to run the following code provided in the tutorial in the latest version of FieldTrip (fieldtrip-lite-20141125) "" *Calculate coherence between power and raw* % mtmconvol cfg = []; cfg.method = 'mtmconvol'; cfg.channel = 'mix'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 2:2:60; cfg.toi = data.time{1}(3001:7000); %power is calculated at every sample cfg.t_ftimwin = 4./cfg.foi; %timewindow used to calculated power is 4 cycles long and therefore differs over frequencies cfg.keeptrials = 'yes'; freq1 = ft_freqanalysis(cfg,data); % Make data same length as freq1 data_cut = data; for iTr = 1:length(data.trial) data_cut.trial{iTr} = data.trial{iTr}(:,3001:7000); data_cut.time{iTr} = data.time{iTr}(3001:7000); end data_app = ft_appenddata([],data_cut, freq1); %contains original channel and channels with power %FieldTrip automatically converts the freq1 data to raw data. % mtmfft output cross-spectral-density between mix(raw) and freq1 cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.taper = 'hanning'; cfg.foilim = [2 60]; cfg.keeptrials = 'no'; cfg.pad = 4; cfg.channelcmb = {'mix' 'mix at 2Hz'; 'mix' 'mix at 4Hz'; 'mix' 'mix at 6Hz'; 'mix' 'mix at 8Hz'; 'mix' 'mix at 10Hz'; 'mix' 'mix at 12Hz'; 'mix' 'mix at 14Hz'; 'mix' 'mix at 16Hz'; 'mix' 'mix at 18Hz'; 'mix' 'mix at 20Hz'; 'mix' 'mix at 22Hz'; 'mix' 'mix at 24Hz'; 'mix' 'mix at 26Hz'; 'mix' 'mix at 28Hz'; 'mix' 'mix at 30Hz'; 'mix' 'mix at 32Hz'; 'mix' 'mix at 34Hz'; 'mix' 'mix at 36Hz'; 'mix' 'mix at 38Hz'; 'mix' 'mix at 40Hz'; 'mix' 'mix at 42Hz'; 'mix' 'mix at 44Hz'; 'mix' 'mix at 46Hz'; 'mix' 'mix at 48Hz'; 'mix' 'mix at 50Hz'; 'mix' 'mix at 52Hz'; 'mix' 'mix at 54Hz'; 'mix' 'mix at 56Hz'; 'mix' 'mix at 58Hz'; 'mix' 'mix at 60Hz';}; freq2 = ft_freqanalysis(cfg,data_app); % calculate coherence coh = ft_freqdescriptives([],freq2); coh.freq2 = [2:2:60]; figure; imagesc(coh.freq, coh.freq2, coh.cohspctrm) axis xy print -dpng phalow_amphigh_fig5.png"" It gives me the following error "Reference to non-existent field 'cohspctrm'." Can anyone tell me if I'm doing something wrong or is there a problem in the code? Any help would be appreciated. Best Deepshikha Moolchandani Research Assistant Brain and Vision Research Lab Boston University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Mon Dec 1 22:27:09 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Mon, 1 Dec 2014 22:27:09 +0100 Subject: [FieldTrip] Probem with cross frequency phase-amplitude example in FieldTrip tutorial In-Reply-To: References: Message-ID: Hey, Try figure; imagesc(coh.freq, coh.freq2, coh.powspctrm) ; % change coh.cohspctrm -> coh.powspctrm That should to the trick. If it works please modify the code on the page too. :) -- Regards, Kousik Sarathy, S -------------- next part -------------- An HTML attachment was scrubbed... URL: From balperin07 at gmail.com Tue Dec 2 07:41:39 2014 From: balperin07 at gmail.com (Brittany Alperin) Date: Mon, 1 Dec 2014 22:41:39 -0800 Subject: [FieldTrip] error running FFT when importing eeglab data with interpolated channels Message-ID: Hello I have preprocessed my data using EEGlab and am running an FFT using fieldtrip. I convert my EEGlab dataset to fieldtrip format using: data = eeglab2fieldtrip(EEG,'preprocessing','none'); No error occurs when I convert the data. My FFT code is: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [4 7]; cfg.output = 'pow'; freq = ft_freqanalysis(cfg,data); When I try to run the FFT, I get the following error: Reference to non-existent field 'trial'. Error in ft_freqanalysis (line 382) ntrials = numel(data.trial); Error in FFT_MIST (line 22) freq = ft_freqanalysis(cfg,data); Error in Batch_FFT_MIST (line 11) FFT_MIST(subj); Error in run (line 63) evalin('caller', [script ';']); Interestingly, I only get this error when I try running an FFT on data that has had channels interpolated using EEGlab's interpolation function. I have 36 channels, but when I've interpolated some, fieldtrip seems to think the interpolated channels have been deleted. I.e., instead of saying "the input is raw data with 36 channels and 118 trials" it will say "the input is raw data with 34 channels and 118 trials". Does anyone know why interpolating channels in EEGlab would throw fieldtrip off? Is there anyway I can correct for this? Thanks, Brittany -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Dec 2 09:26:29 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 2 Dec 2014 08:26:29 +0000 Subject: [FieldTrip] error running FFT when importing eeglab data with interpolated channels In-Reply-To: References: Message-ID: <53F547A0-E8CA-41F2-8AF6-5C808D35546F@donders.ru.nl> Hi Brittany It seems that eeglab2fieldtrip does not know how to deal with the EEG structure once it has interpolated channels in it. This case was probably not considered when implementing the function. Can you report it on http://bugzilla.fcdonders.nl and share a small EEGLAB dataset with it (using http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers)? best regards Robert On 02 Dec 2014, at 06:41, Brittany Alperin wrote: > Hello > > I have preprocessed my data using EEGlab and am running an FFT using fieldtrip. I convert my EEGlab dataset to fieldtrip format using: > data = eeglab2fieldtrip(EEG,'preprocessing','none'); > > No error occurs when I convert the data. My FFT code is: > cfg = []; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.foilim = [4 7]; > cfg.output = 'pow'; > freq = ft_freqanalysis(cfg,data); > > When I try to run the FFT, I get the following error: > > Reference to non-existent field 'trial'. > > Error in ft_freqanalysis (line 382) > ntrials = numel(data.trial); > > Error in FFT_MIST (line 22) > freq = ft_freqanalysis(cfg,data); > > Error in Batch_FFT_MIST (line 11) > FFT_MIST(subj); > > Error in run (line 63) > evalin('caller', [script ';']); > > Interestingly, I only get this error when I try running an FFT on data that has had channels interpolated using EEGlab's interpolation function. > > I have 36 channels, but when I've interpolated some, fieldtrip seems to think the interpolated channels have been deleted. I.e., instead of saying "the input is raw data with 36 channels and 118 trials" it will say "the input is raw data with 34 channels and 118 trials". > > Does anyone know why interpolating channels in EEGlab would throw fieldtrip off? Is there anyway I can correct for this? > > Thanks, > Brittany > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue Dec 2 09:30:07 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 2 Dec 2014 08:30:07 +0000 Subject: [FieldTrip] Easycap 128 XYZ coordinates In-Reply-To: References: Message-ID: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl> Dear Rajat, You can find one in fieldtrip/template/electrode/GSN-HydroCel-128.sfp. Note that there is also a 129 channel version, I don’t know the detailled difference. See http://fieldtrip.fcdonders.nl/template/electrode for the documentation. best regards, Robert On 01 Dec 2014, at 15:31, Rajat Thomas wrote: > ​Dear all, > > Is there anywhere I could download a Easycap 128 channel electrode > coordinate file? On the website of easycap there is only the 64 channel. > > Thanks. > > Rajat > > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.goeldi at psychologie.uzh.ch Tue Dec 2 10:47:52 2014 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Tue, 2 Dec 2014 10:47:52 +0100 Subject: [FieldTrip] Antwort: Re: Easycap 128 XYZ coordinates In-Reply-To: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl> References: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl>, Message-ID: Hi The 129 channel version includes the Cz electrode, the 128 version does not. Unfortunately these electrode positions did not work well for me. I assumed the coordinates are in MNI space (and I might be wrong here). But when I fit it to the template of the MNI head the electrodes do not match. The frontal part is ok, but the parietal electrodes disappear into the head. Looks like the reference head is too small. The electrode positions have to be rearranged manually. I found a template file in spm12 (might also be around in spm8) in ./spm12/EEGtemplates/egi128_GSN_HydroCel.sfp (here the 128 version includes the Cz electrode). This fits perfectly onto the MNI template head. Maybe someone with more experience can verify this discrepancy? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: Robert Oostenveld Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 02.12.2014 09:41 Betreff: Re: [FieldTrip] Easycap 128 XYZ coordinates Dear Rajat, You can find one in fieldtrip/template/electrode/GSN-HydroCel-128.sfp. Note that there is also a 129 channel version, I don’t know the detailled difference. See http://fieldtrip.fcdonders.nl/template/electrode for the documentation. best regards, Robert On 01 Dec 2014, at 15:31, Rajat Thomas wrote: ​Dear all, Is there anywhere I could download a Easycap 128 channel electrode coordinate file? On the website of easycap there is only the 64 channel. Thanks.  Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.Hanslmayr at bham.ac.uk Tue Dec 2 16:52:02 2014 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Tue, 2 Dec 2014 15:52:02 +0000 Subject: [FieldTrip] Lecturer / Senior Lecturer Positions available at the University of Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CEADEDB542@EX8.adf.bham.ac.uk> The School of Psychology at the University of Birmingham (http://www.birmingham.ac.uk/schools/psychology/index.aspx) is currently seeking to fill lecturer / senior lecturer positions. The School seeks to appoint individuals in areas that complement existing strengths within the School and who use advanced neuroscience approaches with a focus in the areas of cognitive and behavioural neuroscience, computational neuroscience and cognitive robotics, sensory motor control, or development throughout the lifespan. The school particularly welcomes applications from individuals doing translational neuroscience in any of the above areas to complement the development of the University's £24M Institute for Translational Medicine in which Psychology is a partner. Exceptional candidates may be considered for the conferment of the title of Reader. Further information and a link to the job application can be found here: http://www.jobs.ac.uk/job/AJZ482/lecturers-senior-lecturers/ Best wishes, Simon Dr. Simon Hanslmayr Senior Lecturer School of Psychology University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.psychologie.uni-konstanz.de/en/cognition-and-oscillations-lab/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From constantino.mendezbertolo at ctb.upm.es Tue Dec 2 18:50:11 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Tue, 2 Dec 2014 18:50:11 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") Message-ID: Dear fieldtrippers, We are doing beamformer with ERF acquired with an Elekta-Neuromag. Regardless our different approaches, we always end with the same problem at the end of the pipeline - the 'inside' field slightly varies between subjects. I attach a plot of the difference between the inside field of two different subjects where one can see that there are truly minor differences. We follow the standard pipeline, I think. We use a template grid and template mri for all the subjects, which we realign using individual headpoints. The resulting leadfield (every subject has the same numbers of dipoles) is used in the sourceanalysis ('lcmv'), and the difference between pre and post periods is first interpolated (using the individual mri aligned) and finally normalized. We also tried using volumereslice before interpolate. Individual results seem coherent but not matter what we end up with different 'inside' fields and sourcegrandaverage complains about that. We are using the fieldtrip-20141201 version and if we use the fieldtrip-20111101 sourcegrandaverage does not complain about that. I don't want to make a really complex mail so I leave it here looking forward to hear input from anybody and willing to give more precise information, Peace! T -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: s5.inside minus s6.inside.jpg Type: image/jpeg Size: 29910 bytes Desc: not available URL: From m.lizarazu at bcbl.eu Wed Dec 3 11:43:36 2014 From: m.lizarazu at bcbl.eu (Mikel Lizarazu) Date: Wed, 3 Dec 2014 11:43:36 +0100 (CET) Subject: [FieldTrip] problems in the fieldtrip2fiff function Message-ID: <303218278.4196758.1417603416701.JavaMail.root@bcbl.eu> Hi all, I would like to convert a Fieldtrip raw data structure to a .fif file, so I can do further analysis using Neuromag software. I am trying to use the fieldtrip2fiff function as in the example, but it is not working: cfg = []; cfg.dataset = 'test.fif'; data = ft_preprocessing(cfg) fieldtrip2fiff('new_test.fif',data) This is the error I am getting: ??? Error using ==> fiff_start_file at 35 Permission denied Error in ==> fiff_start_writing_raw at 54 fid = fiff_start_file(name); Error in ==> fieldtrip2fiff at 124 [outfid, cals] = fiff_start_writing_raw(fifffile, info); I checked this problem in the discussion list and it seems to be unsolved.I downloaded the newest version of Fieldtrip and I checked the writing permissions of my OS (the function [fid, message]=fopen('new_test.fif','w+','ieee-be') works fine). Maybe you are using another code or you have modified this function. Thank you for your time. Best, Mikel -- Mikel Lizarazu Predoctoral researcher www.bcbl.eu Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer -------------- next part -------------- An HTML attachment was scrubbed... URL: From DrakesmithM at cardiff.ac.uk Wed Dec 3 12:32:21 2014 From: DrakesmithM at cardiff.ac.uk (Mark Drakesmith) Date: Wed, 3 Dec 2014 11:32:21 +0000 Subject: [FieldTrip] Post-Doc position in Cognitive Neuroscience / Neuroimaging, Cardiff University Message-ID: <547EF4C5.8040300@cardiff.ac.uk> Dear all Please see link for detail of a post-doctoral vacancy at Cardiff University, starting January 2015. http://www.jobs.ac.uk/job/AKB322/research-associate-neuroimaging/ Many thanks Mark Drakesmith CUBRIC / NMHRI, Cardiff University From tzvetan.popov at uni-konstanz.de Wed Dec 3 16:55:52 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 3 Dec 2014 16:55:52 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") In-Reply-To: References: Message-ID: Peace T, this is due to the unnecessary interpolating and normalizing back and forth where due to some edge irregularities you end up with slightly different inside fields. Using mni aligned grids is actually meant to circumvent the need for normalizing etc. In general you should use ft_sourceinterpolate in order to visualize 1). single subject data (this worked for you) 2). output data from ft_sourcegrandaverage or 3) output from ft_sourcestatistics. Because you are using the mni template approach you’ll never use ft_volumenormalize in your pipeline. So in order to make 2) and 3) work you should exchange the single subject source.dim and source.pos fields with template_grid.dim and template_grid.pos respectively. Subsequently you can call ft_sourcegrandaverage with all your subjects as an input and use the output to interpolate onto the mni template brain. good luck tzvetan > Dear fieldtrippers, > > We are doing beamformer with ERF acquired with an Elekta-Neuromag. Regardless our different approaches, we always end with the same problem at the end of the pipeline - the 'inside' field slightly varies between subjects. I attach a plot of the difference between the inside field of two different subjects where one can see that there are truly minor differences. > > We follow the standard pipeline, I think. We use a template grid and template mri for all the subjects, which we realign using individual headpoints. The resulting leadfield (every subject has the same numbers of dipoles) is used in the sourceanalysis ('lcmv'), and the difference between pre and post periods is first interpolated (using the individual mri aligned) and finally normalized. We also tried using volumereslice before interpolate. > > Individual results seem coherent but not matter what we end up with different 'inside' fields and sourcegrandaverage complains about that. We are using the fieldtrip-20141201 version and if we use the fieldtrip-20111101 sourcegrandaverage does not complain about that. > > I don't want to make a really complex mail so I leave it here looking forward to hear input from anybody and willing to give more precise information, > > Peace! > T > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From constantino.mendezbertolo at ctb.upm.es Wed Dec 3 17:47:17 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Wed, 3 Dec 2014 17:47:17 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") In-Reply-To: References: Message-ID: Dear Tzvetan, Thank you very much, it worked like a charm: substituting .dim and .pos for the one in our template, then averaging and then interpolating. May the gods of beamformer always light up your way, T 2014-12-03 16:55 GMT+01:00 Tzvetan Popov : > Peace T, > this is due to the unnecessary interpolating and normalizing back and > forth where due to some edge irregularities you end up with slightly > different inside fields. Using mni aligned grids is actually meant to > circumvent the need for normalizing etc. > In general you should use ft_sourceinterpolate in order to visualize 1). > single subject data (this worked for you) 2). output data from > ft_sourcegrandaverage or 3) output from ft_sourcestatistics. Because you > are using the mni template approach you’ll never use ft_volumenormalize in > your pipeline. So in order to make 2) and 3) work you should exchange the > single subject source.dim and source.pos fields with template_grid.dim and > template_grid.pos respectively. Subsequently you can call > ft_sourcegrandaverage with all your subjects as an input and use the output > to interpolate onto the mni template brain. > > good luck > tzvetan > > > > Dear fieldtrippers, > > We are doing beamformer with ERF acquired with an Elekta-Neuromag. > Regardless our different approaches, we always end with the same problem at > the end of the pipeline - the 'inside' field slightly varies between > subjects. I attach a plot of the difference between the inside field of two > different subjects where one can see that there are truly minor differences. > > We follow the standard pipeline, I think. We use a template grid and > template mri for all the subjects, which we realign using individual > headpoints. The resulting leadfield (every subject has the same numbers of > dipoles) is used in the sourceanalysis ('lcmv'), and the difference between > pre and post periods is first interpolated (using the individual mri > aligned) and finally normalized. We also tried using volumereslice before > interpolate. > > Individual results seem coherent but not matter what we end up with > different 'inside' fields and sourcegrandaverage complains about that. We > are using the fieldtrip-20141201 version and if we use > the fieldtrip-20111101 sourcegrandaverage does not complain about that. > > I don't want to make a really complex mail so I leave it here looking > forward to hear input from anybody and willing to give more precise > information, > > Peace! > T > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From assaf.harel at wright.edu Wed Dec 3 22:43:02 2014 From: assaf.harel at wright.edu (Harel, Assaf) Date: Wed, 3 Dec 2014 21:43:02 +0000 Subject: [FieldTrip] Ph.D. position - Human Neuroscience and Visual Cognition Lab, Wright State University Message-ID: Two Ph.D. positions are now available at the Human Neuroscience and Visual Cognition Lab at the Department of Psychology, Wright State University beginning Fall 2015. The newly established lab is headed by Dr. Assaf Harel and investigates high-level vision and its neural substrates. We are interested in how visual recognition occurs in real-world settings and adopt a neuroergonomic approach to study the applied aspects of high-level vision. For this purpose, we employ a diversity of cognitive neuroscience methods, including EEG, fMRI, and psychophysics. Topics of research include visual expertise, object and scene recognition, categorization and perceptual learning. For more information on the lab, contact Dr. Assaf Harel at: assaf.harel at wright.edu. The Department of Psychology is housed in the College of Science and Mathematics, offers a Ph.D. in Human Factors and Industrial/ Organizational Psychology, and has 3 undergraduate concentration areas: (1) Cognition and Perception, (2) Industrial/ Organizational, and (3) Behavioral Neuroscience. Wright State University was recently ranked among the "Best in the Midwest" universities by The Princeton Review, listed among 260 Best National Universities in the annual "America's Best Colleges" rankings by U.S. News and World Report, and ranked fourth nationally among universities with limited numbers of doctoral programs in the Faculty Scholarly Productivity Index. For more information on the department and the graduate program go to: http://science-math.wright.edu/psychology/programs/graduate-program-overview. Application deadline is January 1, 2015. -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Thu Dec 4 11:24:30 2014 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Thu, 04 Dec 2014 11:24:30 +0100 Subject: [FieldTrip] =?utf-8?q?How_to_reverse_trial_order=3F?= Message-ID: <13b4-54803680-49-743e7e00@142888300> Dear Fieldtrippers, I would like to reverse the order of my trials (last trial to first position, first trial to last position). Is there a function for this (eg. sth like ft_reverse_trials?). Thank you very much!! Best regards, Barbara From julian.keil at gmail.com Thu Dec 4 12:06:52 2014 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 4 Dec 2014 12:06:52 +0100 Subject: [FieldTrip] How to reverse trial order? In-Reply-To: <13b4-54803680-49-743e7e00@142888300> References: <13b4-54803680-49-743e7e00@142888300> Message-ID: <5BCE878D-65A4-44F9-A284-7EAD22AD3898@gmail.com> Hi Barbara, this can be solved by basic Matlab: Use the fliplr command to flip the trials. For Example: data.trial = fliplr(data.trial); Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 04.12.2014 um 11:24 schrieb Barbara Schorr: > Dear Fieldtrippers, > > I would like to reverse the order of my trials (last trial to first position, first trial to last position). > Is there a function for this (eg. sth like ft_reverse_trials?). > > Thank you very much!! > > Best regards, > Barbara > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Thu Dec 4 12:31:23 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 4 Dec 2014 12:31:23 +0100 Subject: [FieldTrip] Surface laplacian Message-ID: Dear all, I'm interested to apply surface laplacian on my EEG data, however, I was not sure where I can locate information regarding electrode definition. Would someone please show me how I could create an electrode definition file? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Fri Dec 5 22:20:36 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Fri, 5 Dec 2014 21:20:36 +0000 Subject: [FieldTrip] about detrend Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Fri Dec 5 23:11:22 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 17:11:22 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54822D8A.8000700@hms.harvard.edu> Hi Yun, Detrending a data set only removes the regression line. It does not ensure that the process has zero mean, which translates to a zero DC component in frequency space. The most direct way to ensure zero DC is simply to remove the trial mean from each epoch. Best, Alexander Alexander Nakhnikian, Ph.D. Post Doctoral Fellow, Clinical Research Training Program Harvard Medical School Boston VA Healthcare System, Brockton MA On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting cfg.detrend > = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Fri Dec 5 23:19:07 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 17:19:07 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54822F5B.3050407@hms.harvard.edu> Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting cfg.detrend > = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Fri Dec 5 23:19:28 2014 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Fri, 5 Dec 2014 17:19:28 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: Hi Yun, If I'm right, just by high-pass filtering your data you should be able to remove the DC component of it. Best Rodrigo On Fri, Dec 5, 2014 at 4:20 PM, Yun Wen wrote: > Hi all, I want to remove DC offset before applying the high-pass filter. > I was wondering if I can achieve that by putting cfg.detrend = 'yes' > before cfg.hpfilter = 'yes', something like: > > > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > > > Thank you in advance. > > > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Sat Dec 6 00:20:19 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Fri, 5 Dec 2014 23:20:19 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <54822F5B.3050407@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I'd better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Sat Dec 6 02:13:59 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 20:13:59 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54825857.9010807@hms.harvard.edu> It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: > > Hi, Alexander & Rodrigo. Thank you very much for your help. I > collected my data with DC recordings (BioSemi system). I have seen > some discussion on the DC offset: > > http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html > > http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html > > It seems to me that I’d better remove DC offset of continuous data > before high-pass filter. Am I right? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *Alexander > Nakhnikian > *Sent:* Friday, December 05, 2014 10:19 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > Hello Again, > > I think there's an error in my response. I think removing the linear > trend should also set the mean to zero already since the best fit line > incorporates vertical offset. Sorry about that. > > A > > > > On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting > cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Sat Dec 6 08:49:54 2014 From: cb802 at cam.ac.uk (Christopher Brown) Date: Sat, 06 Dec 2014 07:49:54 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics Message-ID: <74e335a2b663ec3b9d1dff326e5d0ba8@cam.ac.uk> Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- DR CHRISTOPHER BROWN _Research Associate __| CamPain Group __| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge_ Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Sat Dec 6 12:33:42 2014 From: cb802 at cam.ac.uk (=?utf-8?B?RHIgQyBBIEJyb3du?=) Date: Sat, 06 Dec 2014 11:33:42 +0000 Subject: [FieldTrip] =?utf-8?q?Cluster_analysis_on_correlation_statistics?= Message-ID: Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Sat Dec 6 16:33:16 2014 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Sat, 6 Dec 2014 15:33:16 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <95C9A440AA5AB042A81E170A4573A15A6F351F@exprd03.hosting.ru.nl> Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 From Yun.Wen at nottingham.ac.uk Sun Dec 7 11:53:26 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Sun, 7 Dec 2014 10:53:26 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <54825857.9010807@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I'd better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Sun Dec 7 17:50:01 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Sun, 7 Dec 2014 11:50:01 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54848539.5010000@hms.harvard.edu> I would. Baseline correction removes background components from the ERP but it does remove linear offset that is part of the post-stimulus time series. In addition to getting ride of DC, detrending also removes certain non-stationarities and reduces the severity of edge effects. I use it as a matter of course unless there is a compelling reason to omit it from the analysis pipeline. On 12/7/14, 5:53 AM, Yun Wen wrote: > > Hi, Alexander. Thank you for your help. Do you suggest that I do > baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend > = 'yes' on epoched data? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *Alexander > Nakhnikian > *Sent:* Saturday, December 06, 2014 1:14 AM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > It looks as though the take home message is that in theory high pass > filters remove DC but you can't be sure how they will interact with > empirical data since there is no perfect filter in the real world. If > other people report substantial artifacts after filtering data without > removing the DC component I suggest getting rid of it. To answer your > original question, assuming you're detrending each epoch individually > it should remove the DC component or at least reduce it substantially. > > I hope that helps. > > > > On 12/5/14, 6:20 PM, Yun Wen wrote: > > Hi, Alexander & Rodrigo. Thank you very much for your help. I > collected my data with DC recordings (BioSemi system). I have seen > some discussion on the DC offset: > > http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html > > http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html > > It seems to me that I’d better remove DC offset of continuous data > before high-pass filter. Am I right? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] > *On Behalf Of *Alexander Nakhnikian > *Sent:* Friday, December 05, 2014 10:19 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > Hello Again, > > I think there's an error in my response. I think removing the > linear trend should also set the mean to zero already since the > best fit line incorporates vertical offset. Sorry about that. > > A > > > > > On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the > high-pass filter. I was wondering if I can achieve that by > putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', > something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Mon Dec 8 09:55:36 2014 From: cb802 at cam.ac.uk (=?utf-8?B?RHIgQyBBIEJyb3du?=) Date: Mon, 08 Dec 2014 08:55:36 +0000 Subject: [FieldTrip] =?utf-8?q?Cluster_analysis_on_correlation_statistics?= Message-ID: Hi Tom Great! That would be really helpful, thank you. I'm still learning fieldtrip so it be interesting to see how it works. The ft_statistics_montecarlo function implies that a custom statistic of choice can be used but I haven't looked deep enough into the function yet to get a could understanding of it. If anything publishable comes out of it I can acknowledge you if you wish? Best wishes Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Marshall, T.R. (Tom)" To: "FieldTrip discussion list" Subject: [FieldTrip] Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 15:33 Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:10:53 2014 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:10:53 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <001f01d012c6$deb62d10$9c228730$@artinis.com> Hi Tom, Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). that’s correct, Tom ;) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Dr C A Brown Sent: Monday, December 8, 2014 9:56 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hi Tom Great! That would be really helpful, thank you. I'm still learning fieldtrip so it be interesting to see how it works. The ft_statistics_montecarlo function implies that a custom statistic of choice can be used but I haven't looked deep enough into the function yet to get a could understanding of it. If anything publishable comes out of it I can acknowledge you if you wish? Best wishes Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Marshall, T.R. (Tom)" > To: "FieldTrip discussion list" > Subject: [FieldTrip] Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 15:33 Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Dec 8 10:17:56 2014 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 08 Dec 2014 10:17:56 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <54856CC4.8050902@fcdonders.ru.nl> Hi Chris, For getting to grips with the cluster-based permutation framework, the best starting point is Eric Maris and Robert Oostenveld's 2007 Journal of Neuroscience Methods paper ('Nonparametric statistical testing of EEG- and MEG-data'). It's designed with cognitive neuroscientists (rather than statisticians) in mind so is not too daunting a read ;) Best, Tom On 12/8/2014 9:55 AM, Dr C A Brown wrote: > Hi Tom > > Great! That would be really helpful, thank you. I'm still learning > fieldtrip so it be interesting to see how it works. The > ft_statistics_montecarlo function implies that a custom statistic of > choice can be used but I haven't looked deep enough into the function > yet to get a could understanding of it. > > If anything publishable comes out of it I can acknowledge you if you wish? > > Best wishes > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Marshall, T.R. (Tom)" > To: "FieldTrip discussion list" > Subject: [FieldTrip] Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 15:33 > > Hi Chris, > > I wrote some functions for doing this a while ago and would be happy to share them. > > Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). > > Best, > Tom > ________________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] > Sent: 06 December 2014 12:33 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. > > Kind regards > > Chris > > -- > > Dr Christopher Brown > Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:18:09 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:18:09 +0100 Subject: [FieldTrip] about detrend In-Reply-To: <54848539.5010000@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> <54848539.5010000@hms.harvard.edu> Message-ID: <002901d012c7$e2d005a0$a87010e0$@artinis.com> Hey guys, FieldTrip is subtracting the DC component prior to filtering to reduce artifacts arising from DC components (and then adding it back). FieldTrip is doing this always, i.e. also if you do not want a demeaned signal. As FieldTrip is open source, you can easily check all this by browsing through the functions yourself.Then you’ll also see the order in which preprocessing options are applied. They do NOT depend on the how you set them in your script, but follow a hard-coded logic. First the detrending/demeaning (called polyremoval in FieldTrip) is applied, and then the filters are applied. For checking these things yourself, checkout the fieldtrip/private/preproc.m function and the fieldtrip/preproc/ft_preproc_*filter. functions. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Sunday, December 7, 2014 5:50 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend I would. Baseline correction removes background components from the ERP but it does remove linear offset that is part of the post-stimulus time series. In addition to getting ride of DC, detrending also removes certain non-stationarities and reduces the severity of edge effects. I use it as a matter of course unless there is a compelling reason to omit it from the analysis pipeline. On 12/7/14, 5:53 AM, Yun Wen wrote: Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:19:56 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:19:56 +0100 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> oh and another thing: in FieldTrip, detrending inherently also demeans, or in other words, if the fitted first order polynomial is removed, also the zeroth order polynomial is. -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Yun Wen Sent: Sunday, December 7, 2014 11:53 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Mon Dec 8 15:56:02 2014 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Mon, 8 Dec 2014 14:56:02 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Hi Chris, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. For correlating/regressing single trial data of a single subject, you use the ft_statfun_indepsamplesregrT (with the units-of-observations being the trials, which each correspond to one column of your design matrix). For correlating/regressing subject-averaged data of a group of subjects, you also use the ft_statfun_indepsamplesregrT (with the units-of-observations being the subjects, which each correspond to one column of your design matrix). Note, in this case your behavioral data (accuracy or RT) or also subject averages. Best, Eric Maris ________________________________ Van: Dr C A Brown [cb802 at cam.ac.uk] Verzonden: zaterdag 6 december 2014 12:33 Aan: fieldtrip at science.ru.nl Onderwerp: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Mon Dec 8 16:05:18 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Mon, 8 Dec 2014 16:05:18 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Message-ID: Hey Chris, We've recently included a function, ft_statfun_intersubcorr, that seems to do what you're asking for (i.e. a brain-behavior correlation across subject/trials). It works fine, but given that it hasn't been fully accommodated, it has yet not been documented. Please check the help for further instructions on how to use this function. Best regards, Arjen 2014-12-08 15:56 GMT+01:00 Maris, E.G.G. (Eric) : > Hi Chris, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across subjects, > with a behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > For correlating/regressing single trial data of a single subject, you use > the ft_statfun_indepsamplesregrT (with the units-of-observations being the > trials, which each correspond to one column of your design matrix). > > For correlating/regressing subject-averaged data of a group of subjects, > you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral data > (accuracy or RT) or also subject averages. > > Best, > > Eric Maris > > > > ------------------------------ > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across subjects, > with a behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about this on > this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will embark > on writing it myself and sharing my results with everyone for feedback. > Being new to Fieldtrip I would greatly appreciate any collaborative help > with this. May I check my understanding on something before getting > started: To allow for multiple comparisons correction using monte carlo for > example, as part of a cluster analysis, I presume the output of the > function must be t values rather than correlation coefficients? Any other > hints as to how to write this are most welcome. > > Kind regards > > Chris > -- > > *Dr Christopher Brown* *Research Associate **| CamPain Group **| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge* > > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Dec 8 16:10:24 2014 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 08 Dec 2014 16:10:24 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Message-ID: <5485BF60.8030100@fcdonders.ru.nl> Hm... it seems that I may have reinvented the wheel (or perhaps invented a cruder wheel before Eric and co provided this more streamlined one). Eric, can indepsamplesregrT also compute nonparametric correlation coefficients (eg Spearman)? Best, Tom On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: > Hi Chris, > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across > subjects, with a behavioral variable. Not linear regression across > conditions as is already implemented in the ft_statfun_depsamplesregrT > function. > For correlating/regressing single trial data of a single subject, you > use the ft_statfun_indepsamplesregrT (with the units-of-observations > being the trials, which each correspond to one column of your design > matrix). > For correlating/regressing subject-averaged data of a group of > subjects, you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral > data (accuracy or RT) or also subject averages. > Best, > Eric Maris > ------------------------------------------------------------------------ > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across > subjects, with a behavioral variable. Not linear regression across > conditions as is already implemented in the ft_statfun_depsamplesregrT > function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about > this on this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will > embark on writing it myself and sharing my results with everyone for > feedback. Being new to Fieldtrip I would greatly appreciate any > collaborative help with this. May I check my understanding on > something before getting started: To allow for multiple comparisons > correction using monte carlo for example, as part of a cluster > analysis, I presume the output of the function must be t values rather > than correlation coefficients? Any other hints as to how to write this > are most welcome. > > Kind regards > > Chris > > -- > *Dr Christopher Brown* > /Research Associate//| CamPain Group//| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge/ > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Mon Dec 8 16:15:56 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Mon, 8 Dec 2014 15:15:56 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B689E@EXCHANGE2.ad.nottingham.ac.uk> Hi, Jörn & Alexander. Thank you for all the explanations. ☺ Best, Yun ~*~*~*~*~*~*~*~*~*~*~*~*~ Yun Wen 温韫 PhD Candidate Rm A25, School of Psychology University of Nottingham University Park, NG7 2RD Phone: +44 [0]115 846-8129 Tout finit toujours bien, si ça ne va pas, c'est que ce n'est pas la fin. From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of J?rn M. Horschig Sent: Monday, December 08, 2014 9:20 AM To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] about detrend oh and another thing: in FieldTrip, detrending inherently also demeans, or in other words, if the fitted first order polynomial is removed, also the zeroth order polynomial is. -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Yun Wen Sent: Sunday, December 7, 2014 11:53 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Tue Dec 9 12:27:55 2014 From: cb802 at cam.ac.uk (Dr Christopher Brown) Date: Tue, 9 Dec 2014 11:27:55 -0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <5485BF60.8030100@fcdonders.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> <5485BF60.8030100@fcdonders.ru.nl> Message-ID: <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> Dear Eric, Tom, Arjen Thanks for the information and it's good to know the functionality I need is already there. Just to clarify, I understand the situation as thus (please correct any errors of understanding): - The ft_statfun_indepsamplesregrT function can be used to calculate parametric linear regression statistics with ivar as the independent variable of interest, e.g. a behavioural variable across trials or subjects, and uvar as units (e.g. trials or subjects). - The new ft_statfun_intersubcorr can calculate Spearman correlation statistics between subjects (but not between trials), and doesn't currently have a parametric (e.g., Pearson's) option, although this appears to be covered by the ft_statfun_indepsamplesregrT function anyway. By the way, in the ft_statfun_intersubcorr description/instructions, some of the text appears to refer to ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the behavioural variable of interest rather than "conditions that must be compared" as currently stated? Also, what is the reason this function cannot be used across trials within a subject? Best wishes Chris Dr Christopher Brown Research Associate | CamPain Research Group | Department of Anaesthesia | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Tom Marshall Sent: 08 December 2014 15:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hm... it seems that I may have reinvented the wheel (or perhaps invented a cruder wheel before Eric and co provided this more streamlined one). Eric, can indepsamplesregrT also compute nonparametric correlation coefficients (eg Spearman)? Best, Tom On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: Hi Chris, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. For correlating/regressing single trial data of a single subject, you use the ft_statfun_indepsamplesregrT (with the units-of-observations being the trials, which each correspond to one column of your design matrix). For correlating/regressing subject-averaged data of a group of subjects, you also use the ft_statfun_indepsamplesregrT (with the units-of-observations being the subjects, which each correspond to one column of your design matrix). Note, in this case your behavioral data (accuracy or RT) or also subject averages. Best, Eric Maris _____ Van: Dr C A Brown [ cb802 at cam.ac.uk] Verzonden: zaterdag 6 december 2014 12:33 Aan: fieldtrip at science.ru.nl Onderwerp: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Dec 9 12:40:58 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 9 Dec 2014 12:40:58 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> <5485BF60.8030100@fcdonders.ru.nl> <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> Message-ID: Hi Chris, Quick reply: - The new ft_statfun_intersubcorr can calculate Spearman correlation statistics between subjects (but not between trials), and doesn’t currently have a parametric (e.g., Pearson’s) option, although this appears to be covered by the ft_statfun_indepsamplesregrT function anyway. > I implemented a cfg.type, allowing the specification of the correlation statistics option (e.g. Pearson), but haven't yet tested it. By the way, in the ft_statfun_intersubcorr description/instructions, some of the text appears to refer to ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the behavioural variable of interest rather than “conditions that must be compared” as currently stated? Also, what is the reason this function cannot be used across trials within a subject? > ft_statfun_intersubcorr was implemented last week on request. the documentation was taken from ft_statfun_depsamplesT and needs to be updated (thanks for reminding). The function computes a correlation across observations (subjects/trials) where one input is neural data, and the other behavior (enforce a match of dimension and size), and then transforms it to a t-value. Theoretically therefore the function could also be used to calculate a correlation statistics across trials in a subject. >> Btw, I didn't see Eric's reply before. But if you get it to work with ft_statfun_indepsamplesregr, I'd go for that. best regards, arjen 2014-12-09 12:27 GMT+01:00 Dr Christopher Brown : > Dear Eric, Tom, Arjen > > > > Thanks for the information and it’s good to know the functionality I need > is already there. Just to clarify, I understand the situation as thus > (please correct any errors of understanding): > > - The ft_statfun_indepsamplesregrT function can be used to > calculate parametric linear regression statistics with ivar as the > independent variable of interest, e.g. a behavioural variable across trials > or subjects, and uvar as units (e.g. trials or subjects). > > - The new ft_statfun_intersubcorr can calculate Spearman > correlation statistics between subjects (but not between trials), and > doesn’t currently have a parametric (e.g., Pearson’s) option, although this > appears to be covered by the ft_statfun_indepsamplesregrT function > anyway. By the way, in the ft_statfun_intersubcorr > description/instructions, some of the text appears to refer to > ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the > behavioural variable of interest rather than “conditions that must be > compared” as currently stated? Also, what is the reason this function > cannot be used across trials within a subject? > > > > Best wishes > > Chris > > > > *Dr Christopher Brown* > > *Research Associate | CamPain Research Group | Department of Anaesthesia | > University of Cambridge* > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Tom Marshall > *Sent:* 08 December 2014 15:10 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Cluster analysis on correlation statistics > > > > Hm... it seems that I may have reinvented the wheel (or perhaps invented a > cruder wheel before Eric and co provided this more streamlined one). > > Eric, can indepsamplesregrT also compute nonparametric correlation > coefficients (eg Spearman)? > > Best, > Tom > > On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: > > Hi Chris, > > > > Just to clarify my last email: I'm referring to correlation between either > single trial data within subject, or averaged ERPs across subjects, with a > behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > > > For correlating/regressing single trial data of a single subject, you use > the ft_statfun_indepsamplesregrT (with the units-of-observations being the > trials, which each correspond to one column of your design matrix). > > > > For correlating/regressing subject-averaged data of a group of subjects, > you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral data > (accuracy or RT) or also subject averages. > > > > Best, > > > > Eric Maris > > > > > > > ------------------------------ > > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > > > Just to clarify my last email: I'm referring to correlation between either > single trial data within subject, or averaged ERPs across subjects, with a > behavioral variable. Not linear regression across conditions as is already > implemented in the ft_statfun_depsamplesregrT function. > > > > Many thanks > > Chris > > > > Dr Christopher Brown > > Research Associate > > > > Sent from a mobile device, please excuse my brevity. > > > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about this on > this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will embark > on writing it myself and sharing my results with everyone for feedback. > Being new to Fieldtrip I would greatly appreciate any collaborative help > with this. May I check my understanding on something before getting > started: To allow for multiple comparisons correction using monte carlo for > example, as part of a cluster analysis, I presume the output of the > function must be t values rather than correlation coefficients? Any other > hints as to how to write this are most welcome. > > Kind regards > > Chris > > -- > > *Dr Christopher Brown* > > *Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge* > > > > Box 93 > > Addenbrooke's Hospital > > Hills Road > > Cambridge CB2 0QQ > > > > 01223 256 995 > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Tue Dec 9 23:51:50 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Tue, 9 Dec 2014 23:51:50 +0100 Subject: [FieldTrip] (no subject) Message-ID: Hey Fieldtrippers, I am fighting with a self defined trialfunction. Basically I want to cut always at one event called ceck. If there is another event in the piece cut out, called resp I want to log the distance between the two of them. I tried function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('pres', {event.value}))).value]'; sample = [event(find(strcmp('pres', {event.value}))).sample]'; % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = sample + pretrig trlend = sample + posttrig offset = sample - sample + pretrig RT = sample2 - sample newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl]; end But the problem is, that not always there is this second event, so length(sample1) is not equal to length (sample2). Now I would just like that every time when event 2 is missing sample 2 is just set to zero, so that the two vectors have the same length and the function is working. Is this possible? Thanks a million Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Dec 10 07:19:28 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Dec 2014 07:19:28 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Het katrin, you could make a couple of conditional if statements (eg creating and changing the value of a variable event1ctr). For example, conceptually: Event1ctr = 0 Loop start If event1 & event1ctr == 0 Event1ctr = 1 Elseif event1 & event1ctr Trl = ... with a zero for trlend # no event2 found Event1ctr = 0 End If event2 Trl = ... # normal trial Event1ctr= 0 End Loop end Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" het volgende: > Hey Fieldtrippers, > > I am fighting with a self defined trialfunction. > Basically I want to cut always at one event called ceck. If there is > another event in the piece cut out, called resp I want to log the distance > between the two of them. > I tried > > function [trl, event] = response_trialfun(cfg); > > % read the header information and the events from the data > hdr = ft_read_header(cfg.dataset); > event = ft_read_event(cfg.dataset); > > > % search for "trigger" events > value = [event(find(strcmp('pres', {event.value}))).value]'; > sample = [event(find(strcmp('pres', {event.value}))).sample]'; > > % search for "trigger" events > value2 = [event(find(strcmp('resp', {event.value}))).value]'; > sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; > > % determine the number of samples before and after the trigger > pretrig = -round(cfg.trialdef.prestim * hdr.Fs); > posttrig = round(cfg.trialdef.poststim * hdr.Fs); > > trl = []; > > trlbegin = sample + pretrig > trlend = sample + posttrig > offset = sample - sample + pretrig > RT = sample2 - sample > > newtrl = [trlbegin trlend offset RT]; > trl = [trl; newtrl]; > > end > > > But the problem is, that not always there is this second event, so > length(sample1) is not equal to length (sample2). Now I would just like > that every time when event 2 is missing sample 2 is just set to zero, so > that the two vectors have the same length and the function is working. Is > this possible? > Thanks a million > Katrin > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Wed Dec 10 12:56:19 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Wed, 10 Dec 2014 12:56:19 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Hey Arjen, hey all, so, I used some if statements, yes, and now I really get lists of trialbegin, trialend, offset and RT as I wanted them, however at the end only one segment (with the last infos of the lists) is created. I just don't get what is wrong. Could you have another short look? Thanks a million Katrin function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('ceck', {event.value}))).value]'; sample = [event(find(strcmp('ceck', {event.value}))).sample]' % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]' % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = []; trlend = [] offset = []; RT = []; i=7 %delete training trials j=1 k=1 while i <= (length(sample)) if sample2(j)-sample(i)<=2500 & sample2(j)-sample(i)>=1 % find resp appearing after ceck within RT-window trlbegin (k) = sample (i) + pretrig; trlend (k) = sample (i) + posttrig; offset (k) = sample (i) - sample (i) + pretrig; RT(k) = sample2 (j) - sample (i); i=i+1 j=j+1 k=k+1 elseif sample2(j)-sample(i)<=0 j=j+1 else i=i+1 end end newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl] 2014-12-10 7:19 GMT+01:00 Arjen Stolk : > Het katrin, you could make a couple of conditional if statements (eg > creating and changing the value of a variable event1ctr). For example, > conceptually: > > Event1ctr = 0 > > Loop start > > If event1 & event1ctr == 0 > Event1ctr = 1 > Elseif event1 & event1ctr > Trl = ... with a zero for trlend # no event2 found > Event1ctr = 0 > End > > If event2 > Trl = ... # normal trial > Event1ctr= 0 > End > > Loop end > Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" > het volgende: > >> Hey Fieldtrippers, >> >> I am fighting with a self defined trialfunction. >> Basically I want to cut always at one event called ceck. If there is >> another event in the piece cut out, called resp I want to log the distance >> between the two of them. >> I tried >> >> function [trl, event] = response_trialfun(cfg); >> >> % read the header information and the events from the data >> hdr = ft_read_header(cfg.dataset); >> event = ft_read_event(cfg.dataset); >> >> >> % search for "trigger" events >> value = [event(find(strcmp('pres', {event.value}))).value]'; >> sample = [event(find(strcmp('pres', {event.value}))).sample]'; >> >> % search for "trigger" events >> value2 = [event(find(strcmp('resp', {event.value}))).value]'; >> sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; >> >> % determine the number of samples before and after the trigger >> pretrig = -round(cfg.trialdef.prestim * hdr.Fs); >> posttrig = round(cfg.trialdef.poststim * hdr.Fs); >> >> trl = []; >> >> trlbegin = sample + pretrig >> trlend = sample + posttrig >> offset = sample - sample + pretrig >> RT = sample2 - sample >> >> newtrl = [trlbegin trlend offset RT]; >> trl = [trl; newtrl]; >> >> end >> >> >> But the problem is, that not always there is this second event, so >> length(sample1) is not equal to length (sample2). Now I would just like >> that every time when event 2 is missing sample 2 is just set to zero, so >> that the two vectors have the same length and the function is working. Is >> this possible? >> Thanks a million >> Katrin >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Wed Dec 10 23:16:29 2014 From: joseluisblues at gmail.com (Jose) Date: Wed, 10 Dec 2014 23:16:29 +0100 Subject: [FieldTrip] Micromed data Message-ID: Dear fellows, I am a beginner in FT, and I need some help. I am analysing EEG Micromed data, which give as ouputs .trc or .edf files. I am trying to workout the edf files, which store the actual 29 electrodes recorded during the experiment, I have troubles putting the data in FT format, Either with: hdr = ft_read_header(data); event = ft_read_event(data); data_2 = ft_read_data(data); I obtain 405 events, which are 1s longer (1024 samples). This is actually more related to the frequency sampling, and it is nothing related to the structures of the trials, Has anybody experience with Micromed data?, Thanks in advance, José Luis -- José Luis ULLOA FULGERI 33 (0)6.29.50.64.93 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Dec 11 08:53:56 2014 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 11 Dec 2014 08:53:56 +0100 Subject: [FieldTrip] Micromed data In-Reply-To: References: Message-ID: <002801d01517$9dfdee40$d9f9cac0$@artinis.com> Hi José, you might want to start looking here: http://fieldtrip.fcdonders.nl/getting_started and then head to one of the tutorials on preprocessing or read the walkthrough. That should help to get you started. As a hint, you can better use ft_preprocessing rather than ft_read_XXX. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jose Sent: Wednesday, December 10, 2014 11:16 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Micromed data Dear fellows, I am a beginner in FT, and I need some help. I am analysing EEG Micromed data, which give as ouputs .trc or .edf files. I am trying to workout the edf files, which store the actual 29 electrodes recorded during the experiment, I have troubles putting the data in FT format, Either with: hdr = ft_read_header(data); event = ft_read_event(data); data_2 = ft_read_data(data); I obtain 405 events, which are 1s longer (1024 samples). This is actually more related to the frequency sampling, and it is nothing related to the structures of the trials, Has anybody experience with Micromed data?, Thanks in advance, José Luis -- José Luis ULLOA FULGERI 33 (0)6.29.50.64.93 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Dec 11 15:35:45 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 11 Dec 2014 14:35:45 +0000 Subject: [FieldTrip] Beamformer source timeseries Message-ID: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> Dear Fieldtrippers, Sorry if I not gotten to the right tutorial page. I have an EEG dataset with 128 electrodes. What I would like is, if there are N sources found using a Beamformer, I would like N timeseries corresponding to these sources which have been split in to trials as in my original sensor-space data. Instead in the tutorial, it is about getting beta power at various locations. Any help on obtaining this would be very useful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Dec 11 15:48:04 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Thu, 11 Dec 2014 15:48:04 +0100 Subject: [FieldTrip] Beamformer source timeseries In-Reply-To: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> References: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> Message-ID: <005401d01551$78af40f0$6a0dc2d0$@artinis.com> Hey Rajat, an example of what you want can be found here: http://fieldtrip.fcdonders.nl/tutorial/shared/virtual_sensors Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Rajat Thomas Sent: Thursday, December 11, 2014 3:36 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Beamformer source timeseries Dear Fieldtrippers, Sorry if I not gotten to the right tutorial page. I have an EEG dataset with 128 electrodes. What I would like is, if there are N sources found using a Beamformer, I would like N timeseries corresponding to these sources which have been split in to trials as in my original sensor-space data. Instead in the tutorial, it is about getting beta power at various locations. Any help on obtaining this would be very useful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jb4590 at nyu.edu Thu Dec 11 19:50:20 2014 From: jb4590 at nyu.edu (Julia Basso) Date: Thu, 11 Dec 2014 13:50:20 -0500 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip Message-ID: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia *Julia C. Basso, PhDPost-doctoral Research AssociateNew York UniversityCenter for Neural ScienceSuzuki Laboratorywww.suzukilab.com * -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Fri Dec 12 10:51:20 2014 From: n.lam at fcdonders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Fri, 12 Dec 2014 09:51:20 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: , Message-ID: Hi Katrin, Not sure if you solved it yet, but it looks like you need to update 'newtrl' and 'trl' within your while loop, and not outside of the loop. Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of KatrinH Heimann [katrinheimann at gmail.com] Sent: 10 December 2014 12:56 To: FieldTrip discussion list Subject: Re: [FieldTrip] (no subject) Hey Arjen, hey all, so, I used some if statements, yes, and now I really get lists of trialbegin, trialend, offset and RT as I wanted them, however at the end only one segment (with the last infos of the lists) is created. I just don't get what is wrong. Could you have another short look? Thanks a million Katrin function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('ceck', {event.value}))).value]'; sample = [event(find(strcmp('ceck', {event.value}))).sample]' % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]' % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = []; trlend = [] offset = []; RT = []; i=7 %delete training trials j=1 k=1 while i <= (length(sample)) if sample2(j)-sample(i)<=2500 & sample2(j)-sample(i)>=1 % find resp appearing after ceck within RT-window trlbegin (k) = sample (i) + pretrig; trlend (k) = sample (i) + posttrig; offset (k) = sample (i) - sample (i) + pretrig; RT(k) = sample2 (j) - sample (i); i=i+1 j=j+1 k=k+1 elseif sample2(j)-sample(i)<=0 j=j+1 else i=i+1 end end newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl] 2014-12-10 7:19 GMT+01:00 Arjen Stolk >: Het katrin, you could make a couple of conditional if statements (eg creating and changing the value of a variable event1ctr). For example, conceptually: Event1ctr = 0 Loop start If event1 & event1ctr == 0 Event1ctr = 1 Elseif event1 & event1ctr Trl = ... with a zero for trlend # no event2 found Event1ctr = 0 End If event2 Trl = ... # normal trial Event1ctr= 0 End Loop end Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" > het volgende: Hey Fieldtrippers, I am fighting with a self defined trialfunction. Basically I want to cut always at one event called ceck. If there is another event in the piece cut out, called resp I want to log the distance between the two of them. I tried function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('pres', {event.value}))).value]'; sample = [event(find(strcmp('pres', {event.value}))).sample]'; % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = sample + pretrig trlend = sample + posttrig offset = sample - sample + pretrig RT = sample2 - sample newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl]; end But the problem is, that not always there is this second event, so length(sample1) is not equal to length (sample2). Now I would just like that every time when event 2 is missing sample 2 is just set to zero, so that the two vectors have the same length and the function is working. Is this possible? Thanks a million Katrin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.kristensen at gipsa-lab.grenoble-inp.fr Fri Dec 12 15:49:10 2014 From: emmanuelle.kristensen at gipsa-lab.grenoble-inp.fr (Kristensen Emmanuelle) Date: Fri, 12 Dec 2014 15:49:10 +0100 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? In-Reply-To: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr> Message-ID: <548B0066.3090309@gipsa-lab.grenoble-inp.fr> Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Fri Dec 12 23:24:17 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Dec 2014 22:24:17 +0000 Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From spa268 at nyu.edu Sat Dec 13 14:04:25 2014 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Sat, 13 Dec 2014 07:04:25 -0600 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: Hello Emmanuelle, I don't think a high-pass filter can replace demeaning. A high-pass filter removes a linear trend, but not a fixed value. Imagine a case where a trial is a flat line at 100 uV for the whole epoch; demeaning would change this trial to 0 uV for the whole epoch, whereas a high-pass filter would (I think) not change it. Detrending, on the other hand, removes a linear trend. There was a discussion very recently on this list discussing detrending vs. high-pass filtering, so you may be interested in checking it out. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Sat Dec 13 14:49:32 2014 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Sat, 13 Dec 2014 14:49:32 +0100 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) Message-ID: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory . Hope this helps, Haiteng On 13 December 2014 at 12:00, wrote: > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Correction baseline : removing the mean value or high-pass > filtering ? (Kristensen Emmanuelle) > 2. Question about how to reduce the file size (Caspar, Emilie) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1ceca823/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Fri, 12 Dec 2014 22:24:17 +0000 > From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size > Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> > Content-Type: text/plain; charset="us-ascii" > > Dear Fieltrippers, > I did a pilot study on one participant today. Now that I'm trying to > analyze my data, I realize that the size file is too big for my computer > (size = 3Gb). Even after one hour, the filters (high pass + low pass) were > not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the > filters. > > I know that there is "ft_resampledata", and I did it to reduce the actual > sample rate (= 2048) to 256. However, even with this procedure my computer > is crashing (even with 16 Go RAM). In addition, I'm not sure that I can > resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I need > (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for > next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1fa62a62/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 49, Issue 12 > ***************************************** > -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Sun Dec 14 21:44:34 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Sun, 14 Dec 2014 20:44:34 +0000 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: Dear Haiteng Thank you for your suggestion. I tried but again, the downsample with this procedure takes more than 40 minutes (I gave up after this time period and stopped the script, the computer was crashing). Perhaps one could tell if the following is correct? I'm maybe wrong somewhere. chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} chansEEG = 1:64; nchans=length(chansEEG); display('downsample each channel') for i=1:nchans cfgp = []; cfgp.dataset = [ file.name]; cfgp.channel = 'all'; datp = ft_preprocessing(cfgp); cfgr = []; cfgr.resamplefs = 512; datr{i} = ft_resampledata(cfgr, datp); clear datp cfg = []; datall = ft_appenddata(cfg, datr{:}); display('Filters') cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = bpfilterRange; cfg.bpfiltord = bpfilterOrder; cfg.reref = 'yes'; cfg.refchannel = chansRef; allData_preprosses = ft_preprocessing(cfg, datall); Thanks again! Emilie On 13 déc. 2014, at 14:49, Haiteng Jiang > wrote: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. Hope this helps, Haiteng On 13 December 2014 at 12:00, > wrote: Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Correction baseline : removing the mean value or high-pass filtering ? (Kristensen Emmanuelle) 2. Question about how to reduce the file size (Caspar, Emilie) ---------------------------------------------------------------------- Message: 1 Date: Fri, 12 Dec 2014 15:49:10 +0100 From: Kristensen Emmanuelle > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 12 Dec 2014 22:24:17 +0000 From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> Content-Type: text/plain; charset="us-ascii" Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 12 ***************************************** -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Dec 14 22:13:23 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sun, 14 Dec 2014 22:13:23 +0100 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: Hi Emilie, It seems from the code pasted that you're still trying to read all channels in at once: cfgp.channel = 'all'; Try reading in & downsampling one channel at a time, as Haiteng suggested with the following link: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory Hope that solves it for you, Arjen 2014-12-14 21:44 GMT+01:00 Caspar, Emilie : > > Dear Haiteng > > Thank you for your suggestion. I tried but again, the downsample with > this procedure takes more than 40 minutes (I gave up after this time period > and stopped the script, the computer was crashing). > > Perhaps one could tell if the following is correct? I'm maybe wrong > somewhere. > > chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} > chansEEG = 1:64; > nchans=length(chansEEG); > > display('downsample each channel') > > for i=1:nchans > cfgp = []; > cfgp.dataset = [ file.name]; > cfgp.channel = 'all'; > datp = ft_preprocessing(cfgp); > > > cfgr = []; > cfgr.resamplefs = 512; > datr{i} = ft_resampledata(cfgr, datp); > > > clear datp > > cfg = []; > datall = ft_appenddata(cfg, datr{:}); > > > display('Filters') > > > cfg = []; > cfg.bpfilter = 'yes'; > cfg.bpfreq = bpfilterRange; > cfg.bpfiltord = bpfilterOrder; > cfg.reref = 'yes'; > cfg.refchannel = chansRef; > allData_preprosses = ft_preprocessing(cfg, datall); > > Thanks again! > > Emilie > > On 13 déc. 2014, at 14:49, Haiteng Jiang wrote: > > Hi Emilie, > You can read each channel and then down sample. In the end , you > append all the channel. For more information and how to , you can refer to > the FAQ: > http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory > . > > Hope this helps, > Haiteng > > On 13 December 2014 at 12:00, wrote: >> >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> 1. Correction baseline : removing the mean value or high-pass >> filtering ? (Kristensen Emmanuelle) >> 2. Question about how to reduce the file size (Caspar, Emilie) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 12 Dec 2014 15:49:10 +0100 >> From: Kristensen Emmanuelle >> >> To: FieldTrip discussion list >> Subject: [FieldTrip] Correction baseline : removing the mean value or >> high-pass filtering ? >> Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> >> Content-Type: text/plain; charset="utf-8"; Format="flowed" >> >> Hi, >> I would need your opinion, please. >> Generally, the baseline correction means to remove a mean value from >> each epoch. I am wondering if a high pass filter, applied on the whole >> recorded signal, can perform the baseline correction. >> What do you think? >> Regards >> Emmanuelle >> >> -- >> Emmanuelle KRISTENSEN >> Doctorante au Gipsa-Lab >> Equipe VIBS >> >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1ceca823/attachment-0001.html >> > >> >> ------------------------------ >> >> Message: 2 >> Date: Fri, 12 Dec 2014 22:24:17 +0000 >> From: "Caspar, Emilie" >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Question about how to reduce the file size >> Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> >> Content-Type: text/plain; charset="us-ascii" >> >> Dear Fieltrippers, >> I did a pilot study on one participant today. Now that I'm trying to >> analyze my data, I realize that the size file is too big for my computer >> (size = 3Gb). Even after one hour, the filters (high pass + low pass) were >> not yet achieved. >> >> So I would like to see how to reduce the size of my sample BEFORE the >> filters. >> >> I know that there is "ft_resampledata", and I did it to reduce the actual >> sample rate (= 2048) to 256. However, even with this procedure my computer >> is crashing (even with 16 Go RAM). In addition, I'm not sure that I can >> resample before filtering (I read different informations). >> >> Another way I was thinking about was to pre-select electrodes that I need >> (only 6 electrodes on 64). But here I have two questions: >> - Can I pre-process only some electrodes? Does it really reduce size for >> next preprocesses? >> - Is this the correct way to ask? As it crashes, not sure it works. >> >> cfg = []; >> cfg.dataset = [ file.name]; >> cfg.channel = 'B5', 'B6', 'B15', 'B16'; >> allData_prepross = ft_preprocessing(cfg); >> cfg.resamplefs = 256; >> DataSample = ft_resampledata(cfg, allData_prepross) >> >> >> I would appreciate pieces of advice! >> >> Many thanks :) >> >> Emilie >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1fa62a62/attachment-0001.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 49, Issue 12 >> ***************************************** >> > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Mon Dec 15 10:03:38 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Mon, 15 Dec 2014 09:03:38 +0000 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: <4C066F35-6488-4360-AD67-ABD826680A31@live.ucl.ac.uk> It works indeed, I have understood my mistake. Thank you! On 14 déc. 2014, at 22:13, Arjen Stolk > wrote: Hi Emilie, It seems from the code pasted that you're still trying to read all channels in at once: cfgp.channel = 'all'; Try reading in & downsampling one channel at a time, as Haiteng suggested with the following link: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory Hope that solves it for you, Arjen 2014-12-14 21:44 GMT+01:00 Caspar, Emilie >: Dear Haiteng Thank you for your suggestion. I tried but again, the downsample with this procedure takes more than 40 minutes (I gave up after this time period and stopped the script, the computer was crashing). Perhaps one could tell if the following is correct? I'm maybe wrong somewhere. chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} chansEEG = 1:64; nchans=length(chansEEG); display('downsample each channel') for i=1:nchans cfgp = []; cfgp.dataset = [ file.name]; cfgp.channel = 'all'; datp = ft_preprocessing(cfgp); cfgr = []; cfgr.resamplefs = 512; datr{i} = ft_resampledata(cfgr, datp); clear datp cfg = []; datall = ft_appenddata(cfg, datr{:}); display('Filters') cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = bpfilterRange; cfg.bpfiltord = bpfilterOrder; cfg.reref = 'yes'; cfg.refchannel = chansRef; allData_preprosses = ft_preprocessing(cfg, datall); Thanks again! Emilie On 13 déc. 2014, at 14:49, Haiteng Jiang > wrote: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. Hope this helps, Haiteng On 13 December 2014 at 12:00, > wrote: Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Correction baseline : removing the mean value or high-pass filtering ? (Kristensen Emmanuelle) 2. Question about how to reduce the file size (Caspar, Emilie) ---------------------------------------------------------------------- Message: 1 Date: Fri, 12 Dec 2014 15:49:10 +0100 From: Kristensen Emmanuelle > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 12 Dec 2014 22:24:17 +0000 From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> Content-Type: text/plain; charset="us-ascii" Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 12 ***************************************** -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.wutz-1 at unitn.it Mon Dec 15 10:15:03 2014 From: andreas.wutz-1 at unitn.it (Wutz, Andreas Gerhard) Date: Mon, 15 Dec 2014 10:15:03 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <548B0066.3090309@gipsa-lab.grenoble-inp.fr> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> Message-ID: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> Dear all, I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. Thank you very much for your suggestions. Best, Andreas Andreas Wutz Post-Doctoral researcher at the Melcher Active Perception Lab CIMeC - Center for Mind/Brain Sciences Università degli studi di Trento ________________________________________ From tzvetan.popov at uni-konstanz.de Mon Dec 15 10:58:08 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 15 Dec 2014 10:58:08 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> Message-ID: <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> Hi Andreas, ft_selectdata is probably what you need. best tzvetan > Dear all, > > I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. > > Thank you very much for your suggestions. > Best, > Andreas > > Andreas Wutz > Post-Doctoral researcher at the Melcher Active Perception Lab > CIMeC - Center for Mind/Brain Sciences > Università degli studi di Trento > ________________________________________ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Mon Dec 15 14:36:18 2014 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Mon, 15 Dec 2014 14:36:18 +0100 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? In-Reply-To: References: Message-ID: Hi Emmanuelle, any high-pass filter will at least attenuate the DC offset (the mean) and a linear trend (by definition). A properly designed high-pass filter should have > 80-100 dB DC attenuation and thus, completely remove the DC offset from the data in most cases. As there are exceptions with extreme DC offsets, quite frequently observed for example in BioSemi EEG recordings, the mean is additionally subtracted from the data before high-pass (and band-pass) filtering in Fieldtrip. Have a look at the filter’s frequency response if available. And yes, your reasoning is correct: a high-pass filter can be used to replace baseline correction in particular applications. This can for example be recommended if you cannot define a clean baseline as for example in many language studies (for detailed discussion see Urbach and Kutas, 2006, doi:10.1016/j.biopsycho.2005.11.012). Baseline correction would remove the mean baseline ERP topography from the data. Possible (but not necessary) drawback is that you might need higher high-pass cutoff frequencies to remove slow drifts from the data. Take care of possible filter distortions with cutoff frequencies > ~.1 Hz (see Acunzo et al., 2012, pre-print version available here: http://homepages.inf.ed.ac.uk/mvanross/reprints/Acunzo_et_al_in_press_lo_res.pdf and Widmann et al., 2014, pre-print version available here: http://www.uni-leipzig.de/~biocog/eprints/widmann_a2014jneuroscimethods.pdf for discussion). Hope this helps! Best, Andreas > Am 13.12.2014 um 14:04 schrieb Stephen Politzer-Ahles : > > Hello Emmanuelle, > > I don't think a high-pass filter can replace demeaning. A high-pass filter removes a linear trend, but not a fixed value. Imagine a case where a trial is a flat line at 100 uV for the whole epoch; demeaning would change this trial to 0 uV for the whole epoch, whereas a high-pass filter would (I think) not change it. > > Detrending, on the other hand, removes a linear trend. There was a discussion very recently on this list discussing detrending vs. high-pass filtering, so you may be interested in checking it out. > > Best, > Steve > > > > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > > > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From andreas.wutz-1 at unitn.it Mon Dec 15 15:41:52 2014 From: andreas.wutz-1 at unitn.it (Wutz, Andreas Gerhard) Date: Mon, 15 Dec 2014 15:41:52 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it>, <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> Message-ID: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10F@MBX.unitn.it> Thx Tzvetan for pointing to the ft_selectdata function. Unfortunately, I don't think it really does what I want it to do. I really only want to shift the time axis backwards for a certain interval per subject and not make a selection of data segments. Maybe I am getting something wrong how ft_selectdata works ...? Anyways, I already re-ran the pipeline from scratch. Thx again, Tzvetan. Hope to see you soon again! Andi Andreas Wutz Post-Doctoral researcher at the Melcher Active Perception Lab CIMeC - Center for Mind/Brain Sciences Università degli studi di Trento ________________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] im Auftrag von Tzvetan Popov [tzvetan.popov at uni-konstanz.de] Gesendet: Montag, 15. Dezember 2014 10:58 An: FieldTrip discussion list Betreff: Re: [FieldTrip] redefine time axis on time-frequency representations Hi Andreas, ft_selectdata is probably what you need. best tzvetan > Dear all, > > I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. > > Thank you very much for your suggestions. > Best, > Andreas > > Andreas Wutz > Post-Doctoral researcher at the Melcher Active Perception Lab > CIMeC - Center for Mind/Brain Sciences > Università degli studi di Trento > ________________________________________ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.thomas at nin.knaw.nl Tue Dec 16 16:01:41 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Tue, 16 Dec 2014 15:01:41 +0000 Subject: [FieldTrip] Active Electrodes and TMS Message-ID: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> ?Dear Fieldtrippers, Is it possible to use TMS with Active Electrodes if say the electrodes are in the Visual area and the TMS pulses are far away on the motor cortex or thereabouts? Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Tue Dec 16 16:20:13 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 16 Dec 2014 15:20:13 +0000 Subject: [FieldTrip] Active Electrodes and TMS In-Reply-To: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> References: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> Message-ID: <17DBF494-ED1C-4ECE-84F3-6210E4DB46DF@fcdonders.ru.nl> Dear Rajat, I would suggest asking the manufacturer of the electrodes. Often they are aware if any researchers are doing this and whether it is feasible and will not break the amplifiers in the electrodes. Best, Jim On 16 Dec 2014, at 16:06, Rajat Thomas > wrote: ​Dear Fieldtrippers, Is it possible to use TMS with Active Electrodes if say the electrodes are in the Visual area and the TMS pulses are far away on the motor cortex or thereabouts? Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Dec 17 11:45:09 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 17 Dec 2014 11:45:09 +0100 Subject: [FieldTrip] problem with surface Laplacian Message-ID: Dear all, I have 60 channel EEG resting state data, and after discarding bad channels, I am left with 48 channels common to all subjects. I applied scalp current density to my data before extracting power information from my EEG data. The EEG cap that I used was in a 10-10 system, and I don't have the electrode position file. Hence, I used the default electrode position file named 'standard_1005.elc' for the purpose. Here's the part of my script for the surface Laplacian: cfg_neighb.method = 'template'; cfg_neighb.layout = 'EEG1010.lay'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'no'; neighbours = ft_prepare_neighbours(cfg_neighb, data7); cfg = []; cfg.method = 'finite'; cfg.elecfile = 'standard_1005.elc'; cfg.elec = ft_read_sens(cfg.elecfile); cfg.trials = 'all'; cfg.neighbours = neighbours; cfg.conductivity = 0.33; data8 = ft_scalpcurrentdensity(cfg, data7); When I tried to extract power from data8 (after surface Laplacian), I keep getting an error message (see below). I'm not sure why this would be the case, and would appreciate very much if someone could help me resolve the error! Thank you! Here's my script for extracting the power: cfg = []; cfg.output = 'pow'; cfg.channel = {'all'}; cfg.method = 'mtmfft'; cfg.keeptrials = 'no'; cfg.tapsmofrq = 5; cfg.layout = 'EEG1010.lay'; % for frequencies up to 30 Hz cfg.foilim = [1 30]; % either the full range of frequencies (data2.hdr.Fs/2) or up to 100 Hz cfg.taper = 'hanning'; % find the index for the c200 condition pre_c200_idx = find(data8.trialinfo == 200); cfg.trials = pre_c200_idx; LF_pre_c200 = ft_freqanalysis(cfg, data8); Here's the output plus error message: the input is raw data with 48 channels and 343 trials Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 223) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 209) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Dec 17 15:07:24 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 17 Dec 2014 09:07:24 -0500 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: It seems like the issue is between the number of channels in your input (48) is different from the number of channels in the sensor description (60). You should use ft_channelrepair to interpolate the removed channels, and then it should work barring any other issues. On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee wrote: > > Dear all, > > I have 60 channel EEG resting state data, and after discarding bad > channels, I am left with 48 channels common to all subjects. > > I applied scalp current density to my data before extracting power > information from my EEG data. The EEG cap that I used was in a 10-10 > system, and I don't have the electrode position file. Hence, I used the > default electrode position file named 'standard_1005.elc' for the purpose. > > Here's the part of my script for the surface Laplacian: > > > cfg_neighb.method = 'template'; > cfg_neighb.layout = 'EEG1010.lay'; > cfg_neighb.channel = 'all'; > cfg_neighb.feedback = 'no'; > > neighbours = ft_prepare_neighbours(cfg_neighb, data7); > > cfg = []; > cfg.method = 'finite'; > cfg.elecfile = 'standard_1005.elc'; > cfg.elec = ft_read_sens(cfg.elecfile); > cfg.trials = 'all'; > cfg.neighbours = neighbours; > cfg.conductivity = 0.33; > > data8 = ft_scalpcurrentdensity(cfg, data7); > > When I tried to extract power from data8 (after surface Laplacian), I keep > getting an error message (see below). I'm not sure why this would be the > case, and would appreciate very much if someone could help me resolve the > error! > > Thank you! > > Here's my script for extracting the power: > cfg = []; > cfg.output = 'pow'; > cfg.channel = {'all'}; > cfg.method = 'mtmfft'; > cfg.keeptrials = 'no'; > cfg.tapsmofrq = 5; > cfg.layout = 'EEG1010.lay'; > > % for frequencies up to 30 Hz > cfg.foilim = [1 30]; % either the full range of frequencies > (data2.hdr.Fs/2) or up to 100 Hz > cfg.taper = 'hanning'; > > % find the index for the c200 condition > pre_c200_idx = find(data8.trialinfo == 200); > cfg.trials = pre_c200_idx; > LF_pre_c200 = ft_freqanalysis(cfg, data8); > > Here's the output plus error message: > > the input is raw data with 48 channels and 343 trials > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 223) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 209) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', > cfg.feedback, 'hassampleinfo', 'yes'); > > Best regards, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Dec 17 15:25:11 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 17 Dec 2014 15:25:11 +0100 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: Hi, Would it possible to change the number of channels in the sensor description? There are some channels that I cannot repair, hence, I decided to discard them completely from the analyses. Cheers, Hweeling On 17 December 2014 at 15:07, Max Cantor wrote: > > It seems like the issue is between the number of channels in your input > (48) is different from the number of channels in the sensor description > (60). You should use ft_channelrepair to interpolate the removed channels, > and then it should work barring any other issues. > > On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee > wrote: > >> Dear all, >> >> I have 60 channel EEG resting state data, and after discarding bad >> channels, I am left with 48 channels common to all subjects. >> >> I applied scalp current density to my data before extracting power >> information from my EEG data. The EEG cap that I used was in a 10-10 >> system, and I don't have the electrode position file. Hence, I used the >> default electrode position file named 'standard_1005.elc' for the purpose. >> >> Here's the part of my script for the surface Laplacian: >> >> >> cfg_neighb.method = 'template'; >> cfg_neighb.layout = 'EEG1010.lay'; >> cfg_neighb.channel = 'all'; >> cfg_neighb.feedback = 'no'; >> >> neighbours = ft_prepare_neighbours(cfg_neighb, data7); >> >> cfg = []; >> cfg.method = 'finite'; >> cfg.elecfile = 'standard_1005.elc'; >> cfg.elec = ft_read_sens(cfg.elecfile); >> cfg.trials = 'all'; >> cfg.neighbours = neighbours; >> cfg.conductivity = 0.33; >> >> data8 = ft_scalpcurrentdensity(cfg, data7); >> >> When I tried to extract power from data8 (after surface Laplacian), I >> keep getting an error message (see below). I'm not sure why this would be >> the case, and would appreciate very much if someone could help me resolve >> the error! >> >> Thank you! >> >> Here's my script for extracting the power: >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = {'all'}; >> cfg.method = 'mtmfft'; >> cfg.keeptrials = 'no'; >> cfg.tapsmofrq = 5; >> cfg.layout = 'EEG1010.lay'; >> >> % for frequencies up to 30 Hz >> cfg.foilim = [1 30]; % either the full range of frequencies >> (data2.hdr.Fs/2) or up to 100 Hz >> cfg.taper = 'hanning'; >> >> % find the index for the c200 condition >> pre_c200_idx = find(data8.trialinfo == 200); >> cfg.trials = pre_c200_idx; >> LF_pre_c200 = ft_freqanalysis(cfg, data8); >> >> Here's the output plus error message: >> >> the input is raw data with 48 channels and 343 trials >> Error using ft_datatype_sens (line 375) >> inconsistent number of channels in sensor description >> >> Error in ft_datatype_raw (line 138) >> data.elec = ft_datatype_sens(data.elec); >> >> Error in ft_checkdata (line 223) >> data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); >> >> Error in ft_freqanalysis (line 209) >> data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, >> 'feedback', >> cfg.feedback, 'hassampleinfo', 'yes'); >> >> Best regards, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Dec 17 15:30:31 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 17 Dec 2014 09:30:31 -0500 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: Why were you not able to repair them? Is it that they are neighbors, so linear interpolation won't work? I can't speak to this too much as I haven't tried it, but I've been looking into spline and if this is your problem spline could work. Otherwise I imagine you could manually edit / create a new elec or layout file (in matlab or in a text editor), which wouldn't be a bad idea anyway. I did this for our system as we could not find a premade one, but we use equidistant caps so it was pretty straightforward. However, I don't know if there would be any negative implications with removing the electrodes from the layout/elec file(s) altogether. On Wed, Dec 17, 2014 at 9:25 AM, Hwee Ling Lee wrote: > > Hi, > > Would it possible to change the number of channels in the sensor > description? There are some channels that I cannot repair, hence, I decided > to discard them completely from the analyses. > > Cheers, > Hweeling > > > On 17 December 2014 at 15:07, Max Cantor wrote: >> >> It seems like the issue is between the number of channels in your input >> (48) is different from the number of channels in the sensor description >> (60). You should use ft_channelrepair to interpolate the removed channels, >> and then it should work barring any other issues. >> >> On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee >> wrote: >> >>> Dear all, >>> >>> I have 60 channel EEG resting state data, and after discarding bad >>> channels, I am left with 48 channels common to all subjects. >>> >>> I applied scalp current density to my data before extracting power >>> information from my EEG data. The EEG cap that I used was in a 10-10 >>> system, and I don't have the electrode position file. Hence, I used the >>> default electrode position file named 'standard_1005.elc' for the purpose. >>> >>> Here's the part of my script for the surface Laplacian: >>> >>> >>> cfg_neighb.method = 'template'; >>> cfg_neighb.layout = 'EEG1010.lay'; >>> cfg_neighb.channel = 'all'; >>> cfg_neighb.feedback = 'no'; >>> >>> neighbours = ft_prepare_neighbours(cfg_neighb, data7); >>> >>> cfg = []; >>> cfg.method = 'finite'; >>> cfg.elecfile = 'standard_1005.elc'; >>> cfg.elec = ft_read_sens(cfg.elecfile); >>> cfg.trials = 'all'; >>> cfg.neighbours = neighbours; >>> cfg.conductivity = 0.33; >>> >>> data8 = ft_scalpcurrentdensity(cfg, data7); >>> >>> When I tried to extract power from data8 (after surface Laplacian), I >>> keep getting an error message (see below). I'm not sure why this would be >>> the case, and would appreciate very much if someone could help me resolve >>> the error! >>> >>> Thank you! >>> >>> Here's my script for extracting the power: >>> cfg = []; >>> cfg.output = 'pow'; >>> cfg.channel = {'all'}; >>> cfg.method = 'mtmfft'; >>> cfg.keeptrials = 'no'; >>> cfg.tapsmofrq = 5; >>> cfg.layout = 'EEG1010.lay'; >>> >>> % for frequencies up to 30 Hz >>> cfg.foilim = [1 30]; % either the full range of frequencies >>> (data2.hdr.Fs/2) or up to 100 Hz >>> cfg.taper = 'hanning'; >>> >>> % find the index for the c200 condition >>> pre_c200_idx = find(data8.trialinfo == 200); >>> cfg.trials = pre_c200_idx; >>> LF_pre_c200 = ft_freqanalysis(cfg, data8); >>> >>> Here's the output plus error message: >>> >>> the input is raw data with 48 channels and 343 trials >>> Error using ft_datatype_sens (line 375) >>> inconsistent number of channels in sensor description >>> >>> Error in ft_datatype_raw (line 138) >>> data.elec = ft_datatype_sens(data.elec); >>> >>> Error in ft_checkdata (line 223) >>> data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); >>> >>> Error in ft_freqanalysis (line 209) >>> data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, >>> 'feedback', >>> cfg.feedback, 'hassampleinfo', 'yes'); >>> >>> Best regards, >>> Hweeling >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> -- >> Max Cantor >> Lab Manager >> Computational Neurolinguistics Lab >> University of Michigan >> > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laszlo.Grand at libd.org Wed Dec 17 20:28:15 2014 From: Laszlo.Grand at libd.org (Laszlo Grand) Date: Wed, 17 Dec 2014 19:28:15 +0000 Subject: [FieldTrip] Common mode artifact rejection Message-ID: <77A47164-4C7B-4463-90BE-60E0879383BD@libd.org> Hello Fieldtrippers, I need to remove artifact (low frequency: 0-7 Hz) that appears strongly on all channels in my EEG data. It's already recorded so I can't use hardware solutions. Please let me know how to remove only the common mode noise from the data. Thank you, Laszlo -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Dec 18 15:02:20 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 18 Dec 2014 15:02:20 +0100 Subject: [FieldTrip] special issue "Brain Oscillations in Human Communication" for Frontiers in Human Neuroscience References: <5492D07E.7060207@glasgow.ac.uk> Message-ID: <9AA746D1-D306-49B6-AAE5-95CE5135AEB5@donders.ru.nl> Begin forwarded message: > Dear Colleagues, > > I am currently co-hosting the special issue "Brain Oscillations in Human Communication" for Frontiers in Human Neuroscience (IF: 2.9). > > We would be delighted if you considered contributing a research article, a review or a perspective article. Besides the obvious topic of communication, we are also interested in purely methodological papers on spectral data analysis. > > Please visit our website for more information: http://journal.frontiersin.org/ResearchTopic/3111 > > If you have any questions, do not hesitate to contact one of us: > > Anne Keitel (anne.keitel at glasgow.ac.uk) > Johanna Rimmele (j.rimmele at uke.de) > Joachim Gross (joachim.gross at glasgow.ac.uk) > > > Many thanks and happy holidays! > Anne > > Topic Summary: > > Brain Oscillations in Human Communication > Anne Keitel (University of Glasgow) > Johanna Rimmele (University Medical Center Hamburg-Eppendorf) > Joachim Gross (University of Glasgow) > > Abstract deadline: 01.05.2015 > Manuscript deadline: 01.09.2015 > > > -- > Dr. Anne Keitel > Centre for Cognitive Neuroimaging > Institute of Neuroscience and Psychology > University of Glasgow > anne.keitel at glasgow.ac.uk > +44 141 330 5003 -------------- next part -------------- An HTML attachment was scrubbed... URL: From widmann at uni-leipzig.de Thu Dec 18 15:51:26 2014 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Thu, 18 Dec 2014 15:51:26 +0100 Subject: [FieldTrip] MMN 2015 - 7th Mismatch Negativity Conference Message-ID: Dear Colleague, We are happy to announce that the MMN 2015 website (https://event.uni-leipzig.de/mmn2015/) is now open for registration and poster abstract submission. The conference, "Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015)", will be held at the University of Leipzig, Germany, from 8-11 September 2015. The conference covers the state of the art in methods, theory and application (basic and clinical research) of the MMN. It will also incorporate other error signals of the brain. Moreover, there will be hands-on pre-conference workshops on methodological aspects of MMN research and on the visual MMN. The University of Leipzig is one of the oldest German universities and the birthplace of experimental psychology. Based on this long tradition, Leipzig has become a powerhouse of modern cognitive neuroscience. The city offers many opportunities for those interested in intellectual, musical, and architectural heritage. The deadline for both early-bird registration and poster abstract submission is 31 March 2015. We look forward to welcoming you in Leipzig for an inspiring MMN 2015 conference. Kind regards, Erich Schröger and the organization team -- Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015) University of Leipzig, 8-11 September 2015 Web: https://event.uni-leipzig.de/mmn2015/ Email: mmn2015 at uni-leipzig.de From r.thomas at nin.knaw.nl Fri Dec 19 13:58:34 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Fri, 19 Dec 2014 12:58:34 +0000 Subject: [FieldTrip] ECG recording Message-ID: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Dec 21 00:30:07 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sat, 20 Dec 2014 23:30:07 +0000 Subject: [FieldTrip] ECG recording In-Reply-To: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> Message-ID: Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Sun Dec 21 03:41:33 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Sun, 21 Dec 2014 02:41:33 +0000 Subject: [FieldTrip] ECG recording In-Reply-To: References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl>, Message-ID: Hi Rajat, I am using a Neuromag Elekta system. Provided I use bioleads to pick up ECG and EOG, when I run an ICA, ECG is picked up and removed very tidily. We use leads above and below each eye (EOG), plus a lead on each wrist (ECG) and the elbow for ground. In this case, running an ICA automatically and clearly picks up EOG and ECG and these can be removed cleanly. Previously I was not using bioleads. In that case, I only had data from the MEG sensors. When I ran the ICA, it was more difficult to identify a clean ECG component. But it was still possible to see components which were largely ECG and EOG, and these could be removed. No ideal, but still possible. If your system allows use of bioleads, use these and run ft_componentanalysis followed by ft_rejectcomponent on preprocessed data. If not, just run the ft_componentanalysis and ft_rejectcomponent anyway. ECG should still be able to be identified. Hope that helps! Kaelasha ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: Sunday, 21 December 2014 10:30 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Sun Dec 21 11:33:08 2014 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Sun, 21 Dec 2014 10:33:08 +0000 (UTC) Subject: [FieldTrip] fieldtrip Digest, Vol 49, Issue 19 In-Reply-To: References: Message-ID: <1020598356.57107.1419157988254.JavaMail.yahoo@jws11131.mail.ir2.yahoo.com>  Dear Rajat, maybe you can use the same method as the EOG removing. For instance you can record an ECG channel using on the two wrists as it was an EEG channel, and then you can use the ICA decomposition the remove such artifact (if it is present). Ivano Send fieldtrip mailing list submissions to     fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to     fieldtrip-request at science.ru.nl You can reach the person managing the list at     fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:   1. ECG recording (Rajat Thomas) ---------------------------------------------------------------------- Message: 1 Date: Fri, 19 Dec 2014 12:58:34 +0000 From: Rajat Thomas To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] ECG recording Message-ID:     <1022bf6ed399450d97be4e0b3ca09df5 at EXNHI01.herseninstituut.knaw.nl> Content-Type: text/plain; charset="us-ascii" Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 19 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 22 13:23:17 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 22 Dec 2014 13:23:17 +0100 Subject: [FieldTrip] ECG recording In-Reply-To: References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl>, Message-ID: <003701d01de2$114567c0$33d03740$@artinis.com> Hi Rajat, on the FieldTrip wiki is an example page showing one way how to deal with the heartbeat in MEG recordings. It is very closely related to what Kaelasha and Ivano proposed: http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica _to_remove_ecg_artifacts Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Kaelasha Tyler Sent: Sunday, December 21, 2014 3:42 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hi Rajat, I am using a Neuromag Elekta system. Provided I use bioleads to pick up ECG and EOG, when I run an ICA, ECG is picked up and removed very tidily. We use leads above and below each eye (EOG), plus a lead on each wrist (ECG) and the elbow for ground. In this case, running an ICA automatically and clearly picks up EOG and ECG and these can be removed cleanly. Previously I was not using bioleads. In that case, I only had data from the MEG sensors. When I ran the ICA, it was more difficult to identify a clean ECG component. But it was still possible to see components which were largely ECG and EOG, and these could be removed. No ideal, but still possible. If your system allows use of bioleads, use these and run ft_componentanalysis followed by ft_rejectcomponent on preprocessed data. If not, just run the ft_componentanalysis and ft_rejectcomponent anyway. ECG should still be able to be identified. Hope that helps! Kaelasha _____ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: Sunday, 21 December 2014 10:30 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Tue Dec 23 16:25:01 2014 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 23 Dec 2014 16:25:01 +0100 Subject: [FieldTrip] ft_rejectcomponent with or withouth data input Message-ID: Dear Fieldtrip users, I would like to ask for one explanation. Could anyone in more detail explain the difference between ft_rejectcomponent(cfg, comp) and ft_rejectcomponent(cfg, comp, data)? I am not sure which one I should use. I have read available information about that and tried out both methods. I understand that data input will lead to back-projection of the data into the original subspace. However I am still not sure which one I should use. Furthermore, in the ICA calculation I have used cfg.runica.pca for data dimensionality reduction. Any clarification of this issue would be greatly appreciated! Thank you in advance! All the best and happy holidays, Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon Dec 29 13:00:37 2014 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 29 Dec 2014 12:00:37 +0000 Subject: [FieldTrip] ft_rejectcomponent with or withouth data input In-Reply-To: References: Message-ID: Dear Nenad, One difference is that 'data' need not be the same 'data' that was used to create 'comp'. For example, you can have 'data' which is the original/raw data, then do some preprocessing on it to create 'data1'. Then call comp=ft_componentanalysis(cfg,data1). Then you can decide which components to reject from comp but apply this rejection to 'data' rather than 'data1'. (e.g. http://mailman.science.ru.nl/pipermail/fieldtrip/2013-October/007118.html or http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007608.html) In your case of calling PCA for dimensionality reduction, let's say for example your 'data' has 100 channels and you set PCA to 50. Then 'comp' will have 50 components (rank 50). Let's say you want to reject 2 components. Then the output of ft_rejectcomponent(cfg,comp) will end up in channel space (100 channels) but of only rank 48. However, the output of ft_rejectcomponent(cfg,comp,data) will be in channel space (100 channels) but of rank 98. There are additional differences, such as mentioned in the 'help documentation' of ft_rejectcomponent, namely "Please use this option of including data as input, if you wish to use the output data.grad in further computation, for example for leadfield computation." This is for the data.grad.tra to be updated appropriately for leadfields. Hope that helps, and perhaps there should be a FAQ on the wiki for this. Regards, Johanna 2014-12-23 15:25 GMT+00:00 Nenad Polomac : > Dear Fieldtrip users, > > I would like to ask for one explanation. Could anyone in more detail > explain the difference between ft_rejectcomponent(cfg, comp) and > ft_rejectcomponent(cfg, comp, data)? I am not sure which one I should use. > I have read available information about that and tried out both methods. I > understand that data input will lead to back-projection of the data into > the original subspace. However I am still not sure which one I should use. > Furthermore, in the ICA calculation I have used cfg.runica.pca for data > dimensionality reduction. > > Any clarification of this issue would be greatly appreciated! > > Thank you in advance! > > All the best and happy holidays, > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sclar028 at uottawa.ca Tue Dec 30 16:55:47 2014 From: sclar028 at uottawa.ca (Stephen Clarke) Date: Tue, 30 Dec 2014 10:55:47 -0500 Subject: [FieldTrip] Fwd: cfg In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Stephen Clarke Date: Tue, Dec 30, 2014 at 10:11 AM Subject: cfg To: fieldtrip at science.ru.nl Hello, A colleague and I are interested in using wavelets to analyze resting state (rMEG) and working memory (tMEG) data from the Human Connectome Project, in order to directly compare resting state and working memory conditions. It appears that ft_freqanalysis.m works with the preprocessed HCP data. Our question concerns the cfg structures. For rMEG, the data.time structure is 1x147 cell, where each cell is a 1x1018 double, each going from 0 to 1.9995 (0.001966075273231 increments). tMEG recordings have been divided into epochs for TIM (onset of image) and TRESP (onset of response). The data.time structure is a 1x166 cell, where each cell is a 1x2035 double, each going from -1.4996 to 2.4994 (0.002 increments). If we use the same cfg.foi / cfg.toi inputs for each case, we get cfg.freq structures which are not equivalent. E.g., when using % cfg = []; % cfg.channel = 'MEG'; % cfg.method = 'wavelet'; % cfg.width = 7; % cfg.output = 'pow'; % cfg.foi = 1:0.01:100; % cfg.toi = -0.5:0.1:1.5; The TFRwave.freq outputs using this code are: rMEG: cfg.freq --> size 1x200. tMEG: cgf.freq --> size 1x400. As well, we get several warnings: “the input is raw data with 244 channels and 144 trials”, which it is not (it is preprocessed data). “the trial definition in the configuration is inconsistent with the actual data” “reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording” By using different cfg inputs to account for differences in the time sampling for the resting and working memory data, we get similar errors, though both output .freq structures are ~1x400 in this case. %%for resting state cfg_rs cfg_rs.foi = 1:0.01:200; cfg_rs.toi = -1.5:0.002:2.5; %%for wm data cfg_wm cfg_wm.foi = 1:0.01:100; cfg_wm.toi = 0:0.0019:2; Any advice on appropriate configuration structures for wavelet analysis of this data would be greatly appreciated. Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at fcdonders.ru.nl Tue Dec 30 18:34:17 2014 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 30 Dec 2014 17:34:17 +0000 Subject: [FieldTrip] cfg In-Reply-To: References: Message-ID: Dear Steve, Great that you guys are interested in our HCP data! Although indeed the processed data are represented as fieldtrip-structures I think the most appropriate platform would be to ask this question on the HCP-users platform. You can subscribe to the users list on: http://www.humanconnectome.org/contact/#subscribe For rMEG, the data.time structure is 1x147 cell, where each cell is a 1x1018 double, each going from 0 to 1.9995 (0.001966075273231 increments). Indeed, this is the consequence of us manually chopping up the 3-minute or so recording into 2 second epochs, and removing some blatantly bad segments of data. Note that the time axis is arbitrary and does not have a meaningful relationship to a physical experimental event. As well, we get several warnings: “the input is raw data with 244 channels and 144 trials”, which it is not (it is preprocessed data). “the trial definition in the configuration is inconsistent with the actual data “reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording” Don’t worry about these specific warnings at the moment By using different cfg inputs to account for differences in the time sampling for the resting and working memory data, we get similar errors, though both output .freq structures are ~1x400 in this case. %%for resting state cfg_rs cfg_rs.foi = 1:0.01:200; cfg_rs.toi = -1.5:0.002:2.5; %%for wm data cfg_wm cfg_wm.foi = 1:0.01:100; cfg_wm.toi = 0:0.0019:2; Any advice on appropriate configuration structures for wavelet analysis of this data would be greatly appreciated. At first glance the frequency resolution requested is far too high. Given the finite and discrete sampling, not all requested frequencies can be exactly estimated. Fieldtrip will do its best, but will round off the requested frequencies to the nearest estimable one. A more meaningful cfg.foi would be 1:1:100 or so. I suggest to read up a bit about spectral analysis on the tutorial section of our Fieldtrip website. Best, Jan-Mathijs -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Mon Dec 1 16:31:53 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Mon, 1 Dec 2014 15:31:53 +0000 Subject: [FieldTrip] Easycap 128 XYZ coordinates Message-ID: ?Dear all, Is there anywhere I could download a Easycap 128 channel electrode coordinate file? On the website of easycap there is only the 64 channel. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From dm4 at bu.edu Mon Dec 1 22:00:48 2014 From: dm4 at bu.edu (Deepshikha Moolchandani) Date: Mon, 1 Dec 2014 16:00:48 -0500 Subject: [FieldTrip] Probem with cross frequency phase-amplitude example in FieldTrip tutorial Message-ID: Dear all I am working on the cross frequency phase-amplitude coupling and I tried to run the following code provided in the tutorial in the latest version of FieldTrip (fieldtrip-lite-20141125) "" *Calculate coherence between power and raw* % mtmconvol cfg = []; cfg.method = 'mtmconvol'; cfg.channel = 'mix'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 2:2:60; cfg.toi = data.time{1}(3001:7000); %power is calculated at every sample cfg.t_ftimwin = 4./cfg.foi; %timewindow used to calculated power is 4 cycles long and therefore differs over frequencies cfg.keeptrials = 'yes'; freq1 = ft_freqanalysis(cfg,data); % Make data same length as freq1 data_cut = data; for iTr = 1:length(data.trial) data_cut.trial{iTr} = data.trial{iTr}(:,3001:7000); data_cut.time{iTr} = data.time{iTr}(3001:7000); end data_app = ft_appenddata([],data_cut, freq1); %contains original channel and channels with power %FieldTrip automatically converts the freq1 data to raw data. % mtmfft output cross-spectral-density between mix(raw) and freq1 cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.taper = 'hanning'; cfg.foilim = [2 60]; cfg.keeptrials = 'no'; cfg.pad = 4; cfg.channelcmb = {'mix' 'mix at 2Hz'; 'mix' 'mix at 4Hz'; 'mix' 'mix at 6Hz'; 'mix' 'mix at 8Hz'; 'mix' 'mix at 10Hz'; 'mix' 'mix at 12Hz'; 'mix' 'mix at 14Hz'; 'mix' 'mix at 16Hz'; 'mix' 'mix at 18Hz'; 'mix' 'mix at 20Hz'; 'mix' 'mix at 22Hz'; 'mix' 'mix at 24Hz'; 'mix' 'mix at 26Hz'; 'mix' 'mix at 28Hz'; 'mix' 'mix at 30Hz'; 'mix' 'mix at 32Hz'; 'mix' 'mix at 34Hz'; 'mix' 'mix at 36Hz'; 'mix' 'mix at 38Hz'; 'mix' 'mix at 40Hz'; 'mix' 'mix at 42Hz'; 'mix' 'mix at 44Hz'; 'mix' 'mix at 46Hz'; 'mix' 'mix at 48Hz'; 'mix' 'mix at 50Hz'; 'mix' 'mix at 52Hz'; 'mix' 'mix at 54Hz'; 'mix' 'mix at 56Hz'; 'mix' 'mix at 58Hz'; 'mix' 'mix at 60Hz';}; freq2 = ft_freqanalysis(cfg,data_app); % calculate coherence coh = ft_freqdescriptives([],freq2); coh.freq2 = [2:2:60]; figure; imagesc(coh.freq, coh.freq2, coh.cohspctrm) axis xy print -dpng phalow_amphigh_fig5.png"" It gives me the following error "Reference to non-existent field 'cohspctrm'." Can anyone tell me if I'm doing something wrong or is there a problem in the code? Any help would be appreciated. Best Deepshikha Moolchandani Research Assistant Brain and Vision Research Lab Boston University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Mon Dec 1 22:27:09 2014 From: sarathykousik at gmail.com (kousik sarathy) Date: Mon, 1 Dec 2014 22:27:09 +0100 Subject: [FieldTrip] Probem with cross frequency phase-amplitude example in FieldTrip tutorial In-Reply-To: References: Message-ID: Hey, Try figure; imagesc(coh.freq, coh.freq2, coh.powspctrm) ; % change coh.cohspctrm -> coh.powspctrm That should to the trick. If it works please modify the code on the page too. :) -- Regards, Kousik Sarathy, S -------------- next part -------------- An HTML attachment was scrubbed... URL: From balperin07 at gmail.com Tue Dec 2 07:41:39 2014 From: balperin07 at gmail.com (Brittany Alperin) Date: Mon, 1 Dec 2014 22:41:39 -0800 Subject: [FieldTrip] error running FFT when importing eeglab data with interpolated channels Message-ID: Hello I have preprocessed my data using EEGlab and am running an FFT using fieldtrip. I convert my EEGlab dataset to fieldtrip format using: data = eeglab2fieldtrip(EEG,'preprocessing','none'); No error occurs when I convert the data. My FFT code is: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [4 7]; cfg.output = 'pow'; freq = ft_freqanalysis(cfg,data); When I try to run the FFT, I get the following error: Reference to non-existent field 'trial'. Error in ft_freqanalysis (line 382) ntrials = numel(data.trial); Error in FFT_MIST (line 22) freq = ft_freqanalysis(cfg,data); Error in Batch_FFT_MIST (line 11) FFT_MIST(subj); Error in run (line 63) evalin('caller', [script ';']); Interestingly, I only get this error when I try running an FFT on data that has had channels interpolated using EEGlab's interpolation function. I have 36 channels, but when I've interpolated some, fieldtrip seems to think the interpolated channels have been deleted. I.e., instead of saying "the input is raw data with 36 channels and 118 trials" it will say "the input is raw data with 34 channels and 118 trials". Does anyone know why interpolating channels in EEGlab would throw fieldtrip off? Is there anyway I can correct for this? Thanks, Brittany -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Dec 2 09:26:29 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 2 Dec 2014 08:26:29 +0000 Subject: [FieldTrip] error running FFT when importing eeglab data with interpolated channels In-Reply-To: References: Message-ID: <53F547A0-E8CA-41F2-8AF6-5C808D35546F@donders.ru.nl> Hi Brittany It seems that eeglab2fieldtrip does not know how to deal with the EEG structure once it has interpolated channels in it. This case was probably not considered when implementing the function. Can you report it on http://bugzilla.fcdonders.nl and share a small EEGLAB dataset with it (using http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers)? best regards Robert On 02 Dec 2014, at 06:41, Brittany Alperin wrote: > Hello > > I have preprocessed my data using EEGlab and am running an FFT using fieldtrip. I convert my EEGlab dataset to fieldtrip format using: > data = eeglab2fieldtrip(EEG,'preprocessing','none'); > > No error occurs when I convert the data. My FFT code is: > cfg = []; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.foilim = [4 7]; > cfg.output = 'pow'; > freq = ft_freqanalysis(cfg,data); > > When I try to run the FFT, I get the following error: > > Reference to non-existent field 'trial'. > > Error in ft_freqanalysis (line 382) > ntrials = numel(data.trial); > > Error in FFT_MIST (line 22) > freq = ft_freqanalysis(cfg,data); > > Error in Batch_FFT_MIST (line 11) > FFT_MIST(subj); > > Error in run (line 63) > evalin('caller', [script ';']); > > Interestingly, I only get this error when I try running an FFT on data that has had channels interpolated using EEGlab's interpolation function. > > I have 36 channels, but when I've interpolated some, fieldtrip seems to think the interpolated channels have been deleted. I.e., instead of saying "the input is raw data with 36 channels and 118 trials" it will say "the input is raw data with 34 channels and 118 trials". > > Does anyone know why interpolating channels in EEGlab would throw fieldtrip off? Is there anyway I can correct for this? > > Thanks, > Brittany > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue Dec 2 09:30:07 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 2 Dec 2014 08:30:07 +0000 Subject: [FieldTrip] Easycap 128 XYZ coordinates In-Reply-To: References: Message-ID: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl> Dear Rajat, You can find one in fieldtrip/template/electrode/GSN-HydroCel-128.sfp. Note that there is also a 129 channel version, I don’t know the detailled difference. See http://fieldtrip.fcdonders.nl/template/electrode for the documentation. best regards, Robert On 01 Dec 2014, at 15:31, Rajat Thomas wrote: > ​Dear all, > > Is there anywhere I could download a Easycap 128 channel electrode > coordinate file? On the website of easycap there is only the 64 channel. > > Thanks. > > Rajat > > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.goeldi at psychologie.uzh.ch Tue Dec 2 10:47:52 2014 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Tue, 2 Dec 2014 10:47:52 +0100 Subject: [FieldTrip] Antwort: Re: Easycap 128 XYZ coordinates In-Reply-To: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl> References: <84388337-DCC3-4E97-A3AB-7D828497325D@donders.ru.nl>, Message-ID: Hi The 129 channel version includes the Cz electrode, the 128 version does not. Unfortunately these electrode positions did not work well for me. I assumed the coordinates are in MNI space (and I might be wrong here). But when I fit it to the template of the MNI head the electrodes do not match. The frontal part is ok, but the parietal electrodes disappear into the head. Looks like the reference head is too small. The electrode positions have to be rearranged manually. I found a template file in spm12 (might also be around in spm8) in ./spm12/EEGtemplates/egi128_GSN_HydroCel.sfp (here the 128 version includes the Cz electrode). This fits perfectly onto the MNI template head. Maybe someone with more experience can verify this discrepancy? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: Robert Oostenveld Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 02.12.2014 09:41 Betreff: Re: [FieldTrip] Easycap 128 XYZ coordinates Dear Rajat, You can find one in fieldtrip/template/electrode/GSN-HydroCel-128.sfp. Note that there is also a 129 channel version, I don’t know the detailled difference. See http://fieldtrip.fcdonders.nl/template/electrode for the documentation. best regards, Robert On 01 Dec 2014, at 15:31, Rajat Thomas wrote: ​Dear all, Is there anywhere I could download a Easycap 128 channel electrode coordinate file? On the website of easycap there is only the 64 channel. Thanks.  Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.Hanslmayr at bham.ac.uk Tue Dec 2 16:52:02 2014 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Tue, 2 Dec 2014 15:52:02 +0000 Subject: [FieldTrip] Lecturer / Senior Lecturer Positions available at the University of Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CEADEDB542@EX8.adf.bham.ac.uk> The School of Psychology at the University of Birmingham (http://www.birmingham.ac.uk/schools/psychology/index.aspx) is currently seeking to fill lecturer / senior lecturer positions. The School seeks to appoint individuals in areas that complement existing strengths within the School and who use advanced neuroscience approaches with a focus in the areas of cognitive and behavioural neuroscience, computational neuroscience and cognitive robotics, sensory motor control, or development throughout the lifespan. The school particularly welcomes applications from individuals doing translational neuroscience in any of the above areas to complement the development of the University's £24M Institute for Translational Medicine in which Psychology is a partner. Exceptional candidates may be considered for the conferment of the title of Reader. Further information and a link to the job application can be found here: http://www.jobs.ac.uk/job/AJZ482/lecturers-senior-lecturers/ Best wishes, Simon Dr. Simon Hanslmayr Senior Lecturer School of Psychology University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.psychologie.uni-konstanz.de/en/cognition-and-oscillations-lab/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From constantino.mendezbertolo at ctb.upm.es Tue Dec 2 18:50:11 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Tue, 2 Dec 2014 18:50:11 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") Message-ID: Dear fieldtrippers, We are doing beamformer with ERF acquired with an Elekta-Neuromag. Regardless our different approaches, we always end with the same problem at the end of the pipeline - the 'inside' field slightly varies between subjects. I attach a plot of the difference between the inside field of two different subjects where one can see that there are truly minor differences. We follow the standard pipeline, I think. We use a template grid and template mri for all the subjects, which we realign using individual headpoints. The resulting leadfield (every subject has the same numbers of dipoles) is used in the sourceanalysis ('lcmv'), and the difference between pre and post periods is first interpolated (using the individual mri aligned) and finally normalized. We also tried using volumereslice before interpolate. Individual results seem coherent but not matter what we end up with different 'inside' fields and sourcegrandaverage complains about that. We are using the fieldtrip-20141201 version and if we use the fieldtrip-20111101 sourcegrandaverage does not complain about that. I don't want to make a really complex mail so I leave it here looking forward to hear input from anybody and willing to give more precise information, Peace! T -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: s5.inside minus s6.inside.jpg Type: image/jpeg Size: 29910 bytes Desc: not available URL: From m.lizarazu at bcbl.eu Wed Dec 3 11:43:36 2014 From: m.lizarazu at bcbl.eu (Mikel Lizarazu) Date: Wed, 3 Dec 2014 11:43:36 +0100 (CET) Subject: [FieldTrip] problems in the fieldtrip2fiff function Message-ID: <303218278.4196758.1417603416701.JavaMail.root@bcbl.eu> Hi all, I would like to convert a Fieldtrip raw data structure to a .fif file, so I can do further analysis using Neuromag software. I am trying to use the fieldtrip2fiff function as in the example, but it is not working: cfg = []; cfg.dataset = 'test.fif'; data = ft_preprocessing(cfg) fieldtrip2fiff('new_test.fif',data) This is the error I am getting: ??? Error using ==> fiff_start_file at 35 Permission denied Error in ==> fiff_start_writing_raw at 54 fid = fiff_start_file(name); Error in ==> fieldtrip2fiff at 124 [outfid, cals] = fiff_start_writing_raw(fifffile, info); I checked this problem in the discussion list and it seems to be unsolved.I downloaded the newest version of Fieldtrip and I checked the writing permissions of my OS (the function [fid, message]=fopen('new_test.fif','w+','ieee-be') works fine). Maybe you are using another code or you have modified this function. Thank you for your time. Best, Mikel -- Mikel Lizarazu Predoctoral researcher www.bcbl.eu Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer -------------- next part -------------- An HTML attachment was scrubbed... URL: From DrakesmithM at cardiff.ac.uk Wed Dec 3 12:32:21 2014 From: DrakesmithM at cardiff.ac.uk (Mark Drakesmith) Date: Wed, 3 Dec 2014 11:32:21 +0000 Subject: [FieldTrip] Post-Doc position in Cognitive Neuroscience / Neuroimaging, Cardiff University Message-ID: <547EF4C5.8040300@cardiff.ac.uk> Dear all Please see link for detail of a post-doctoral vacancy at Cardiff University, starting January 2015. http://www.jobs.ac.uk/job/AKB322/research-associate-neuroimaging/ Many thanks Mark Drakesmith CUBRIC / NMHRI, Cardiff University From tzvetan.popov at uni-konstanz.de Wed Dec 3 16:55:52 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 3 Dec 2014 16:55:52 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") In-Reply-To: References: Message-ID: Peace T, this is due to the unnecessary interpolating and normalizing back and forth where due to some edge irregularities you end up with slightly different inside fields. Using mni aligned grids is actually meant to circumvent the need for normalizing etc. In general you should use ft_sourceinterpolate in order to visualize 1). single subject data (this worked for you) 2). output data from ft_sourcegrandaverage or 3) output from ft_sourcestatistics. Because you are using the mni template approach you’ll never use ft_volumenormalize in your pipeline. So in order to make 2) and 3) work you should exchange the single subject source.dim and source.pos fields with template_grid.dim and template_grid.pos respectively. Subsequently you can call ft_sourcegrandaverage with all your subjects as an input and use the output to interpolate onto the mni template brain. good luck tzvetan > Dear fieldtrippers, > > We are doing beamformer with ERF acquired with an Elekta-Neuromag. Regardless our different approaches, we always end with the same problem at the end of the pipeline - the 'inside' field slightly varies between subjects. I attach a plot of the difference between the inside field of two different subjects where one can see that there are truly minor differences. > > We follow the standard pipeline, I think. We use a template grid and template mri for all the subjects, which we realign using individual headpoints. The resulting leadfield (every subject has the same numbers of dipoles) is used in the sourceanalysis ('lcmv'), and the difference between pre and post periods is first interpolated (using the individual mri aligned) and finally normalized. We also tried using volumereslice before interpolate. > > Individual results seem coherent but not matter what we end up with different 'inside' fields and sourcegrandaverage complains about that. We are using the fieldtrip-20141201 version and if we use the fieldtrip-20111101 sourcegrandaverage does not complain about that. > > I don't want to make a really complex mail so I leave it here looking forward to hear input from anybody and willing to give more precise information, > > Peace! > T > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From constantino.mendezbertolo at ctb.upm.es Wed Dec 3 17:47:17 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Wed, 3 Dec 2014 17:47:17 +0100 Subject: [FieldTrip] Problem averaging sources ("vary in the field 'inside'") In-Reply-To: References: Message-ID: Dear Tzvetan, Thank you very much, it worked like a charm: substituting .dim and .pos for the one in our template, then averaging and then interpolating. May the gods of beamformer always light up your way, T 2014-12-03 16:55 GMT+01:00 Tzvetan Popov : > Peace T, > this is due to the unnecessary interpolating and normalizing back and > forth where due to some edge irregularities you end up with slightly > different inside fields. Using mni aligned grids is actually meant to > circumvent the need for normalizing etc. > In general you should use ft_sourceinterpolate in order to visualize 1). > single subject data (this worked for you) 2). output data from > ft_sourcegrandaverage or 3) output from ft_sourcestatistics. Because you > are using the mni template approach you’ll never use ft_volumenormalize in > your pipeline. So in order to make 2) and 3) work you should exchange the > single subject source.dim and source.pos fields with template_grid.dim and > template_grid.pos respectively. Subsequently you can call > ft_sourcegrandaverage with all your subjects as an input and use the output > to interpolate onto the mni template brain. > > good luck > tzvetan > > > > Dear fieldtrippers, > > We are doing beamformer with ERF acquired with an Elekta-Neuromag. > Regardless our different approaches, we always end with the same problem at > the end of the pipeline - the 'inside' field slightly varies between > subjects. I attach a plot of the difference between the inside field of two > different subjects where one can see that there are truly minor differences. > > We follow the standard pipeline, I think. We use a template grid and > template mri for all the subjects, which we realign using individual > headpoints. The resulting leadfield (every subject has the same numbers of > dipoles) is used in the sourceanalysis ('lcmv'), and the difference between > pre and post periods is first interpolated (using the individual mri > aligned) and finally normalized. We also tried using volumereslice before > interpolate. > > Individual results seem coherent but not matter what we end up with > different 'inside' fields and sourcegrandaverage complains about that. We > are using the fieldtrip-20141201 version and if we use > the fieldtrip-20111101 sourcegrandaverage does not complain about that. > > I don't want to make a really complex mail so I leave it here looking > forward to hear input from anybody and willing to give more precise > information, > > Peace! > T > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > 28223 Pozuelo de Alarcón, Madrid, SPAIN > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From assaf.harel at wright.edu Wed Dec 3 22:43:02 2014 From: assaf.harel at wright.edu (Harel, Assaf) Date: Wed, 3 Dec 2014 21:43:02 +0000 Subject: [FieldTrip] Ph.D. position - Human Neuroscience and Visual Cognition Lab, Wright State University Message-ID: Two Ph.D. positions are now available at the Human Neuroscience and Visual Cognition Lab at the Department of Psychology, Wright State University beginning Fall 2015. The newly established lab is headed by Dr. Assaf Harel and investigates high-level vision and its neural substrates. We are interested in how visual recognition occurs in real-world settings and adopt a neuroergonomic approach to study the applied aspects of high-level vision. For this purpose, we employ a diversity of cognitive neuroscience methods, including EEG, fMRI, and psychophysics. Topics of research include visual expertise, object and scene recognition, categorization and perceptual learning. For more information on the lab, contact Dr. Assaf Harel at: assaf.harel at wright.edu. The Department of Psychology is housed in the College of Science and Mathematics, offers a Ph.D. in Human Factors and Industrial/ Organizational Psychology, and has 3 undergraduate concentration areas: (1) Cognition and Perception, (2) Industrial/ Organizational, and (3) Behavioral Neuroscience. Wright State University was recently ranked among the "Best in the Midwest" universities by The Princeton Review, listed among 260 Best National Universities in the annual "America's Best Colleges" rankings by U.S. News and World Report, and ranked fourth nationally among universities with limited numbers of doctoral programs in the Faculty Scholarly Productivity Index. For more information on the department and the graduate program go to: http://science-math.wright.edu/psychology/programs/graduate-program-overview. Application deadline is January 1, 2015. -------------- next part -------------- An HTML attachment was scrubbed... URL: From barbara.schorr at uni-ulm.de Thu Dec 4 11:24:30 2014 From: barbara.schorr at uni-ulm.de (Barbara Schorr) Date: Thu, 04 Dec 2014 11:24:30 +0100 Subject: [FieldTrip] =?utf-8?q?How_to_reverse_trial_order=3F?= Message-ID: <13b4-54803680-49-743e7e00@142888300> Dear Fieldtrippers, I would like to reverse the order of my trials (last trial to first position, first trial to last position). Is there a function for this (eg. sth like ft_reverse_trials?). Thank you very much!! Best regards, Barbara From julian.keil at gmail.com Thu Dec 4 12:06:52 2014 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 4 Dec 2014 12:06:52 +0100 Subject: [FieldTrip] How to reverse trial order? In-Reply-To: <13b4-54803680-49-743e7e00@142888300> References: <13b4-54803680-49-743e7e00@142888300> Message-ID: <5BCE878D-65A4-44F9-A284-7EAD22AD3898@gmail.com> Hi Barbara, this can be solved by basic Matlab: Use the fliplr command to flip the trials. For Example: data.trial = fliplr(data.trial); Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 04.12.2014 um 11:24 schrieb Barbara Schorr: > Dear Fieldtrippers, > > I would like to reverse the order of my trials (last trial to first position, first trial to last position). > Is there a function for this (eg. sth like ft_reverse_trials?). > > Thank you very much!! > > Best regards, > Barbara > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Thu Dec 4 12:31:23 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 4 Dec 2014 12:31:23 +0100 Subject: [FieldTrip] Surface laplacian Message-ID: Dear all, I'm interested to apply surface laplacian on my EEG data, however, I was not sure where I can locate information regarding electrode definition. Would someone please show me how I could create an electrode definition file? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Fri Dec 5 22:20:36 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Fri, 5 Dec 2014 21:20:36 +0000 Subject: [FieldTrip] about detrend Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Fri Dec 5 23:11:22 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 17:11:22 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54822D8A.8000700@hms.harvard.edu> Hi Yun, Detrending a data set only removes the regression line. It does not ensure that the process has zero mean, which translates to a zero DC component in frequency space. The most direct way to ensure zero DC is simply to remove the trial mean from each epoch. Best, Alexander Alexander Nakhnikian, Ph.D. Post Doctoral Fellow, Clinical Research Training Program Harvard Medical School Boston VA Healthcare System, Brockton MA On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting cfg.detrend > = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Fri Dec 5 23:19:07 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 17:19:07 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54822F5B.3050407@hms.harvard.edu> Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting cfg.detrend > = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmontefusco at med.uchile.cl Fri Dec 5 23:19:28 2014 From: rmontefusco at med.uchile.cl (Rodrigo Montefusco) Date: Fri, 5 Dec 2014 17:19:28 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: Hi Yun, If I'm right, just by high-pass filtering your data you should be able to remove the DC component of it. Best Rodrigo On Fri, Dec 5, 2014 at 4:20 PM, Yun Wen wrote: > Hi all, I want to remove DC offset before applying the high-pass filter. > I was wondering if I can achieve that by putting cfg.detrend = 'yes' > before cfg.hpfilter = 'yes', something like: > > > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > > > Thank you in advance. > > > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Sat Dec 6 00:20:19 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Fri, 5 Dec 2014 23:20:19 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <54822F5B.3050407@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I'd better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Sat Dec 6 02:13:59 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 5 Dec 2014 20:13:59 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54825857.9010807@hms.harvard.edu> It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: > > Hi, Alexander & Rodrigo. Thank you very much for your help. I > collected my data with DC recordings (BioSemi system). I have seen > some discussion on the DC offset: > > http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html > > http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html > > It seems to me that I’d better remove DC offset of continuous data > before high-pass filter. Am I right? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *Alexander > Nakhnikian > *Sent:* Friday, December 05, 2014 10:19 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > Hello Again, > > I think there's an error in my response. I think removing the linear > trend should also set the mean to zero already since the best fit line > incorporates vertical offset. Sorry about that. > > A > > > > On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the high-pass > filter. I was wondering if I can achieve that by putting > cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Sat Dec 6 08:49:54 2014 From: cb802 at cam.ac.uk (Christopher Brown) Date: Sat, 06 Dec 2014 07:49:54 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics Message-ID: <74e335a2b663ec3b9d1dff326e5d0ba8@cam.ac.uk> Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- DR CHRISTOPHER BROWN _Research Associate __| CamPain Group __| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge_ Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Sat Dec 6 12:33:42 2014 From: cb802 at cam.ac.uk (=?utf-8?B?RHIgQyBBIEJyb3du?=) Date: Sat, 06 Dec 2014 11:33:42 +0000 Subject: [FieldTrip] =?utf-8?q?Cluster_analysis_on_correlation_statistics?= Message-ID: Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Sat Dec 6 16:33:16 2014 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Sat, 6 Dec 2014 15:33:16 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <95C9A440AA5AB042A81E170A4573A15A6F351F@exprd03.hosting.ru.nl> Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 From Yun.Wen at nottingham.ac.uk Sun Dec 7 11:53:26 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Sun, 7 Dec 2014 10:53:26 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <54825857.9010807@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I'd better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Sun Dec 7 17:50:01 2014 From: Alexander_Nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Sun, 7 Dec 2014 11:50:01 -0500 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <54848539.5010000@hms.harvard.edu> I would. Baseline correction removes background components from the ERP but it does remove linear offset that is part of the post-stimulus time series. In addition to getting ride of DC, detrending also removes certain non-stationarities and reduces the severity of edge effects. I use it as a matter of course unless there is a compelling reason to omit it from the analysis pipeline. On 12/7/14, 5:53 AM, Yun Wen wrote: > > Hi, Alexander. Thank you for your help. Do you suggest that I do > baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend > = 'yes' on epoched data? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] *On Behalf Of *Alexander > Nakhnikian > *Sent:* Saturday, December 06, 2014 1:14 AM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > It looks as though the take home message is that in theory high pass > filters remove DC but you can't be sure how they will interact with > empirical data since there is no perfect filter in the real world. If > other people report substantial artifacts after filtering data without > removing the DC component I suggest getting rid of it. To answer your > original question, assuming you're detrending each epoch individually > it should remove the DC component or at least reduce it substantially. > > I hope that helps. > > > > On 12/5/14, 6:20 PM, Yun Wen wrote: > > Hi, Alexander & Rodrigo. Thank you very much for your help. I > collected my data with DC recordings (BioSemi system). I have seen > some discussion on the DC offset: > > http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html > > http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html > > http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html > > It seems to me that I’d better remove DC offset of continuous data > before high-pass filter. Am I right? > > Best, > > Yun > > *From:*fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] > *On Behalf Of *Alexander Nakhnikian > *Sent:* Friday, December 05, 2014 10:19 PM > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] about detrend > > Hello Again, > > I think there's an error in my response. I think removing the > linear trend should also set the mean to zero already since the > best fit line incorporates vertical offset. Sorry about that. > > A > > > > > On 12/5/14, 4:20 PM, Yun Wen wrote: > > Hi all, I want to remove DC offset before applying the > high-pass filter. I was wondering if I can achieve that by > putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', > something like: > > cfg = []; > > cfg.dataset = filename_raweeg; > > cfg.detrend = 'yes'; > > cfg.hpfilter = 'yes'; > > cfg.hpfiltord = 2; % Order of the filter = 2. > > cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; > > [data] = ft_preprocessing (cfg); > > Thank you in advance. > > Best, > > Yun > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. > > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Mon Dec 8 09:55:36 2014 From: cb802 at cam.ac.uk (=?utf-8?B?RHIgQyBBIEJyb3du?=) Date: Mon, 08 Dec 2014 08:55:36 +0000 Subject: [FieldTrip] =?utf-8?q?Cluster_analysis_on_correlation_statistics?= Message-ID: Hi Tom Great! That would be really helpful, thank you. I'm still learning fieldtrip so it be interesting to see how it works. The ft_statistics_montecarlo function implies that a custom statistic of choice can be used but I haven't looked deep enough into the function yet to get a could understanding of it. If anything publishable comes out of it I can acknowledge you if you wish? Best wishes Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Marshall, T.R. (Tom)" To: "FieldTrip discussion list" Subject: [FieldTrip] Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 15:33 Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:10:53 2014 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:10:53 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <001f01d012c6$deb62d10$9c228730$@artinis.com> Hi Tom, Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). that’s correct, Tom ;) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Dr C A Brown Sent: Monday, December 8, 2014 9:56 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hi Tom Great! That would be really helpful, thank you. I'm still learning fieldtrip so it be interesting to see how it works. The ft_statistics_montecarlo function implies that a custom statistic of choice can be used but I haven't looked deep enough into the function yet to get a could understanding of it. If anything publishable comes out of it I can acknowledge you if you wish? Best wishes Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Marshall, T.R. (Tom)" > To: "FieldTrip discussion list" > Subject: [FieldTrip] Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 15:33 Hi Chris, I wrote some functions for doing this a while ago and would be happy to share them. Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). Best, Tom ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] Sent: 06 December 2014 12:33 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Dec 8 10:17:56 2014 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 08 Dec 2014 10:17:56 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <54856CC4.8050902@fcdonders.ru.nl> Hi Chris, For getting to grips with the cluster-based permutation framework, the best starting point is Eric Maris and Robert Oostenveld's 2007 Journal of Neuroscience Methods paper ('Nonparametric statistical testing of EEG- and MEG-data'). It's designed with cognitive neuroscientists (rather than statisticians) in mind so is not too daunting a read ;) Best, Tom On 12/8/2014 9:55 AM, Dr C A Brown wrote: > Hi Tom > > Great! That would be really helpful, thank you. I'm still learning > fieldtrip so it be interesting to see how it works. The > ft_statistics_montecarlo function implies that a custom statistic of > choice can be used but I haven't looked deep enough into the function > yet to get a could understanding of it. > > If anything publishable comes out of it I can acknowledge you if you wish? > > Best wishes > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Marshall, T.R. (Tom)" > To: "FieldTrip discussion list" > Subject: [FieldTrip] Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 15:33 > > Hi Chris, > > I wrote some functions for doing this a while ago and would be happy to share them. > > Re: t stat vs r - as I understand it you can permute any statistic you want, it doesn't have to be a t or f. The montecarlo method for solving the multiple comparisons problem is not dependent on your choice of statistic (right guys?). > > Best, > Tom > ________________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Dr C A Brown [cb802 at cam.ac.uk] > Sent: 06 December 2014 12:33 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. > > Kind regards > > Chris > > -- > > Dr Christopher Brown > Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:18:09 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:18:09 +0100 Subject: [FieldTrip] about detrend In-Reply-To: <54848539.5010000@hms.harvard.edu> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> <54848539.5010000@hms.harvard.edu> Message-ID: <002901d012c7$e2d005a0$a87010e0$@artinis.com> Hey guys, FieldTrip is subtracting the DC component prior to filtering to reduce artifacts arising from DC components (and then adding it back). FieldTrip is doing this always, i.e. also if you do not want a demeaned signal. As FieldTrip is open source, you can easily check all this by browsing through the functions yourself.Then you’ll also see the order in which preprocessing options are applied. They do NOT depend on the how you set them in your script, but follow a hard-coded logic. First the detrending/demeaning (called polyremoval in FieldTrip) is applied, and then the filters are applied. For checking these things yourself, checkout the fieldtrip/private/preproc.m function and the fieldtrip/preproc/ft_preproc_*filter. functions. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Sunday, December 7, 2014 5:50 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend I would. Baseline correction removes background components from the ERP but it does remove linear offset that is part of the post-stimulus time series. In addition to getting ride of DC, detrending also removes certain non-stationarities and reduces the severity of edge effects. I use it as a matter of course unless there is a compelling reason to omit it from the analysis pipeline. On 12/7/14, 5:53 AM, Yun Wen wrote: Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 8 10:19:56 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 8 Dec 2014 10:19:56 +0100 Subject: [FieldTrip] about detrend In-Reply-To: <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> Message-ID: <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> oh and another thing: in FieldTrip, detrending inherently also demeans, or in other words, if the fitted first order polynomial is removed, also the zeroth order polynomial is. -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Yun Wen Sent: Sunday, December 7, 2014 11:53 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Mon Dec 8 15:56:02 2014 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Mon, 8 Dec 2014 14:56:02 +0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: References: Message-ID: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Hi Chris, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. For correlating/regressing single trial data of a single subject, you use the ft_statfun_indepsamplesregrT (with the units-of-observations being the trials, which each correspond to one column of your design matrix). For correlating/regressing subject-averaged data of a group of subjects, you also use the ft_statfun_indepsamplesregrT (with the units-of-observations being the subjects, which each correspond to one column of your design matrix). Note, in this case your behavioral data (accuracy or RT) or also subject averages. Best, Eric Maris ________________________________ Van: Dr C A Brown [cb802 at cam.ac.uk] Verzonden: zaterdag 6 december 2014 12:33 Aan: fieldtrip at science.ru.nl Onderwerp: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Mon Dec 8 16:05:18 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Mon, 8 Dec 2014 16:05:18 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Message-ID: Hey Chris, We've recently included a function, ft_statfun_intersubcorr, that seems to do what you're asking for (i.e. a brain-behavior correlation across subject/trials). It works fine, but given that it hasn't been fully accommodated, it has yet not been documented. Please check the help for further instructions on how to use this function. Best regards, Arjen 2014-12-08 15:56 GMT+01:00 Maris, E.G.G. (Eric) : > Hi Chris, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across subjects, > with a behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > For correlating/regressing single trial data of a single subject, you use > the ft_statfun_indepsamplesregrT (with the units-of-observations being the > trials, which each correspond to one column of your design matrix). > > For correlating/regressing subject-averaged data of a group of subjects, > you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral data > (accuracy or RT) or also subject averages. > > Best, > > Eric Maris > > > > ------------------------------ > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across subjects, > with a behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about this on > this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will embark > on writing it myself and sharing my results with everyone for feedback. > Being new to Fieldtrip I would greatly appreciate any collaborative help > with this. May I check my understanding on something before getting > started: To allow for multiple comparisons correction using monte carlo for > example, as part of a cluster analysis, I presume the output of the > function must be t values rather than correlation coefficients? Any other > hints as to how to write this are most welcome. > > Kind regards > > Chris > -- > > *Dr Christopher Brown* *Research Associate **| CamPain Group **| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge* > > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Dec 8 16:10:24 2014 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 08 Dec 2014 16:10:24 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> Message-ID: <5485BF60.8030100@fcdonders.ru.nl> Hm... it seems that I may have reinvented the wheel (or perhaps invented a cruder wheel before Eric and co provided this more streamlined one). Eric, can indepsamplesregrT also compute nonparametric correlation coefficients (eg Spearman)? Best, Tom On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: > Hi Chris, > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across > subjects, with a behavioral variable. Not linear regression across > conditions as is already implemented in the ft_statfun_depsamplesregrT > function. > For correlating/regressing single trial data of a single subject, you > use the ft_statfun_indepsamplesregrT (with the units-of-observations > being the trials, which each correspond to one column of your design > matrix). > For correlating/regressing subject-averaged data of a group of > subjects, you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral > data (accuracy or RT) or also subject averages. > Best, > Eric Maris > ------------------------------------------------------------------------ > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > Just to clarify my last email: I'm referring to correlation between > either single trial data within subject, or averaged ERPs across > subjects, with a behavioral variable. Not linear regression across > conditions as is already implemented in the ft_statfun_depsamplesregrT > function. > > Many thanks > Chris > > Dr Christopher Brown > Research Associate > > Sent from a mobile device, please excuse my brevity. > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about > this on this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will > embark on writing it myself and sharing my results with everyone for > feedback. Being new to Fieldtrip I would greatly appreciate any > collaborative help with this. May I check my understanding on > something before getting started: To allow for multiple comparisons > correction using monte carlo for example, as part of a cluster > analysis, I presume the output of the function must be t values rather > than correlation coefficients? Any other hints as to how to write this > are most welcome. > > Kind regards > > Chris > > -- > *Dr Christopher Brown* > /Research Associate//| CamPain Group//| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge/ > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yun.Wen at nottingham.ac.uk Mon Dec 8 16:15:56 2014 From: Yun.Wen at nottingham.ac.uk (Yun Wen) Date: Mon, 8 Dec 2014 15:15:56 +0000 Subject: [FieldTrip] about detrend In-Reply-To: <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> References: <5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk> <54822F5B.3050407@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6549@EXCHANGE2.ad.nottingham.ac.uk> <54825857.9010807@hms.harvard.edu> <5546552AC7F6814B8C9826920C70E5AE3E613B6579@EXCHANGE2.ad.nottingham.ac.uk> <002e01d012c8$22e3d4a0$68ab7de0$@artinis.com> Message-ID: <5546552AC7F6814B8C9826920C70E5AE3E613B689E@EXCHANGE2.ad.nottingham.ac.uk> Hi, Jörn & Alexander. Thank you for all the explanations. ☺ Best, Yun ~*~*~*~*~*~*~*~*~*~*~*~*~ Yun Wen 温韫 PhD Candidate Rm A25, School of Psychology University of Nottingham University Park, NG7 2RD Phone: +44 [0]115 846-8129 Tout finit toujours bien, si ça ne va pas, c'est que ce n'est pas la fin. From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of J?rn M. Horschig Sent: Monday, December 08, 2014 9:20 AM To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] about detrend oh and another thing: in FieldTrip, detrending inherently also demeans, or in other words, if the fitted first order polynomial is removed, also the zeroth order polynomial is. -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Yun Wen Sent: Sunday, December 7, 2014 11:53 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g, cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Saturday, December 06, 2014 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world. If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it. To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially. I hope that helps. On 12/5/14, 6:20 PM, Yun Wen wrote: Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset: http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right? Best, Yun From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Alexander Nakhnikian Sent: Friday, December 05, 2014 10:19 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] about detrend Hello Again, I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset. Sorry about that. A On 12/5/14, 4:20 PM, Yun Wen wrote: Hi all, I want to remove DC offset before applying the high-pass filter. I was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like: cfg = []; cfg.dataset = filename_raweeg; cfg.detrend = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfiltord = 2; % Order of the filter = 2. cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz; [data] = ft_preprocessing (cfg); Thank you in advance. Best, Yun This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cb802 at cam.ac.uk Tue Dec 9 12:27:55 2014 From: cb802 at cam.ac.uk (Dr Christopher Brown) Date: Tue, 9 Dec 2014 11:27:55 -0000 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <5485BF60.8030100@fcdonders.ru.nl> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> <5485BF60.8030100@fcdonders.ru.nl> Message-ID: <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> Dear Eric, Tom, Arjen Thanks for the information and it's good to know the functionality I need is already there. Just to clarify, I understand the situation as thus (please correct any errors of understanding): - The ft_statfun_indepsamplesregrT function can be used to calculate parametric linear regression statistics with ivar as the independent variable of interest, e.g. a behavioural variable across trials or subjects, and uvar as units (e.g. trials or subjects). - The new ft_statfun_intersubcorr can calculate Spearman correlation statistics between subjects (but not between trials), and doesn't currently have a parametric (e.g., Pearson's) option, although this appears to be covered by the ft_statfun_indepsamplesregrT function anyway. By the way, in the ft_statfun_intersubcorr description/instructions, some of the text appears to refer to ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the behavioural variable of interest rather than "conditions that must be compared" as currently stated? Also, what is the reason this function cannot be used across trials within a subject? Best wishes Chris Dr Christopher Brown Research Associate | CamPain Research Group | Department of Anaesthesia | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Tom Marshall Sent: 08 December 2014 15:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] Cluster analysis on correlation statistics Hm... it seems that I may have reinvented the wheel (or perhaps invented a cruder wheel before Eric and co provided this more streamlined one). Eric, can indepsamplesregrT also compute nonparametric correlation coefficients (eg Spearman)? Best, Tom On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: Hi Chris, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. For correlating/regressing single trial data of a single subject, you use the ft_statfun_indepsamplesregrT (with the units-of-observations being the trials, which each correspond to one column of your design matrix). For correlating/regressing subject-averaged data of a group of subjects, you also use the ft_statfun_indepsamplesregrT (with the units-of-observations being the subjects, which each correspond to one column of your design matrix). Note, in this case your behavioral data (accuracy or RT) or also subject averages. Best, Eric Maris _____ Van: Dr C A Brown [ cb802 at cam.ac.uk] Verzonden: zaterdag 6 december 2014 12:33 Aan: fieldtrip at science.ru.nl Onderwerp: Re: [FieldTrip] Cluster analysis on correlation statistics Hello again, Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function. Many thanks Chris Dr Christopher Brown Research Associate Sent from a mobile device, please excuse my brevity. ----- Reply message ----- From: "Christopher Brown" To: Subject: Cluster analysis on correlation statistics Date: Sat, Dec 6, 2014 07:49 Dear all I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis. It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients? Any other hints as to how to write this are most welcome. Kind regards Chris -- Dr Christopher Brown Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge Box 93 Addenbrooke's Hospital Hills Road Cambridge CB2 0QQ 01223 256 995 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Dec 9 12:40:58 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 9 Dec 2014 12:40:58 +0100 Subject: [FieldTrip] Cluster analysis on correlation statistics In-Reply-To: <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> References: <39F7E98E967D3F48B543DDBD9C9421354617BB@exprd02.hosting.ru.nl> <5485BF60.8030100@fcdonders.ru.nl> <02f701d013a3$2d2c0140$878403c0$@cam.ac.uk> Message-ID: Hi Chris, Quick reply: - The new ft_statfun_intersubcorr can calculate Spearman correlation statistics between subjects (but not between trials), and doesn’t currently have a parametric (e.g., Pearson’s) option, although this appears to be covered by the ft_statfun_indepsamplesregrT function anyway. > I implemented a cfg.type, allowing the specification of the correlation statistics option (e.g. Pearson), but haven't yet tested it. By the way, in the ft_statfun_intersubcorr description/instructions, some of the text appears to refer to ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the behavioural variable of interest rather than “conditions that must be compared” as currently stated? Also, what is the reason this function cannot be used across trials within a subject? > ft_statfun_intersubcorr was implemented last week on request. the documentation was taken from ft_statfun_depsamplesT and needs to be updated (thanks for reminding). The function computes a correlation across observations (subjects/trials) where one input is neural data, and the other behavior (enforce a match of dimension and size), and then transforms it to a t-value. Theoretically therefore the function could also be used to calculate a correlation statistics across trials in a subject. >> Btw, I didn't see Eric's reply before. But if you get it to work with ft_statfun_indepsamplesregr, I'd go for that. best regards, arjen 2014-12-09 12:27 GMT+01:00 Dr Christopher Brown : > Dear Eric, Tom, Arjen > > > > Thanks for the information and it’s good to know the functionality I need > is already there. Just to clarify, I understand the situation as thus > (please correct any errors of understanding): > > - The ft_statfun_indepsamplesregrT function can be used to > calculate parametric linear regression statistics with ivar as the > independent variable of interest, e.g. a behavioural variable across trials > or subjects, and uvar as units (e.g. trials or subjects). > > - The new ft_statfun_intersubcorr can calculate Spearman > correlation statistics between subjects (but not between trials), and > doesn’t currently have a parametric (e.g., Pearson’s) option, although this > appears to be covered by the ft_statfun_indepsamplesregrT function > anyway. By the way, in the ft_statfun_intersubcorr > description/instructions, some of the text appears to refer to > ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the > behavioural variable of interest rather than “conditions that must be > compared” as currently stated? Also, what is the reason this function > cannot be used across trials within a subject? > > > > Best wishes > > Chris > > > > *Dr Christopher Brown* > > *Research Associate | CamPain Research Group | Department of Anaesthesia | > University of Cambridge* > > Box 93 > Addenbrooke's Hospital > Hills Road > Cambridge CB2 0QQ > > 01223 256 995 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Tom Marshall > *Sent:* 08 December 2014 15:10 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] Cluster analysis on correlation statistics > > > > Hm... it seems that I may have reinvented the wheel (or perhaps invented a > cruder wheel before Eric and co provided this more streamlined one). > > Eric, can indepsamplesregrT also compute nonparametric correlation > coefficients (eg Spearman)? > > Best, > Tom > > On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote: > > Hi Chris, > > > > Just to clarify my last email: I'm referring to correlation between either > single trial data within subject, or averaged ERPs across subjects, with a > behavioral variable. Not linear regression across conditions as is > already implemented in the ft_statfun_depsamplesregrT function. > > > > For correlating/regressing single trial data of a single subject, you use > the ft_statfun_indepsamplesregrT (with the units-of-observations being the > trials, which each correspond to one column of your design matrix). > > > > For correlating/regressing subject-averaged data of a group of subjects, > you also use the ft_statfun_indepsamplesregrT (with the > units-of-observations being the subjects, which each correspond to one > column of your design matrix). Note, in this case your behavioral data > (accuracy or RT) or also subject averages. > > > > Best, > > > > Eric Maris > > > > > > > ------------------------------ > > *Van:* Dr C A Brown [cb802 at cam.ac.uk] > *Verzonden:* zaterdag 6 december 2014 12:33 > *Aan:* fieldtrip at science.ru.nl > *Onderwerp:* Re: [FieldTrip] Cluster analysis on correlation statistics > > Hello again, > > > > Just to clarify my last email: I'm referring to correlation between either > single trial data within subject, or averaged ERPs across subjects, with a > behavioral variable. Not linear regression across conditions as is already > implemented in the ft_statfun_depsamplesregrT function. > > > > Many thanks > > Chris > > > > Dr Christopher Brown > > Research Associate > > > > Sent from a mobile device, please excuse my brevity. > > > > ----- Reply message ----- > From: "Christopher Brown" > To: > Subject: Cluster analysis on correlation statistics > Date: Sat, Dec 6, 2014 07:49 > > > > Dear all > > I would like to use the cluster analysis functions in Fieldtrip on > correlation statistics. I note there has been some discussion about this on > this list in the past but I haven't come across the necessary > ft_statfun_corr function to allow this analysis. It would be great if > somebody has this code and could share it with me; otherwise, I will embark > on writing it myself and sharing my results with everyone for feedback. > Being new to Fieldtrip I would greatly appreciate any collaborative help > with this. May I check my understanding on something before getting > started: To allow for multiple comparisons correction using monte carlo for > example, as part of a cluster analysis, I presume the output of the > function must be t values rather than correlation coefficients? Any other > hints as to how to write this are most welcome. > > Kind regards > > Chris > > -- > > *Dr Christopher Brown* > > *Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge* > > > > Box 93 > > Addenbrooke's Hospital > > Hills Road > > Cambridge CB2 0QQ > > > > 01223 256 995 > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Tue Dec 9 23:51:50 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Tue, 9 Dec 2014 23:51:50 +0100 Subject: [FieldTrip] (no subject) Message-ID: Hey Fieldtrippers, I am fighting with a self defined trialfunction. Basically I want to cut always at one event called ceck. If there is another event in the piece cut out, called resp I want to log the distance between the two of them. I tried function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('pres', {event.value}))).value]'; sample = [event(find(strcmp('pres', {event.value}))).sample]'; % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = sample + pretrig trlend = sample + posttrig offset = sample - sample + pretrig RT = sample2 - sample newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl]; end But the problem is, that not always there is this second event, so length(sample1) is not equal to length (sample2). Now I would just like that every time when event 2 is missing sample 2 is just set to zero, so that the two vectors have the same length and the function is working. Is this possible? Thanks a million Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Dec 10 07:19:28 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Dec 2014 07:19:28 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Het katrin, you could make a couple of conditional if statements (eg creating and changing the value of a variable event1ctr). For example, conceptually: Event1ctr = 0 Loop start If event1 & event1ctr == 0 Event1ctr = 1 Elseif event1 & event1ctr Trl = ... with a zero for trlend # no event2 found Event1ctr = 0 End If event2 Trl = ... # normal trial Event1ctr= 0 End Loop end Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" het volgende: > Hey Fieldtrippers, > > I am fighting with a self defined trialfunction. > Basically I want to cut always at one event called ceck. If there is > another event in the piece cut out, called resp I want to log the distance > between the two of them. > I tried > > function [trl, event] = response_trialfun(cfg); > > % read the header information and the events from the data > hdr = ft_read_header(cfg.dataset); > event = ft_read_event(cfg.dataset); > > > % search for "trigger" events > value = [event(find(strcmp('pres', {event.value}))).value]'; > sample = [event(find(strcmp('pres', {event.value}))).sample]'; > > % search for "trigger" events > value2 = [event(find(strcmp('resp', {event.value}))).value]'; > sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; > > % determine the number of samples before and after the trigger > pretrig = -round(cfg.trialdef.prestim * hdr.Fs); > posttrig = round(cfg.trialdef.poststim * hdr.Fs); > > trl = []; > > trlbegin = sample + pretrig > trlend = sample + posttrig > offset = sample - sample + pretrig > RT = sample2 - sample > > newtrl = [trlbegin trlend offset RT]; > trl = [trl; newtrl]; > > end > > > But the problem is, that not always there is this second event, so > length(sample1) is not equal to length (sample2). Now I would just like > that every time when event 2 is missing sample 2 is just set to zero, so > that the two vectors have the same length and the function is working. Is > this possible? > Thanks a million > Katrin > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Wed Dec 10 12:56:19 2014 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Wed, 10 Dec 2014 12:56:19 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Hey Arjen, hey all, so, I used some if statements, yes, and now I really get lists of trialbegin, trialend, offset and RT as I wanted them, however at the end only one segment (with the last infos of the lists) is created. I just don't get what is wrong. Could you have another short look? Thanks a million Katrin function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('ceck', {event.value}))).value]'; sample = [event(find(strcmp('ceck', {event.value}))).sample]' % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]' % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = []; trlend = [] offset = []; RT = []; i=7 %delete training trials j=1 k=1 while i <= (length(sample)) if sample2(j)-sample(i)<=2500 & sample2(j)-sample(i)>=1 % find resp appearing after ceck within RT-window trlbegin (k) = sample (i) + pretrig; trlend (k) = sample (i) + posttrig; offset (k) = sample (i) - sample (i) + pretrig; RT(k) = sample2 (j) - sample (i); i=i+1 j=j+1 k=k+1 elseif sample2(j)-sample(i)<=0 j=j+1 else i=i+1 end end newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl] 2014-12-10 7:19 GMT+01:00 Arjen Stolk : > Het katrin, you could make a couple of conditional if statements (eg > creating and changing the value of a variable event1ctr). For example, > conceptually: > > Event1ctr = 0 > > Loop start > > If event1 & event1ctr == 0 > Event1ctr = 1 > Elseif event1 & event1ctr > Trl = ... with a zero for trlend # no event2 found > Event1ctr = 0 > End > > If event2 > Trl = ... # normal trial > Event1ctr= 0 > End > > Loop end > Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" > het volgende: > >> Hey Fieldtrippers, >> >> I am fighting with a self defined trialfunction. >> Basically I want to cut always at one event called ceck. If there is >> another event in the piece cut out, called resp I want to log the distance >> between the two of them. >> I tried >> >> function [trl, event] = response_trialfun(cfg); >> >> % read the header information and the events from the data >> hdr = ft_read_header(cfg.dataset); >> event = ft_read_event(cfg.dataset); >> >> >> % search for "trigger" events >> value = [event(find(strcmp('pres', {event.value}))).value]'; >> sample = [event(find(strcmp('pres', {event.value}))).sample]'; >> >> % search for "trigger" events >> value2 = [event(find(strcmp('resp', {event.value}))).value]'; >> sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; >> >> % determine the number of samples before and after the trigger >> pretrig = -round(cfg.trialdef.prestim * hdr.Fs); >> posttrig = round(cfg.trialdef.poststim * hdr.Fs); >> >> trl = []; >> >> trlbegin = sample + pretrig >> trlend = sample + posttrig >> offset = sample - sample + pretrig >> RT = sample2 - sample >> >> newtrl = [trlbegin trlend offset RT]; >> trl = [trl; newtrl]; >> >> end >> >> >> But the problem is, that not always there is this second event, so >> length(sample1) is not equal to length (sample2). Now I would just like >> that every time when event 2 is missing sample 2 is just set to zero, so >> that the two vectors have the same length and the function is working. Is >> this possible? >> Thanks a million >> Katrin >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Wed Dec 10 23:16:29 2014 From: joseluisblues at gmail.com (Jose) Date: Wed, 10 Dec 2014 23:16:29 +0100 Subject: [FieldTrip] Micromed data Message-ID: Dear fellows, I am a beginner in FT, and I need some help. I am analysing EEG Micromed data, which give as ouputs .trc or .edf files. I am trying to workout the edf files, which store the actual 29 electrodes recorded during the experiment, I have troubles putting the data in FT format, Either with: hdr = ft_read_header(data); event = ft_read_event(data); data_2 = ft_read_data(data); I obtain 405 events, which are 1s longer (1024 samples). This is actually more related to the frequency sampling, and it is nothing related to the structures of the trials, Has anybody experience with Micromed data?, Thanks in advance, José Luis -- José Luis ULLOA FULGERI 33 (0)6.29.50.64.93 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Dec 11 08:53:56 2014 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Thu, 11 Dec 2014 08:53:56 +0100 Subject: [FieldTrip] Micromed data In-Reply-To: References: Message-ID: <002801d01517$9dfdee40$d9f9cac0$@artinis.com> Hi José, you might want to start looking here: http://fieldtrip.fcdonders.nl/getting_started and then head to one of the tutorials on preprocessing or read the walkthrough. That should help to get you started. As a hint, you can better use ft_preprocessing rather than ft_read_XXX. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jose Sent: Wednesday, December 10, 2014 11:16 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Micromed data Dear fellows, I am a beginner in FT, and I need some help. I am analysing EEG Micromed data, which give as ouputs .trc or .edf files. I am trying to workout the edf files, which store the actual 29 electrodes recorded during the experiment, I have troubles putting the data in FT format, Either with: hdr = ft_read_header(data); event = ft_read_event(data); data_2 = ft_read_data(data); I obtain 405 events, which are 1s longer (1024 samples). This is actually more related to the frequency sampling, and it is nothing related to the structures of the trials, Has anybody experience with Micromed data?, Thanks in advance, José Luis -- José Luis ULLOA FULGERI 33 (0)6.29.50.64.93 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Dec 11 15:35:45 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 11 Dec 2014 14:35:45 +0000 Subject: [FieldTrip] Beamformer source timeseries Message-ID: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> Dear Fieldtrippers, Sorry if I not gotten to the right tutorial page. I have an EEG dataset with 128 electrodes. What I would like is, if there are N sources found using a Beamformer, I would like N timeseries corresponding to these sources which have been split in to trials as in my original sensor-space data. Instead in the tutorial, it is about getting beta power at various locations. Any help on obtaining this would be very useful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Dec 11 15:48:04 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Thu, 11 Dec 2014 15:48:04 +0100 Subject: [FieldTrip] Beamformer source timeseries In-Reply-To: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> References: <8da7659c70204dd58ab7b19660eaab2c@EXNHI01.herseninstituut.knaw.nl> Message-ID: <005401d01551$78af40f0$6a0dc2d0$@artinis.com> Hey Rajat, an example of what you want can be found here: http://fieldtrip.fcdonders.nl/tutorial/shared/virtual_sensors Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Rajat Thomas Sent: Thursday, December 11, 2014 3:36 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Beamformer source timeseries Dear Fieldtrippers, Sorry if I not gotten to the right tutorial page. I have an EEG dataset with 128 electrodes. What I would like is, if there are N sources found using a Beamformer, I would like N timeseries corresponding to these sources which have been split in to trials as in my original sensor-space data. Instead in the tutorial, it is about getting beta power at various locations. Any help on obtaining this would be very useful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jb4590 at nyu.edu Thu Dec 11 19:50:20 2014 From: jb4590 at nyu.edu (Julia Basso) Date: Thu, 11 Dec 2014 13:50:20 -0500 Subject: [FieldTrip] .dat files from intan to usable file format in fieldtrip Message-ID: Hi, I am using the intan system (http://intantech.com/) to collect my EEG data. The data files I have collected from this system are .dat files. I would now like to use fieldtrip to analyze this data, but need a way to convert the .dat files into a usable file format for fieldtrip. I was wondering if anyone has a script for this or has done this before and could offer me advice. Best, Julia *Julia C. Basso, PhDPost-doctoral Research AssociateNew York UniversityCenter for Neural ScienceSuzuki Laboratorywww.suzukilab.com * -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Fri Dec 12 10:51:20 2014 From: n.lam at fcdonders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Fri, 12 Dec 2014 09:51:20 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: , Message-ID: Hi Katrin, Not sure if you solved it yet, but it looks like you need to update 'newtrl' and 'trl' within your while loop, and not outside of the loop. Best, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of KatrinH Heimann [katrinheimann at gmail.com] Sent: 10 December 2014 12:56 To: FieldTrip discussion list Subject: Re: [FieldTrip] (no subject) Hey Arjen, hey all, so, I used some if statements, yes, and now I really get lists of trialbegin, trialend, offset and RT as I wanted them, however at the end only one segment (with the last infos of the lists) is created. I just don't get what is wrong. Could you have another short look? Thanks a million Katrin function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('ceck', {event.value}))).value]'; sample = [event(find(strcmp('ceck', {event.value}))).sample]' % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]' % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = []; trlend = [] offset = []; RT = []; i=7 %delete training trials j=1 k=1 while i <= (length(sample)) if sample2(j)-sample(i)<=2500 & sample2(j)-sample(i)>=1 % find resp appearing after ceck within RT-window trlbegin (k) = sample (i) + pretrig; trlend (k) = sample (i) + posttrig; offset (k) = sample (i) - sample (i) + pretrig; RT(k) = sample2 (j) - sample (i); i=i+1 j=j+1 k=k+1 elseif sample2(j)-sample(i)<=0 j=j+1 else i=i+1 end end newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl] 2014-12-10 7:19 GMT+01:00 Arjen Stolk >: Het katrin, you could make a couple of conditional if statements (eg creating and changing the value of a variable event1ctr). For example, conceptually: Event1ctr = 0 Loop start If event1 & event1ctr == 0 Event1ctr = 1 Elseif event1 & event1ctr Trl = ... with a zero for trlend # no event2 found Event1ctr = 0 End If event2 Trl = ... # normal trial Event1ctr= 0 End Loop end Op 9 dec. 2014 23:52 schreef "KatrinH Heimann" > het volgende: Hey Fieldtrippers, I am fighting with a self defined trialfunction. Basically I want to cut always at one event called ceck. If there is another event in the piece cut out, called resp I want to log the distance between the two of them. I tried function [trl, event] = response_trialfun(cfg); % read the header information and the events from the data hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); % search for "trigger" events value = [event(find(strcmp('pres', {event.value}))).value]'; sample = [event(find(strcmp('pres', {event.value}))).sample]'; % search for "trigger" events value2 = [event(find(strcmp('resp', {event.value}))).value]'; sample2 = [event(find(strcmp('resp', {event.value}))).sample]'; % determine the number of samples before and after the trigger pretrig = -round(cfg.trialdef.prestim * hdr.Fs); posttrig = round(cfg.trialdef.poststim * hdr.Fs); trl = []; trlbegin = sample + pretrig trlend = sample + posttrig offset = sample - sample + pretrig RT = sample2 - sample newtrl = [trlbegin trlend offset RT]; trl = [trl; newtrl]; end But the problem is, that not always there is this second event, so length(sample1) is not equal to length (sample2). Now I would just like that every time when event 2 is missing sample 2 is just set to zero, so that the two vectors have the same length and the function is working. Is this possible? Thanks a million Katrin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.kristensen at gipsa-lab.grenoble-inp.fr Fri Dec 12 15:49:10 2014 From: emmanuelle.kristensen at gipsa-lab.grenoble-inp.fr (Kristensen Emmanuelle) Date: Fri, 12 Dec 2014 15:49:10 +0100 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? In-Reply-To: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr> Message-ID: <548B0066.3090309@gipsa-lab.grenoble-inp.fr> Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Fri Dec 12 23:24:17 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 12 Dec 2014 22:24:17 +0000 Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From spa268 at nyu.edu Sat Dec 13 14:04:25 2014 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Sat, 13 Dec 2014 07:04:25 -0600 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: Hello Emmanuelle, I don't think a high-pass filter can replace demeaning. A high-pass filter removes a linear trend, but not a fixed value. Imagine a case where a trial is a flat line at 100 uV for the whole epoch; demeaning would change this trial to 0 uV for the whole epoch, whereas a high-pass filter would (I think) not change it. Detrending, on the other hand, removes a linear trend. There was a discussion very recently on this list discussing detrending vs. high-pass filtering, so you may be interested in checking it out. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Sat Dec 13 14:49:32 2014 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Sat, 13 Dec 2014 14:49:32 +0100 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) Message-ID: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory . Hope this helps, Haiteng On 13 December 2014 at 12:00, wrote: > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Correction baseline : removing the mean value or high-pass > filtering ? (Kristensen Emmanuelle) > 2. Question about how to reduce the file size (Caspar, Emilie) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1ceca823/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Fri, 12 Dec 2014 22:24:17 +0000 > From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size > Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> > Content-Type: text/plain; charset="us-ascii" > > Dear Fieltrippers, > I did a pilot study on one participant today. Now that I'm trying to > analyze my data, I realize that the size file is too big for my computer > (size = 3Gb). Even after one hour, the filters (high pass + low pass) were > not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the > filters. > > I know that there is "ft_resampledata", and I did it to reduce the actual > sample rate (= 2048) to 256. However, even with this procedure my computer > is crashing (even with 16 Go RAM). In addition, I'm not sure that I can > resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I need > (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for > next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1fa62a62/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 49, Issue 12 > ***************************************** > -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Sun Dec 14 21:44:34 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Sun, 14 Dec 2014 20:44:34 +0000 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: Dear Haiteng Thank you for your suggestion. I tried but again, the downsample with this procedure takes more than 40 minutes (I gave up after this time period and stopped the script, the computer was crashing). Perhaps one could tell if the following is correct? I'm maybe wrong somewhere. chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} chansEEG = 1:64; nchans=length(chansEEG); display('downsample each channel') for i=1:nchans cfgp = []; cfgp.dataset = [ file.name]; cfgp.channel = 'all'; datp = ft_preprocessing(cfgp); cfgr = []; cfgr.resamplefs = 512; datr{i} = ft_resampledata(cfgr, datp); clear datp cfg = []; datall = ft_appenddata(cfg, datr{:}); display('Filters') cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = bpfilterRange; cfg.bpfiltord = bpfilterOrder; cfg.reref = 'yes'; cfg.refchannel = chansRef; allData_preprosses = ft_preprocessing(cfg, datall); Thanks again! Emilie On 13 déc. 2014, at 14:49, Haiteng Jiang > wrote: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. Hope this helps, Haiteng On 13 December 2014 at 12:00, > wrote: Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Correction baseline : removing the mean value or high-pass filtering ? (Kristensen Emmanuelle) 2. Question about how to reduce the file size (Caspar, Emilie) ---------------------------------------------------------------------- Message: 1 Date: Fri, 12 Dec 2014 15:49:10 +0100 From: Kristensen Emmanuelle > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 12 Dec 2014 22:24:17 +0000 From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> Content-Type: text/plain; charset="us-ascii" Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 12 ***************************************** -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sun Dec 14 22:13:23 2014 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Sun, 14 Dec 2014 22:13:23 +0100 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: Hi Emilie, It seems from the code pasted that you're still trying to read all channels in at once: cfgp.channel = 'all'; Try reading in & downsampling one channel at a time, as Haiteng suggested with the following link: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory Hope that solves it for you, Arjen 2014-12-14 21:44 GMT+01:00 Caspar, Emilie : > > Dear Haiteng > > Thank you for your suggestion. I tried but again, the downsample with > this procedure takes more than 40 minutes (I gave up after this time period > and stopped the script, the computer was crashing). > > Perhaps one could tell if the following is correct? I'm maybe wrong > somewhere. > > chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} > chansEEG = 1:64; > nchans=length(chansEEG); > > display('downsample each channel') > > for i=1:nchans > cfgp = []; > cfgp.dataset = [ file.name]; > cfgp.channel = 'all'; > datp = ft_preprocessing(cfgp); > > > cfgr = []; > cfgr.resamplefs = 512; > datr{i} = ft_resampledata(cfgr, datp); > > > clear datp > > cfg = []; > datall = ft_appenddata(cfg, datr{:}); > > > display('Filters') > > > cfg = []; > cfg.bpfilter = 'yes'; > cfg.bpfreq = bpfilterRange; > cfg.bpfiltord = bpfilterOrder; > cfg.reref = 'yes'; > cfg.refchannel = chansRef; > allData_preprosses = ft_preprocessing(cfg, datall); > > Thanks again! > > Emilie > > On 13 déc. 2014, at 14:49, Haiteng Jiang wrote: > > Hi Emilie, > You can read each channel and then down sample. In the end , you > append all the channel. For more information and how to , you can refer to > the FAQ: > http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory > . > > Hope this helps, > Haiteng > > On 13 December 2014 at 12:00, wrote: >> >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> 1. Correction baseline : removing the mean value or high-pass >> filtering ? (Kristensen Emmanuelle) >> 2. Question about how to reduce the file size (Caspar, Emilie) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 12 Dec 2014 15:49:10 +0100 >> From: Kristensen Emmanuelle >> >> To: FieldTrip discussion list >> Subject: [FieldTrip] Correction baseline : removing the mean value or >> high-pass filtering ? >> Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> >> Content-Type: text/plain; charset="utf-8"; Format="flowed" >> >> Hi, >> I would need your opinion, please. >> Generally, the baseline correction means to remove a mean value from >> each epoch. I am wondering if a high pass filter, applied on the whole >> recorded signal, can perform the baseline correction. >> What do you think? >> Regards >> Emmanuelle >> >> -- >> Emmanuelle KRISTENSEN >> Doctorante au Gipsa-Lab >> Equipe VIBS >> >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1ceca823/attachment-0001.html >> > >> >> ------------------------------ >> >> Message: 2 >> Date: Fri, 12 Dec 2014 22:24:17 +0000 >> From: "Caspar, Emilie" >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Question about how to reduce the file size >> Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> >> Content-Type: text/plain; charset="us-ascii" >> >> Dear Fieltrippers, >> I did a pilot study on one participant today. Now that I'm trying to >> analyze my data, I realize that the size file is too big for my computer >> (size = 3Gb). Even after one hour, the filters (high pass + low pass) were >> not yet achieved. >> >> So I would like to see how to reduce the size of my sample BEFORE the >> filters. >> >> I know that there is "ft_resampledata", and I did it to reduce the actual >> sample rate (= 2048) to 256. However, even with this procedure my computer >> is crashing (even with 16 Go RAM). In addition, I'm not sure that I can >> resample before filtering (I read different informations). >> >> Another way I was thinking about was to pre-select electrodes that I need >> (only 6 electrodes on 64). But here I have two questions: >> - Can I pre-process only some electrodes? Does it really reduce size for >> next preprocesses? >> - Is this the correct way to ask? As it crashes, not sure it works. >> >> cfg = []; >> cfg.dataset = [ file.name]; >> cfg.channel = 'B5', 'B6', 'B15', 'B16'; >> allData_prepross = ft_preprocessing(cfg); >> cfg.resamplefs = 256; >> DataSample = ft_resampledata(cfg, allData_prepross) >> >> >> I would appreciate pieces of advice! >> >> Many thanks :) >> >> Emilie >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1fa62a62/attachment-0001.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 49, Issue 12 >> ***************************************** >> > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Mon Dec 15 10:03:38 2014 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Mon, 15 Dec 2014 09:03:38 +0000 Subject: [FieldTrip] Question about how to reduce the file size (Caspar, Emilie) In-Reply-To: References: Message-ID: <4C066F35-6488-4360-AD67-ABD826680A31@live.ucl.ac.uk> It works indeed, I have understood my mistake. Thank you! On 14 déc. 2014, at 22:13, Arjen Stolk > wrote: Hi Emilie, It seems from the code pasted that you're still trying to read all channels in at once: cfgp.channel = 'all'; Try reading in & downsampling one channel at a time, as Haiteng suggested with the following link: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory Hope that solves it for you, Arjen 2014-12-14 21:44 GMT+01:00 Caspar, Emilie >: Dear Haiteng Thank you for your suggestion. I tried but again, the downsample with this procedure takes more than 40 minutes (I gave up after this time period and stopped the script, the computer was crashing). Perhaps one could tell if the following is correct? I'm maybe wrong somewhere. chansAll = 1:68;%{'CPz', 'Cz', 'FCz', 'Fz'} chansEEG = 1:64; nchans=length(chansEEG); display('downsample each channel') for i=1:nchans cfgp = []; cfgp.dataset = [ file.name]; cfgp.channel = 'all'; datp = ft_preprocessing(cfgp); cfgr = []; cfgr.resamplefs = 512; datr{i} = ft_resampledata(cfgr, datp); clear datp cfg = []; datall = ft_appenddata(cfg, datr{:}); display('Filters') cfg = []; cfg.bpfilter = 'yes'; cfg.bpfreq = bpfilterRange; cfg.bpfiltord = bpfilterOrder; cfg.reref = 'yes'; cfg.refchannel = chansRef; allData_preprosses = ft_preprocessing(cfg, datall); Thanks again! Emilie On 13 déc. 2014, at 14:49, Haiteng Jiang > wrote: Hi Emilie, You can read each channel and then down sample. In the end , you append all the channel. For more information and how to , you can refer to the FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. Hope this helps, Haiteng On 13 December 2014 at 12:00, > wrote: Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Correction baseline : removing the mean value or high-pass filtering ? (Kristensen Emmanuelle) 2. Question about how to reduce the file size (Caspar, Emilie) ---------------------------------------------------------------------- Message: 1 Date: Fri, 12 Dec 2014 15:49:10 +0100 From: Kristensen Emmanuelle > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi, I would need your opinion, please. Generally, the baseline correction means to remove a mean value from each epoch. I am wondering if a high pass filter, applied on the whole recorded signal, can perform the baseline correction. What do you think? Regards Emmanuelle -- Emmanuelle KRISTENSEN Doctorante au Gipsa-Lab Equipe VIBS -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 12 Dec 2014 22:24:17 +0000 From: "Caspar, Emilie" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Question about how to reduce the file size Message-ID: <484FAA32-F84A-4BD2-8928-C07265183751 at live.ucl.ac.uk> Content-Type: text/plain; charset="us-ascii" Dear Fieltrippers, I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. So I would like to see how to reduce the size of my sample BEFORE the filters. I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? - Is this the correct way to ask? As it crashes, not sure it works. cfg = []; cfg.dataset = [ file.name]; cfg.channel = 'B5', 'B6', 'B15', 'B16'; allData_prepross = ft_preprocessing(cfg); cfg.resamplefs = 256; DataSample = ft_resampledata(cfg, allData_prepross) I would appreciate pieces of advice! Many thanks :) Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 12 ***************************************** -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.wutz-1 at unitn.it Mon Dec 15 10:15:03 2014 From: andreas.wutz-1 at unitn.it (Wutz, Andreas Gerhard) Date: Mon, 15 Dec 2014 10:15:03 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <548B0066.3090309@gipsa-lab.grenoble-inp.fr> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> Message-ID: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> Dear all, I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. Thank you very much for your suggestions. Best, Andreas Andreas Wutz Post-Doctoral researcher at the Melcher Active Perception Lab CIMeC - Center for Mind/Brain Sciences Università degli studi di Trento ________________________________________ From tzvetan.popov at uni-konstanz.de Mon Dec 15 10:58:08 2014 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 15 Dec 2014 10:58:08 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it> Message-ID: <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> Hi Andreas, ft_selectdata is probably what you need. best tzvetan > Dear all, > > I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. > > Thank you very much for your suggestions. > Best, > Andreas > > Andreas Wutz > Post-Doctoral researcher at the Melcher Active Perception Lab > CIMeC - Center for Mind/Brain Sciences > Università degli studi di Trento > ________________________________________ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Mon Dec 15 14:36:18 2014 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Mon, 15 Dec 2014 14:36:18 +0100 Subject: [FieldTrip] Correction baseline : removing the mean value or high-pass filtering ? In-Reply-To: References: Message-ID: Hi Emmanuelle, any high-pass filter will at least attenuate the DC offset (the mean) and a linear trend (by definition). A properly designed high-pass filter should have > 80-100 dB DC attenuation and thus, completely remove the DC offset from the data in most cases. As there are exceptions with extreme DC offsets, quite frequently observed for example in BioSemi EEG recordings, the mean is additionally subtracted from the data before high-pass (and band-pass) filtering in Fieldtrip. Have a look at the filter’s frequency response if available. And yes, your reasoning is correct: a high-pass filter can be used to replace baseline correction in particular applications. This can for example be recommended if you cannot define a clean baseline as for example in many language studies (for detailed discussion see Urbach and Kutas, 2006, doi:10.1016/j.biopsycho.2005.11.012). Baseline correction would remove the mean baseline ERP topography from the data. Possible (but not necessary) drawback is that you might need higher high-pass cutoff frequencies to remove slow drifts from the data. Take care of possible filter distortions with cutoff frequencies > ~.1 Hz (see Acunzo et al., 2012, pre-print version available here: http://homepages.inf.ed.ac.uk/mvanross/reprints/Acunzo_et_al_in_press_lo_res.pdf and Widmann et al., 2014, pre-print version available here: http://www.uni-leipzig.de/~biocog/eprints/widmann_a2014jneuroscimethods.pdf for discussion). Hope this helps! Best, Andreas > Am 13.12.2014 um 14:04 schrieb Stephen Politzer-Ahles : > > Hello Emmanuelle, > > I don't think a high-pass filter can replace demeaning. A high-pass filter removes a linear trend, but not a fixed value. Imagine a case where a trial is a flat line at 100 uV for the whole epoch; demeaning would change this trial to 0 uV for the whole epoch, whereas a high-pass filter would (I think) not change it. > > Detrending, on the other hand, removes a linear trend. There was a discussion very recently on this list discussing detrending vs. high-pass filtering, so you may be interested in checking it out. > > Best, > Steve > > > > Stephen Politzer-Ahles > New York University, Abu Dhabi > Neuroscience of Language Lab > http://www.nyu.edu/projects/politzer-ahles/ > > > > Message: 1 > Date: Fri, 12 Dec 2014 15:49:10 +0100 > From: Kristensen Emmanuelle > > To: FieldTrip discussion list > Subject: [FieldTrip] Correction baseline : removing the mean value or > high-pass filtering ? > Message-ID: <548B0066.3090309 at gipsa-lab.grenoble-inp.fr> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > I would need your opinion, please. > Generally, the baseline correction means to remove a mean value from > each epoch. I am wondering if a high pass filter, applied on the whole > recorded signal, can perform the baseline correction. > What do you think? > Regards > Emmanuelle > > -- > Emmanuelle KRISTENSEN > Doctorante au Gipsa-Lab > Equipe VIBS > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From andreas.wutz-1 at unitn.it Mon Dec 15 15:41:52 2014 From: andreas.wutz-1 at unitn.it (Wutz, Andreas Gerhard) Date: Mon, 15 Dec 2014 15:41:52 +0100 Subject: [FieldTrip] redefine time axis on time-frequency representations In-Reply-To: <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> References: <548AFDB9.8050009@gipsa-lab.grenoble-inp.fr>, <548B0066.3090309@gipsa-lab.grenoble-inp.fr> <5A75DDB72F4A3C4297406397CD804C0D14FB82C10B@MBX.unitn.it>, <42BC748E-956A-40BE-9754-6E4C334D8E1A@uni-konstanz.de> Message-ID: <5A75DDB72F4A3C4297406397CD804C0D14FB82C10F@MBX.unitn.it> Thx Tzvetan for pointing to the ft_selectdata function. Unfortunately, I don't think it really does what I want it to do. I really only want to shift the time axis backwards for a certain interval per subject and not make a selection of data segments. Maybe I am getting something wrong how ft_selectdata works ...? Anyways, I already re-ran the pipeline from scratch. Thx again, Tzvetan. Hope to see you soon again! Andi Andreas Wutz Post-Doctoral researcher at the Melcher Active Perception Lab CIMeC - Center for Mind/Brain Sciences Università degli studi di Trento ________________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] im Auftrag von Tzvetan Popov [tzvetan.popov at uni-konstanz.de] Gesendet: Montag, 15. Dezember 2014 10:58 An: FieldTrip discussion list Betreff: Re: [FieldTrip] redefine time axis on time-frequency representations Hi Andreas, ft_selectdata is probably what you need. best tzvetan > Dear all, > > I need to adjust the time axis of 4-D Fourier spectra (repetitions by channels by frequency by time) for each subject individually. I learned that ft_redefinetrial is only supposed to be applied on raw data (coming from ft_preprocessing). Am I correct that at this point the simplest way to shift the time axis is to write my own code (something like data2.time=data.time-0.02) rather than applying ft_redefinetrial on the raw data and calculating the TFRs again. > > Thank you very much for your suggestions. > Best, > Andreas > > Andreas Wutz > Post-Doctoral researcher at the Melcher Active Perception Lab > CIMeC - Center for Mind/Brain Sciences > Università degli studi di Trento > ________________________________________ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.thomas at nin.knaw.nl Tue Dec 16 16:01:41 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Tue, 16 Dec 2014 15:01:41 +0000 Subject: [FieldTrip] Active Electrodes and TMS Message-ID: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> ?Dear Fieldtrippers, Is it possible to use TMS with Active Electrodes if say the electrodes are in the Visual area and the TMS pulses are far away on the motor cortex or thereabouts? Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Tue Dec 16 16:20:13 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 16 Dec 2014 15:20:13 +0000 Subject: [FieldTrip] Active Electrodes and TMS In-Reply-To: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> References: <46f9d6dfb23c46ab96da9a19f83eec7e@EXNHI01.herseninstituut.knaw.nl> Message-ID: <17DBF494-ED1C-4ECE-84F3-6210E4DB46DF@fcdonders.ru.nl> Dear Rajat, I would suggest asking the manufacturer of the electrodes. Often they are aware if any researchers are doing this and whether it is feasible and will not break the amplifiers in the electrodes. Best, Jim On 16 Dec 2014, at 16:06, Rajat Thomas > wrote: ​Dear Fieldtrippers, Is it possible to use TMS with Active Electrodes if say the electrodes are in the Visual area and the TMS pulses are far away on the motor cortex or thereabouts? Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Dec 17 11:45:09 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 17 Dec 2014 11:45:09 +0100 Subject: [FieldTrip] problem with surface Laplacian Message-ID: Dear all, I have 60 channel EEG resting state data, and after discarding bad channels, I am left with 48 channels common to all subjects. I applied scalp current density to my data before extracting power information from my EEG data. The EEG cap that I used was in a 10-10 system, and I don't have the electrode position file. Hence, I used the default electrode position file named 'standard_1005.elc' for the purpose. Here's the part of my script for the surface Laplacian: cfg_neighb.method = 'template'; cfg_neighb.layout = 'EEG1010.lay'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'no'; neighbours = ft_prepare_neighbours(cfg_neighb, data7); cfg = []; cfg.method = 'finite'; cfg.elecfile = 'standard_1005.elc'; cfg.elec = ft_read_sens(cfg.elecfile); cfg.trials = 'all'; cfg.neighbours = neighbours; cfg.conductivity = 0.33; data8 = ft_scalpcurrentdensity(cfg, data7); When I tried to extract power from data8 (after surface Laplacian), I keep getting an error message (see below). I'm not sure why this would be the case, and would appreciate very much if someone could help me resolve the error! Thank you! Here's my script for extracting the power: cfg = []; cfg.output = 'pow'; cfg.channel = {'all'}; cfg.method = 'mtmfft'; cfg.keeptrials = 'no'; cfg.tapsmofrq = 5; cfg.layout = 'EEG1010.lay'; % for frequencies up to 30 Hz cfg.foilim = [1 30]; % either the full range of frequencies (data2.hdr.Fs/2) or up to 100 Hz cfg.taper = 'hanning'; % find the index for the c200 condition pre_c200_idx = find(data8.trialinfo == 200); cfg.trials = pre_c200_idx; LF_pre_c200 = ft_freqanalysis(cfg, data8); Here's the output plus error message: the input is raw data with 48 channels and 343 trials Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 223) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 209) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Dec 17 15:07:24 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 17 Dec 2014 09:07:24 -0500 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: It seems like the issue is between the number of channels in your input (48) is different from the number of channels in the sensor description (60). You should use ft_channelrepair to interpolate the removed channels, and then it should work barring any other issues. On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee wrote: > > Dear all, > > I have 60 channel EEG resting state data, and after discarding bad > channels, I am left with 48 channels common to all subjects. > > I applied scalp current density to my data before extracting power > information from my EEG data. The EEG cap that I used was in a 10-10 > system, and I don't have the electrode position file. Hence, I used the > default electrode position file named 'standard_1005.elc' for the purpose. > > Here's the part of my script for the surface Laplacian: > > > cfg_neighb.method = 'template'; > cfg_neighb.layout = 'EEG1010.lay'; > cfg_neighb.channel = 'all'; > cfg_neighb.feedback = 'no'; > > neighbours = ft_prepare_neighbours(cfg_neighb, data7); > > cfg = []; > cfg.method = 'finite'; > cfg.elecfile = 'standard_1005.elc'; > cfg.elec = ft_read_sens(cfg.elecfile); > cfg.trials = 'all'; > cfg.neighbours = neighbours; > cfg.conductivity = 0.33; > > data8 = ft_scalpcurrentdensity(cfg, data7); > > When I tried to extract power from data8 (after surface Laplacian), I keep > getting an error message (see below). I'm not sure why this would be the > case, and would appreciate very much if someone could help me resolve the > error! > > Thank you! > > Here's my script for extracting the power: > cfg = []; > cfg.output = 'pow'; > cfg.channel = {'all'}; > cfg.method = 'mtmfft'; > cfg.keeptrials = 'no'; > cfg.tapsmofrq = 5; > cfg.layout = 'EEG1010.lay'; > > % for frequencies up to 30 Hz > cfg.foilim = [1 30]; % either the full range of frequencies > (data2.hdr.Fs/2) or up to 100 Hz > cfg.taper = 'hanning'; > > % find the index for the c200 condition > pre_c200_idx = find(data8.trialinfo == 200); > cfg.trials = pre_c200_idx; > LF_pre_c200 = ft_freqanalysis(cfg, data8); > > Here's the output plus error message: > > the input is raw data with 48 channels and 343 trials > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 223) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 209) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', > cfg.feedback, 'hassampleinfo', 'yes'); > > Best regards, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Dec 17 15:25:11 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 17 Dec 2014 15:25:11 +0100 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: Hi, Would it possible to change the number of channels in the sensor description? There are some channels that I cannot repair, hence, I decided to discard them completely from the analyses. Cheers, Hweeling On 17 December 2014 at 15:07, Max Cantor wrote: > > It seems like the issue is between the number of channels in your input > (48) is different from the number of channels in the sensor description > (60). You should use ft_channelrepair to interpolate the removed channels, > and then it should work barring any other issues. > > On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee > wrote: > >> Dear all, >> >> I have 60 channel EEG resting state data, and after discarding bad >> channels, I am left with 48 channels common to all subjects. >> >> I applied scalp current density to my data before extracting power >> information from my EEG data. The EEG cap that I used was in a 10-10 >> system, and I don't have the electrode position file. Hence, I used the >> default electrode position file named 'standard_1005.elc' for the purpose. >> >> Here's the part of my script for the surface Laplacian: >> >> >> cfg_neighb.method = 'template'; >> cfg_neighb.layout = 'EEG1010.lay'; >> cfg_neighb.channel = 'all'; >> cfg_neighb.feedback = 'no'; >> >> neighbours = ft_prepare_neighbours(cfg_neighb, data7); >> >> cfg = []; >> cfg.method = 'finite'; >> cfg.elecfile = 'standard_1005.elc'; >> cfg.elec = ft_read_sens(cfg.elecfile); >> cfg.trials = 'all'; >> cfg.neighbours = neighbours; >> cfg.conductivity = 0.33; >> >> data8 = ft_scalpcurrentdensity(cfg, data7); >> >> When I tried to extract power from data8 (after surface Laplacian), I >> keep getting an error message (see below). I'm not sure why this would be >> the case, and would appreciate very much if someone could help me resolve >> the error! >> >> Thank you! >> >> Here's my script for extracting the power: >> cfg = []; >> cfg.output = 'pow'; >> cfg.channel = {'all'}; >> cfg.method = 'mtmfft'; >> cfg.keeptrials = 'no'; >> cfg.tapsmofrq = 5; >> cfg.layout = 'EEG1010.lay'; >> >> % for frequencies up to 30 Hz >> cfg.foilim = [1 30]; % either the full range of frequencies >> (data2.hdr.Fs/2) or up to 100 Hz >> cfg.taper = 'hanning'; >> >> % find the index for the c200 condition >> pre_c200_idx = find(data8.trialinfo == 200); >> cfg.trials = pre_c200_idx; >> LF_pre_c200 = ft_freqanalysis(cfg, data8); >> >> Here's the output plus error message: >> >> the input is raw data with 48 channels and 343 trials >> Error using ft_datatype_sens (line 375) >> inconsistent number of channels in sensor description >> >> Error in ft_datatype_raw (line 138) >> data.elec = ft_datatype_sens(data.elec); >> >> Error in ft_checkdata (line 223) >> data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); >> >> Error in ft_freqanalysis (line 209) >> data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, >> 'feedback', >> cfg.feedback, 'hassampleinfo', 'yes'); >> >> Best regards, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Dec 17 15:30:31 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 17 Dec 2014 09:30:31 -0500 Subject: [FieldTrip] problem with surface Laplacian In-Reply-To: References: Message-ID: Why were you not able to repair them? Is it that they are neighbors, so linear interpolation won't work? I can't speak to this too much as I haven't tried it, but I've been looking into spline and if this is your problem spline could work. Otherwise I imagine you could manually edit / create a new elec or layout file (in matlab or in a text editor), which wouldn't be a bad idea anyway. I did this for our system as we could not find a premade one, but we use equidistant caps so it was pretty straightforward. However, I don't know if there would be any negative implications with removing the electrodes from the layout/elec file(s) altogether. On Wed, Dec 17, 2014 at 9:25 AM, Hwee Ling Lee wrote: > > Hi, > > Would it possible to change the number of channels in the sensor > description? There are some channels that I cannot repair, hence, I decided > to discard them completely from the analyses. > > Cheers, > Hweeling > > > On 17 December 2014 at 15:07, Max Cantor wrote: >> >> It seems like the issue is between the number of channels in your input >> (48) is different from the number of channels in the sensor description >> (60). You should use ft_channelrepair to interpolate the removed channels, >> and then it should work barring any other issues. >> >> On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee >> wrote: >> >>> Dear all, >>> >>> I have 60 channel EEG resting state data, and after discarding bad >>> channels, I am left with 48 channels common to all subjects. >>> >>> I applied scalp current density to my data before extracting power >>> information from my EEG data. The EEG cap that I used was in a 10-10 >>> system, and I don't have the electrode position file. Hence, I used the >>> default electrode position file named 'standard_1005.elc' for the purpose. >>> >>> Here's the part of my script for the surface Laplacian: >>> >>> >>> cfg_neighb.method = 'template'; >>> cfg_neighb.layout = 'EEG1010.lay'; >>> cfg_neighb.channel = 'all'; >>> cfg_neighb.feedback = 'no'; >>> >>> neighbours = ft_prepare_neighbours(cfg_neighb, data7); >>> >>> cfg = []; >>> cfg.method = 'finite'; >>> cfg.elecfile = 'standard_1005.elc'; >>> cfg.elec = ft_read_sens(cfg.elecfile); >>> cfg.trials = 'all'; >>> cfg.neighbours = neighbours; >>> cfg.conductivity = 0.33; >>> >>> data8 = ft_scalpcurrentdensity(cfg, data7); >>> >>> When I tried to extract power from data8 (after surface Laplacian), I >>> keep getting an error message (see below). I'm not sure why this would be >>> the case, and would appreciate very much if someone could help me resolve >>> the error! >>> >>> Thank you! >>> >>> Here's my script for extracting the power: >>> cfg = []; >>> cfg.output = 'pow'; >>> cfg.channel = {'all'}; >>> cfg.method = 'mtmfft'; >>> cfg.keeptrials = 'no'; >>> cfg.tapsmofrq = 5; >>> cfg.layout = 'EEG1010.lay'; >>> >>> % for frequencies up to 30 Hz >>> cfg.foilim = [1 30]; % either the full range of frequencies >>> (data2.hdr.Fs/2) or up to 100 Hz >>> cfg.taper = 'hanning'; >>> >>> % find the index for the c200 condition >>> pre_c200_idx = find(data8.trialinfo == 200); >>> cfg.trials = pre_c200_idx; >>> LF_pre_c200 = ft_freqanalysis(cfg, data8); >>> >>> Here's the output plus error message: >>> >>> the input is raw data with 48 channels and 343 trials >>> Error using ft_datatype_sens (line 375) >>> inconsistent number of channels in sensor description >>> >>> Error in ft_datatype_raw (line 138) >>> data.elec = ft_datatype_sens(data.elec); >>> >>> Error in ft_checkdata (line 223) >>> data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); >>> >>> Error in ft_freqanalysis (line 209) >>> data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, >>> 'feedback', >>> cfg.feedback, 'hassampleinfo', 'yes'); >>> >>> Best regards, >>> Hweeling >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> -- >> Max Cantor >> Lab Manager >> Computational Neurolinguistics Lab >> University of Michigan >> > > > -- > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laszlo.Grand at libd.org Wed Dec 17 20:28:15 2014 From: Laszlo.Grand at libd.org (Laszlo Grand) Date: Wed, 17 Dec 2014 19:28:15 +0000 Subject: [FieldTrip] Common mode artifact rejection Message-ID: <77A47164-4C7B-4463-90BE-60E0879383BD@libd.org> Hello Fieldtrippers, I need to remove artifact (low frequency: 0-7 Hz) that appears strongly on all channels in my EEG data. It's already recorded so I can't use hardware solutions. Please let me know how to remove only the common mode noise from the data. Thank you, Laszlo -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Dec 18 15:02:20 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 18 Dec 2014 15:02:20 +0100 Subject: [FieldTrip] special issue "Brain Oscillations in Human Communication" for Frontiers in Human Neuroscience References: <5492D07E.7060207@glasgow.ac.uk> Message-ID: <9AA746D1-D306-49B6-AAE5-95CE5135AEB5@donders.ru.nl> Begin forwarded message: > Dear Colleagues, > > I am currently co-hosting the special issue "Brain Oscillations in Human Communication" for Frontiers in Human Neuroscience (IF: 2.9). > > We would be delighted if you considered contributing a research article, a review or a perspective article. Besides the obvious topic of communication, we are also interested in purely methodological papers on spectral data analysis. > > Please visit our website for more information: http://journal.frontiersin.org/ResearchTopic/3111 > > If you have any questions, do not hesitate to contact one of us: > > Anne Keitel (anne.keitel at glasgow.ac.uk) > Johanna Rimmele (j.rimmele at uke.de) > Joachim Gross (joachim.gross at glasgow.ac.uk) > > > Many thanks and happy holidays! > Anne > > Topic Summary: > > Brain Oscillations in Human Communication > Anne Keitel (University of Glasgow) > Johanna Rimmele (University Medical Center Hamburg-Eppendorf) > Joachim Gross (University of Glasgow) > > Abstract deadline: 01.05.2015 > Manuscript deadline: 01.09.2015 > > > -- > Dr. Anne Keitel > Centre for Cognitive Neuroimaging > Institute of Neuroscience and Psychology > University of Glasgow > anne.keitel at glasgow.ac.uk > +44 141 330 5003 -------------- next part -------------- An HTML attachment was scrubbed... URL: From widmann at uni-leipzig.de Thu Dec 18 15:51:26 2014 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Thu, 18 Dec 2014 15:51:26 +0100 Subject: [FieldTrip] MMN 2015 - 7th Mismatch Negativity Conference Message-ID: Dear Colleague, We are happy to announce that the MMN 2015 website (https://event.uni-leipzig.de/mmn2015/) is now open for registration and poster abstract submission. The conference, "Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015)", will be held at the University of Leipzig, Germany, from 8-11 September 2015. The conference covers the state of the art in methods, theory and application (basic and clinical research) of the MMN. It will also incorporate other error signals of the brain. Moreover, there will be hands-on pre-conference workshops on methodological aspects of MMN research and on the visual MMN. The University of Leipzig is one of the oldest German universities and the birthplace of experimental psychology. Based on this long tradition, Leipzig has become a powerhouse of modern cognitive neuroscience. The city offers many opportunities for those interested in intellectual, musical, and architectural heritage. The deadline for both early-bird registration and poster abstract submission is 31 March 2015. We look forward to welcoming you in Leipzig for an inspiring MMN 2015 conference. Kind regards, Erich Schröger and the organization team -- Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015) University of Leipzig, 8-11 September 2015 Web: https://event.uni-leipzig.de/mmn2015/ Email: mmn2015 at uni-leipzig.de From r.thomas at nin.knaw.nl Fri Dec 19 13:58:34 2014 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Fri, 19 Dec 2014 12:58:34 +0000 Subject: [FieldTrip] ECG recording Message-ID: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Dec 21 00:30:07 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sat, 20 Dec 2014 23:30:07 +0000 Subject: [FieldTrip] ECG recording In-Reply-To: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl> Message-ID: Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Sun Dec 21 03:41:33 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Sun, 21 Dec 2014 02:41:33 +0000 Subject: [FieldTrip] ECG recording In-Reply-To: References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl>, Message-ID: Hi Rajat, I am using a Neuromag Elekta system. Provided I use bioleads to pick up ECG and EOG, when I run an ICA, ECG is picked up and removed very tidily. We use leads above and below each eye (EOG), plus a lead on each wrist (ECG) and the elbow for ground. In this case, running an ICA automatically and clearly picks up EOG and ECG and these can be removed cleanly. Previously I was not using bioleads. In that case, I only had data from the MEG sensors. When I ran the ICA, it was more difficult to identify a clean ECG component. But it was still possible to see components which were largely ECG and EOG, and these could be removed. No ideal, but still possible. If your system allows use of bioleads, use these and run ft_componentanalysis followed by ft_rejectcomponent on preprocessed data. If not, just run the ft_componentanalysis and ft_rejectcomponent anyway. ECG should still be able to be identified. Hope that helps! Kaelasha ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: Sunday, 21 December 2014 10:30 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Sun Dec 21 11:33:08 2014 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Sun, 21 Dec 2014 10:33:08 +0000 (UTC) Subject: [FieldTrip] fieldtrip Digest, Vol 49, Issue 19 In-Reply-To: References: Message-ID: <1020598356.57107.1419157988254.JavaMail.yahoo@jws11131.mail.ir2.yahoo.com>  Dear Rajat, maybe you can use the same method as the EOG removing. For instance you can record an ECG channel using on the two wrists as it was an EEG channel, and then you can use the ICA decomposition the remove such artifact (if it is present). Ivano Send fieldtrip mailing list submissions to     fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to     fieldtrip-request at science.ru.nl You can reach the person managing the list at     fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:   1. ECG recording (Rajat Thomas) ---------------------------------------------------------------------- Message: 1 Date: Fri, 19 Dec 2014 12:58:34 +0000 From: Rajat Thomas To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] ECG recording Message-ID:     <1022bf6ed399450d97be4e0b3ca09df5 at EXNHI01.herseninstituut.knaw.nl> Content-Type: text/plain; charset="us-ascii" Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 49, Issue 19 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Dec 22 13:23:17 2014 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 22 Dec 2014 13:23:17 +0100 Subject: [FieldTrip] ECG recording In-Reply-To: References: <1022bf6ed399450d97be4e0b3ca09df5@EXNHI01.herseninstituut.knaw.nl>, Message-ID: <003701d01de2$114567c0$33d03740$@artinis.com> Hi Rajat, on the FieldTrip wiki is an example page showing one way how to deal with the heartbeat in MEG recordings. It is very closely related to what Kaelasha and Ivano proposed: http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica _to_remove_ecg_artifacts Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Kaelasha Tyler Sent: Sunday, December 21, 2014 3:42 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hi Rajat, I am using a Neuromag Elekta system. Provided I use bioleads to pick up ECG and EOG, when I run an ICA, ECG is picked up and removed very tidily. We use leads above and below each eye (EOG), plus a lead on each wrist (ECG) and the elbow for ground. In this case, running an ICA automatically and clearly picks up EOG and ECG and these can be removed cleanly. Previously I was not using bioleads. In that case, I only had data from the MEG sensors. When I ran the ICA, it was more difficult to identify a clean ECG component. But it was still possible to see components which were largely ECG and EOG, and these could be removed. No ideal, but still possible. If your system allows use of bioleads, use these and run ft_componentanalysis followed by ft_rejectcomponent on preprocessed data. If not, just run the ft_componentanalysis and ft_rejectcomponent anyway. ECG should still be able to be identified. Hope that helps! Kaelasha _____ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: Sunday, 21 December 2014 10:30 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] ECG recording Hello rajat, To do the triangle, it's usually left wrist, right wrist and right leg. However in clinical studies, they use two electrodes: one underneath the right clavicle and the other roughly five centimetres below the left arm pit. As for removing it from the signal, the ICA method is your best bet. However it will be difficult and I'm not 100% you'll be to find a pure ICA component that contains just ECG activity. I hope I helped the slightest bit. Tyler On 19 Dec 2014, at 11:31 pm, Rajat Thomas > wrote: Dear FieldTrippers, I have not been able to find a resource for ECG recording and removal in FieldTrip. What is the best practise in terms of placing the electrodes (and how many) ? Left/Right wrist? Also is there a standard pipeline to remove the ECG from these measurements? Any pointers would be great. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Tue Dec 23 16:25:01 2014 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 23 Dec 2014 16:25:01 +0100 Subject: [FieldTrip] ft_rejectcomponent with or withouth data input Message-ID: Dear Fieldtrip users, I would like to ask for one explanation. Could anyone in more detail explain the difference between ft_rejectcomponent(cfg, comp) and ft_rejectcomponent(cfg, comp, data)? I am not sure which one I should use. I have read available information about that and tried out both methods. I understand that data input will lead to back-projection of the data into the original subspace. However I am still not sure which one I should use. Furthermore, in the ICA calculation I have used cfg.runica.pca for data dimensionality reduction. Any clarification of this issue would be greatly appreciated! Thank you in advance! All the best and happy holidays, Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon Dec 29 13:00:37 2014 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 29 Dec 2014 12:00:37 +0000 Subject: [FieldTrip] ft_rejectcomponent with or withouth data input In-Reply-To: References: Message-ID: Dear Nenad, One difference is that 'data' need not be the same 'data' that was used to create 'comp'. For example, you can have 'data' which is the original/raw data, then do some preprocessing on it to create 'data1'. Then call comp=ft_componentanalysis(cfg,data1). Then you can decide which components to reject from comp but apply this rejection to 'data' rather than 'data1'. (e.g. http://mailman.science.ru.nl/pipermail/fieldtrip/2013-October/007118.html or http://mailman.science.ru.nl/pipermail/fieldtrip/2014-February/007608.html) In your case of calling PCA for dimensionality reduction, let's say for example your 'data' has 100 channels and you set PCA to 50. Then 'comp' will have 50 components (rank 50). Let's say you want to reject 2 components. Then the output of ft_rejectcomponent(cfg,comp) will end up in channel space (100 channels) but of only rank 48. However, the output of ft_rejectcomponent(cfg,comp,data) will be in channel space (100 channels) but of rank 98. There are additional differences, such as mentioned in the 'help documentation' of ft_rejectcomponent, namely "Please use this option of including data as input, if you wish to use the output data.grad in further computation, for example for leadfield computation." This is for the data.grad.tra to be updated appropriately for leadfields. Hope that helps, and perhaps there should be a FAQ on the wiki for this. Regards, Johanna 2014-12-23 15:25 GMT+00:00 Nenad Polomac : > Dear Fieldtrip users, > > I would like to ask for one explanation. Could anyone in more detail > explain the difference between ft_rejectcomponent(cfg, comp) and > ft_rejectcomponent(cfg, comp, data)? I am not sure which one I should use. > I have read available information about that and tried out both methods. I > understand that data input will lead to back-projection of the data into > the original subspace. However I am still not sure which one I should use. > Furthermore, in the ICA calculation I have used cfg.runica.pca for data > dimensionality reduction. > > Any clarification of this issue would be greatly appreciated! > > Thank you in advance! > > All the best and happy holidays, > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sclar028 at uottawa.ca Tue Dec 30 16:55:47 2014 From: sclar028 at uottawa.ca (Stephen Clarke) Date: Tue, 30 Dec 2014 10:55:47 -0500 Subject: [FieldTrip] Fwd: cfg In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Stephen Clarke Date: Tue, Dec 30, 2014 at 10:11 AM Subject: cfg To: fieldtrip at science.ru.nl Hello, A colleague and I are interested in using wavelets to analyze resting state (rMEG) and working memory (tMEG) data from the Human Connectome Project, in order to directly compare resting state and working memory conditions. It appears that ft_freqanalysis.m works with the preprocessed HCP data. Our question concerns the cfg structures. For rMEG, the data.time structure is 1x147 cell, where each cell is a 1x1018 double, each going from 0 to 1.9995 (0.001966075273231 increments). tMEG recordings have been divided into epochs for TIM (onset of image) and TRESP (onset of response). The data.time structure is a 1x166 cell, where each cell is a 1x2035 double, each going from -1.4996 to 2.4994 (0.002 increments). If we use the same cfg.foi / cfg.toi inputs for each case, we get cfg.freq structures which are not equivalent. E.g., when using % cfg = []; % cfg.channel = 'MEG'; % cfg.method = 'wavelet'; % cfg.width = 7; % cfg.output = 'pow'; % cfg.foi = 1:0.01:100; % cfg.toi = -0.5:0.1:1.5; The TFRwave.freq outputs using this code are: rMEG: cfg.freq --> size 1x200. tMEG: cgf.freq --> size 1x400. As well, we get several warnings: “the input is raw data with 244 channels and 144 trials”, which it is not (it is preprocessed data). “the trial definition in the configuration is inconsistent with the actual data” “reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording” By using different cfg inputs to account for differences in the time sampling for the resting and working memory data, we get similar errors, though both output .freq structures are ~1x400 in this case. %%for resting state cfg_rs cfg_rs.foi = 1:0.01:200; cfg_rs.toi = -1.5:0.002:2.5; %%for wm data cfg_wm cfg_wm.foi = 1:0.01:100; cfg_wm.toi = 0:0.0019:2; Any advice on appropriate configuration structures for wavelet analysis of this data would be greatly appreciated. Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at fcdonders.ru.nl Tue Dec 30 18:34:17 2014 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 30 Dec 2014 17:34:17 +0000 Subject: [FieldTrip] cfg In-Reply-To: References: Message-ID: Dear Steve, Great that you guys are interested in our HCP data! Although indeed the processed data are represented as fieldtrip-structures I think the most appropriate platform would be to ask this question on the HCP-users platform. You can subscribe to the users list on: http://www.humanconnectome.org/contact/#subscribe For rMEG, the data.time structure is 1x147 cell, where each cell is a 1x1018 double, each going from 0 to 1.9995 (0.001966075273231 increments). Indeed, this is the consequence of us manually chopping up the 3-minute or so recording into 2 second epochs, and removing some blatantly bad segments of data. Note that the time axis is arbitrary and does not have a meaningful relationship to a physical experimental event. As well, we get several warnings: “the input is raw data with 244 channels and 144 trials”, which it is not (it is preprocessed data). “the trial definition in the configuration is inconsistent with the actual data “reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording” Don’t worry about these specific warnings at the moment By using different cfg inputs to account for differences in the time sampling for the resting and working memory data, we get similar errors, though both output .freq structures are ~1x400 in this case. %%for resting state cfg_rs cfg_rs.foi = 1:0.01:200; cfg_rs.toi = -1.5:0.002:2.5; %%for wm data cfg_wm cfg_wm.foi = 1:0.01:100; cfg_wm.toi = 0:0.0019:2; Any advice on appropriate configuration structures for wavelet analysis of this data would be greatly appreciated. At first glance the frequency resolution requested is far too high. Given the finite and discrete sampling, not all requested frequencies can be exactly estimated. Fieldtrip will do its best, but will round off the requested frequencies to the nearest estimable one. A more meaningful cfg.foi would be 1:1:100 or so. I suggest to read up a bit about spectral analysis on the tutorial section of our Fieldtrip website. Best, Jan-Mathijs -------------- next part -------------- An HTML attachment was scrubbed... URL: