From deydhiman794 at gmail.com Sat Jun 2 20:55:25 2018 From: deydhiman794 at gmail.com (Dhiman Dey) Date: Sun, 3 Jun 2018 00:25:25 +0530 Subject: [FieldTrip] Brain source localization using EEG SIGNAL(ELORETA) Message-ID: Hello Please help me out.I am doing project on EEG signal to localize the brain source. I am using ELORETA technique in fieldtrip. I completed the preprocessing process,forward problem and now am stucked in the inverse problem. That is while using the eloreta method in ft_source analysis. If anyone has the code for source analysis please provide me. I am attaching the source analysis code as well as the error. Please help me. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IMG-20180603-WA0000.jpg Type: image/jpeg Size: 172924 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IMG-20180602-WA0004.jpg Type: image/jpeg Size: 168391 bytes Desc: not available URL: From mfibm at yahoo.com Sun Jun 3 11:34:28 2018 From: mfibm at yahoo.com (Mohamed Fawzy) Date: Sun, 3 Jun 2018 09:34:28 +0000 (UTC) Subject: [FieldTrip] error References: <773513623.1549476.1528018468996.ref@mail.yahoo.com> Message-ID: <773513623.1549476.1528018468996@mail.yahoo.com> Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Undefined function 'ft_info' for input arguments of type 'char'. how i fix that error -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfibm at yahoo.com Sun Jun 3 15:25:59 2018 From: mfibm at yahoo.com (Mohamed Fawzy) Date: Sun, 3 Jun 2018 13:25:59 +0000 (UTC) Subject: [FieldTrip] i got this error References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> Message-ID: <846398119.1559949.1528032359313@mail.yahoo.com> ft_definetrial (cfg);Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: no trialfun was specified, using ft_trialfun_general evaluating trialfunction 'ft_trialfun_general'reading the header from 'ArtifactMEG.ds'Error using ft_read_header (line 202)file or directory 'ArtifactMEG.ds' does not exist Error in ft_trialfun_general (line 84)  hdr = ft_read_header (cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 178)    [trl, event] = feval (cfg.trialfun, cfg);how i fix it  -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jun 12 12:50:29 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 12 Jun 2018 12:50:29 +0200 Subject: [FieldTrip] i got this error In-Reply-To: <846398119.1559949.1528032359313@mail.yahoo.com> References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> Message-ID: The dataset simply does not exist. You could fix that error by downloading the dataset that you want to process and by putting it in your working directory. Please note that FieldTrip requires quite some MATLAB knowledge. If you get stuck here, you might not get very far with subsequent data analysis either. You may want to check out http://www.fieldtriptoolbox.org/references_to_review_papers_and_teaching_material#programming . best regards, Robert > On 3 Jun 2018, at 15:25, Mohamed Fawzy wrote: > > ft_definetrial (cfg); > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: no trialfun was specified, using ft_trialfun_general > evaluating trialfunction 'ft_trialfun_general' > reading the header from 'ArtifactMEG.ds' > Error using ft_read_header (line 202) > file or directory 'ArtifactMEG.ds' does not exist > > Error in ft_trialfun_general (line 84) > hdr = ft_read_header (cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 178) > [trl, event] = feval (cfg.trialfun, cfg); > how i fix it > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.bleichner at uni-oldenburg.de Wed Jun 13 15:07:52 2018 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Wed, 13 Jun 2018 15:07:52 +0200 Subject: [FieldTrip] LSL Workshop Registration - Now Open In-Reply-To: <9e31942b-0fa1-9673-a4ab-d5501d82b315@uni-oldenburg.de> References: <9e31942b-0fa1-9673-a4ab-d5501d82b315@uni-oldenburg.de> Message-ID: <0b0c573b-1855-4b5e-3b7b-2c36a6647b73@uni-oldenburg.de> Hi all, We are happy to announce the second international Lab Streaming Layer (LSL) workshop, which will take place September 27 - 28, 2018, at the Hanse Wissenschaftskolleg, in Delmenhorst, Germany. You can now register for the event: http://www.h-w-k.de/index.php?id=2266. The registration is open until*July 30, 2018.*The number of participants is limited to 40 people. The workshop participation fee is /*100,00 € reduced rate for Postdocs, PhDs, and Students 350,00 € for Industrial Partners, and Other*/ and includes meals. Participants need to cover their own travel expenses.  LSL is an open-source project enabling the synchronized streaming of time series data coming from different devices, such as EEG amplifiers, audio, video, eye tracking, keyboards, etc. LSL features near real-time access to data streams, time-synchronization, networking and centralized collection. Key LSL developers and expert users have confirmed attendance. The workshop will provide a general introduction to LSL. We will present how LSL can be used for a multitude of different experimental setups, using a variety of experimental software, hardware and operating systems. In a hands-on session, participants can learn to stream data from their own hardware or play with hardware provided by us and external partners. We will name pitfalls and discuss how to test and ensure the best possible timing accuracy when recording multimodal data. We will also provide a best practice guide and present different use cases of LSL. We will also use the workshop to discuss future software and hardware developments. For further enquiries, please contact: martin.bleichner at uol.de Best, Martin Bleichner -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From o.jensen at bham.ac.uk Thu Jun 14 12:12:33 2018 From: o.jensen at bham.ac.uk (Ole Jensen) Date: Thu, 14 Jun 2018 11:12:33 +0100 Subject: [FieldTrip] Biomag2018/Competitions Message-ID: <2e0acea2-58f2-f9bb-a25d-48d984c07c07@bham.ac.uk> Dear all, I would like to point you to these two exciting competitions at Biomag2018: _ __Epilepsy data_ (Valentina Gumenyuk, Hudson Regional Hospital): https://sites.google.com/view/biomag-2018-challenge/home _OPMs_ (Gareth Barnes, UCL/Nottingham): http://www.fil.ion.ucl.ac.uk/~gbarnes/ Deadline for submitting is Aug 1, 2018 Please make interested colleagues/students aware! All the best, Ole -- Prof. Ole Jensen Centre for Human Brain Health, University of Birmingham http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Oleksiy.Bobrov at uni-konstanz.de Thu Jun 14 16:32:24 2018 From: Oleksiy.Bobrov at uni-konstanz.de (Oleksiy Bobrov) Date: Thu, 14 Jun 2018 16:32:24 +0200 Subject: [FieldTrip] Windows10: Missing dependent shared libraries: 'MSVCR100.dll' In-Reply-To: References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> Message-ID: <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> Please, help to fix the following error-exception with Windows10: Invalid MEX-file 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64': Missing dependent shared libraries: 'MSVCR100.dll' required by 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64'. The above error accuses every time,  we use "ft_compile_mex"-function. The 'MSVCR100.dll'-library is installed, and will be found. Here is our  configuration. 1. Windows 10 Prof. (fresh installed, up-to-date) 2. Matlab 2018a. 3. Visual C++ Redistributable für Visual Studio 2015 is installed. 4. Fieldtrip-20180603 is in use. Perhaps, would someone report a workable Windows10-runtime for Fieldtrip? Best regards Mr. Oleksiy Bobrov EEG-lab University of Konstanz Germany From r.oostenveld at donders.ru.nl Thu Jun 14 21:12:31 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 14 Jun 2018 21:12:31 +0200 Subject: [FieldTrip] Windows10: Missing dependent shared libraries: 'MSVCR100.dll' In-Reply-To: <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> Message-ID: <9ACD5476-F88C-4C6D-9CA3-46DBAE1DC4C1@donders.ru.nl> Please try copying the MSVCR100.dll file into the fieldtrip-20180603\src directory. best Robert > On 14 Jun 2018, at 16:32, Oleksiy Bobrov wrote: > > Please, help to fix the following error-exception with Windows10: > > Invalid MEX-file 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64': Missing dependent shared libraries: 'MSVCR100.dll' required by 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64'. > The above error accuses every time, we use "ft_compile_mex"-function. The 'MSVCR100.dll'-library is installed, and will be found. > Here is our configuration. > > 1. Windows 10 Prof. (fresh installed, up-to-date) > 2. Matlab 2018a. > 3. Visual C++ Redistributable für Visual Studio 2015 is installed. > 4. Fieldtrip-20180603 is in use. > > Perhaps, would someone report a workable Windows10-runtime for Fieldtrip? > > Best regards > Mr. Oleksiy Bobrov > EEG-lab > University of Konstanz > Germany > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From fanny.lachat at gmail.com Fri Jun 15 17:31:29 2018 From: fanny.lachat at gmail.com (Fanny) Date: Fri, 15 Jun 2018 17:31:29 +0200 Subject: [FieldTrip] preproc : electrodes missing and databrowser Message-ID: hello fieldtrip users, I have encounter some problems and I hope you can help me with those .... 1- I have EEG data : 128 channel -with 1 ref so 127 Channel and 2 EOG- so 129 channels at the end. All of my channels are label 'EEG'. When I do the preprocessing at the end I obtain 125 channels ... my 2 eog channel and channel O9 and O10 are gone ... I don t know how to fix that because of course I want to analyse the 129 channels. on the hdr ( from ft_preprocessing) : hdr.label = 129 and hdr.type = eeg for the 129 channel BUT the cfg.channel ( from ft_preprocessing) is 125 .... ---- My preprocessing : cfg = []; cfg.dataset = 'sujet12_250418000001.eeg'; % filter HP and DFT (50Hz) cfg.hpinstabilityfix = 'reduce'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.5; cfg.dftfilter = 'yes'; data_preprocv02 = ft_preprocessing (cfg) ----- 2- this there a difference between cfg.preproc.hpfilter and cfg.hpfilter ? ---- 3- when I do on my preprocessing data : cfg = []; cfg.method = 'average'; cfg.elec = elec; cfg.badchannel = {'AFp2'}; cfg.neighbours = neighbours; data_interp = ft_channelrepair(cfg,data_preproc); and then I want to vizualised my data_preproc again ft_databrowser (cfg,data_preproc) The signal of my data_preproc looks different that BEFORE the channelrepair ... does channelrepair change something to the data ... ? Thank you for your help ! Fanny -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.kayser at uni-bielefeld.de Tue Jun 19 12:03:27 2018 From: christoph.kayser at uni-bielefeld.de (Christoph Kayser) Date: Tue, 19 Jun 2018 12:03:27 +0200 Subject: [FieldTrip] PostDoc & PhD Position, Cognitive Neuroscience, Bielefeld, Germany Message-ID: <01ac01d407b4$c5174010$4f45c030$@uni-bielefeld.de> The Department of Cognitive Neuroscience at Bielefeld University, Germany, is advertising a 3-year Postdoctoral position, and a 3-year PhD position in auditory and multisensory neuroimaging studies. We are looking to fill two positions to complement our research on auditory and multisensory perception based on a combination of psychophysics, neuroimaging (EEG) and statistical modelling. The Department for Cognitive Neuroscience is dedicated to understanding the integration of sensory information in the brain. Our studies use state of the art EEG imaging, combined with eyetracking, psychophysical paradigms, and substantive quantitative data analysis to better understand when and how the brain transforms sensory information into a conscious percept. Further details about our research can be found here http://www.uni-bielefeld.de/biologie/cns/ The positions involve all aspects of study design, implementation, data collection, data analysis and the write up of results. Contributions to the supervision of student projects or the preparation of practical courses are also expected. Applicants should have a background in neuroscience, cognitive science, psychology, mathematics, or a relevant discipline. Applicants for the post-doc position should have a doctoral degree or equivalent title. We are especially interested in devotion to advanced quantitative data analysis including the capabilities to program or modify analysis code. The ideal applicant will have a strong analytical background and direct experience using MATLAB. Applicants should have enthusiasm, and a clear, demonstrable capacity for acquiring expertise in these techniques. Being fluent in German is considered a major advantage. The positions are funded for 3 years starting ideally around September 2018, at Germany salary grades TV-L E13 (100% for post-doc, 65% for PhD student). Application deadline is July 16th. Further information and the official advert in German can be found here: https://www.uni-bielefeld.de/Universitaet/Aktuelles/Stellenausschreibungen/A nzeigen/Wiss/wiss18107.pdf and here https://www.uni-bielefeld.de/Universitaet/Aktuelles/Stellenausschreibungen/A nzeigen/Wiss/wiss18106.pdf Interested candidates please contact Christoph Kayser -------------- next part -------------- An HTML attachment was scrubbed... URL: From Patrick.Rollo at uth.tmc.edu Tue Jun 19 16:51:22 2018 From: Patrick.Rollo at uth.tmc.edu (Rollo, Patrick) Date: Tue, 19 Jun 2018 14:51:22 +0000 Subject: [FieldTrip] Postdoctoral Research Positions Available Message-ID: <56528a0782fe44229fec0e99867c4997@uth.tmc.edu> Fieldtrip Users, Postdoctoral research positions are available in the lab of Dr. Nitin Tandon using ECoG and fMRI to evaluate psycholingustic models of reading and speech production and create network level representations of language. The advert is attached above, please reach out if you have any questions Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Tandon Lab POSTDOCTORAL RESEARCH POSITION-1.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 166222 bytes Desc: Tandon Lab POSTDOCTORAL RESEARCH POSITION-1.docx URL: From jedmeltzer at yahoo.com Wed Jun 20 20:55:02 2018 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Wed, 20 Jun 2018 18:55:02 +0000 (UTC) Subject: [FieldTrip] Postdoctoral Position Toronto : Treatment and Neuroimaging of Chronic Pain References: <473438130.2426355.1529520902566.ref@mail.yahoo.com> Message-ID: <473438130.2426355.1529520902566@mail.yahoo.com> A multidisciplinary research team in Toronto seeks a Postdoctoral Fellow to conduct research as part of the first large Canadian national grant - CIHR SPOR Chronic Pain Network - dedicated to conducting innovative research to improve the lives of many Canadians with chronic pain. The successful candidate will examine the effects and mechanisms associated with complementary therapy for managing chronic pain (i.e., Rhythmic Sensory Stimulation and Music) using behavioral and neuroimaging methods, including MEG and MRI. The successful candidate will collaborate with experts in various fields at renowned academic centres across the city, including the Toronto Academic Pain Medicine Institute at Women’s College Hospital, the Rotman Research Institute at Baycrest Health Sciences, and the Faculty of Music at University of Toronto. Preferred Start Date: Sept 1, 2018 (negotiable)Duration: 2-3 yearsSupervisor: Dr. Lee Bartel, Faculty of Music, University of TorontoCollaborating Supervisors:  Dr. Tania Di Rena, Women’s College Hospital & Dr. Jed Meltzer, Baycrest Health SciencesSalary: $50,000 per year Responsibilities will include: conducting literature reviews, preparation and submission of research ethics board applications, study design, recruiting participants, collecting data, organizing and maintaining research tracking databases, and managing all administrative aspects of conducting pilot studies and randomized clinical trials. The candidate will also have the opportunity to be an author on grant proposals, manuscripts, and poster abstracts, and to present their work at national and international conferences.  The deadline to apply is Friday July 27, 2018.   Please include the following information in your application: 1)    1-page cover letter with a concise description of why you are interested in this position and how your academic and professional background make you a strong candidate for this research opportunity2)    Curriculum vitae 3)    Your unofficial transcript Submissions that are missing any components of this application will not be considered. You will be required to conduct research onsite at the Women’s College Hospital and Baycrest Health Sciences. Preference will be given to individuals who have training in neuroimaging, behavioural, and/or cognitive neuroscience, psychology or related research focused disciplines. Given the proposed mechanisms of Rhythmic Sensory Stimulation, research interests in rhythmic and oscillatory neural activity are especially important. The normal hours of work are 40 hours per week for a full-time postdoctoral fellow  recognizing that the needs of the employee’s research and training and the needs of the supervisor’s research program may require flexibility in the performance of the employee’s duties and hours of work. Employment as a Postdoctoral Fellow at the University of Toronto is covered by the terms of the CUPE 3902 Unit 5 Collective Agreement. This job is posted in accordance with the CUPE 3902 Unit 5 Collective Agreement. The University of Toronto is strongly committed to diversity within its community and especially welcomes applications from racialized persons / persons of colour, women, Indigenous / Aboriginal People of North America, persons with disabilities, LGBTQ persons, and others who may contribute to the further diversification of ideas. If you are interested in this position please send your application, preferably combined in one pdf document, to lbartel at chass.utoronto.ca Interviews will commence immediately following the application deadline.     -------------- next part -------------- An HTML attachment was scrubbed... URL: From krugliakova.es at gmail.com Thu Jun 21 11:23:32 2018 From: krugliakova.es at gmail.com (Elena Krugliakova) Date: Thu, 21 Jun 2018 11:23:32 +0200 Subject: [FieldTrip] flipped sourceplot Message-ID: Dear FieldTrip users, I am trying to plot my source localisation results on parcelled brain following this tutorial: http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_result_in_parceled_brain_space Similarly to the figure in tutorial I get plot with inverted left-right axis (left appears on the right and right on the left). I guess this is related to the transformation matrix of* template_mri* that is used for interpolation of source and atlas. Is there some way to flip left and right on the sourceplot? Thanks! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 21 11:43:06 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 21 Jun 2018 09:43:06 +0000 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Hi Elena, I guess that any graphics editing program (like adobe illustrator, or even windows paint) can flip the figure for you. :) If you want to do this prior to generating the figure, you can cal ft_volumereslice on your anatomical image. Provided the coordinate system attached to the volume is right handed, right will be right and left will be left, after reslicing. Best wishes, Jan-Mathijs On 21 Jun 2018, at 11:23, Elena Krugliakova > wrote: Dear FieldTrip users, I am trying to plot my source localisation results on parcelled brain following this tutorial: http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_result_in_parceled_brain_space Similarly to the figure in tutorial I get plot with inverted left-right axis (left appears on the right and right on the left). I guess this is related to the transformation matrix of template_mri that is used for interpolation of source and atlas. Is there some way to flip left and right on the sourceplot? Thanks! Elena _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From krugliakova.es at gmail.com Thu Jun 21 15:17:47 2018 From: krugliakova.es at gmail.com (Elena Krugliakova) Date: Thu, 21 Jun 2018 15:17:47 +0200 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Dear Jan-Mathijs, Thank you for your answer, it helped! But additionally I needed to interpolate atlas on the resliced mri, otherwise ft_sourceparcellate gave me an error "*the source positions are not consistent with the parcellation*". Best, Elena On 21 June 2018 at 11:43, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Elena, > > I guess that any graphics editing program (like adobe illustrator, or even > windows paint) can flip the figure for you. :) > If you want to do this prior to generating the figure, you can cal > ft_volumereslice on your anatomical image. Provided the coordinate system > attached to the volume is right handed, right will be right and left will > be left, after reslicing. > > Best wishes, > Jan-Mathijs > > On 21 Jun 2018, at 11:23, Elena Krugliakova > wrote: > > Dear FieldTrip users, > > I am trying to plot my source localisation results on parcelled brain > following this tutorial: > http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_ > the_result_in_parceled_brain_space > > Similarly to the figure in tutorial I get plot with inverted left-right > axis (left appears on the right and right on the left). I guess this is > related to the transformation matrix of* template_mri* that is used for > interpolation of source and atlas. > > Is there some way to flip left and right on the sourceplot? > > Thanks! > > Elena > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xiew1202 at gmail.com Thu Jun 21 15:49:36 2018 From: xiew1202 at gmail.com (Xie Wanze) Date: Thu, 21 Jun 2018 09:49:36 -0400 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Hi Elena, I had the same issue when I use the sour interpolation function in Fieldtrip. This is what I did: outsource.pos(:,1) = outsource.pos(:,1)*-1; My images are in the SPM system with the AC's coordinates being [0 0 0] and the sagittal (X) coordinate of the PC being 0 too. However, it seems that the ft_sourceinterpolate flips my source images occasionally (not for all the data). I did not spend too much time on it, so I still have no idea why the function does that. Best, Wanze 2018-06-21 9:17 GMT-04:00 Elena Krugliakova : > Dear Jan-Mathijs, > > Thank you for your answer, it helped! > > But additionally I needed to interpolate atlas on the resliced mri, > otherwise ft_sourceparcellate gave me an error "*the source positions are > not consistent with the parcellation*". > > Best, > Elena > > On 21 June 2018 at 11:43, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Elena, >> >> I guess that any graphics editing program (like adobe illustrator, or >> even windows paint) can flip the figure for you. :) >> If you want to do this prior to generating the figure, you can cal >> ft_volumereslice on your anatomical image. Provided the coordinate system >> attached to the volume is right handed, right will be right and left will >> be left, after reslicing. >> >> Best wishes, >> Jan-Mathijs >> >> On 21 Jun 2018, at 11:23, Elena Krugliakova >> wrote: >> >> Dear FieldTrip users, >> >> I am trying to plot my source localisation results on parcelled brain >> following this tutorial: >> http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_ >> result_in_parceled_brain_space >> >> Similarly to the figure in tutorial I get plot with inverted left-right >> axis (left appears on the right and right on the left). I guess this is >> related to the transformation matrix of* template_mri* that is used for >> interpolation of source and atlas. >> >> Is there some way to flip left and right on the sourceplot? >> >> Thanks! >> >> Elena >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From o.jensen at bham.ac.uk Fri Jun 22 12:33:34 2018 From: o.jensen at bham.ac.uk (Ole Jensen) Date: Fri, 22 Jun 2018 11:33:34 +0100 Subject: [FieldTrip] Postdoc position/Nerwcastle Message-ID: Dear all, Below an exciting postdoc opportunity. All the best, Ole PS: Also encourage your MEG colleagues to sign up at https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=BIOMAGCENTRAL&A=1_/* */_/*==========================*/_/* */_ */_Post Doctoral Position:_/**Neuronal mechanisms of cognition: multisensory convergence for learning and memory* Research Assistant or Associate position** *Main Supervisor:*Professor Christopher Petkov *Duration:*The position is for 1 with extensions possible *Closing date: *Applications will be evaluated until the closing date:*/_August 21st, 2018_/* A post-doctoral position is available for a European Research Council funded program grant on neuronal mechanisms of cognition: multisensory convergence for learning and memory. The scientific work is a collaboration between Newcastle University Medical School, UK (Professors Christopher Petkov and Timothy Griffiths), the University of Iowa, USA (Department of Neurosurgery, led by Professor Matthew Howard III) and the University of Birmingham, UK (Profs. Ole Jensen and Simon Hanslmayr). The work will involve professionally conducted neurophysiological studies with primate models at Newcastle University. This work will be the primary focus, but the laboratory also works with neurosurgical patients at the University of Iowa and amnesic patients in Newcastle University which will complement the work in animal models. The successful candidate will work on cutting edge behavioural, fMRI and electrophysiological experiments in nonhuman primates to study neural oscillations, cognition and multisensory integration using innovative learning and memory tasks. Some testing of cognitively impaired patients or neural recordings in patients being monitored for surgery would be possible and will help to translate to humans the mechanistic information that requires the work with animals. Cutting edge behavioural, neuroimaging and neurophysiological recording studies will be conducted, including neural system perturbation by stimulation or inactivation to establish causal relationships crucial for learning and memory. The successful candidates will work in the laboratory of Prof. Christopher Petkov at Newcastle University Medical School in Newcastle upon Tyne, United Kingdom. The ideal candidate will possess a PhD in neurobiology, or a related field, have a strong track record and experience with electrophysiological methods (e.g., EEG, MEG, extracellular recordings) or methods of stimulating the brain (e.g., optogenetics, TMS). Evidence of strong computational and technical skills is desired. Being able to work independently and professionally and collegially as part of a team is a must. A PhD in neuroscience or a related field is required for appointment as a Research Associate, but we can also consider strong candidates close to completing their PhD. We seek an individual who already has evidence as a strong scientist, with strong technical and computing skills and a publication track record with demonstrated writing skills. Expertise involving behavioural and neurophysiological work in humans (e.g., EEG/MEG) or related techniques in other animals are strongly recommended. Financial support is available for at least 1 year, with extensions possible. *Value of the Award:*The salary is commensurate with post-doctoral experience. International applicants are encouraged to apply but will need to have obtained permission to work in the UK. Salary is paid in GBP and ranges from £29,301 - £33,183, which is highly competitive given the low cost of living at Newcastle in the UK. *How to Apply: *Please submit a covering letter, full CV and the contact information of at least three individuals who can provide professional references. The covering letter should state how your interests and experience relate to the project and the laboratory work. The application documents can be submitted to chris.petkov at ncl.ac.uk , please include ‘ERC Post-Doctoral Position’ in the subject field. *Further Information: *To find out more about the position please contact chris.petkov at ncl.ac.uk or browse the laboratory website: http://www.staff.ncl.ac.uk/lcnncl. University of Iowa Human Brain Research Laboratory: http://www.healthcare.uiowa.edu/Labs/hbrl-neurosurgery/index.html. Website of Prof. Matthew Howard III, MD: http://www.medicine.uiowa.edu/dept_primary_apr.aspx?appointment=Neurosurgery&id=howardma. Website of Ole Jensen: . Website of Simon Hanslmayr: . -- Prof. Ole Jensen Centre for Human Brain Health, University of Birmingham http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.Hanslmayr at bham.ac.uk Fri Jun 22 14:17:54 2018 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Fri, 22 Jun 2018 12:17:54 +0000 Subject: [FieldTrip] Postdoc Position available at University of Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CED876D2B1@EX12.adf.bham.ac.uk> Dear Fieldtrippers, We have an exciting opportunity within the Cognition and Oscillations Lab at the University of Birmingham. We are hiring a grade 7 postdoc to start in October 2018 - the deadline for applications is Sunday 1st July. Applications are invited for a full-time Postdoctoral Research Fellow to work within the School of Psychology, University of Birmingham. The successful candidate will work on a 3-year project funded within an ERC Consolidator Grant to investigate the role of brain oscillations for human episodic memory (lab of Dr Simon Hanslmayr). The methodological focus of the project is on intracranial single-unit recordings in human epilepsy patients and computational modelling of oscillations in memory networks. The postdoctoral researcher will be involved in all stages of designing and conducting experiments, analysing electrophysiological data, computational modelling. The postdoctoral researcher will be expected to prepare the results for academic publication, to present at national and international academic conferences, and to engage in public activities. For more info, please have a look at the job advert: https://atsv7.wcn.co.uk/search_engine/jobs.cgi?amNvZGU9MTcyNzQyMSZ2dF90ZW1wbGF0ZT03Njcmb3duZXI9NTAzMjUyMSZvd25lcnR5cGU9ZmFpciZicmFuZF9pZD0wJnZhY2Zpcm0udmFjdGl0bGU9NTUyMDQmcG9zdGluZ19jb2RlPTExNw%3D%3D=&jcode=1727421&vt_template=767&owner=5032521&ownertype=fair&brand_id=0&vacfirm.vactitle=55204&posting_code=117 If you have any queries regarding this post, please contact either myself or Sophie Watson (S.Watson.2 at bham.ac.uk). Kind regards, Simon Dr. Simon Hanslmayr Reader in Cognitive Neuroscience Royal Society Wolfson Research Merit Award Holder School of Psychology Hills Building 2.37 University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.memorybham.com/people/#/simon-hanslmayr/ [http://www.nature.com/content/sr/ebm/1248_2014_Branded_Sig_460x80_v1.gif] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 8560 bytes Desc: image001.gif URL: From i.simanova at donders.ru.nl Tue Jun 26 17:16:40 2018 From: i.simanova at donders.ru.nl (Simanova, I. (Irina)) Date: Tue, 26 Jun 2018 15:16:40 +0000 Subject: [FieldTrip] low-pass filtering Message-ID: Dear experts, We recently submitted a paper where we use a cluster permutation analysis of ERFs (testing conditions exchangeability). The EEG was sampled at 500 Hz and low-pass filtered at 40 Hz during preprocessing. One of the reviewers has indicated that using this temporal resolution for the analysis seems unnecessary given the low-pass filter, which makes each time point not independent due to smoothing. He further asks: "Do all key significant components replicate if the analysis is performed using a mean amplitude that is averaged for larger time bins (25 ms bins) instead of individual time points?" I understand that when doing parametric analysis one might want to reduce the number of comparisons by averaging ERF samples over time bins. But here we solve the MCP with the cluster analysis. But it also seems like the reviewer is concerned about non-independecy in the data resulting from low-pass filtering. I wanted to check with you: can smoothing time-series indeed compromise the cluster-based analysis (e.g. affect the cluster size)? Thank you, Kind regards, Irina -------------- next part -------------- An HTML attachment was scrubbed... URL: From Matthias.Franken at UGent.be Wed Jun 27 11:57:18 2018 From: Matthias.Franken at UGent.be (Matthias Franken) Date: Wed, 27 Jun 2018 09:57:18 +0000 Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: <86f83318618a4a9d8cdec977e8ede658@xmail303.UGent.be> Hi Irina, I’ve been wondering about a similar question a while ago. As far as I can see, I think it can affect cluster size, but without compromising the permutation test. More smoothing should (I guess) lead to larger clusters, but this should affect both the observed clusters as well as the clusters in your premutation distribution (after having permuted data labels). So I guess the comparison should be unaffected. ________________________________________ Matthias Franken postdoctoral researcher Experimental Psychology Department Ghent University From: Simanova, I. (Irina) Sent: Tuesday, 26 June 2018 18:44 To: fieldtrip at science.ru.nl Subject: [FieldTrip] low-pass filtering Dear experts, We recently submitted a paper where we use a cluster permutation analysis of ERFs (testing conditions exchangeability). The EEG was sampled at 500 Hz and low-pass filtered at 40 Hz during preprocessing. One of the reviewers has indicated that using this temporal resolution for the analysis seems unnecessary given the low-pass filter, which makes each time point not independent due to smoothing. He further asks: "Do all key significant components replicate if the analysis is performed using a mean amplitude that is averaged for larger time bins (25 ms bins) instead of individual time points?" I understand that when doing parametric analysis one might want to reduce the number of comparisons by averaging ERF samples over time bins. But here we solve the MCP with the cluster analysis. But it also seems like the reviewer is concerned about non-independecy in the data resulting from low-pass filtering. I wanted to check with you: can smoothing time-series indeed compromise the cluster-based analysis (e.g. affect the cluster size)? Thank you, Kind regards, Irina -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Wed Jun 27 12:09:43 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Wed, 27 Jun 2018 12:09:43 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: Hi Irina, On the one hand, the smoothing can indeed influence the cluster size. On the other hand, the "type" of smoothing will influence how sensitive are you to detect the potential differences too. I would try to illustrate the reviewer the trade off between the type of differences you may have (transient vs sustained; regarding the temporal domain) and the filter type that can be more appropriate to detect the differences to justify your pipeline. I have no idea about the type of ERF you're studying but I hope the example is illustrative enough Look at the attached screenshot. In the first column, I simulated a transient ERF with added noise (code below) and I ran the non-parametric cluster-based permutation test that showed some significant and discontinuous differences. The second column represents the same data but with a lowpass filter (40 Hz) and I find longer significant clusters. If you look at the filtered ERFs, the structure is very similar to the noisy, unfiltered version. The third column is what I understand is requested by the reviewer. Suddenly, no significant differences are found because the ground truth simulated difference was too short and weak to survive the 0.25ms averaging. In case of a long and sustained ERF, may be the three plots would had been more congruent. I guess that the permutation part of the cluster-based nonparametric test will take into account the non-independecy in the data resulting from low-pass filtering. This non-independency will be the same for the original and the permuted surrogates. I hope that helps! Diego %--------------------------------- fsample = 600; sigma = 0.5; ferf = 6.0; Aerf1 = -0.7; Aerf2 = -0.2; tau1 = 0.1; tau2 = 0.05; t = -0.8:1/fsample:0.8; signoise = 0.2; t0 = 0.05; t0idx = nearest(t,t0); ntrials = 100; data1.label{1}='Oz'; data2.label{1}='Oz'; for k=1:ntrials; freq1 = normrnd(ferf,sigma); freq2 = normrnd(ferf,sigma); for tk = 1:size(t,2); phi1 = random('uniform',0,pi,1,1); phi2 = random('uniform',0,pi,1,1); if tk > t0idx; Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * sin(2*pi*freq1*(t(1,tk)-t0)+phi1); Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * sin(2*pi*freq2*(t(1,tk)-t0)+phi2); end Snoise1 = signoise.*randn(size(t)); Snoise2 = signoise.*randn(size(t)); end data1.trial{k}(1,:) = Serf1 + Snoise1; data1.time{k} = t; data2.trial{k}(1,:) = Serf2 + Snoise2; data2.time{k} = t; end cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1); timelock2 = ft_timelockanalysis(cfg, data2); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); legend('condition 1', 'condition 2', 'difference'); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('raw data: unfiltered') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% low pass 40 Hz cfg = []; cfg.lpfilter = 'yes'; cfg.lpfreq = 40; data1_lp40 = ft_preprocessing(cfg, data1); data2_lp40 = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_lp40); timelock2 = ft_timelockanalysis(cfg, data2_lp40); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('lowpass filtering 40Hz') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% boxcar 0.25ms cfg = []; cfg.boxcar = 0.25; data1_box = ft_preprocessing(cfg, data1); data2_box = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_box); timelock2 = ft_timelockanalysis(cfg, data2_box); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('boxcar filter 0.25s') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); On 26 June 2018 at 17:16, Simanova, I. (Irina) wrote: > Dear experts, > > We recently submitted a paper where we use a cluster permutation analysis > of ERFs (testing conditions exchangeability). The EEG was sampled at 500 > Hz and low-pass filtered at 40 Hz during preprocessing. One of the > reviewers has indicated that using this temporal resolution for the > analysis seems unnecessary given the low-pass filter, which makes each time > point not independent due to smoothing. He further asks: "Do all key > significant components replicate if the analysis is performed using a mean > amplitude that is averaged for larger time bins (25 ms bins) instead of > individual time points?" > > I understand that when doing parametric analysis one might want to reduce > the number of comparisons by averaging ERF samples over time bins. But here > we solve the MCP with the cluster analysis. But it also seems like the > reviewer is concerned about non-independecy in the data resulting from > low-pass filtering. I wanted to check with you: can smoothing time-series > indeed compromise the cluster-based analysis (e.g. affect the cluster size)? > > Thank you, > Kind regards, > Irina > > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2018-06-27 11-39-54.png Type: image/png Size: 87542 bytes Desc: not available URL: From maess at cbs.mpg.de Wed Jun 27 13:58:26 2018 From: maess at cbs.mpg.de (Burkhard Maess) Date: Wed, 27 Jun 2018 13:58:26 +0200 (CEST) Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> Hi Irina and Diego, I am also expecting that the permutation test is rather insensitive to the bandwidth of the underlying data. I only would like to comment on the resampling issue: as a rule of thumb, often a third of the sampling frequency is assumed to represent the available bandwidth. With this ratio - the 500Hz sampled data represents about 160Hz bandwidth. Applying a lowpass of 40Hz (of similar steepness as the one used during the recording) will divide the bandwidth by four. Consequently, dividing the sampling rate by 4 is appropriate: 125Hz, which corresponds to delta-t of 8ms. The suggested 25ms by the reviewer are related to the 40Hz, but averaging over the 25ms would constitute an additional lowpass of poor quality. I would therefore recommend to rerun the cluster analysis using subsampled data. In principle, you may retrieve four different sets from the subsampling routine by taking either always the first, the second, the third or the forth sample of the 8ms interval. However, the results of the cluster analysis should be almost identical. best wishes, Burkhard -- Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, D-04301 Leipzig, Germany phone/fax: +49 341 9940-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- | From: "Diego Lozano-Soldevilla" | To: "FieldTrip discussion list" | Sent: Wednesday, 27 June, 2018 12:09:43 | Subject: Re: [FieldTrip] low-pass filtering | Hi Irina, | | On the one hand, the smoothing can indeed influence the cluster size. On the | other hand, the "type" of smoothing will influence how sensitive are you to | detect the potential differences too. I would try to illustrate the reviewer | the trade off between the type of differences you may have (transient vs | sustained; regarding the temporal domain) and the filter type that can be more | appropriate to detect the differences to justify your pipeline. I have no idea | about the type of ERF you're studying but I hope the example is illustrative | enough | | Look at the attached screenshot. In the first column, I simulated a transient | ERF with added noise (code below) and I ran the non-parametric cluster-based | permutation test that showed some significant and discontinuous differences. | The second column represents the same data but with a lowpass filter (40 Hz) | and I find longer significant clusters. If you look at the filtered ERFs, the | structure is very similar to the noisy, unfiltered version. The third column is | what I understand is requested by the reviewer. Suddenly, no significant | differences are found because the ground truth simulated difference was too | short and weak to survive the 0.25ms averaging. In case of a long and sustained | ERF, may be the three plots would had been more congruent. | | I guess that the permutation part of the cluster-based nonparametric test will | take into account the non-independecy in the data resulting from low-pass | filtering. This non-independency will be the same for the original and the | permuted surrogates. | | I hope that helps! | | Diego | | | | %--------------------------------- | | fsample = 600; | sigma = 0.5; | ferf = 6.0; | Aerf1 = -0.7; | Aerf2 = -0.2; | tau1 = 0.1; | tau2 = 0.05; | t = -0.8:1/fsample:0.8; | signoise = 0.2; | t0 = 0.05; | t0idx = nearest(t,t0); | ntrials = 100; | | data1.label{1}='Oz'; | data2.label{1}='Oz'; | | for k=1:ntrials; | freq1 = normrnd(ferf,sigma); | freq2 = normrnd(ferf,sigma); | for tk = 1:size(t,2); | phi1 = random('uniform',0,pi,1,1); | phi2 = random('uniform',0,pi,1,1); | if tk > t0idx; | Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * | sin(2*pi*freq1*(t(1,tk)-t0)+phi1); | Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * | sin(2*pi*freq2*(t(1,tk)-t0)+phi2); | end | Snoise1 = signoise.*randn(size(t)); | Snoise2 = signoise.*randn(size(t)); | end | data1.trial{k}(1,:) = Serf1 + Snoise1; | data1.time{k} = t; | data2.trial{k}(1,:) = Serf2 + Snoise2; | data2.time{k} = t; | end | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1); | timelock2 = ft_timelockanalysis(cfg, data2); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | legend('condition 1', 'condition 2', 'difference'); | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('raw data: unfiltered') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | %% low pass 40 Hz | cfg = []; | cfg.lpfilter = 'yes'; | cfg.lpfreq = 40; | data1_lp40 = ft_preprocessing(cfg, data1); | data2_lp40 = ft_preprocessing(cfg, data2); | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1_lp40); | timelock2 = ft_timelockanalysis(cfg, data2_lp40); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('lowpass filtering 40Hz') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | %% boxcar 0.25ms | cfg = []; | cfg.boxcar = 0.25; | data1_box = ft_preprocessing(cfg, data1); | data2_box = ft_preprocessing(cfg, data2); | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1_box); | timelock2 = ft_timelockanalysis(cfg, data2_box); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('boxcar filter 0.25s') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | | | | On 26 June 2018 at 17:16, Simanova, I. (Irina) < i.simanova at donders.ru.nl > | wrote: | | | | Dear experts, | | We recently submitted a paper where we use a cluster permutation analysis of | ERFs (testing conditions exchangeability) . The EEG was sampled at 500 Hz and | low-pass filtered at 40 Hz during preprocessing. One of the reviewers has | indicated that u sing this temporal resolution for the analysis seems | unnecessary given the low-pass filter, which makes each time point not | independent due to smoothing. He further asks: " Do all key significant | components replicate if the analysis is performed using a mean amplitude that | is averaged for larger time bins (25 ms bins) instead of individual time | points?" | | I understand that when doing parametric analysis one might want to reduce the | number of comparisons by averaging ERF samples over time bins. But here we | solve the MCP with the cluster analysis. But it also seems like the reviewer is | concerned about non-independecy in the data resulting from low-pass filtering. | I wanted to check with you: can smoothing time-series indeed compromise the | cluster-based analysis (e.g. affect the cluster size)? | | Thank you, | Kind regards, | Irina | | | | | _______________________________________________ | fieldtrip mailing list | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip | https://doi.org/10.1371/journal.pcbi.1002202 | | | _______________________________________________ | fieldtrip mailing list | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip | https://doi.org/10.1371/journal.pcbi.1002202 From dlozanosoldevilla at gmail.com Wed Jun 27 15:29:53 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Wed, 27 Jun 2018 15:29:53 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> References: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> Message-ID: Dear Burkhard, Thank you very much for your input. I totally missed the bandwidth point. I rerun the cluster based comparing the 500hz lowpass filtered at 40hz and the downsampled data to 125hz (see code below). As you suggested, the cluster analysis output is almost identical. Best, Diego %------------------------------- fsample = 500; sigma = 0.5; ferf = 6.0; Aerf1 = -0.7; Aerf2 = -0.2; tau1 = 0.1; tau2 = 0.05; t = -0.8:1/fsample:0.8; signoise = 0.2; t0 = 0.05; t0idx = nearest(t,t0); ntrials = 100; data1.label{1}='Oz'; data2.label{1}='Oz'; for k=1:ntrials; freq1 = normrnd(ferf,sigma); freq2 = normrnd(ferf,sigma); for tk = 1:size(t,2); phi1 = random('uniform',0,pi,1,1); phi2 = random('uniform',0,pi,1,1); if tk > t0idx; Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * sin(2*pi*freq1*(t(1,tk)-t0)+phi1); Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * sin(2*pi*freq2*(t(1,tk)-t0)+phi2); end Snoise1 = signoise.*randn(size(t)); Snoise2 = signoise.*randn(size(t)); end data1.trial{k}(1,:) = Serf1 + Snoise1; data1.time{k} = t; data2.trial{k}(1,:) = Serf2 + Snoise2; data2.time{k} = t; end cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1); timelock2 = ft_timelockanalysis(cfg, data2); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); legend('condition 1', 'condition 2', 'difference'); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('raw data: unfiltered') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% low pass 40 Hz cfg = []; cfg.lpfilter = 'yes'; cfg.lpfreq = 40; data1_lp40 = ft_preprocessing(cfg, data1); data2_lp40 = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_lp40); timelock2 = ft_timelockanalysis(cfg, data2_lp40); diff_lp40 = timelock1; diff_lp40.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff_lp40.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat_lp40 = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat_lp40.time, stat_lp40.stat); ylabel('t-value'); title('lowpass filtering 40Hz') subplot(4,1,2); plot(diff_lp40.time, diff_lp40.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat_lp40.time, stat_lp40.prob); ylabel('prob'); subplot(4,1,4); plot(stat_lp40.time, stat_lp40.mask); ylabel('significant'); %% boxcar 0.25ms cfg = []; cfg.boxcar = 0.25; data1_box = ft_preprocessing(cfg, data1); data2_box = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_box); timelock2 = ft_timelockanalysis(cfg, data2_box); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('boxcar filter 0.25s') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% downsample the data cfg = []; cfg.resamplefs = 125; cfg.demean = 'yes'; data1_res = ft_resampledata(cfg, data1); data2_res = ft_resampledata(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_res); timelock2 = ft_timelockanalysis(cfg, data2_res); diff_res = timelock1; diff_res.avg = timelock1.avg-timelock2.avg; figure;plot(diff_res.time,[timelock1.avg' timelock2.avg' diff_res.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat_res = ft_timelockstatistics(cfg, timelock1, timelock2); figure; hold all;subplot(4,1,1); plot(stat_res.time, stat_res.stat); ylabel('t-value'); title('downsample to 125 Hz') hold all;subplot(4,1,2); plot(diff_res.time, diff_res.avg); ylabel('avg1-avg2 (uV)'); hold all;subplot(4,1,3); semilogy(stat_res.time, stat_res.prob); ylabel('prob'); subplot(4,1,4); plot(stat_res.time, stat_res.mask); ylabel('significant'); %% all in one plot figure; subplot(4,1,1); plotyy(stat_res.time, stat_res.stat, stat_lp40.time, stat_lp40.stat); ylabel('t-value'); subplot(4,1,2); plotyy(diff_res.time, diff_res.avg, diff_lp40.time, diff_lp40.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat_res.time, stat_res.prob); hold all;semilogy(stat_lp40.time, stat_lp40.prob); ylabel('prob'); subplot(4,1,4); plotyy(stat_res.time, stat_res.mask,stat_lp40.time, stat_lp40.mask); ylabel('significant'); legend('downsampled 125hz','500hz + lpfilt 40hz') On 27 June 2018 at 13:58, Burkhard Maess wrote: > Hi Irina and Diego, > > I am also expecting that the permutation test is rather insensitive to the > bandwidth of the underlying data. I only would like to comment on the > resampling issue: as a rule of thumb, often a third of the sampling > frequency is assumed to represent the available bandwidth. With this ratio > - the 500Hz sampled data represents about 160Hz bandwidth. Applying a > lowpass of 40Hz (of similar steepness as the one used during the recording) > will divide the bandwidth by four. Consequently, dividing the sampling rate > by 4 is appropriate: 125Hz, which corresponds to delta-t of 8ms. The > suggested 25ms by the reviewer are related to the 40Hz, but averaging over > the 25ms would constitute an additional lowpass of poor quality. > I would therefore recommend to rerun the cluster analysis using subsampled > data. In principle, you may retrieve four different sets from the > subsampling routine by taking either always the first, the second, the > third or the forth sample of the 8ms interval. However, the results of the > cluster analysis should be almost identical. > > best wishes, > Burkhard > > > > -- > Dr. Burkhard Maess > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstr. 1a, D-04301 Leipzig, Germany > phone/fax: +49 341 9940-2526/-2511 mail: maess 'at' cbs.mpg.de, > http://www.cbs.mpg.de > > ----- Original Message ----- > | From: "Diego Lozano-Soldevilla" > | To: "FieldTrip discussion list" > | Sent: Wednesday, 27 June, 2018 12:09:43 > | Subject: Re: [FieldTrip] low-pass filtering > > | Hi Irina, > | > | On the one hand, the smoothing can indeed influence the cluster size. On > the > | other hand, the "type" of smoothing will influence how sensitive are you > to > | detect the potential differences too. I would try to illustrate the > reviewer > | the trade off between the type of differences you may have (transient vs > | sustained; regarding the temporal domain) and the filter type that can > be more > | appropriate to detect the differences to justify your pipeline. I have > no idea > | about the type of ERF you're studying but I hope the example is > illustrative > | enough > | > | Look at the attached screenshot. In the first column, I simulated a > transient > | ERF with added noise (code below) and I ran the non-parametric > cluster-based > | permutation test that showed some significant and discontinuous > differences. > | The second column represents the same data but with a lowpass filter (40 > Hz) > | and I find longer significant clusters. If you look at the filtered > ERFs, the > | structure is very similar to the noisy, unfiltered version. The third > column is > | what I understand is requested by the reviewer. Suddenly, no significant > | differences are found because the ground truth simulated difference was > too > | short and weak to survive the 0.25ms averaging. In case of a long and > sustained > | ERF, may be the three plots would had been more congruent. > | > | I guess that the permutation part of the cluster-based nonparametric > test will > | take into account the non-independecy in the data resulting from low-pass > | filtering. This non-independency will be the same for the original and > the > | permuted surrogates. > | > | I hope that helps! > | > | Diego > | > | > | > | %--------------------------------- > | > | fsample = 600; > | sigma = 0.5; > | ferf = 6.0; > | Aerf1 = -0.7; > | Aerf2 = -0.2; > | tau1 = 0.1; > | tau2 = 0.05; > | t = -0.8:1/fsample:0.8; > | signoise = 0.2; > | t0 = 0.05; > | t0idx = nearest(t,t0); > | ntrials = 100; > | > | data1.label{1}='Oz'; > | data2.label{1}='Oz'; > | > | for k=1:ntrials; > | freq1 = normrnd(ferf,sigma); > | freq2 = normrnd(ferf,sigma); > | for tk = 1:size(t,2); > | phi1 = random('uniform',0,pi,1,1); > | phi2 = random('uniform',0,pi,1,1); > | if tk > t0idx; > | Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * > | sin(2*pi*freq1*(t(1,tk)-t0)+phi1); > | Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * > | sin(2*pi*freq2*(t(1,tk)-t0)+phi2); > | end > | Snoise1 = signoise.*randn(size(t)); > | Snoise2 = signoise.*randn(size(t)); > | end > | data1.trial{k}(1,:) = Serf1 + Snoise1; > | data1.time{k} = t; > | data2.trial{k}(1,:) = Serf2 + Snoise2; > | data2.time{k} = t; > | end > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1); > | timelock2 = ft_timelockanalysis(cfg, data2); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | legend('condition 1', 'condition 2', 'difference'); > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('raw data: unfiltered') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | %% low pass 40 Hz > | cfg = []; > | cfg.lpfilter = 'yes'; > | cfg.lpfreq = 40; > | data1_lp40 = ft_preprocessing(cfg, data1); > | data2_lp40 = ft_preprocessing(cfg, data2); > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1_lp40); > | timelock2 = ft_timelockanalysis(cfg, data2_lp40); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('lowpass filtering 40Hz') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | %% boxcar 0.25ms > | cfg = []; > | cfg.boxcar = 0.25; > | data1_box = ft_preprocessing(cfg, data1); > | data2_box = ft_preprocessing(cfg, data2); > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1_box); > | timelock2 = ft_timelockanalysis(cfg, data2_box); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('boxcar filter 0.25s') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | > | > | > | On 26 June 2018 at 17:16, Simanova, I. (Irina) < > i.simanova at donders.ru.nl > > | wrote: > | > | > | > | Dear experts, > | > | We recently submitted a paper where we use a cluster permutation > analysis of > | ERFs (testing conditions exchangeability) . The EEG was sampled at 500 > Hz and > | low-pass filtered at 40 Hz during preprocessing. One of the reviewers has > | indicated that u sing this temporal resolution for the analysis seems > | unnecessary given the low-pass filter, which makes each time point not > | independent due to smoothing. He further asks: " Do all key significant > | components replicate if the analysis is performed using a mean amplitude > that > | is averaged for larger time bins (25 ms bins) instead of individual time > | points?" > | > | I understand that when doing parametric analysis one might want to > reduce the > | number of comparisons by averaging ERF samples over time bins. But here > we > | solve the MCP with the cluster analysis. But it also seems like the > reviewer is > | concerned about non-independecy in the data resulting from low-pass > filtering. > | I wanted to check with you: can smoothing time-series indeed compromise > the > | cluster-based analysis (e.g. affect the cluster size)? > | > | Thank you, > | Kind regards, > | Irina > | > | > | > | > | _______________________________________________ > | fieldtrip mailing list > | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > | https://doi.org/10.1371/journal.pcbi.1002202 > | > | > | _______________________________________________ > | fieldtrip mailing list > | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > | https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2018-06-27 15-11-38.png Type: image/png Size: 58548 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: untitled.png Type: image/png Size: 13832 bytes Desc: not available URL: From i.simanova at donders.ru.nl Thu Jun 28 11:46:12 2018 From: i.simanova at donders.ru.nl (Simanova, I. (Irina)) Date: Thu, 28 Jun 2018 09:46:12 +0000 Subject: [FieldTrip] low-pass filtering Message-ID: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> Hi Diego, Hi Matthias, Dear Burkhard, Thank you very much for your replies, they are very helpful. My intuition was that the permutation test should not be affected by the filtering, because any non-independecy would be identical in the real and permuted data. And I would also expect that averaging over 25 ms reduces the data and removes all effects. The simulation (thank you, Diego), and the comment on the bandwidth (thanks Burkhard) make it really clear. We will indeed rerun the analysis on downsampled data to 125hz, and I do not expect to see much difference from the original analysis, same as in Diego’s simulation. Best, Irina From dlozanosoldevilla at gmail.com Thu Jun 28 11:53:09 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Thu, 28 Jun 2018 11:53:09 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> References: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> Message-ID: You're welcome Irina! Best wishes for the review process! Cheers, Diego On 28 June 2018 at 11:46, Simanova, I. (Irina) wrote: > Hi Diego, Hi Matthias, Dear Burkhard, > > Thank you very much for your replies, they are very helpful. > > My intuition was that the permutation test should not be affected by the > filtering, because any non-independecy would be identical in the real and > permuted data. And I would also expect that averaging over 25 ms reduces > the data and removes all effects. The simulation (thank you, Diego), and > the comment on the bandwidth (thanks Burkhard) make it really clear. We > will indeed rerun the analysis on downsampled data to 125hz, and I do not > expect to see much difference from the original analysis, same as in > Diego’s simulation. > > Best, > Irina > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alessandro.orticoni at gmail.com Thu Jun 28 17:22:03 2018 From: alessandro.orticoni at gmail.com (Alessandro Orticoni) Date: Thu, 28 Jun 2018 17:22:03 +0200 Subject: [FieldTrip] [Fieldtrip] Line noise Removal Message-ID: Dear experts, I'm basically a beginner in coding with Fieldtrip, and I'm having a problem with line noise filtering. I would like to remove it from the heart rate signal, and I tried just typing 'yes' at the option cfg.dftfilter. But is doesn't seem to work, since the power spectrum contains the 50Hz and her harmonics even after the filtering. You can find the code in the following lines: %% ===FREQUENCY Pre Filtering VERIFICATION=== fs=data.fsample; cfg = []; cfg.output = 'pow'; cfg.channel = 'ECG 2'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz = ft_freqanalysis(cfg, data_epoched_Cz); %% ===Plot Spectra=== figure; plot(freq_epoched_Cz.freq,mag2db(freq_epoched_Cz.powspctrm)); %% ===Filtering=== cfg = []; cfg.channel = {'ECG 2'}; cfg.dftfilter = 'yes'; ECG_Filtered = ft_preprocessing(cfg,data_Cz); cfg = []; cfg.length = 30; % in seconds; cfg.overlap = 0; data_epoched_ECG_Filtered = ft_redefinetrial(cfg, ECG_Filtered); cfg = []; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz_Filtered = ft_freqanalysis(cfg, data_epoched_ECG_Filtered); %% ===Plot Spectra=== plot(freq_epoched_Cz_Filtered.freq,mag2db(freq_epoched_Cz_Filtered.powspctrm)); Thanks a lot. Kind regards, Alessandro Orticoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 28 18:35:34 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 28 Jun 2018 16:35:34 +0000 Subject: [FieldTrip] [Fieldtrip] Line noise Removal In-Reply-To: References: Message-ID: <57F427CD-DB64-4A98-A8D6-55810F80E4AA@donders.ru.nl> Dear Alessandro, Given the code you provided it looks as if you have one single very long trial that you subject to dft-filtering. If the power line fluctuations actually do vary a bit in amplitude, which is likely (particularly given long sections of data), the pure 50 (or 60) Hz sinusoid will get some ‘bandwidth’, so the removal won’t be perfect. I’d recommend to call ft_redefinetrial first, and then do a second call to ft_preprocessing with the dftfilter switched on. Yet, I’d expect that with 30 s segments it still won’t work that well. In this case you could widen the notch a bit by specifying cfg.dftfreq = 50+(-n:n)./30;, with n put to a small number, e.g. <=3. However, unless you have good reasons to have the data chopped in half-minute segments, I’d also consider to reduce this length, because you probably do not need to have a 1/30 Hz frequency resolution in your spectral decomposition. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Associate PI, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 28 Jun 2018, at 16:22, Alessandro Orticoni > wrote: Dear experts, I'm basically a beginner in coding with Fieldtrip, and I'm having a problem with line noise filtering. I would like to remove it from the heart rate signal, and I tried just typing 'yes' at the option cfg.dftfilter. But is doesn't seem to work, since the power spectrum contains the 50Hz and her harmonics even after the filtering. You can find the code in the following lines: %% ===FREQUENCY Pre Filtering VERIFICATION=== fs=data.fsample; cfg = []; cfg.output = 'pow'; cfg.channel = 'ECG 2'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz = ft_freqanalysis(cfg, data_epoched_Cz); %% ===Plot Spectra=== figure; plot(freq_epoched_Cz.freq,mag2db(freq_epoched_Cz.powspctrm)); %% ===Filtering=== cfg = []; cfg.channel = {'ECG 2'}; cfg.dftfilter = 'yes'; ECG_Filtered = ft_preprocessing(cfg,data_Cz); cfg = []; cfg.length = 30; % in seconds; cfg.overlap = 0; data_epoched_ECG_Filtered = ft_redefinetrial(cfg, ECG_Filtered); cfg = []; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz_Filtered = ft_freqanalysis(cfg, data_epoched_ECG_Filtered); %% ===Plot Spectra=== plot(freq_epoched_Cz_Filtered.freq,mag2db(freq_epoched_Cz_Filtered.powspctrm)); Thanks a lot. Kind regards, Alessandro Orticoni _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yadwinder.kaur at stud.uni-greifswald.de Sat Jun 30 15:06:19 2018 From: yadwinder.kaur at stud.uni-greifswald.de (Yadwinder Kaur) Date: Sat, 30 Jun 2018 15:06:19 +0200 Subject: [FieldTrip] Concatenate different size of trials into single one trial Message-ID: Dear All I have pre-processed my EEG data cutting into different trials (35 trials total) using fieldtrip , now I wish to concatenate them into one single data matrix. The length of each trial varies form each other. ofcourse, ft_appenddata didn't work in this case. I would highly appreciate any help to solve this issue. Thanks in advance. Regards Yadwinder -------------- next part -------------- An HTML attachment was scrubbed... URL: From deydhiman794 at gmail.com Sat Jun 2 20:55:25 2018 From: deydhiman794 at gmail.com (Dhiman Dey) Date: Sun, 3 Jun 2018 00:25:25 +0530 Subject: [FieldTrip] Brain source localization using EEG SIGNAL(ELORETA) Message-ID: Hello Please help me out.I am doing project on EEG signal to localize the brain source. I am using ELORETA technique in fieldtrip. I completed the preprocessing process,forward problem and now am stucked in the inverse problem. That is while using the eloreta method in ft_source analysis. If anyone has the code for source analysis please provide me. I am attaching the source analysis code as well as the error. Please help me. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IMG-20180603-WA0000.jpg Type: image/jpeg Size: 172924 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IMG-20180602-WA0004.jpg Type: image/jpeg Size: 168391 bytes Desc: not available URL: From mfibm at yahoo.com Sun Jun 3 11:34:28 2018 From: mfibm at yahoo.com (Mohamed Fawzy) Date: Sun, 3 Jun 2018 09:34:28 +0000 (UTC) Subject: [FieldTrip] error References: <773513623.1549476.1528018468996.ref@mail.yahoo.com> Message-ID: <773513623.1549476.1528018468996@mail.yahoo.com> Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Undefined function 'ft_info' for input arguments of type 'char'. how i fix that error -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfibm at yahoo.com Sun Jun 3 15:25:59 2018 From: mfibm at yahoo.com (Mohamed Fawzy) Date: Sun, 3 Jun 2018 13:25:59 +0000 (UTC) Subject: [FieldTrip] i got this error References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> Message-ID: <846398119.1559949.1528032359313@mail.yahoo.com> ft_definetrial (cfg);Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: no trialfun was specified, using ft_trialfun_general evaluating trialfunction 'ft_trialfun_general'reading the header from 'ArtifactMEG.ds'Error using ft_read_header (line 202)file or directory 'ArtifactMEG.ds' does not exist Error in ft_trialfun_general (line 84)  hdr = ft_read_header (cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 178)    [trl, event] = feval (cfg.trialfun, cfg);how i fix it  -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jun 12 12:50:29 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 12 Jun 2018 12:50:29 +0200 Subject: [FieldTrip] i got this error In-Reply-To: <846398119.1559949.1528032359313@mail.yahoo.com> References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> Message-ID: The dataset simply does not exist. You could fix that error by downloading the dataset that you want to process and by putting it in your working directory. Please note that FieldTrip requires quite some MATLAB knowledge. If you get stuck here, you might not get very far with subsequent data analysis either. You may want to check out http://www.fieldtriptoolbox.org/references_to_review_papers_and_teaching_material#programming . best regards, Robert > On 3 Jun 2018, at 15:25, Mohamed Fawzy wrote: > > ft_definetrial (cfg); > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: no trialfun was specified, using ft_trialfun_general > evaluating trialfunction 'ft_trialfun_general' > reading the header from 'ArtifactMEG.ds' > Error using ft_read_header (line 202) > file or directory 'ArtifactMEG.ds' does not exist > > Error in ft_trialfun_general (line 84) > hdr = ft_read_header (cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 178) > [trl, event] = feval (cfg.trialfun, cfg); > how i fix it > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.bleichner at uni-oldenburg.de Wed Jun 13 15:07:52 2018 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Wed, 13 Jun 2018 15:07:52 +0200 Subject: [FieldTrip] LSL Workshop Registration - Now Open In-Reply-To: <9e31942b-0fa1-9673-a4ab-d5501d82b315@uni-oldenburg.de> References: <9e31942b-0fa1-9673-a4ab-d5501d82b315@uni-oldenburg.de> Message-ID: <0b0c573b-1855-4b5e-3b7b-2c36a6647b73@uni-oldenburg.de> Hi all, We are happy to announce the second international Lab Streaming Layer (LSL) workshop, which will take place September 27 - 28, 2018, at the Hanse Wissenschaftskolleg, in Delmenhorst, Germany. You can now register for the event: http://www.h-w-k.de/index.php?id=2266. The registration is open until*July 30, 2018.*The number of participants is limited to 40 people. The workshop participation fee is /*100,00 € reduced rate for Postdocs, PhDs, and Students 350,00 € for Industrial Partners, and Other*/ and includes meals. Participants need to cover their own travel expenses.  LSL is an open-source project enabling the synchronized streaming of time series data coming from different devices, such as EEG amplifiers, audio, video, eye tracking, keyboards, etc. LSL features near real-time access to data streams, time-synchronization, networking and centralized collection. Key LSL developers and expert users have confirmed attendance. The workshop will provide a general introduction to LSL. We will present how LSL can be used for a multitude of different experimental setups, using a variety of experimental software, hardware and operating systems. In a hands-on session, participants can learn to stream data from their own hardware or play with hardware provided by us and external partners. We will name pitfalls and discuss how to test and ensure the best possible timing accuracy when recording multimodal data. We will also provide a best practice guide and present different use cases of LSL. We will also use the workshop to discuss future software and hardware developments. For further enquiries, please contact: martin.bleichner at uol.de Best, Martin Bleichner -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From o.jensen at bham.ac.uk Thu Jun 14 12:12:33 2018 From: o.jensen at bham.ac.uk (Ole Jensen) Date: Thu, 14 Jun 2018 11:12:33 +0100 Subject: [FieldTrip] Biomag2018/Competitions Message-ID: <2e0acea2-58f2-f9bb-a25d-48d984c07c07@bham.ac.uk> Dear all, I would like to point you to these two exciting competitions at Biomag2018: _ __Epilepsy data_ (Valentina Gumenyuk, Hudson Regional Hospital): https://sites.google.com/view/biomag-2018-challenge/home _OPMs_ (Gareth Barnes, UCL/Nottingham): http://www.fil.ion.ucl.ac.uk/~gbarnes/ Deadline for submitting is Aug 1, 2018 Please make interested colleagues/students aware! All the best, Ole -- Prof. Ole Jensen Centre for Human Brain Health, University of Birmingham http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Oleksiy.Bobrov at uni-konstanz.de Thu Jun 14 16:32:24 2018 From: Oleksiy.Bobrov at uni-konstanz.de (Oleksiy Bobrov) Date: Thu, 14 Jun 2018 16:32:24 +0200 Subject: [FieldTrip] Windows10: Missing dependent shared libraries: 'MSVCR100.dll' In-Reply-To: References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> Message-ID: <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> Please, help to fix the following error-exception with Windows10: Invalid MEX-file 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64': Missing dependent shared libraries: 'MSVCR100.dll' required by 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64'. The above error accuses every time,  we use "ft_compile_mex"-function. The 'MSVCR100.dll'-library is installed, and will be found. Here is our  configuration. 1. Windows 10 Prof. (fresh installed, up-to-date) 2. Matlab 2018a. 3. Visual C++ Redistributable für Visual Studio 2015 is installed. 4. Fieldtrip-20180603 is in use. Perhaps, would someone report a workable Windows10-runtime for Fieldtrip? Best regards Mr. Oleksiy Bobrov EEG-lab University of Konstanz Germany From r.oostenveld at donders.ru.nl Thu Jun 14 21:12:31 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 14 Jun 2018 21:12:31 +0200 Subject: [FieldTrip] Windows10: Missing dependent shared libraries: 'MSVCR100.dll' In-Reply-To: <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> Message-ID: <9ACD5476-F88C-4C6D-9CA3-46DBAE1DC4C1@donders.ru.nl> Please try copying the MSVCR100.dll file into the fieldtrip-20180603\src directory. best Robert > On 14 Jun 2018, at 16:32, Oleksiy Bobrov wrote: > > Please, help to fix the following error-exception with Windows10: > > Invalid MEX-file 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64': Missing dependent shared libraries: 'MSVCR100.dll' required by 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64'. > The above error accuses every time, we use "ft_compile_mex"-function. The 'MSVCR100.dll'-library is installed, and will be found. > Here is our configuration. > > 1. Windows 10 Prof. (fresh installed, up-to-date) > 2. Matlab 2018a. > 3. Visual C++ Redistributable für Visual Studio 2015 is installed. > 4. Fieldtrip-20180603 is in use. > > Perhaps, would someone report a workable Windows10-runtime for Fieldtrip? > > Best regards > Mr. Oleksiy Bobrov > EEG-lab > University of Konstanz > Germany > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From fanny.lachat at gmail.com Fri Jun 15 17:31:29 2018 From: fanny.lachat at gmail.com (Fanny) Date: Fri, 15 Jun 2018 17:31:29 +0200 Subject: [FieldTrip] preproc : electrodes missing and databrowser Message-ID: hello fieldtrip users, I have encounter some problems and I hope you can help me with those .... 1- I have EEG data : 128 channel -with 1 ref so 127 Channel and 2 EOG- so 129 channels at the end. All of my channels are label 'EEG'. When I do the preprocessing at the end I obtain 125 channels ... my 2 eog channel and channel O9 and O10 are gone ... I don t know how to fix that because of course I want to analyse the 129 channels. on the hdr ( from ft_preprocessing) : hdr.label = 129 and hdr.type = eeg for the 129 channel BUT the cfg.channel ( from ft_preprocessing) is 125 .... ---- My preprocessing : cfg = []; cfg.dataset = 'sujet12_250418000001.eeg'; % filter HP and DFT (50Hz) cfg.hpinstabilityfix = 'reduce'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.5; cfg.dftfilter = 'yes'; data_preprocv02 = ft_preprocessing (cfg) ----- 2- this there a difference between cfg.preproc.hpfilter and cfg.hpfilter ? ---- 3- when I do on my preprocessing data : cfg = []; cfg.method = 'average'; cfg.elec = elec; cfg.badchannel = {'AFp2'}; cfg.neighbours = neighbours; data_interp = ft_channelrepair(cfg,data_preproc); and then I want to vizualised my data_preproc again ft_databrowser (cfg,data_preproc) The signal of my data_preproc looks different that BEFORE the channelrepair ... does channelrepair change something to the data ... ? Thank you for your help ! Fanny -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.kayser at uni-bielefeld.de Tue Jun 19 12:03:27 2018 From: christoph.kayser at uni-bielefeld.de (Christoph Kayser) Date: Tue, 19 Jun 2018 12:03:27 +0200 Subject: [FieldTrip] PostDoc & PhD Position, Cognitive Neuroscience, Bielefeld, Germany Message-ID: <01ac01d407b4$c5174010$4f45c030$@uni-bielefeld.de> The Department of Cognitive Neuroscience at Bielefeld University, Germany, is advertising a 3-year Postdoctoral position, and a 3-year PhD position in auditory and multisensory neuroimaging studies. We are looking to fill two positions to complement our research on auditory and multisensory perception based on a combination of psychophysics, neuroimaging (EEG) and statistical modelling. The Department for Cognitive Neuroscience is dedicated to understanding the integration of sensory information in the brain. Our studies use state of the art EEG imaging, combined with eyetracking, psychophysical paradigms, and substantive quantitative data analysis to better understand when and how the brain transforms sensory information into a conscious percept. Further details about our research can be found here http://www.uni-bielefeld.de/biologie/cns/ The positions involve all aspects of study design, implementation, data collection, data analysis and the write up of results. Contributions to the supervision of student projects or the preparation of practical courses are also expected. Applicants should have a background in neuroscience, cognitive science, psychology, mathematics, or a relevant discipline. Applicants for the post-doc position should have a doctoral degree or equivalent title. We are especially interested in devotion to advanced quantitative data analysis including the capabilities to program or modify analysis code. The ideal applicant will have a strong analytical background and direct experience using MATLAB. Applicants should have enthusiasm, and a clear, demonstrable capacity for acquiring expertise in these techniques. Being fluent in German is considered a major advantage. The positions are funded for 3 years starting ideally around September 2018, at Germany salary grades TV-L E13 (100% for post-doc, 65% for PhD student). Application deadline is July 16th. Further information and the official advert in German can be found here: https://www.uni-bielefeld.de/Universitaet/Aktuelles/Stellenausschreibungen/A nzeigen/Wiss/wiss18107.pdf and here https://www.uni-bielefeld.de/Universitaet/Aktuelles/Stellenausschreibungen/A nzeigen/Wiss/wiss18106.pdf Interested candidates please contact Christoph Kayser -------------- next part -------------- An HTML attachment was scrubbed... URL: From Patrick.Rollo at uth.tmc.edu Tue Jun 19 16:51:22 2018 From: Patrick.Rollo at uth.tmc.edu (Rollo, Patrick) Date: Tue, 19 Jun 2018 14:51:22 +0000 Subject: [FieldTrip] Postdoctoral Research Positions Available Message-ID: <56528a0782fe44229fec0e99867c4997@uth.tmc.edu> Fieldtrip Users, Postdoctoral research positions are available in the lab of Dr. Nitin Tandon using ECoG and fMRI to evaluate psycholingustic models of reading and speech production and create network level representations of language. The advert is attached above, please reach out if you have any questions Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Tandon Lab POSTDOCTORAL RESEARCH POSITION-1.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 166222 bytes Desc: Tandon Lab POSTDOCTORAL RESEARCH POSITION-1.docx URL: From jedmeltzer at yahoo.com Wed Jun 20 20:55:02 2018 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Wed, 20 Jun 2018 18:55:02 +0000 (UTC) Subject: [FieldTrip] Postdoctoral Position Toronto : Treatment and Neuroimaging of Chronic Pain References: <473438130.2426355.1529520902566.ref@mail.yahoo.com> Message-ID: <473438130.2426355.1529520902566@mail.yahoo.com> A multidisciplinary research team in Toronto seeks a Postdoctoral Fellow to conduct research as part of the first large Canadian national grant - CIHR SPOR Chronic Pain Network - dedicated to conducting innovative research to improve the lives of many Canadians with chronic pain. The successful candidate will examine the effects and mechanisms associated with complementary therapy for managing chronic pain (i.e., Rhythmic Sensory Stimulation and Music) using behavioral and neuroimaging methods, including MEG and MRI. The successful candidate will collaborate with experts in various fields at renowned academic centres across the city, including the Toronto Academic Pain Medicine Institute at Women’s College Hospital, the Rotman Research Institute at Baycrest Health Sciences, and the Faculty of Music at University of Toronto. Preferred Start Date: Sept 1, 2018 (negotiable)Duration: 2-3 yearsSupervisor: Dr. Lee Bartel, Faculty of Music, University of TorontoCollaborating Supervisors:  Dr. Tania Di Rena, Women’s College Hospital & Dr. Jed Meltzer, Baycrest Health SciencesSalary: $50,000 per year Responsibilities will include: conducting literature reviews, preparation and submission of research ethics board applications, study design, recruiting participants, collecting data, organizing and maintaining research tracking databases, and managing all administrative aspects of conducting pilot studies and randomized clinical trials. The candidate will also have the opportunity to be an author on grant proposals, manuscripts, and poster abstracts, and to present their work at national and international conferences.  The deadline to apply is Friday July 27, 2018.   Please include the following information in your application: 1)    1-page cover letter with a concise description of why you are interested in this position and how your academic and professional background make you a strong candidate for this research opportunity2)    Curriculum vitae 3)    Your unofficial transcript Submissions that are missing any components of this application will not be considered. You will be required to conduct research onsite at the Women’s College Hospital and Baycrest Health Sciences. Preference will be given to individuals who have training in neuroimaging, behavioural, and/or cognitive neuroscience, psychology or related research focused disciplines. Given the proposed mechanisms of Rhythmic Sensory Stimulation, research interests in rhythmic and oscillatory neural activity are especially important. The normal hours of work are 40 hours per week for a full-time postdoctoral fellow  recognizing that the needs of the employee’s research and training and the needs of the supervisor’s research program may require flexibility in the performance of the employee’s duties and hours of work. Employment as a Postdoctoral Fellow at the University of Toronto is covered by the terms of the CUPE 3902 Unit 5 Collective Agreement. This job is posted in accordance with the CUPE 3902 Unit 5 Collective Agreement. The University of Toronto is strongly committed to diversity within its community and especially welcomes applications from racialized persons / persons of colour, women, Indigenous / Aboriginal People of North America, persons with disabilities, LGBTQ persons, and others who may contribute to the further diversification of ideas. If you are interested in this position please send your application, preferably combined in one pdf document, to lbartel at chass.utoronto.ca Interviews will commence immediately following the application deadline.     -------------- next part -------------- An HTML attachment was scrubbed... URL: From krugliakova.es at gmail.com Thu Jun 21 11:23:32 2018 From: krugliakova.es at gmail.com (Elena Krugliakova) Date: Thu, 21 Jun 2018 11:23:32 +0200 Subject: [FieldTrip] flipped sourceplot Message-ID: Dear FieldTrip users, I am trying to plot my source localisation results on parcelled brain following this tutorial: http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_result_in_parceled_brain_space Similarly to the figure in tutorial I get plot with inverted left-right axis (left appears on the right and right on the left). I guess this is related to the transformation matrix of* template_mri* that is used for interpolation of source and atlas. Is there some way to flip left and right on the sourceplot? Thanks! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 21 11:43:06 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 21 Jun 2018 09:43:06 +0000 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Hi Elena, I guess that any graphics editing program (like adobe illustrator, or even windows paint) can flip the figure for you. :) If you want to do this prior to generating the figure, you can cal ft_volumereslice on your anatomical image. Provided the coordinate system attached to the volume is right handed, right will be right and left will be left, after reslicing. Best wishes, Jan-Mathijs On 21 Jun 2018, at 11:23, Elena Krugliakova > wrote: Dear FieldTrip users, I am trying to plot my source localisation results on parcelled brain following this tutorial: http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_result_in_parceled_brain_space Similarly to the figure in tutorial I get plot with inverted left-right axis (left appears on the right and right on the left). I guess this is related to the transformation matrix of template_mri that is used for interpolation of source and atlas. Is there some way to flip left and right on the sourceplot? Thanks! Elena _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From krugliakova.es at gmail.com Thu Jun 21 15:17:47 2018 From: krugliakova.es at gmail.com (Elena Krugliakova) Date: Thu, 21 Jun 2018 15:17:47 +0200 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Dear Jan-Mathijs, Thank you for your answer, it helped! But additionally I needed to interpolate atlas on the resliced mri, otherwise ft_sourceparcellate gave me an error "*the source positions are not consistent with the parcellation*". Best, Elena On 21 June 2018 at 11:43, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Elena, > > I guess that any graphics editing program (like adobe illustrator, or even > windows paint) can flip the figure for you. :) > If you want to do this prior to generating the figure, you can cal > ft_volumereslice on your anatomical image. Provided the coordinate system > attached to the volume is right handed, right will be right and left will > be left, after reslicing. > > Best wishes, > Jan-Mathijs > > On 21 Jun 2018, at 11:23, Elena Krugliakova > wrote: > > Dear FieldTrip users, > > I am trying to plot my source localisation results on parcelled brain > following this tutorial: > http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_ > the_result_in_parceled_brain_space > > Similarly to the figure in tutorial I get plot with inverted left-right > axis (left appears on the right and right on the left). I guess this is > related to the transformation matrix of* template_mri* that is used for > interpolation of source and atlas. > > Is there some way to flip left and right on the sourceplot? > > Thanks! > > Elena > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xiew1202 at gmail.com Thu Jun 21 15:49:36 2018 From: xiew1202 at gmail.com (Xie Wanze) Date: Thu, 21 Jun 2018 09:49:36 -0400 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Hi Elena, I had the same issue when I use the sour interpolation function in Fieldtrip. This is what I did: outsource.pos(:,1) = outsource.pos(:,1)*-1; My images are in the SPM system with the AC's coordinates being [0 0 0] and the sagittal (X) coordinate of the PC being 0 too. However, it seems that the ft_sourceinterpolate flips my source images occasionally (not for all the data). I did not spend too much time on it, so I still have no idea why the function does that. Best, Wanze 2018-06-21 9:17 GMT-04:00 Elena Krugliakova : > Dear Jan-Mathijs, > > Thank you for your answer, it helped! > > But additionally I needed to interpolate atlas on the resliced mri, > otherwise ft_sourceparcellate gave me an error "*the source positions are > not consistent with the parcellation*". > > Best, > Elena > > On 21 June 2018 at 11:43, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Elena, >> >> I guess that any graphics editing program (like adobe illustrator, or >> even windows paint) can flip the figure for you. :) >> If you want to do this prior to generating the figure, you can cal >> ft_volumereslice on your anatomical image. Provided the coordinate system >> attached to the volume is right handed, right will be right and left will >> be left, after reslicing. >> >> Best wishes, >> Jan-Mathijs >> >> On 21 Jun 2018, at 11:23, Elena Krugliakova >> wrote: >> >> Dear FieldTrip users, >> >> I am trying to plot my source localisation results on parcelled brain >> following this tutorial: >> http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_ >> result_in_parceled_brain_space >> >> Similarly to the figure in tutorial I get plot with inverted left-right >> axis (left appears on the right and right on the left). I guess this is >> related to the transformation matrix of* template_mri* that is used for >> interpolation of source and atlas. >> >> Is there some way to flip left and right on the sourceplot? >> >> Thanks! >> >> Elena >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From o.jensen at bham.ac.uk Fri Jun 22 12:33:34 2018 From: o.jensen at bham.ac.uk (Ole Jensen) Date: Fri, 22 Jun 2018 11:33:34 +0100 Subject: [FieldTrip] Postdoc position/Nerwcastle Message-ID: Dear all, Below an exciting postdoc opportunity. All the best, Ole PS: Also encourage your MEG colleagues to sign up at https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=BIOMAGCENTRAL&A=1_/* */_/*==========================*/_/* */_ */_Post Doctoral Position:_/**Neuronal mechanisms of cognition: multisensory convergence for learning and memory* Research Assistant or Associate position** *Main Supervisor:*Professor Christopher Petkov *Duration:*The position is for 1 with extensions possible *Closing date: *Applications will be evaluated until the closing date:*/_August 21st, 2018_/* A post-doctoral position is available for a European Research Council funded program grant on neuronal mechanisms of cognition: multisensory convergence for learning and memory. The scientific work is a collaboration between Newcastle University Medical School, UK (Professors Christopher Petkov and Timothy Griffiths), the University of Iowa, USA (Department of Neurosurgery, led by Professor Matthew Howard III) and the University of Birmingham, UK (Profs. Ole Jensen and Simon Hanslmayr). The work will involve professionally conducted neurophysiological studies with primate models at Newcastle University. This work will be the primary focus, but the laboratory also works with neurosurgical patients at the University of Iowa and amnesic patients in Newcastle University which will complement the work in animal models. The successful candidate will work on cutting edge behavioural, fMRI and electrophysiological experiments in nonhuman primates to study neural oscillations, cognition and multisensory integration using innovative learning and memory tasks. Some testing of cognitively impaired patients or neural recordings in patients being monitored for surgery would be possible and will help to translate to humans the mechanistic information that requires the work with animals. Cutting edge behavioural, neuroimaging and neurophysiological recording studies will be conducted, including neural system perturbation by stimulation or inactivation to establish causal relationships crucial for learning and memory. The successful candidates will work in the laboratory of Prof. Christopher Petkov at Newcastle University Medical School in Newcastle upon Tyne, United Kingdom. The ideal candidate will possess a PhD in neurobiology, or a related field, have a strong track record and experience with electrophysiological methods (e.g., EEG, MEG, extracellular recordings) or methods of stimulating the brain (e.g., optogenetics, TMS). Evidence of strong computational and technical skills is desired. Being able to work independently and professionally and collegially as part of a team is a must. A PhD in neuroscience or a related field is required for appointment as a Research Associate, but we can also consider strong candidates close to completing their PhD. We seek an individual who already has evidence as a strong scientist, with strong technical and computing skills and a publication track record with demonstrated writing skills. Expertise involving behavioural and neurophysiological work in humans (e.g., EEG/MEG) or related techniques in other animals are strongly recommended. Financial support is available for at least 1 year, with extensions possible. *Value of the Award:*The salary is commensurate with post-doctoral experience. International applicants are encouraged to apply but will need to have obtained permission to work in the UK. Salary is paid in GBP and ranges from £29,301 - £33,183, which is highly competitive given the low cost of living at Newcastle in the UK. *How to Apply: *Please submit a covering letter, full CV and the contact information of at least three individuals who can provide professional references. The covering letter should state how your interests and experience relate to the project and the laboratory work. The application documents can be submitted to chris.petkov at ncl.ac.uk , please include ‘ERC Post-Doctoral Position’ in the subject field. *Further Information: *To find out more about the position please contact chris.petkov at ncl.ac.uk or browse the laboratory website: http://www.staff.ncl.ac.uk/lcnncl. University of Iowa Human Brain Research Laboratory: http://www.healthcare.uiowa.edu/Labs/hbrl-neurosurgery/index.html. Website of Prof. Matthew Howard III, MD: http://www.medicine.uiowa.edu/dept_primary_apr.aspx?appointment=Neurosurgery&id=howardma. Website of Ole Jensen: . Website of Simon Hanslmayr: . -- Prof. Ole Jensen Centre for Human Brain Health, University of Birmingham http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.Hanslmayr at bham.ac.uk Fri Jun 22 14:17:54 2018 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Fri, 22 Jun 2018 12:17:54 +0000 Subject: [FieldTrip] Postdoc Position available at University of Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CED876D2B1@EX12.adf.bham.ac.uk> Dear Fieldtrippers, We have an exciting opportunity within the Cognition and Oscillations Lab at the University of Birmingham. We are hiring a grade 7 postdoc to start in October 2018 - the deadline for applications is Sunday 1st July. Applications are invited for a full-time Postdoctoral Research Fellow to work within the School of Psychology, University of Birmingham. The successful candidate will work on a 3-year project funded within an ERC Consolidator Grant to investigate the role of brain oscillations for human episodic memory (lab of Dr Simon Hanslmayr). The methodological focus of the project is on intracranial single-unit recordings in human epilepsy patients and computational modelling of oscillations in memory networks. The postdoctoral researcher will be involved in all stages of designing and conducting experiments, analysing electrophysiological data, computational modelling. The postdoctoral researcher will be expected to prepare the results for academic publication, to present at national and international academic conferences, and to engage in public activities. For more info, please have a look at the job advert: https://atsv7.wcn.co.uk/search_engine/jobs.cgi?amNvZGU9MTcyNzQyMSZ2dF90ZW1wbGF0ZT03Njcmb3duZXI9NTAzMjUyMSZvd25lcnR5cGU9ZmFpciZicmFuZF9pZD0wJnZhY2Zpcm0udmFjdGl0bGU9NTUyMDQmcG9zdGluZ19jb2RlPTExNw%3D%3D=&jcode=1727421&vt_template=767&owner=5032521&ownertype=fair&brand_id=0&vacfirm.vactitle=55204&posting_code=117 If you have any queries regarding this post, please contact either myself or Sophie Watson (S.Watson.2 at bham.ac.uk). Kind regards, Simon Dr. Simon Hanslmayr Reader in Cognitive Neuroscience Royal Society Wolfson Research Merit Award Holder School of Psychology Hills Building 2.37 University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.memorybham.com/people/#/simon-hanslmayr/ [http://www.nature.com/content/sr/ebm/1248_2014_Branded_Sig_460x80_v1.gif] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 8560 bytes Desc: image001.gif URL: From i.simanova at donders.ru.nl Tue Jun 26 17:16:40 2018 From: i.simanova at donders.ru.nl (Simanova, I. (Irina)) Date: Tue, 26 Jun 2018 15:16:40 +0000 Subject: [FieldTrip] low-pass filtering Message-ID: Dear experts, We recently submitted a paper where we use a cluster permutation analysis of ERFs (testing conditions exchangeability). The EEG was sampled at 500 Hz and low-pass filtered at 40 Hz during preprocessing. One of the reviewers has indicated that using this temporal resolution for the analysis seems unnecessary given the low-pass filter, which makes each time point not independent due to smoothing. He further asks: "Do all key significant components replicate if the analysis is performed using a mean amplitude that is averaged for larger time bins (25 ms bins) instead of individual time points?" I understand that when doing parametric analysis one might want to reduce the number of comparisons by averaging ERF samples over time bins. But here we solve the MCP with the cluster analysis. But it also seems like the reviewer is concerned about non-independecy in the data resulting from low-pass filtering. I wanted to check with you: can smoothing time-series indeed compromise the cluster-based analysis (e.g. affect the cluster size)? Thank you, Kind regards, Irina -------------- next part -------------- An HTML attachment was scrubbed... URL: From Matthias.Franken at UGent.be Wed Jun 27 11:57:18 2018 From: Matthias.Franken at UGent.be (Matthias Franken) Date: Wed, 27 Jun 2018 09:57:18 +0000 Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: <86f83318618a4a9d8cdec977e8ede658@xmail303.UGent.be> Hi Irina, I’ve been wondering about a similar question a while ago. As far as I can see, I think it can affect cluster size, but without compromising the permutation test. More smoothing should (I guess) lead to larger clusters, but this should affect both the observed clusters as well as the clusters in your premutation distribution (after having permuted data labels). So I guess the comparison should be unaffected. ________________________________________ Matthias Franken postdoctoral researcher Experimental Psychology Department Ghent University From: Simanova, I. (Irina) Sent: Tuesday, 26 June 2018 18:44 To: fieldtrip at science.ru.nl Subject: [FieldTrip] low-pass filtering Dear experts, We recently submitted a paper where we use a cluster permutation analysis of ERFs (testing conditions exchangeability). The EEG was sampled at 500 Hz and low-pass filtered at 40 Hz during preprocessing. One of the reviewers has indicated that using this temporal resolution for the analysis seems unnecessary given the low-pass filter, which makes each time point not independent due to smoothing. He further asks: "Do all key significant components replicate if the analysis is performed using a mean amplitude that is averaged for larger time bins (25 ms bins) instead of individual time points?" I understand that when doing parametric analysis one might want to reduce the number of comparisons by averaging ERF samples over time bins. But here we solve the MCP with the cluster analysis. But it also seems like the reviewer is concerned about non-independecy in the data resulting from low-pass filtering. I wanted to check with you: can smoothing time-series indeed compromise the cluster-based analysis (e.g. affect the cluster size)? Thank you, Kind regards, Irina -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Wed Jun 27 12:09:43 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Wed, 27 Jun 2018 12:09:43 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: Hi Irina, On the one hand, the smoothing can indeed influence the cluster size. On the other hand, the "type" of smoothing will influence how sensitive are you to detect the potential differences too. I would try to illustrate the reviewer the trade off between the type of differences you may have (transient vs sustained; regarding the temporal domain) and the filter type that can be more appropriate to detect the differences to justify your pipeline. I have no idea about the type of ERF you're studying but I hope the example is illustrative enough Look at the attached screenshot. In the first column, I simulated a transient ERF with added noise (code below) and I ran the non-parametric cluster-based permutation test that showed some significant and discontinuous differences. The second column represents the same data but with a lowpass filter (40 Hz) and I find longer significant clusters. If you look at the filtered ERFs, the structure is very similar to the noisy, unfiltered version. The third column is what I understand is requested by the reviewer. Suddenly, no significant differences are found because the ground truth simulated difference was too short and weak to survive the 0.25ms averaging. In case of a long and sustained ERF, may be the three plots would had been more congruent. I guess that the permutation part of the cluster-based nonparametric test will take into account the non-independecy in the data resulting from low-pass filtering. This non-independency will be the same for the original and the permuted surrogates. I hope that helps! Diego %--------------------------------- fsample = 600; sigma = 0.5; ferf = 6.0; Aerf1 = -0.7; Aerf2 = -0.2; tau1 = 0.1; tau2 = 0.05; t = -0.8:1/fsample:0.8; signoise = 0.2; t0 = 0.05; t0idx = nearest(t,t0); ntrials = 100; data1.label{1}='Oz'; data2.label{1}='Oz'; for k=1:ntrials; freq1 = normrnd(ferf,sigma); freq2 = normrnd(ferf,sigma); for tk = 1:size(t,2); phi1 = random('uniform',0,pi,1,1); phi2 = random('uniform',0,pi,1,1); if tk > t0idx; Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * sin(2*pi*freq1*(t(1,tk)-t0)+phi1); Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * sin(2*pi*freq2*(t(1,tk)-t0)+phi2); end Snoise1 = signoise.*randn(size(t)); Snoise2 = signoise.*randn(size(t)); end data1.trial{k}(1,:) = Serf1 + Snoise1; data1.time{k} = t; data2.trial{k}(1,:) = Serf2 + Snoise2; data2.time{k} = t; end cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1); timelock2 = ft_timelockanalysis(cfg, data2); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); legend('condition 1', 'condition 2', 'difference'); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('raw data: unfiltered') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% low pass 40 Hz cfg = []; cfg.lpfilter = 'yes'; cfg.lpfreq = 40; data1_lp40 = ft_preprocessing(cfg, data1); data2_lp40 = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_lp40); timelock2 = ft_timelockanalysis(cfg, data2_lp40); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('lowpass filtering 40Hz') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% boxcar 0.25ms cfg = []; cfg.boxcar = 0.25; data1_box = ft_preprocessing(cfg, data1); data2_box = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_box); timelock2 = ft_timelockanalysis(cfg, data2_box); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('boxcar filter 0.25s') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); On 26 June 2018 at 17:16, Simanova, I. (Irina) wrote: > Dear experts, > > We recently submitted a paper where we use a cluster permutation analysis > of ERFs (testing conditions exchangeability). The EEG was sampled at 500 > Hz and low-pass filtered at 40 Hz during preprocessing. One of the > reviewers has indicated that using this temporal resolution for the > analysis seems unnecessary given the low-pass filter, which makes each time > point not independent due to smoothing. He further asks: "Do all key > significant components replicate if the analysis is performed using a mean > amplitude that is averaged for larger time bins (25 ms bins) instead of > individual time points?" > > I understand that when doing parametric analysis one might want to reduce > the number of comparisons by averaging ERF samples over time bins. But here > we solve the MCP with the cluster analysis. But it also seems like the > reviewer is concerned about non-independecy in the data resulting from > low-pass filtering. I wanted to check with you: can smoothing time-series > indeed compromise the cluster-based analysis (e.g. affect the cluster size)? > > Thank you, > Kind regards, > Irina > > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2018-06-27 11-39-54.png Type: image/png Size: 87542 bytes Desc: not available URL: From maess at cbs.mpg.de Wed Jun 27 13:58:26 2018 From: maess at cbs.mpg.de (Burkhard Maess) Date: Wed, 27 Jun 2018 13:58:26 +0200 (CEST) Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> Hi Irina and Diego, I am also expecting that the permutation test is rather insensitive to the bandwidth of the underlying data. I only would like to comment on the resampling issue: as a rule of thumb, often a third of the sampling frequency is assumed to represent the available bandwidth. With this ratio - the 500Hz sampled data represents about 160Hz bandwidth. Applying a lowpass of 40Hz (of similar steepness as the one used during the recording) will divide the bandwidth by four. Consequently, dividing the sampling rate by 4 is appropriate: 125Hz, which corresponds to delta-t of 8ms. The suggested 25ms by the reviewer are related to the 40Hz, but averaging over the 25ms would constitute an additional lowpass of poor quality. I would therefore recommend to rerun the cluster analysis using subsampled data. In principle, you may retrieve four different sets from the subsampling routine by taking either always the first, the second, the third or the forth sample of the 8ms interval. However, the results of the cluster analysis should be almost identical. best wishes, Burkhard -- Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, D-04301 Leipzig, Germany phone/fax: +49 341 9940-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- | From: "Diego Lozano-Soldevilla" | To: "FieldTrip discussion list" | Sent: Wednesday, 27 June, 2018 12:09:43 | Subject: Re: [FieldTrip] low-pass filtering | Hi Irina, | | On the one hand, the smoothing can indeed influence the cluster size. On the | other hand, the "type" of smoothing will influence how sensitive are you to | detect the potential differences too. I would try to illustrate the reviewer | the trade off between the type of differences you may have (transient vs | sustained; regarding the temporal domain) and the filter type that can be more | appropriate to detect the differences to justify your pipeline. I have no idea | about the type of ERF you're studying but I hope the example is illustrative | enough | | Look at the attached screenshot. In the first column, I simulated a transient | ERF with added noise (code below) and I ran the non-parametric cluster-based | permutation test that showed some significant and discontinuous differences. | The second column represents the same data but with a lowpass filter (40 Hz) | and I find longer significant clusters. If you look at the filtered ERFs, the | structure is very similar to the noisy, unfiltered version. The third column is | what I understand is requested by the reviewer. Suddenly, no significant | differences are found because the ground truth simulated difference was too | short and weak to survive the 0.25ms averaging. In case of a long and sustained | ERF, may be the three plots would had been more congruent. | | I guess that the permutation part of the cluster-based nonparametric test will | take into account the non-independecy in the data resulting from low-pass | filtering. This non-independency will be the same for the original and the | permuted surrogates. | | I hope that helps! | | Diego | | | | %--------------------------------- | | fsample = 600; | sigma = 0.5; | ferf = 6.0; | Aerf1 = -0.7; | Aerf2 = -0.2; | tau1 = 0.1; | tau2 = 0.05; | t = -0.8:1/fsample:0.8; | signoise = 0.2; | t0 = 0.05; | t0idx = nearest(t,t0); | ntrials = 100; | | data1.label{1}='Oz'; | data2.label{1}='Oz'; | | for k=1:ntrials; | freq1 = normrnd(ferf,sigma); | freq2 = normrnd(ferf,sigma); | for tk = 1:size(t,2); | phi1 = random('uniform',0,pi,1,1); | phi2 = random('uniform',0,pi,1,1); | if tk > t0idx; | Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * | sin(2*pi*freq1*(t(1,tk)-t0)+phi1); | Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * | sin(2*pi*freq2*(t(1,tk)-t0)+phi2); | end | Snoise1 = signoise.*randn(size(t)); | Snoise2 = signoise.*randn(size(t)); | end | data1.trial{k}(1,:) = Serf1 + Snoise1; | data1.time{k} = t; | data2.trial{k}(1,:) = Serf2 + Snoise2; | data2.time{k} = t; | end | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1); | timelock2 = ft_timelockanalysis(cfg, data2); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | legend('condition 1', 'condition 2', 'difference'); | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('raw data: unfiltered') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | %% low pass 40 Hz | cfg = []; | cfg.lpfilter = 'yes'; | cfg.lpfreq = 40; | data1_lp40 = ft_preprocessing(cfg, data1); | data2_lp40 = ft_preprocessing(cfg, data2); | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1_lp40); | timelock2 = ft_timelockanalysis(cfg, data2_lp40); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('lowpass filtering 40Hz') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | %% boxcar 0.25ms | cfg = []; | cfg.boxcar = 0.25; | data1_box = ft_preprocessing(cfg, data1); | data2_box = ft_preprocessing(cfg, data2); | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1_box); | timelock2 = ft_timelockanalysis(cfg, data2_box); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('boxcar filter 0.25s') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | | | | On 26 June 2018 at 17:16, Simanova, I. (Irina) < i.simanova at donders.ru.nl > | wrote: | | | | Dear experts, | | We recently submitted a paper where we use a cluster permutation analysis of | ERFs (testing conditions exchangeability) . The EEG was sampled at 500 Hz and | low-pass filtered at 40 Hz during preprocessing. One of the reviewers has | indicated that u sing this temporal resolution for the analysis seems | unnecessary given the low-pass filter, which makes each time point not | independent due to smoothing. He further asks: " Do all key significant | components replicate if the analysis is performed using a mean amplitude that | is averaged for larger time bins (25 ms bins) instead of individual time | points?" | | I understand that when doing parametric analysis one might want to reduce the | number of comparisons by averaging ERF samples over time bins. But here we | solve the MCP with the cluster analysis. But it also seems like the reviewer is | concerned about non-independecy in the data resulting from low-pass filtering. | I wanted to check with you: can smoothing time-series indeed compromise the | cluster-based analysis (e.g. affect the cluster size)? | | Thank you, | Kind regards, | Irina | | | | | _______________________________________________ | fieldtrip mailing list | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip | https://doi.org/10.1371/journal.pcbi.1002202 | | | _______________________________________________ | fieldtrip mailing list | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip | https://doi.org/10.1371/journal.pcbi.1002202 From dlozanosoldevilla at gmail.com Wed Jun 27 15:29:53 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Wed, 27 Jun 2018 15:29:53 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> References: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> Message-ID: Dear Burkhard, Thank you very much for your input. I totally missed the bandwidth point. I rerun the cluster based comparing the 500hz lowpass filtered at 40hz and the downsampled data to 125hz (see code below). As you suggested, the cluster analysis output is almost identical. Best, Diego %------------------------------- fsample = 500; sigma = 0.5; ferf = 6.0; Aerf1 = -0.7; Aerf2 = -0.2; tau1 = 0.1; tau2 = 0.05; t = -0.8:1/fsample:0.8; signoise = 0.2; t0 = 0.05; t0idx = nearest(t,t0); ntrials = 100; data1.label{1}='Oz'; data2.label{1}='Oz'; for k=1:ntrials; freq1 = normrnd(ferf,sigma); freq2 = normrnd(ferf,sigma); for tk = 1:size(t,2); phi1 = random('uniform',0,pi,1,1); phi2 = random('uniform',0,pi,1,1); if tk > t0idx; Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * sin(2*pi*freq1*(t(1,tk)-t0)+phi1); Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * sin(2*pi*freq2*(t(1,tk)-t0)+phi2); end Snoise1 = signoise.*randn(size(t)); Snoise2 = signoise.*randn(size(t)); end data1.trial{k}(1,:) = Serf1 + Snoise1; data1.time{k} = t; data2.trial{k}(1,:) = Serf2 + Snoise2; data2.time{k} = t; end cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1); timelock2 = ft_timelockanalysis(cfg, data2); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); legend('condition 1', 'condition 2', 'difference'); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('raw data: unfiltered') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% low pass 40 Hz cfg = []; cfg.lpfilter = 'yes'; cfg.lpfreq = 40; data1_lp40 = ft_preprocessing(cfg, data1); data2_lp40 = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_lp40); timelock2 = ft_timelockanalysis(cfg, data2_lp40); diff_lp40 = timelock1; diff_lp40.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff_lp40.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat_lp40 = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat_lp40.time, stat_lp40.stat); ylabel('t-value'); title('lowpass filtering 40Hz') subplot(4,1,2); plot(diff_lp40.time, diff_lp40.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat_lp40.time, stat_lp40.prob); ylabel('prob'); subplot(4,1,4); plot(stat_lp40.time, stat_lp40.mask); ylabel('significant'); %% boxcar 0.25ms cfg = []; cfg.boxcar = 0.25; data1_box = ft_preprocessing(cfg, data1); data2_box = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_box); timelock2 = ft_timelockanalysis(cfg, data2_box); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('boxcar filter 0.25s') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% downsample the data cfg = []; cfg.resamplefs = 125; cfg.demean = 'yes'; data1_res = ft_resampledata(cfg, data1); data2_res = ft_resampledata(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_res); timelock2 = ft_timelockanalysis(cfg, data2_res); diff_res = timelock1; diff_res.avg = timelock1.avg-timelock2.avg; figure;plot(diff_res.time,[timelock1.avg' timelock2.avg' diff_res.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat_res = ft_timelockstatistics(cfg, timelock1, timelock2); figure; hold all;subplot(4,1,1); plot(stat_res.time, stat_res.stat); ylabel('t-value'); title('downsample to 125 Hz') hold all;subplot(4,1,2); plot(diff_res.time, diff_res.avg); ylabel('avg1-avg2 (uV)'); hold all;subplot(4,1,3); semilogy(stat_res.time, stat_res.prob); ylabel('prob'); subplot(4,1,4); plot(stat_res.time, stat_res.mask); ylabel('significant'); %% all in one plot figure; subplot(4,1,1); plotyy(stat_res.time, stat_res.stat, stat_lp40.time, stat_lp40.stat); ylabel('t-value'); subplot(4,1,2); plotyy(diff_res.time, diff_res.avg, diff_lp40.time, diff_lp40.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat_res.time, stat_res.prob); hold all;semilogy(stat_lp40.time, stat_lp40.prob); ylabel('prob'); subplot(4,1,4); plotyy(stat_res.time, stat_res.mask,stat_lp40.time, stat_lp40.mask); ylabel('significant'); legend('downsampled 125hz','500hz + lpfilt 40hz') On 27 June 2018 at 13:58, Burkhard Maess wrote: > Hi Irina and Diego, > > I am also expecting that the permutation test is rather insensitive to the > bandwidth of the underlying data. I only would like to comment on the > resampling issue: as a rule of thumb, often a third of the sampling > frequency is assumed to represent the available bandwidth. With this ratio > - the 500Hz sampled data represents about 160Hz bandwidth. Applying a > lowpass of 40Hz (of similar steepness as the one used during the recording) > will divide the bandwidth by four. Consequently, dividing the sampling rate > by 4 is appropriate: 125Hz, which corresponds to delta-t of 8ms. The > suggested 25ms by the reviewer are related to the 40Hz, but averaging over > the 25ms would constitute an additional lowpass of poor quality. > I would therefore recommend to rerun the cluster analysis using subsampled > data. In principle, you may retrieve four different sets from the > subsampling routine by taking either always the first, the second, the > third or the forth sample of the 8ms interval. However, the results of the > cluster analysis should be almost identical. > > best wishes, > Burkhard > > > > -- > Dr. Burkhard Maess > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstr. 1a, D-04301 Leipzig, Germany > phone/fax: +49 341 9940-2526/-2511 mail: maess 'at' cbs.mpg.de, > http://www.cbs.mpg.de > > ----- Original Message ----- > | From: "Diego Lozano-Soldevilla" > | To: "FieldTrip discussion list" > | Sent: Wednesday, 27 June, 2018 12:09:43 > | Subject: Re: [FieldTrip] low-pass filtering > > | Hi Irina, > | > | On the one hand, the smoothing can indeed influence the cluster size. On > the > | other hand, the "type" of smoothing will influence how sensitive are you > to > | detect the potential differences too. I would try to illustrate the > reviewer > | the trade off between the type of differences you may have (transient vs > | sustained; regarding the temporal domain) and the filter type that can > be more > | appropriate to detect the differences to justify your pipeline. I have > no idea > | about the type of ERF you're studying but I hope the example is > illustrative > | enough > | > | Look at the attached screenshot. In the first column, I simulated a > transient > | ERF with added noise (code below) and I ran the non-parametric > cluster-based > | permutation test that showed some significant and discontinuous > differences. > | The second column represents the same data but with a lowpass filter (40 > Hz) > | and I find longer significant clusters. If you look at the filtered > ERFs, the > | structure is very similar to the noisy, unfiltered version. The third > column is > | what I understand is requested by the reviewer. Suddenly, no significant > | differences are found because the ground truth simulated difference was > too > | short and weak to survive the 0.25ms averaging. In case of a long and > sustained > | ERF, may be the three plots would had been more congruent. > | > | I guess that the permutation part of the cluster-based nonparametric > test will > | take into account the non-independecy in the data resulting from low-pass > | filtering. This non-independency will be the same for the original and > the > | permuted surrogates. > | > | I hope that helps! > | > | Diego > | > | > | > | %--------------------------------- > | > | fsample = 600; > | sigma = 0.5; > | ferf = 6.0; > | Aerf1 = -0.7; > | Aerf2 = -0.2; > | tau1 = 0.1; > | tau2 = 0.05; > | t = -0.8:1/fsample:0.8; > | signoise = 0.2; > | t0 = 0.05; > | t0idx = nearest(t,t0); > | ntrials = 100; > | > | data1.label{1}='Oz'; > | data2.label{1}='Oz'; > | > | for k=1:ntrials; > | freq1 = normrnd(ferf,sigma); > | freq2 = normrnd(ferf,sigma); > | for tk = 1:size(t,2); > | phi1 = random('uniform',0,pi,1,1); > | phi2 = random('uniform',0,pi,1,1); > | if tk > t0idx; > | Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * > | sin(2*pi*freq1*(t(1,tk)-t0)+phi1); > | Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * > | sin(2*pi*freq2*(t(1,tk)-t0)+phi2); > | end > | Snoise1 = signoise.*randn(size(t)); > | Snoise2 = signoise.*randn(size(t)); > | end > | data1.trial{k}(1,:) = Serf1 + Snoise1; > | data1.time{k} = t; > | data2.trial{k}(1,:) = Serf2 + Snoise2; > | data2.time{k} = t; > | end > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1); > | timelock2 = ft_timelockanalysis(cfg, data2); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | legend('condition 1', 'condition 2', 'difference'); > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('raw data: unfiltered') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | %% low pass 40 Hz > | cfg = []; > | cfg.lpfilter = 'yes'; > | cfg.lpfreq = 40; > | data1_lp40 = ft_preprocessing(cfg, data1); > | data2_lp40 = ft_preprocessing(cfg, data2); > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1_lp40); > | timelock2 = ft_timelockanalysis(cfg, data2_lp40); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('lowpass filtering 40Hz') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | %% boxcar 0.25ms > | cfg = []; > | cfg.boxcar = 0.25; > | data1_box = ft_preprocessing(cfg, data1); > | data2_box = ft_preprocessing(cfg, data2); > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1_box); > | timelock2 = ft_timelockanalysis(cfg, data2_box); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('boxcar filter 0.25s') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | > | > | > | On 26 June 2018 at 17:16, Simanova, I. (Irina) < > i.simanova at donders.ru.nl > > | wrote: > | > | > | > | Dear experts, > | > | We recently submitted a paper where we use a cluster permutation > analysis of > | ERFs (testing conditions exchangeability) . The EEG was sampled at 500 > Hz and > | low-pass filtered at 40 Hz during preprocessing. One of the reviewers has > | indicated that u sing this temporal resolution for the analysis seems > | unnecessary given the low-pass filter, which makes each time point not > | independent due to smoothing. He further asks: " Do all key significant > | components replicate if the analysis is performed using a mean amplitude > that > | is averaged for larger time bins (25 ms bins) instead of individual time > | points?" > | > | I understand that when doing parametric analysis one might want to > reduce the > | number of comparisons by averaging ERF samples over time bins. But here > we > | solve the MCP with the cluster analysis. But it also seems like the > reviewer is > | concerned about non-independecy in the data resulting from low-pass > filtering. > | I wanted to check with you: can smoothing time-series indeed compromise > the > | cluster-based analysis (e.g. affect the cluster size)? > | > | Thank you, > | Kind regards, > | Irina > | > | > | > | > | _______________________________________________ > | fieldtrip mailing list > | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > | https://doi.org/10.1371/journal.pcbi.1002202 > | > | > | _______________________________________________ > | fieldtrip mailing list > | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > | https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2018-06-27 15-11-38.png Type: image/png Size: 58548 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: untitled.png Type: image/png Size: 13832 bytes Desc: not available URL: From i.simanova at donders.ru.nl Thu Jun 28 11:46:12 2018 From: i.simanova at donders.ru.nl (Simanova, I. (Irina)) Date: Thu, 28 Jun 2018 09:46:12 +0000 Subject: [FieldTrip] low-pass filtering Message-ID: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> Hi Diego, Hi Matthias, Dear Burkhard, Thank you very much for your replies, they are very helpful. My intuition was that the permutation test should not be affected by the filtering, because any non-independecy would be identical in the real and permuted data. And I would also expect that averaging over 25 ms reduces the data and removes all effects. The simulation (thank you, Diego), and the comment on the bandwidth (thanks Burkhard) make it really clear. We will indeed rerun the analysis on downsampled data to 125hz, and I do not expect to see much difference from the original analysis, same as in Diego’s simulation. Best, Irina From dlozanosoldevilla at gmail.com Thu Jun 28 11:53:09 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Thu, 28 Jun 2018 11:53:09 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> References: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> Message-ID: You're welcome Irina! Best wishes for the review process! Cheers, Diego On 28 June 2018 at 11:46, Simanova, I. (Irina) wrote: > Hi Diego, Hi Matthias, Dear Burkhard, > > Thank you very much for your replies, they are very helpful. > > My intuition was that the permutation test should not be affected by the > filtering, because any non-independecy would be identical in the real and > permuted data. And I would also expect that averaging over 25 ms reduces > the data and removes all effects. The simulation (thank you, Diego), and > the comment on the bandwidth (thanks Burkhard) make it really clear. We > will indeed rerun the analysis on downsampled data to 125hz, and I do not > expect to see much difference from the original analysis, same as in > Diego’s simulation. > > Best, > Irina > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alessandro.orticoni at gmail.com Thu Jun 28 17:22:03 2018 From: alessandro.orticoni at gmail.com (Alessandro Orticoni) Date: Thu, 28 Jun 2018 17:22:03 +0200 Subject: [FieldTrip] [Fieldtrip] Line noise Removal Message-ID: Dear experts, I'm basically a beginner in coding with Fieldtrip, and I'm having a problem with line noise filtering. I would like to remove it from the heart rate signal, and I tried just typing 'yes' at the option cfg.dftfilter. But is doesn't seem to work, since the power spectrum contains the 50Hz and her harmonics even after the filtering. You can find the code in the following lines: %% ===FREQUENCY Pre Filtering VERIFICATION=== fs=data.fsample; cfg = []; cfg.output = 'pow'; cfg.channel = 'ECG 2'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz = ft_freqanalysis(cfg, data_epoched_Cz); %% ===Plot Spectra=== figure; plot(freq_epoched_Cz.freq,mag2db(freq_epoched_Cz.powspctrm)); %% ===Filtering=== cfg = []; cfg.channel = {'ECG 2'}; cfg.dftfilter = 'yes'; ECG_Filtered = ft_preprocessing(cfg,data_Cz); cfg = []; cfg.length = 30; % in seconds; cfg.overlap = 0; data_epoched_ECG_Filtered = ft_redefinetrial(cfg, ECG_Filtered); cfg = []; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz_Filtered = ft_freqanalysis(cfg, data_epoched_ECG_Filtered); %% ===Plot Spectra=== plot(freq_epoched_Cz_Filtered.freq,mag2db(freq_epoched_Cz_Filtered.powspctrm)); Thanks a lot. Kind regards, Alessandro Orticoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 28 18:35:34 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 28 Jun 2018 16:35:34 +0000 Subject: [FieldTrip] [Fieldtrip] Line noise Removal In-Reply-To: References: Message-ID: <57F427CD-DB64-4A98-A8D6-55810F80E4AA@donders.ru.nl> Dear Alessandro, Given the code you provided it looks as if you have one single very long trial that you subject to dft-filtering. If the power line fluctuations actually do vary a bit in amplitude, which is likely (particularly given long sections of data), the pure 50 (or 60) Hz sinusoid will get some ‘bandwidth’, so the removal won’t be perfect. I’d recommend to call ft_redefinetrial first, and then do a second call to ft_preprocessing with the dftfilter switched on. Yet, I’d expect that with 30 s segments it still won’t work that well. In this case you could widen the notch a bit by specifying cfg.dftfreq = 50+(-n:n)./30;, with n put to a small number, e.g. <=3. However, unless you have good reasons to have the data chopped in half-minute segments, I’d also consider to reduce this length, because you probably do not need to have a 1/30 Hz frequency resolution in your spectral decomposition. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Associate PI, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 28 Jun 2018, at 16:22, Alessandro Orticoni > wrote: Dear experts, I'm basically a beginner in coding with Fieldtrip, and I'm having a problem with line noise filtering. I would like to remove it from the heart rate signal, and I tried just typing 'yes' at the option cfg.dftfilter. But is doesn't seem to work, since the power spectrum contains the 50Hz and her harmonics even after the filtering. You can find the code in the following lines: %% ===FREQUENCY Pre Filtering VERIFICATION=== fs=data.fsample; cfg = []; cfg.output = 'pow'; cfg.channel = 'ECG 2'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz = ft_freqanalysis(cfg, data_epoched_Cz); %% ===Plot Spectra=== figure; plot(freq_epoched_Cz.freq,mag2db(freq_epoched_Cz.powspctrm)); %% ===Filtering=== cfg = []; cfg.channel = {'ECG 2'}; cfg.dftfilter = 'yes'; ECG_Filtered = ft_preprocessing(cfg,data_Cz); cfg = []; cfg.length = 30; % in seconds; cfg.overlap = 0; data_epoched_ECG_Filtered = ft_redefinetrial(cfg, ECG_Filtered); cfg = []; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz_Filtered = ft_freqanalysis(cfg, data_epoched_ECG_Filtered); %% ===Plot Spectra=== plot(freq_epoched_Cz_Filtered.freq,mag2db(freq_epoched_Cz_Filtered.powspctrm)); Thanks a lot. Kind regards, Alessandro Orticoni _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yadwinder.kaur at stud.uni-greifswald.de Sat Jun 30 15:06:19 2018 From: yadwinder.kaur at stud.uni-greifswald.de (Yadwinder Kaur) Date: Sat, 30 Jun 2018 15:06:19 +0200 Subject: [FieldTrip] Concatenate different size of trials into single one trial Message-ID: Dear All I have pre-processed my EEG data cutting into different trials (35 trials total) using fieldtrip , now I wish to concatenate them into one single data matrix. The length of each trial varies form each other. ofcourse, ft_appenddata didn't work in this case. I would highly appreciate any help to solve this issue. Thanks in advance. Regards Yadwinder -------------- next part -------------- An HTML attachment was scrubbed... URL: From deydhiman794 at gmail.com Sat Jun 2 20:55:25 2018 From: deydhiman794 at gmail.com (Dhiman Dey) Date: Sun, 3 Jun 2018 00:25:25 +0530 Subject: [FieldTrip] Brain source localization using EEG SIGNAL(ELORETA) Message-ID: Hello Please help me out.I am doing project on EEG signal to localize the brain source. I am using ELORETA technique in fieldtrip. I completed the preprocessing process,forward problem and now am stucked in the inverse problem. That is while using the eloreta method in ft_source analysis. If anyone has the code for source analysis please provide me. I am attaching the source analysis code as well as the error. Please help me. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IMG-20180603-WA0000.jpg Type: image/jpeg Size: 172924 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IMG-20180602-WA0004.jpg Type: image/jpeg Size: 168391 bytes Desc: not available URL: From mfibm at yahoo.com Sun Jun 3 11:34:28 2018 From: mfibm at yahoo.com (Mohamed Fawzy) Date: Sun, 3 Jun 2018 09:34:28 +0000 (UTC) Subject: [FieldTrip] error References: <773513623.1549476.1528018468996.ref@mail.yahoo.com> Message-ID: <773513623.1549476.1528018468996@mail.yahoo.com> Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Undefined function 'ft_info' for input arguments of type 'char'. how i fix that error -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfibm at yahoo.com Sun Jun 3 15:25:59 2018 From: mfibm at yahoo.com (Mohamed Fawzy) Date: Sun, 3 Jun 2018 13:25:59 +0000 (UTC) Subject: [FieldTrip] i got this error References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> Message-ID: <846398119.1559949.1528032359313@mail.yahoo.com> ft_definetrial (cfg);Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat Warning: no trialfun was specified, using ft_trialfun_general evaluating trialfunction 'ft_trialfun_general'reading the header from 'ArtifactMEG.ds'Error using ft_read_header (line 202)file or directory 'ArtifactMEG.ds' does not exist Error in ft_trialfun_general (line 84)  hdr = ft_read_header (cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 178)    [trl, event] = feval (cfg.trialfun, cfg);how i fix it  -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jun 12 12:50:29 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 12 Jun 2018 12:50:29 +0200 Subject: [FieldTrip] i got this error In-Reply-To: <846398119.1559949.1528032359313@mail.yahoo.com> References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> Message-ID: The dataset simply does not exist. You could fix that error by downloading the dataset that you want to process and by putting it in your working directory. Please note that FieldTrip requires quite some MATLAB knowledge. If you get stuck here, you might not get very far with subsequent data analysis either. You may want to check out http://www.fieldtriptoolbox.org/references_to_review_papers_and_teaching_material#programming . best regards, Robert > On 3 Jun 2018, at 15:25, Mohamed Fawzy wrote: > > ft_definetrial (cfg); > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: file or directory "ArtifactMEG.ds" does not exist, could not determine fileformat > Warning: no trialfun was specified, using ft_trialfun_general > evaluating trialfunction 'ft_trialfun_general' > reading the header from 'ArtifactMEG.ds' > Error using ft_read_header (line 202) > file or directory 'ArtifactMEG.ds' does not exist > > Error in ft_trialfun_general (line 84) > hdr = ft_read_header (cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 178) > [trl, event] = feval (cfg.trialfun, cfg); > how i fix it > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.bleichner at uni-oldenburg.de Wed Jun 13 15:07:52 2018 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Wed, 13 Jun 2018 15:07:52 +0200 Subject: [FieldTrip] LSL Workshop Registration - Now Open In-Reply-To: <9e31942b-0fa1-9673-a4ab-d5501d82b315@uni-oldenburg.de> References: <9e31942b-0fa1-9673-a4ab-d5501d82b315@uni-oldenburg.de> Message-ID: <0b0c573b-1855-4b5e-3b7b-2c36a6647b73@uni-oldenburg.de> Hi all, We are happy to announce the second international Lab Streaming Layer (LSL) workshop, which will take place September 27 - 28, 2018, at the Hanse Wissenschaftskolleg, in Delmenhorst, Germany. You can now register for the event: http://www.h-w-k.de/index.php?id=2266. The registration is open until*July 30, 2018.*The number of participants is limited to 40 people. The workshop participation fee is /*100,00 € reduced rate for Postdocs, PhDs, and Students 350,00 € for Industrial Partners, and Other*/ and includes meals. Participants need to cover their own travel expenses.  LSL is an open-source project enabling the synchronized streaming of time series data coming from different devices, such as EEG amplifiers, audio, video, eye tracking, keyboards, etc. LSL features near real-time access to data streams, time-synchronization, networking and centralized collection. Key LSL developers and expert users have confirmed attendance. The workshop will provide a general introduction to LSL. We will present how LSL can be used for a multitude of different experimental setups, using a variety of experimental software, hardware and operating systems. In a hands-on session, participants can learn to stream data from their own hardware or play with hardware provided by us and external partners. We will name pitfalls and discuss how to test and ensure the best possible timing accuracy when recording multimodal data. We will also provide a best practice guide and present different use cases of LSL. We will also use the workshop to discuss future software and hardware developments. For further enquiries, please contact: martin.bleichner at uol.de Best, Martin Bleichner -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From o.jensen at bham.ac.uk Thu Jun 14 12:12:33 2018 From: o.jensen at bham.ac.uk (Ole Jensen) Date: Thu, 14 Jun 2018 11:12:33 +0100 Subject: [FieldTrip] Biomag2018/Competitions Message-ID: <2e0acea2-58f2-f9bb-a25d-48d984c07c07@bham.ac.uk> Dear all, I would like to point you to these two exciting competitions at Biomag2018: _ __Epilepsy data_ (Valentina Gumenyuk, Hudson Regional Hospital): https://sites.google.com/view/biomag-2018-challenge/home _OPMs_ (Gareth Barnes, UCL/Nottingham): http://www.fil.ion.ucl.ac.uk/~gbarnes/ Deadline for submitting is Aug 1, 2018 Please make interested colleagues/students aware! All the best, Ole -- Prof. Ole Jensen Centre for Human Brain Health, University of Birmingham http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Oleksiy.Bobrov at uni-konstanz.de Thu Jun 14 16:32:24 2018 From: Oleksiy.Bobrov at uni-konstanz.de (Oleksiy Bobrov) Date: Thu, 14 Jun 2018 16:32:24 +0200 Subject: [FieldTrip] Windows10: Missing dependent shared libraries: 'MSVCR100.dll' In-Reply-To: References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> Message-ID: <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> Please, help to fix the following error-exception with Windows10: Invalid MEX-file 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64': Missing dependent shared libraries: 'MSVCR100.dll' required by 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64'. The above error accuses every time,  we use "ft_compile_mex"-function. The 'MSVCR100.dll'-library is installed, and will be found. Here is our  configuration. 1. Windows 10 Prof. (fresh installed, up-to-date) 2. Matlab 2018a. 3. Visual C++ Redistributable für Visual Studio 2015 is installed. 4. Fieldtrip-20180603 is in use. Perhaps, would someone report a workable Windows10-runtime for Fieldtrip? Best regards Mr. Oleksiy Bobrov EEG-lab University of Konstanz Germany From r.oostenveld at donders.ru.nl Thu Jun 14 21:12:31 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 14 Jun 2018 21:12:31 +0200 Subject: [FieldTrip] Windows10: Missing dependent shared libraries: 'MSVCR100.dll' In-Reply-To: <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> References: <846398119.1559949.1528032359313.ref@mail.yahoo.com> <846398119.1559949.1528032359313@mail.yahoo.com> <4b7e2e51-acf2-18d8-bcaa-fca88bc5506b@uni-konstanz.de> Message-ID: <9ACD5476-F88C-4C6D-9CA3-46DBAE1DC4C1@donders.ru.nl> Please try copying the MSVCR100.dll file into the fieldtrip-20180603\src directory. best Robert > On 14 Jun 2018, at 16:32, Oleksiy Bobrov wrote: > > Please, help to fix the following error-exception with Windows10: > > Invalid MEX-file 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64': Missing dependent shared libraries: 'MSVCR100.dll' required by 'W:\Fieldtrip\fieldtrip-20180603\src\ft_getopt.mexw64'. > The above error accuses every time, we use "ft_compile_mex"-function. The 'MSVCR100.dll'-library is installed, and will be found. > Here is our configuration. > > 1. Windows 10 Prof. (fresh installed, up-to-date) > 2. Matlab 2018a. > 3. Visual C++ Redistributable für Visual Studio 2015 is installed. > 4. Fieldtrip-20180603 is in use. > > Perhaps, would someone report a workable Windows10-runtime for Fieldtrip? > > Best regards > Mr. Oleksiy Bobrov > EEG-lab > University of Konstanz > Germany > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From fanny.lachat at gmail.com Fri Jun 15 17:31:29 2018 From: fanny.lachat at gmail.com (Fanny) Date: Fri, 15 Jun 2018 17:31:29 +0200 Subject: [FieldTrip] preproc : electrodes missing and databrowser Message-ID: hello fieldtrip users, I have encounter some problems and I hope you can help me with those .... 1- I have EEG data : 128 channel -with 1 ref so 127 Channel and 2 EOG- so 129 channels at the end. All of my channels are label 'EEG'. When I do the preprocessing at the end I obtain 125 channels ... my 2 eog channel and channel O9 and O10 are gone ... I don t know how to fix that because of course I want to analyse the 129 channels. on the hdr ( from ft_preprocessing) : hdr.label = 129 and hdr.type = eeg for the 129 channel BUT the cfg.channel ( from ft_preprocessing) is 125 .... ---- My preprocessing : cfg = []; cfg.dataset = 'sujet12_250418000001.eeg'; % filter HP and DFT (50Hz) cfg.hpinstabilityfix = 'reduce'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.5; cfg.dftfilter = 'yes'; data_preprocv02 = ft_preprocessing (cfg) ----- 2- this there a difference between cfg.preproc.hpfilter and cfg.hpfilter ? ---- 3- when I do on my preprocessing data : cfg = []; cfg.method = 'average'; cfg.elec = elec; cfg.badchannel = {'AFp2'}; cfg.neighbours = neighbours; data_interp = ft_channelrepair(cfg,data_preproc); and then I want to vizualised my data_preproc again ft_databrowser (cfg,data_preproc) The signal of my data_preproc looks different that BEFORE the channelrepair ... does channelrepair change something to the data ... ? Thank you for your help ! Fanny -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.kayser at uni-bielefeld.de Tue Jun 19 12:03:27 2018 From: christoph.kayser at uni-bielefeld.de (Christoph Kayser) Date: Tue, 19 Jun 2018 12:03:27 +0200 Subject: [FieldTrip] PostDoc & PhD Position, Cognitive Neuroscience, Bielefeld, Germany Message-ID: <01ac01d407b4$c5174010$4f45c030$@uni-bielefeld.de> The Department of Cognitive Neuroscience at Bielefeld University, Germany, is advertising a 3-year Postdoctoral position, and a 3-year PhD position in auditory and multisensory neuroimaging studies. We are looking to fill two positions to complement our research on auditory and multisensory perception based on a combination of psychophysics, neuroimaging (EEG) and statistical modelling. The Department for Cognitive Neuroscience is dedicated to understanding the integration of sensory information in the brain. Our studies use state of the art EEG imaging, combined with eyetracking, psychophysical paradigms, and substantive quantitative data analysis to better understand when and how the brain transforms sensory information into a conscious percept. Further details about our research can be found here http://www.uni-bielefeld.de/biologie/cns/ The positions involve all aspects of study design, implementation, data collection, data analysis and the write up of results. Contributions to the supervision of student projects or the preparation of practical courses are also expected. Applicants should have a background in neuroscience, cognitive science, psychology, mathematics, or a relevant discipline. Applicants for the post-doc position should have a doctoral degree or equivalent title. We are especially interested in devotion to advanced quantitative data analysis including the capabilities to program or modify analysis code. The ideal applicant will have a strong analytical background and direct experience using MATLAB. Applicants should have enthusiasm, and a clear, demonstrable capacity for acquiring expertise in these techniques. Being fluent in German is considered a major advantage. The positions are funded for 3 years starting ideally around September 2018, at Germany salary grades TV-L E13 (100% for post-doc, 65% for PhD student). Application deadline is July 16th. Further information and the official advert in German can be found here: https://www.uni-bielefeld.de/Universitaet/Aktuelles/Stellenausschreibungen/A nzeigen/Wiss/wiss18107.pdf and here https://www.uni-bielefeld.de/Universitaet/Aktuelles/Stellenausschreibungen/A nzeigen/Wiss/wiss18106.pdf Interested candidates please contact Christoph Kayser -------------- next part -------------- An HTML attachment was scrubbed... URL: From Patrick.Rollo at uth.tmc.edu Tue Jun 19 16:51:22 2018 From: Patrick.Rollo at uth.tmc.edu (Rollo, Patrick) Date: Tue, 19 Jun 2018 14:51:22 +0000 Subject: [FieldTrip] Postdoctoral Research Positions Available Message-ID: <56528a0782fe44229fec0e99867c4997@uth.tmc.edu> Fieldtrip Users, Postdoctoral research positions are available in the lab of Dr. Nitin Tandon using ECoG and fMRI to evaluate psycholingustic models of reading and speech production and create network level representations of language. The advert is attached above, please reach out if you have any questions Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Tandon Lab POSTDOCTORAL RESEARCH POSITION-1.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 166222 bytes Desc: Tandon Lab POSTDOCTORAL RESEARCH POSITION-1.docx URL: From jedmeltzer at yahoo.com Wed Jun 20 20:55:02 2018 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Wed, 20 Jun 2018 18:55:02 +0000 (UTC) Subject: [FieldTrip] Postdoctoral Position Toronto : Treatment and Neuroimaging of Chronic Pain References: <473438130.2426355.1529520902566.ref@mail.yahoo.com> Message-ID: <473438130.2426355.1529520902566@mail.yahoo.com> A multidisciplinary research team in Toronto seeks a Postdoctoral Fellow to conduct research as part of the first large Canadian national grant - CIHR SPOR Chronic Pain Network - dedicated to conducting innovative research to improve the lives of many Canadians with chronic pain. The successful candidate will examine the effects and mechanisms associated with complementary therapy for managing chronic pain (i.e., Rhythmic Sensory Stimulation and Music) using behavioral and neuroimaging methods, including MEG and MRI. The successful candidate will collaborate with experts in various fields at renowned academic centres across the city, including the Toronto Academic Pain Medicine Institute at Women’s College Hospital, the Rotman Research Institute at Baycrest Health Sciences, and the Faculty of Music at University of Toronto. Preferred Start Date: Sept 1, 2018 (negotiable)Duration: 2-3 yearsSupervisor: Dr. Lee Bartel, Faculty of Music, University of TorontoCollaborating Supervisors:  Dr. Tania Di Rena, Women’s College Hospital & Dr. Jed Meltzer, Baycrest Health SciencesSalary: $50,000 per year Responsibilities will include: conducting literature reviews, preparation and submission of research ethics board applications, study design, recruiting participants, collecting data, organizing and maintaining research tracking databases, and managing all administrative aspects of conducting pilot studies and randomized clinical trials. The candidate will also have the opportunity to be an author on grant proposals, manuscripts, and poster abstracts, and to present their work at national and international conferences.  The deadline to apply is Friday July 27, 2018.   Please include the following information in your application: 1)    1-page cover letter with a concise description of why you are interested in this position and how your academic and professional background make you a strong candidate for this research opportunity2)    Curriculum vitae 3)    Your unofficial transcript Submissions that are missing any components of this application will not be considered. You will be required to conduct research onsite at the Women’s College Hospital and Baycrest Health Sciences. Preference will be given to individuals who have training in neuroimaging, behavioural, and/or cognitive neuroscience, psychology or related research focused disciplines. Given the proposed mechanisms of Rhythmic Sensory Stimulation, research interests in rhythmic and oscillatory neural activity are especially important. The normal hours of work are 40 hours per week for a full-time postdoctoral fellow  recognizing that the needs of the employee’s research and training and the needs of the supervisor’s research program may require flexibility in the performance of the employee’s duties and hours of work. Employment as a Postdoctoral Fellow at the University of Toronto is covered by the terms of the CUPE 3902 Unit 5 Collective Agreement. This job is posted in accordance with the CUPE 3902 Unit 5 Collective Agreement. The University of Toronto is strongly committed to diversity within its community and especially welcomes applications from racialized persons / persons of colour, women, Indigenous / Aboriginal People of North America, persons with disabilities, LGBTQ persons, and others who may contribute to the further diversification of ideas. If you are interested in this position please send your application, preferably combined in one pdf document, to lbartel at chass.utoronto.ca Interviews will commence immediately following the application deadline.     -------------- next part -------------- An HTML attachment was scrubbed... URL: From krugliakova.es at gmail.com Thu Jun 21 11:23:32 2018 From: krugliakova.es at gmail.com (Elena Krugliakova) Date: Thu, 21 Jun 2018 11:23:32 +0200 Subject: [FieldTrip] flipped sourceplot Message-ID: Dear FieldTrip users, I am trying to plot my source localisation results on parcelled brain following this tutorial: http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_result_in_parceled_brain_space Similarly to the figure in tutorial I get plot with inverted left-right axis (left appears on the right and right on the left). I guess this is related to the transformation matrix of* template_mri* that is used for interpolation of source and atlas. Is there some way to flip left and right on the sourceplot? Thanks! Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 21 11:43:06 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 21 Jun 2018 09:43:06 +0000 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Hi Elena, I guess that any graphics editing program (like adobe illustrator, or even windows paint) can flip the figure for you. :) If you want to do this prior to generating the figure, you can cal ft_volumereslice on your anatomical image. Provided the coordinate system attached to the volume is right handed, right will be right and left will be left, after reslicing. Best wishes, Jan-Mathijs On 21 Jun 2018, at 11:23, Elena Krugliakova > wrote: Dear FieldTrip users, I am trying to plot my source localisation results on parcelled brain following this tutorial: http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_result_in_parceled_brain_space Similarly to the figure in tutorial I get plot with inverted left-right axis (left appears on the right and right on the left). I guess this is related to the transformation matrix of template_mri that is used for interpolation of source and atlas. Is there some way to flip left and right on the sourceplot? Thanks! Elena _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From krugliakova.es at gmail.com Thu Jun 21 15:17:47 2018 From: krugliakova.es at gmail.com (Elena Krugliakova) Date: Thu, 21 Jun 2018 15:17:47 +0200 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Dear Jan-Mathijs, Thank you for your answer, it helped! But additionally I needed to interpolate atlas on the resliced mri, otherwise ft_sourceparcellate gave me an error "*the source positions are not consistent with the parcellation*". Best, Elena On 21 June 2018 at 11:43, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Elena, > > I guess that any graphics editing program (like adobe illustrator, or even > windows paint) can flip the figure for you. :) > If you want to do this prior to generating the figure, you can cal > ft_volumereslice on your anatomical image. Provided the coordinate system > attached to the volume is right handed, right will be right and left will > be left, after reslicing. > > Best wishes, > Jan-Mathijs > > On 21 Jun 2018, at 11:23, Elena Krugliakova > wrote: > > Dear FieldTrip users, > > I am trying to plot my source localisation results on parcelled brain > following this tutorial: > http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_ > the_result_in_parceled_brain_space > > Similarly to the figure in tutorial I get plot with inverted left-right > axis (left appears on the right and right on the left). I guess this is > related to the transformation matrix of* template_mri* that is used for > interpolation of source and atlas. > > Is there some way to flip left and right on the sourceplot? > > Thanks! > > Elena > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xiew1202 at gmail.com Thu Jun 21 15:49:36 2018 From: xiew1202 at gmail.com (Xie Wanze) Date: Thu, 21 Jun 2018 09:49:36 -0400 Subject: [FieldTrip] flipped sourceplot In-Reply-To: References: Message-ID: Hi Elena, I had the same issue when I use the sour interpolation function in Fieldtrip. This is what I did: outsource.pos(:,1) = outsource.pos(:,1)*-1; My images are in the SPM system with the AC's coordinates being [0 0 0] and the sagittal (X) coordinate of the PC being 0 too. However, it seems that the ft_sourceinterpolate flips my source images occasionally (not for all the data). I did not spend too much time on it, so I still have no idea why the function does that. Best, Wanze 2018-06-21 9:17 GMT-04:00 Elena Krugliakova : > Dear Jan-Mathijs, > > Thank you for your answer, it helped! > > But additionally I needed to interpolate atlas on the resliced mri, > otherwise ft_sourceparcellate gave me an error "*the source positions are > not consistent with the parcellation*". > > Best, > Elena > > On 21 June 2018 at 11:43, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Elena, >> >> I guess that any graphics editing program (like adobe illustrator, or >> even windows paint) can flip the figure for you. :) >> If you want to do this prior to generating the figure, you can cal >> ft_volumereslice on your anatomical image. Provided the coordinate system >> attached to the volume is right handed, right will be right and left will >> be left, after reslicing. >> >> Best wishes, >> Jan-Mathijs >> >> On 21 Jun 2018, at 11:23, Elena Krugliakova >> wrote: >> >> Dear FieldTrip users, >> >> I am trying to plot my source localisation results on parcelled brain >> following this tutorial: >> http://www.fieldtriptoolbox.org/tutorial/salzburg#plot_the_ >> result_in_parceled_brain_space >> >> Similarly to the figure in tutorial I get plot with inverted left-right >> axis (left appears on the right and right on the left). I guess this is >> related to the transformation matrix of* template_mri* that is used for >> interpolation of source and atlas. >> >> Is there some way to flip left and right on the sourceplot? >> >> Thanks! >> >> Elena >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From o.jensen at bham.ac.uk Fri Jun 22 12:33:34 2018 From: o.jensen at bham.ac.uk (Ole Jensen) Date: Fri, 22 Jun 2018 11:33:34 +0100 Subject: [FieldTrip] Postdoc position/Nerwcastle Message-ID: Dear all, Below an exciting postdoc opportunity. All the best, Ole PS: Also encourage your MEG colleagues to sign up at https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=BIOMAGCENTRAL&A=1_/* */_/*==========================*/_/* */_ */_Post Doctoral Position:_/**Neuronal mechanisms of cognition: multisensory convergence for learning and memory* Research Assistant or Associate position** *Main Supervisor:*Professor Christopher Petkov *Duration:*The position is for 1 with extensions possible *Closing date: *Applications will be evaluated until the closing date:*/_August 21st, 2018_/* A post-doctoral position is available for a European Research Council funded program grant on neuronal mechanisms of cognition: multisensory convergence for learning and memory. The scientific work is a collaboration between Newcastle University Medical School, UK (Professors Christopher Petkov and Timothy Griffiths), the University of Iowa, USA (Department of Neurosurgery, led by Professor Matthew Howard III) and the University of Birmingham, UK (Profs. Ole Jensen and Simon Hanslmayr). The work will involve professionally conducted neurophysiological studies with primate models at Newcastle University. This work will be the primary focus, but the laboratory also works with neurosurgical patients at the University of Iowa and amnesic patients in Newcastle University which will complement the work in animal models. The successful candidate will work on cutting edge behavioural, fMRI and electrophysiological experiments in nonhuman primates to study neural oscillations, cognition and multisensory integration using innovative learning and memory tasks. Some testing of cognitively impaired patients or neural recordings in patients being monitored for surgery would be possible and will help to translate to humans the mechanistic information that requires the work with animals. Cutting edge behavioural, neuroimaging and neurophysiological recording studies will be conducted, including neural system perturbation by stimulation or inactivation to establish causal relationships crucial for learning and memory. The successful candidates will work in the laboratory of Prof. Christopher Petkov at Newcastle University Medical School in Newcastle upon Tyne, United Kingdom. The ideal candidate will possess a PhD in neurobiology, or a related field, have a strong track record and experience with electrophysiological methods (e.g., EEG, MEG, extracellular recordings) or methods of stimulating the brain (e.g., optogenetics, TMS). Evidence of strong computational and technical skills is desired. Being able to work independently and professionally and collegially as part of a team is a must. A PhD in neuroscience or a related field is required for appointment as a Research Associate, but we can also consider strong candidates close to completing their PhD. We seek an individual who already has evidence as a strong scientist, with strong technical and computing skills and a publication track record with demonstrated writing skills. Expertise involving behavioural and neurophysiological work in humans (e.g., EEG/MEG) or related techniques in other animals are strongly recommended. Financial support is available for at least 1 year, with extensions possible. *Value of the Award:*The salary is commensurate with post-doctoral experience. International applicants are encouraged to apply but will need to have obtained permission to work in the UK. Salary is paid in GBP and ranges from £29,301 - £33,183, which is highly competitive given the low cost of living at Newcastle in the UK. *How to Apply: *Please submit a covering letter, full CV and the contact information of at least three individuals who can provide professional references. The covering letter should state how your interests and experience relate to the project and the laboratory work. The application documents can be submitted to chris.petkov at ncl.ac.uk , please include ‘ERC Post-Doctoral Position’ in the subject field. *Further Information: *To find out more about the position please contact chris.petkov at ncl.ac.uk or browse the laboratory website: http://www.staff.ncl.ac.uk/lcnncl. University of Iowa Human Brain Research Laboratory: http://www.healthcare.uiowa.edu/Labs/hbrl-neurosurgery/index.html. Website of Prof. Matthew Howard III, MD: http://www.medicine.uiowa.edu/dept_primary_apr.aspx?appointment=Neurosurgery&id=howardma. Website of Ole Jensen: . Website of Simon Hanslmayr: . -- Prof. Ole Jensen Centre for Human Brain Health, University of Birmingham http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.Hanslmayr at bham.ac.uk Fri Jun 22 14:17:54 2018 From: S.Hanslmayr at bham.ac.uk (Simon Hanslmayr) Date: Fri, 22 Jun 2018 12:17:54 +0000 Subject: [FieldTrip] Postdoc Position available at University of Birmingham Message-ID: <257F6C65A372A04CA41056EACC0DE7CED876D2B1@EX12.adf.bham.ac.uk> Dear Fieldtrippers, We have an exciting opportunity within the Cognition and Oscillations Lab at the University of Birmingham. We are hiring a grade 7 postdoc to start in October 2018 - the deadline for applications is Sunday 1st July. Applications are invited for a full-time Postdoctoral Research Fellow to work within the School of Psychology, University of Birmingham. The successful candidate will work on a 3-year project funded within an ERC Consolidator Grant to investigate the role of brain oscillations for human episodic memory (lab of Dr Simon Hanslmayr). The methodological focus of the project is on intracranial single-unit recordings in human epilepsy patients and computational modelling of oscillations in memory networks. The postdoctoral researcher will be involved in all stages of designing and conducting experiments, analysing electrophysiological data, computational modelling. The postdoctoral researcher will be expected to prepare the results for academic publication, to present at national and international academic conferences, and to engage in public activities. For more info, please have a look at the job advert: https://atsv7.wcn.co.uk/search_engine/jobs.cgi?amNvZGU9MTcyNzQyMSZ2dF90ZW1wbGF0ZT03Njcmb3duZXI9NTAzMjUyMSZvd25lcnR5cGU9ZmFpciZicmFuZF9pZD0wJnZhY2Zpcm0udmFjdGl0bGU9NTUyMDQmcG9zdGluZ19jb2RlPTExNw%3D%3D=&jcode=1727421&vt_template=767&owner=5032521&ownertype=fair&brand_id=0&vacfirm.vactitle=55204&posting_code=117 If you have any queries regarding this post, please contact either myself or Sophie Watson (S.Watson.2 at bham.ac.uk). Kind regards, Simon Dr. Simon Hanslmayr Reader in Cognitive Neuroscience Royal Society Wolfson Research Merit Award Holder School of Psychology Hills Building 2.37 University of Birmingham Edgbaston Birmingham B15 2TT UK Tel +44 121 4146203 http://www.memorybham.com/people/#/simon-hanslmayr/ [http://www.nature.com/content/sr/ebm/1248_2014_Branded_Sig_460x80_v1.gif] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 8560 bytes Desc: image001.gif URL: From i.simanova at donders.ru.nl Tue Jun 26 17:16:40 2018 From: i.simanova at donders.ru.nl (Simanova, I. (Irina)) Date: Tue, 26 Jun 2018 15:16:40 +0000 Subject: [FieldTrip] low-pass filtering Message-ID: Dear experts, We recently submitted a paper where we use a cluster permutation analysis of ERFs (testing conditions exchangeability). The EEG was sampled at 500 Hz and low-pass filtered at 40 Hz during preprocessing. One of the reviewers has indicated that using this temporal resolution for the analysis seems unnecessary given the low-pass filter, which makes each time point not independent due to smoothing. He further asks: "Do all key significant components replicate if the analysis is performed using a mean amplitude that is averaged for larger time bins (25 ms bins) instead of individual time points?" I understand that when doing parametric analysis one might want to reduce the number of comparisons by averaging ERF samples over time bins. But here we solve the MCP with the cluster analysis. But it also seems like the reviewer is concerned about non-independecy in the data resulting from low-pass filtering. I wanted to check with you: can smoothing time-series indeed compromise the cluster-based analysis (e.g. affect the cluster size)? Thank you, Kind regards, Irina -------------- next part -------------- An HTML attachment was scrubbed... URL: From Matthias.Franken at UGent.be Wed Jun 27 11:57:18 2018 From: Matthias.Franken at UGent.be (Matthias Franken) Date: Wed, 27 Jun 2018 09:57:18 +0000 Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: <86f83318618a4a9d8cdec977e8ede658@xmail303.UGent.be> Hi Irina, I’ve been wondering about a similar question a while ago. As far as I can see, I think it can affect cluster size, but without compromising the permutation test. More smoothing should (I guess) lead to larger clusters, but this should affect both the observed clusters as well as the clusters in your premutation distribution (after having permuted data labels). So I guess the comparison should be unaffected. ________________________________________ Matthias Franken postdoctoral researcher Experimental Psychology Department Ghent University From: Simanova, I. (Irina) Sent: Tuesday, 26 June 2018 18:44 To: fieldtrip at science.ru.nl Subject: [FieldTrip] low-pass filtering Dear experts, We recently submitted a paper where we use a cluster permutation analysis of ERFs (testing conditions exchangeability). The EEG was sampled at 500 Hz and low-pass filtered at 40 Hz during preprocessing. One of the reviewers has indicated that using this temporal resolution for the analysis seems unnecessary given the low-pass filter, which makes each time point not independent due to smoothing. He further asks: "Do all key significant components replicate if the analysis is performed using a mean amplitude that is averaged for larger time bins (25 ms bins) instead of individual time points?" I understand that when doing parametric analysis one might want to reduce the number of comparisons by averaging ERF samples over time bins. But here we solve the MCP with the cluster analysis. But it also seems like the reviewer is concerned about non-independecy in the data resulting from low-pass filtering. I wanted to check with you: can smoothing time-series indeed compromise the cluster-based analysis (e.g. affect the cluster size)? Thank you, Kind regards, Irina -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Wed Jun 27 12:09:43 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Wed, 27 Jun 2018 12:09:43 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: Hi Irina, On the one hand, the smoothing can indeed influence the cluster size. On the other hand, the "type" of smoothing will influence how sensitive are you to detect the potential differences too. I would try to illustrate the reviewer the trade off between the type of differences you may have (transient vs sustained; regarding the temporal domain) and the filter type that can be more appropriate to detect the differences to justify your pipeline. I have no idea about the type of ERF you're studying but I hope the example is illustrative enough Look at the attached screenshot. In the first column, I simulated a transient ERF with added noise (code below) and I ran the non-parametric cluster-based permutation test that showed some significant and discontinuous differences. The second column represents the same data but with a lowpass filter (40 Hz) and I find longer significant clusters. If you look at the filtered ERFs, the structure is very similar to the noisy, unfiltered version. The third column is what I understand is requested by the reviewer. Suddenly, no significant differences are found because the ground truth simulated difference was too short and weak to survive the 0.25ms averaging. In case of a long and sustained ERF, may be the three plots would had been more congruent. I guess that the permutation part of the cluster-based nonparametric test will take into account the non-independecy in the data resulting from low-pass filtering. This non-independency will be the same for the original and the permuted surrogates. I hope that helps! Diego %--------------------------------- fsample = 600; sigma = 0.5; ferf = 6.0; Aerf1 = -0.7; Aerf2 = -0.2; tau1 = 0.1; tau2 = 0.05; t = -0.8:1/fsample:0.8; signoise = 0.2; t0 = 0.05; t0idx = nearest(t,t0); ntrials = 100; data1.label{1}='Oz'; data2.label{1}='Oz'; for k=1:ntrials; freq1 = normrnd(ferf,sigma); freq2 = normrnd(ferf,sigma); for tk = 1:size(t,2); phi1 = random('uniform',0,pi,1,1); phi2 = random('uniform',0,pi,1,1); if tk > t0idx; Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * sin(2*pi*freq1*(t(1,tk)-t0)+phi1); Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * sin(2*pi*freq2*(t(1,tk)-t0)+phi2); end Snoise1 = signoise.*randn(size(t)); Snoise2 = signoise.*randn(size(t)); end data1.trial{k}(1,:) = Serf1 + Snoise1; data1.time{k} = t; data2.trial{k}(1,:) = Serf2 + Snoise2; data2.time{k} = t; end cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1); timelock2 = ft_timelockanalysis(cfg, data2); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); legend('condition 1', 'condition 2', 'difference'); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('raw data: unfiltered') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% low pass 40 Hz cfg = []; cfg.lpfilter = 'yes'; cfg.lpfreq = 40; data1_lp40 = ft_preprocessing(cfg, data1); data2_lp40 = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_lp40); timelock2 = ft_timelockanalysis(cfg, data2_lp40); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('lowpass filtering 40Hz') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% boxcar 0.25ms cfg = []; cfg.boxcar = 0.25; data1_box = ft_preprocessing(cfg, data1); data2_box = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_box); timelock2 = ft_timelockanalysis(cfg, data2_box); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('boxcar filter 0.25s') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); On 26 June 2018 at 17:16, Simanova, I. (Irina) wrote: > Dear experts, > > We recently submitted a paper where we use a cluster permutation analysis > of ERFs (testing conditions exchangeability). The EEG was sampled at 500 > Hz and low-pass filtered at 40 Hz during preprocessing. One of the > reviewers has indicated that using this temporal resolution for the > analysis seems unnecessary given the low-pass filter, which makes each time > point not independent due to smoothing. He further asks: "Do all key > significant components replicate if the analysis is performed using a mean > amplitude that is averaged for larger time bins (25 ms bins) instead of > individual time points?" > > I understand that when doing parametric analysis one might want to reduce > the number of comparisons by averaging ERF samples over time bins. But here > we solve the MCP with the cluster analysis. But it also seems like the > reviewer is concerned about non-independecy in the data resulting from > low-pass filtering. I wanted to check with you: can smoothing time-series > indeed compromise the cluster-based analysis (e.g. affect the cluster size)? > > Thank you, > Kind regards, > Irina > > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2018-06-27 11-39-54.png Type: image/png Size: 87542 bytes Desc: not available URL: From maess at cbs.mpg.de Wed Jun 27 13:58:26 2018 From: maess at cbs.mpg.de (Burkhard Maess) Date: Wed, 27 Jun 2018 13:58:26 +0200 (CEST) Subject: [FieldTrip] low-pass filtering In-Reply-To: References: Message-ID: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> Hi Irina and Diego, I am also expecting that the permutation test is rather insensitive to the bandwidth of the underlying data. I only would like to comment on the resampling issue: as a rule of thumb, often a third of the sampling frequency is assumed to represent the available bandwidth. With this ratio - the 500Hz sampled data represents about 160Hz bandwidth. Applying a lowpass of 40Hz (of similar steepness as the one used during the recording) will divide the bandwidth by four. Consequently, dividing the sampling rate by 4 is appropriate: 125Hz, which corresponds to delta-t of 8ms. The suggested 25ms by the reviewer are related to the 40Hz, but averaging over the 25ms would constitute an additional lowpass of poor quality. I would therefore recommend to rerun the cluster analysis using subsampled data. In principle, you may retrieve four different sets from the subsampling routine by taking either always the first, the second, the third or the forth sample of the 8ms interval. However, the results of the cluster analysis should be almost identical. best wishes, Burkhard -- Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, D-04301 Leipzig, Germany phone/fax: +49 341 9940-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ----- Original Message ----- | From: "Diego Lozano-Soldevilla" | To: "FieldTrip discussion list" | Sent: Wednesday, 27 June, 2018 12:09:43 | Subject: Re: [FieldTrip] low-pass filtering | Hi Irina, | | On the one hand, the smoothing can indeed influence the cluster size. On the | other hand, the "type" of smoothing will influence how sensitive are you to | detect the potential differences too. I would try to illustrate the reviewer | the trade off between the type of differences you may have (transient vs | sustained; regarding the temporal domain) and the filter type that can be more | appropriate to detect the differences to justify your pipeline. I have no idea | about the type of ERF you're studying but I hope the example is illustrative | enough | | Look at the attached screenshot. In the first column, I simulated a transient | ERF with added noise (code below) and I ran the non-parametric cluster-based | permutation test that showed some significant and discontinuous differences. | The second column represents the same data but with a lowpass filter (40 Hz) | and I find longer significant clusters. If you look at the filtered ERFs, the | structure is very similar to the noisy, unfiltered version. The third column is | what I understand is requested by the reviewer. Suddenly, no significant | differences are found because the ground truth simulated difference was too | short and weak to survive the 0.25ms averaging. In case of a long and sustained | ERF, may be the three plots would had been more congruent. | | I guess that the permutation part of the cluster-based nonparametric test will | take into account the non-independecy in the data resulting from low-pass | filtering. This non-independency will be the same for the original and the | permuted surrogates. | | I hope that helps! | | Diego | | | | %--------------------------------- | | fsample = 600; | sigma = 0.5; | ferf = 6.0; | Aerf1 = -0.7; | Aerf2 = -0.2; | tau1 = 0.1; | tau2 = 0.05; | t = -0.8:1/fsample:0.8; | signoise = 0.2; | t0 = 0.05; | t0idx = nearest(t,t0); | ntrials = 100; | | data1.label{1}='Oz'; | data2.label{1}='Oz'; | | for k=1:ntrials; | freq1 = normrnd(ferf,sigma); | freq2 = normrnd(ferf,sigma); | for tk = 1:size(t,2); | phi1 = random('uniform',0,pi,1,1); | phi2 = random('uniform',0,pi,1,1); | if tk > t0idx; | Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * | sin(2*pi*freq1*(t(1,tk)-t0)+phi1); | Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * | sin(2*pi*freq2*(t(1,tk)-t0)+phi2); | end | Snoise1 = signoise.*randn(size(t)); | Snoise2 = signoise.*randn(size(t)); | end | data1.trial{k}(1,:) = Serf1 + Snoise1; | data1.time{k} = t; | data2.trial{k}(1,:) = Serf2 + Snoise2; | data2.time{k} = t; | end | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1); | timelock2 = ft_timelockanalysis(cfg, data2); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | legend('condition 1', 'condition 2', 'difference'); | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('raw data: unfiltered') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | %% low pass 40 Hz | cfg = []; | cfg.lpfilter = 'yes'; | cfg.lpfreq = 40; | data1_lp40 = ft_preprocessing(cfg, data1); | data2_lp40 = ft_preprocessing(cfg, data2); | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1_lp40); | timelock2 = ft_timelockanalysis(cfg, data2_lp40); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('lowpass filtering 40Hz') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | %% boxcar 0.25ms | cfg = []; | cfg.boxcar = 0.25; | data1_box = ft_preprocessing(cfg, data1); | data2_box = ft_preprocessing(cfg, data2); | | cfg = []; | cfg.keeptrials = 'yes'; | timelock1 = ft_timelockanalysis(cfg, data1_box); | timelock2 = ft_timelockanalysis(cfg, data2_box); | | diff = timelock1; | diff.avg = timelock1.avg-timelock2.avg; | | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); | | cfg = []; | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; | cfg.ivar = 1; | cfg.method = 'montecarlo'; | cfg.statistic = 'indepsamplesT'; | cfg.correctm = 'cluster'; | cfg.numrandomization = 5000; | stat = ft_timelockstatistics(cfg, timelock1, timelock2); | | figure; | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); | title('boxcar filter 0.25s') | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); | | | | | | On 26 June 2018 at 17:16, Simanova, I. (Irina) < i.simanova at donders.ru.nl > | wrote: | | | | Dear experts, | | We recently submitted a paper where we use a cluster permutation analysis of | ERFs (testing conditions exchangeability) . The EEG was sampled at 500 Hz and | low-pass filtered at 40 Hz during preprocessing. One of the reviewers has | indicated that u sing this temporal resolution for the analysis seems | unnecessary given the low-pass filter, which makes each time point not | independent due to smoothing. He further asks: " Do all key significant | components replicate if the analysis is performed using a mean amplitude that | is averaged for larger time bins (25 ms bins) instead of individual time | points?" | | I understand that when doing parametric analysis one might want to reduce the | number of comparisons by averaging ERF samples over time bins. But here we | solve the MCP with the cluster analysis. But it also seems like the reviewer is | concerned about non-independecy in the data resulting from low-pass filtering. | I wanted to check with you: can smoothing time-series indeed compromise the | cluster-based analysis (e.g. affect the cluster size)? | | Thank you, | Kind regards, | Irina | | | | | _______________________________________________ | fieldtrip mailing list | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip | https://doi.org/10.1371/journal.pcbi.1002202 | | | _______________________________________________ | fieldtrip mailing list | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip | https://doi.org/10.1371/journal.pcbi.1002202 From dlozanosoldevilla at gmail.com Wed Jun 27 15:29:53 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Wed, 27 Jun 2018 15:29:53 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> References: <226826090.76391.1530100706136.JavaMail.zimbra@cbs.mpg.de> Message-ID: Dear Burkhard, Thank you very much for your input. I totally missed the bandwidth point. I rerun the cluster based comparing the 500hz lowpass filtered at 40hz and the downsampled data to 125hz (see code below). As you suggested, the cluster analysis output is almost identical. Best, Diego %------------------------------- fsample = 500; sigma = 0.5; ferf = 6.0; Aerf1 = -0.7; Aerf2 = -0.2; tau1 = 0.1; tau2 = 0.05; t = -0.8:1/fsample:0.8; signoise = 0.2; t0 = 0.05; t0idx = nearest(t,t0); ntrials = 100; data1.label{1}='Oz'; data2.label{1}='Oz'; for k=1:ntrials; freq1 = normrnd(ferf,sigma); freq2 = normrnd(ferf,sigma); for tk = 1:size(t,2); phi1 = random('uniform',0,pi,1,1); phi2 = random('uniform',0,pi,1,1); if tk > t0idx; Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * sin(2*pi*freq1*(t(1,tk)-t0)+phi1); Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * sin(2*pi*freq2*(t(1,tk)-t0)+phi2); end Snoise1 = signoise.*randn(size(t)); Snoise2 = signoise.*randn(size(t)); end data1.trial{k}(1,:) = Serf1 + Snoise1; data1.time{k} = t; data2.trial{k}(1,:) = Serf2 + Snoise2; data2.time{k} = t; end cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1); timelock2 = ft_timelockanalysis(cfg, data2); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); legend('condition 1', 'condition 2', 'difference'); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('raw data: unfiltered') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% low pass 40 Hz cfg = []; cfg.lpfilter = 'yes'; cfg.lpfreq = 40; data1_lp40 = ft_preprocessing(cfg, data1); data2_lp40 = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_lp40); timelock2 = ft_timelockanalysis(cfg, data2_lp40); diff_lp40 = timelock1; diff_lp40.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff_lp40.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat_lp40 = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat_lp40.time, stat_lp40.stat); ylabel('t-value'); title('lowpass filtering 40Hz') subplot(4,1,2); plot(diff_lp40.time, diff_lp40.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat_lp40.time, stat_lp40.prob); ylabel('prob'); subplot(4,1,4); plot(stat_lp40.time, stat_lp40.mask); ylabel('significant'); %% boxcar 0.25ms cfg = []; cfg.boxcar = 0.25; data1_box = ft_preprocessing(cfg, data1); data2_box = ft_preprocessing(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_box); timelock2 = ft_timelockanalysis(cfg, data2_box); diff = timelock1; diff.avg = timelock1.avg-timelock2.avg; figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat = ft_timelockstatistics(cfg, timelock1, timelock2); figure; subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); title('boxcar filter 0.25s') subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); %% downsample the data cfg = []; cfg.resamplefs = 125; cfg.demean = 'yes'; data1_res = ft_resampledata(cfg, data1); data2_res = ft_resampledata(cfg, data2); cfg = []; cfg.keeptrials = 'yes'; timelock1 = ft_timelockanalysis(cfg, data1_res); timelock2 = ft_timelockanalysis(cfg, data2_res); diff_res = timelock1; diff_res.avg = timelock1.avg-timelock2.avg; figure;plot(diff_res.time,[timelock1.avg' timelock2.avg' diff_res.avg']); cfg = []; cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; cfg.ivar = 1; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.numrandomization = 5000; stat_res = ft_timelockstatistics(cfg, timelock1, timelock2); figure; hold all;subplot(4,1,1); plot(stat_res.time, stat_res.stat); ylabel('t-value'); title('downsample to 125 Hz') hold all;subplot(4,1,2); plot(diff_res.time, diff_res.avg); ylabel('avg1-avg2 (uV)'); hold all;subplot(4,1,3); semilogy(stat_res.time, stat_res.prob); ylabel('prob'); subplot(4,1,4); plot(stat_res.time, stat_res.mask); ylabel('significant'); %% all in one plot figure; subplot(4,1,1); plotyy(stat_res.time, stat_res.stat, stat_lp40.time, stat_lp40.stat); ylabel('t-value'); subplot(4,1,2); plotyy(diff_res.time, diff_res.avg, diff_lp40.time, diff_lp40.avg); ylabel('avg1-avg2 (uV)'); subplot(4,1,3); semilogy(stat_res.time, stat_res.prob); hold all;semilogy(stat_lp40.time, stat_lp40.prob); ylabel('prob'); subplot(4,1,4); plotyy(stat_res.time, stat_res.mask,stat_lp40.time, stat_lp40.mask); ylabel('significant'); legend('downsampled 125hz','500hz + lpfilt 40hz') On 27 June 2018 at 13:58, Burkhard Maess wrote: > Hi Irina and Diego, > > I am also expecting that the permutation test is rather insensitive to the > bandwidth of the underlying data. I only would like to comment on the > resampling issue: as a rule of thumb, often a third of the sampling > frequency is assumed to represent the available bandwidth. With this ratio > - the 500Hz sampled data represents about 160Hz bandwidth. Applying a > lowpass of 40Hz (of similar steepness as the one used during the recording) > will divide the bandwidth by four. Consequently, dividing the sampling rate > by 4 is appropriate: 125Hz, which corresponds to delta-t of 8ms. The > suggested 25ms by the reviewer are related to the 40Hz, but averaging over > the 25ms would constitute an additional lowpass of poor quality. > I would therefore recommend to rerun the cluster analysis using subsampled > data. In principle, you may retrieve four different sets from the > subsampling routine by taking either always the first, the second, the > third or the forth sample of the 8ms interval. However, the results of the > cluster analysis should be almost identical. > > best wishes, > Burkhard > > > > -- > Dr. Burkhard Maess > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstr. 1a, D-04301 Leipzig, Germany > phone/fax: +49 341 9940-2526/-2511 mail: maess 'at' cbs.mpg.de, > http://www.cbs.mpg.de > > ----- Original Message ----- > | From: "Diego Lozano-Soldevilla" > | To: "FieldTrip discussion list" > | Sent: Wednesday, 27 June, 2018 12:09:43 > | Subject: Re: [FieldTrip] low-pass filtering > > | Hi Irina, > | > | On the one hand, the smoothing can indeed influence the cluster size. On > the > | other hand, the "type" of smoothing will influence how sensitive are you > to > | detect the potential differences too. I would try to illustrate the > reviewer > | the trade off between the type of differences you may have (transient vs > | sustained; regarding the temporal domain) and the filter type that can > be more > | appropriate to detect the differences to justify your pipeline. I have > no idea > | about the type of ERF you're studying but I hope the example is > illustrative > | enough > | > | Look at the attached screenshot. In the first column, I simulated a > transient > | ERF with added noise (code below) and I ran the non-parametric > cluster-based > | permutation test that showed some significant and discontinuous > differences. > | The second column represents the same data but with a lowpass filter (40 > Hz) > | and I find longer significant clusters. If you look at the filtered > ERFs, the > | structure is very similar to the noisy, unfiltered version. The third > column is > | what I understand is requested by the reviewer. Suddenly, no significant > | differences are found because the ground truth simulated difference was > too > | short and weak to survive the 0.25ms averaging. In case of a long and > sustained > | ERF, may be the three plots would had been more congruent. > | > | I guess that the permutation part of the cluster-based nonparametric > test will > | take into account the non-independecy in the data resulting from low-pass > | filtering. This non-independency will be the same for the original and > the > | permuted surrogates. > | > | I hope that helps! > | > | Diego > | > | > | > | %--------------------------------- > | > | fsample = 600; > | sigma = 0.5; > | ferf = 6.0; > | Aerf1 = -0.7; > | Aerf2 = -0.2; > | tau1 = 0.1; > | tau2 = 0.05; > | t = -0.8:1/fsample:0.8; > | signoise = 0.2; > | t0 = 0.05; > | t0idx = nearest(t,t0); > | ntrials = 100; > | > | data1.label{1}='Oz'; > | data2.label{1}='Oz'; > | > | for k=1:ntrials; > | freq1 = normrnd(ferf,sigma); > | freq2 = normrnd(ferf,sigma); > | for tk = 1:size(t,2); > | phi1 = random('uniform',0,pi,1,1); > | phi2 = random('uniform',0,pi,1,1); > | if tk > t0idx; > | Serf1(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau1)) * > | sin(2*pi*freq1*(t(1,tk)-t0)+phi1); > | Serf2(1,tk) = Aerf2 * exp(1 - ((t(1,tk)-t0)/tau2)) * > | sin(2*pi*freq2*(t(1,tk)-t0)+phi2); > | end > | Snoise1 = signoise.*randn(size(t)); > | Snoise2 = signoise.*randn(size(t)); > | end > | data1.trial{k}(1,:) = Serf1 + Snoise1; > | data1.time{k} = t; > | data2.trial{k}(1,:) = Serf2 + Snoise2; > | data2.time{k} = t; > | end > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1); > | timelock2 = ft_timelockanalysis(cfg, data2); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | legend('condition 1', 'condition 2', 'difference'); > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('raw data: unfiltered') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | %% low pass 40 Hz > | cfg = []; > | cfg.lpfilter = 'yes'; > | cfg.lpfreq = 40; > | data1_lp40 = ft_preprocessing(cfg, data1); > | data2_lp40 = ft_preprocessing(cfg, data2); > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1_lp40); > | timelock2 = ft_timelockanalysis(cfg, data2_lp40); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('lowpass filtering 40Hz') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | %% boxcar 0.25ms > | cfg = []; > | cfg.boxcar = 0.25; > | data1_box = ft_preprocessing(cfg, data1); > | data2_box = ft_preprocessing(cfg, data2); > | > | cfg = []; > | cfg.keeptrials = 'yes'; > | timelock1 = ft_timelockanalysis(cfg, data1_box); > | timelock2 = ft_timelockanalysis(cfg, data2_box); > | > | diff = timelock1; > | diff.avg = timelock1.avg-timelock2.avg; > | > | figure;plot(t,[timelock1.avg' timelock2.avg' diff.avg']); > | > | cfg = []; > | cfg.design = [ 1*ones(1,ntrials) 2*ones(1,ntrials) ]; > | cfg.ivar = 1; > | cfg.method = 'montecarlo'; > | cfg.statistic = 'indepsamplesT'; > | cfg.correctm = 'cluster'; > | cfg.numrandomization = 5000; > | stat = ft_timelockstatistics(cfg, timelock1, timelock2); > | > | figure; > | subplot(4,1,1); plot(stat.time, stat.stat); ylabel('t-value'); > | title('boxcar filter 0.25s') > | subplot(4,1,2); plot(diff.time, diff.avg); ylabel('avg1-avg2 (uV)'); > | subplot(4,1,3); semilogy(stat.time, stat.prob); ylabel('prob'); > | subplot(4,1,4); plot(stat.time, stat.mask); ylabel('significant'); > | > | > | > | > | > | On 26 June 2018 at 17:16, Simanova, I. (Irina) < > i.simanova at donders.ru.nl > > | wrote: > | > | > | > | Dear experts, > | > | We recently submitted a paper where we use a cluster permutation > analysis of > | ERFs (testing conditions exchangeability) . The EEG was sampled at 500 > Hz and > | low-pass filtered at 40 Hz during preprocessing. One of the reviewers has > | indicated that u sing this temporal resolution for the analysis seems > | unnecessary given the low-pass filter, which makes each time point not > | independent due to smoothing. He further asks: " Do all key significant > | components replicate if the analysis is performed using a mean amplitude > that > | is averaged for larger time bins (25 ms bins) instead of individual time > | points?" > | > | I understand that when doing parametric analysis one might want to > reduce the > | number of comparisons by averaging ERF samples over time bins. But here > we > | solve the MCP with the cluster analysis. But it also seems like the > reviewer is > | concerned about non-independecy in the data resulting from low-pass > filtering. > | I wanted to check with you: can smoothing time-series indeed compromise > the > | cluster-based analysis (e.g. affect the cluster size)? > | > | Thank you, > | Kind regards, > | Irina > | > | > | > | > | _______________________________________________ > | fieldtrip mailing list > | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > | https://doi.org/10.1371/journal.pcbi.1002202 > | > | > | _______________________________________________ > | fieldtrip mailing list > | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > | https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2018-06-27 15-11-38.png Type: image/png Size: 58548 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: untitled.png Type: image/png Size: 13832 bytes Desc: not available URL: From i.simanova at donders.ru.nl Thu Jun 28 11:46:12 2018 From: i.simanova at donders.ru.nl (Simanova, I. (Irina)) Date: Thu, 28 Jun 2018 09:46:12 +0000 Subject: [FieldTrip] low-pass filtering Message-ID: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> Hi Diego, Hi Matthias, Dear Burkhard, Thank you very much for your replies, they are very helpful. My intuition was that the permutation test should not be affected by the filtering, because any non-independecy would be identical in the real and permuted data. And I would also expect that averaging over 25 ms reduces the data and removes all effects. The simulation (thank you, Diego), and the comment on the bandwidth (thanks Burkhard) make it really clear. We will indeed rerun the analysis on downsampled data to 125hz, and I do not expect to see much difference from the original analysis, same as in Diego’s simulation. Best, Irina From dlozanosoldevilla at gmail.com Thu Jun 28 11:53:09 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Thu, 28 Jun 2018 11:53:09 +0200 Subject: [FieldTrip] low-pass filtering In-Reply-To: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> References: <3FB34B31-FDE9-482C-BDC8-450502703538@donders.ru.nl> Message-ID: You're welcome Irina! Best wishes for the review process! Cheers, Diego On 28 June 2018 at 11:46, Simanova, I. (Irina) wrote: > Hi Diego, Hi Matthias, Dear Burkhard, > > Thank you very much for your replies, they are very helpful. > > My intuition was that the permutation test should not be affected by the > filtering, because any non-independecy would be identical in the real and > permuted data. And I would also expect that averaging over 25 ms reduces > the data and removes all effects. The simulation (thank you, Diego), and > the comment on the bandwidth (thanks Burkhard) make it really clear. We > will indeed rerun the analysis on downsampled data to 125hz, and I do not > expect to see much difference from the original analysis, same as in > Diego’s simulation. > > Best, > Irina > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alessandro.orticoni at gmail.com Thu Jun 28 17:22:03 2018 From: alessandro.orticoni at gmail.com (Alessandro Orticoni) Date: Thu, 28 Jun 2018 17:22:03 +0200 Subject: [FieldTrip] [Fieldtrip] Line noise Removal Message-ID: Dear experts, I'm basically a beginner in coding with Fieldtrip, and I'm having a problem with line noise filtering. I would like to remove it from the heart rate signal, and I tried just typing 'yes' at the option cfg.dftfilter. But is doesn't seem to work, since the power spectrum contains the 50Hz and her harmonics even after the filtering. You can find the code in the following lines: %% ===FREQUENCY Pre Filtering VERIFICATION=== fs=data.fsample; cfg = []; cfg.output = 'pow'; cfg.channel = 'ECG 2'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz = ft_freqanalysis(cfg, data_epoched_Cz); %% ===Plot Spectra=== figure; plot(freq_epoched_Cz.freq,mag2db(freq_epoched_Cz.powspctrm)); %% ===Filtering=== cfg = []; cfg.channel = {'ECG 2'}; cfg.dftfilter = 'yes'; ECG_Filtered = ft_preprocessing(cfg,data_Cz); cfg = []; cfg.length = 30; % in seconds; cfg.overlap = 0; data_epoched_ECG_Filtered = ft_redefinetrial(cfg, ECG_Filtered); cfg = []; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz_Filtered = ft_freqanalysis(cfg, data_epoched_ECG_Filtered); %% ===Plot Spectra=== plot(freq_epoched_Cz_Filtered.freq,mag2db(freq_epoched_Cz_Filtered.powspctrm)); Thanks a lot. Kind regards, Alessandro Orticoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 28 18:35:34 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 28 Jun 2018 16:35:34 +0000 Subject: [FieldTrip] [Fieldtrip] Line noise Removal In-Reply-To: References: Message-ID: <57F427CD-DB64-4A98-A8D6-55810F80E4AA@donders.ru.nl> Dear Alessandro, Given the code you provided it looks as if you have one single very long trial that you subject to dft-filtering. If the power line fluctuations actually do vary a bit in amplitude, which is likely (particularly given long sections of data), the pure 50 (or 60) Hz sinusoid will get some ‘bandwidth’, so the removal won’t be perfect. I’d recommend to call ft_redefinetrial first, and then do a second call to ft_preprocessing with the dftfilter switched on. Yet, I’d expect that with 30 s segments it still won’t work that well. In this case you could widen the notch a bit by specifying cfg.dftfreq = 50+(-n:n)./30;, with n put to a small number, e.g. <=3. However, unless you have good reasons to have the data chopped in half-minute segments, I’d also consider to reduce this length, because you probably do not need to have a 1/30 Hz frequency resolution in your spectral decomposition. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Associate PI, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 28 Jun 2018, at 16:22, Alessandro Orticoni > wrote: Dear experts, I'm basically a beginner in coding with Fieldtrip, and I'm having a problem with line noise filtering. I would like to remove it from the heart rate signal, and I tried just typing 'yes' at the option cfg.dftfilter. But is doesn't seem to work, since the power spectrum contains the 50Hz and her harmonics even after the filtering. You can find the code in the following lines: %% ===FREQUENCY Pre Filtering VERIFICATION=== fs=data.fsample; cfg = []; cfg.output = 'pow'; cfg.channel = 'ECG 2'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz = ft_freqanalysis(cfg, data_epoched_Cz); %% ===Plot Spectra=== figure; plot(freq_epoched_Cz.freq,mag2db(freq_epoched_Cz.powspctrm)); %% ===Filtering=== cfg = []; cfg.channel = {'ECG 2'}; cfg.dftfilter = 'yes'; ECG_Filtered = ft_preprocessing(cfg,data_Cz); cfg = []; cfg.length = 30; % in seconds; cfg.overlap = 0; data_epoched_ECG_Filtered = ft_redefinetrial(cfg, ECG_Filtered); cfg = []; cfg.output = 'pow'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.pad = 'nextpow2'; cfg.foilim = [0.3 fs/2]; % teorema di Nyquist freq_epoched_Cz_Filtered = ft_freqanalysis(cfg, data_epoched_ECG_Filtered); %% ===Plot Spectra=== plot(freq_epoched_Cz_Filtered.freq,mag2db(freq_epoched_Cz_Filtered.powspctrm)); Thanks a lot. Kind regards, Alessandro Orticoni _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yadwinder.kaur at stud.uni-greifswald.de Sat Jun 30 15:06:19 2018 From: yadwinder.kaur at stud.uni-greifswald.de (Yadwinder Kaur) Date: Sat, 30 Jun 2018 15:06:19 +0200 Subject: [FieldTrip] Concatenate different size of trials into single one trial Message-ID: Dear All I have pre-processed my EEG data cutting into different trials (35 trials total) using fieldtrip , now I wish to concatenate them into one single data matrix. The length of each trial varies form each other. ofcourse, ft_appenddata didn't work in this case. I would highly appreciate any help to solve this issue. Thanks in advance. Regards Yadwinder -------------- next part -------------- An HTML attachment was scrubbed... URL: